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 a4179804be
commit fc3093d176
2 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ v0.3 (16/08/2011)
** Bugs **
Fix a bug in language settings
Virtual transferts must not be considered as a debit
Last account/category wasn't taken in account during search
v0.2 (04/07/2011)

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)) ? Database::CHECKED_OP : 0;
types |= (_optype->IsChecked(3)) ? Database::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"));