Possibility to find operations with unknown category/account
This commit is contained in:
@@ -70,6 +70,7 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent
|
||||
_amountTo = new wxTextCtrl(this, wxID_ANY);
|
||||
|
||||
_category = new wxCheckListBox(this, wxID_ANY);
|
||||
_category->Append(_("Unknown"));
|
||||
for(categoryIt = user->_categories.begin(); categoryIt != user->_categories.end(); categoryIt++)
|
||||
_category->Append(categoryIt->name);
|
||||
|
||||
@@ -77,6 +78,7 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent
|
||||
_optype = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, stypes);
|
||||
|
||||
_account = new wxCheckListBox(this, wxID_ANY);
|
||||
_account->Append(_("Unknown"));
|
||||
for(accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); accountIt++)
|
||||
_account->Append(accountIt->name);
|
||||
|
||||
@@ -223,7 +225,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||
|
||||
for(i=0; i<user->GetCategoriesNumber(); i++)
|
||||
if (_category->IsChecked(i))
|
||||
categories.push_back(user->_categories[i].id);
|
||||
categories.push_back((i) ? user->_categories[i].id : wxT("0"));
|
||||
|
||||
types |= (_optype->IsChecked(0)) ? FIX_OP : 0;
|
||||
types |= (_optype->IsChecked(1)) ? NON_FIX_OP : 0;
|
||||
@@ -232,7 +234,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||
|
||||
for(i=0; i<user->GetAccountsNumber(); i++)
|
||||
if (_account->IsChecked(i))
|
||||
accounts.push_back(user->_accounts[i].id);
|
||||
accounts.push_back((i) ? user->_accounts[i].id : wxT("0"));
|
||||
|
||||
if (_operations)
|
||||
delete _operations;
|
||||
|
Reference in New Issue
Block a user