Last account/category wasn't taken in account during search

This commit is contained in:
Grégory Soutadé 2011-08-16 20:28:22 +02:00
parent c05fcdc250
commit 6dcb006de9
1 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ std::vector<Operation> * SearchBanner::Search()
*description = _description->GetLineText(0);
}
for(i=0; i<user->GetCategoriesNumber(); i++)
for(i=0; i<user->GetCategoriesNumber()+1; i++)
if (_category->IsChecked(i))
categories.push_back((i) ? user->_categories[i-1].id : wxT("0"));
@ -188,7 +188,7 @@ std::vector<Operation> * SearchBanner::Search()
types |= (_optype->IsChecked(2)) ? CHECKED_OP : 0;
types |= (_optype->IsChecked(3)) ? NOT_CHECKED_OP : 0;
for(i=0; i<user->GetAccountsNumber(); i++)
for(i=0; i<user->GetAccountsNumber()+1; i++)
if (_account->IsChecked(i))
accounts.push_back((i) ? user->_accounts[i-1].id : wxT("0"));