Update TODO
Add Documentation Add KissCount URL into about Add Fix, non fix, both criteria into search Fix a bug (modifying language and go to another panel than main)
This commit is contained in:
@@ -52,7 +52,7 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : wxScrolledWindow(&(*pa
|
||||
_checkDateFrom->SetValue(wxT("1"));
|
||||
_checkDateTo->SetValue(wxT("1"));
|
||||
|
||||
wxGridBagSizer *gridBagSizer = new wxGridBagSizer(3, 9);
|
||||
wxGridBagSizer *gridBagSizer = new wxGridBagSizer(3, 10);
|
||||
|
||||
firstOfMonth.SetToCurrent();
|
||||
firstOfMonth.SetDay(1);
|
||||
@@ -72,6 +72,10 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : wxScrolledWindow(&(*pa
|
||||
_category = new wxCheckListBox(this, wxID_ANY);
|
||||
for(categoryIt = user->_categories.begin(); categoryIt != user->_categories.end(); categoryIt++)
|
||||
_category->Append(categoryIt->name);
|
||||
|
||||
wxString fixop[] = {_("Both"), _("Fix"), _("Non fix")};
|
||||
_fix = new wxRadioBox(this, wxID_ANY, _("Operations"), wxDefaultPosition, wxDefaultSize, 3, fixop);
|
||||
|
||||
_account = new wxCheckListBox(this, wxID_ANY);
|
||||
for(accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); accountIt++)
|
||||
_account->Append(accountIt->name);
|
||||
@@ -96,8 +100,9 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : wxScrolledWindow(&(*pa
|
||||
gridBagSizer->Add(_amountTo, wxGBPosition(1, 4));
|
||||
gridBagSizer->Add(labelCategory, wxGBPosition(0, 5));
|
||||
gridBagSizer->Add(_category, wxGBPosition(1, 5));
|
||||
gridBagSizer->Add(labelAccount, wxGBPosition(0, 6));
|
||||
gridBagSizer->Add(_account, wxGBPosition(1, 6));
|
||||
gridBagSizer->Add(_fix, wxGBPosition(1, 6));
|
||||
gridBagSizer->Add(labelAccount, wxGBPosition(0, 7));
|
||||
gridBagSizer->Add(_account, wxGBPosition(1, 7));
|
||||
gridBagSizer->Add(_searchButton, wxGBPosition(2, 0));
|
||||
|
||||
vbox->Add(gridBagSizer);
|
||||
@@ -126,7 +131,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||
std::vector<wxString> categories, accounts;
|
||||
wxDateTime *dateFrom=NULL, *dateTo=NULL;
|
||||
User* user= _kiss->GetUser();
|
||||
int i;
|
||||
int i, fix;
|
||||
std::vector<Operation>::iterator it;
|
||||
double af, at;
|
||||
|
||||
@@ -202,6 +207,13 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||
if (_category->IsChecked(i))
|
||||
categories.push_back(user->_categories[i].id);
|
||||
|
||||
if (_fix->IsItemEnabled(FIX_OP))
|
||||
fix = FIX_OP;
|
||||
if (_fix->IsItemEnabled(NON_FIX_OP))
|
||||
fix = NON_FIX_OP;
|
||||
else
|
||||
fix = BOTH;
|
||||
|
||||
for(i=0; i<user->GetAccountsNumber(); i++)
|
||||
if (_account->IsChecked(i))
|
||||
accounts.push_back(user->_accounts[i].id);
|
||||
@@ -209,7 +221,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||
if (_operations)
|
||||
delete _operations;
|
||||
|
||||
_operations = _kiss->Search(description, dateFrom, dateTo, amountFrom, amountTo, categories, accounts);
|
||||
_operations = _kiss->Search(description, dateFrom, dateTo, amountFrom, amountTo, categories,fix, accounts);
|
||||
|
||||
if (_operations->size() > 1)
|
||||
wxMessageBox(wxString::Format(wxT("%d"), _operations->size()) + _(" entries found"), wxT("KissCount"), wxICON_INFORMATION | wxOK);
|
||||
|
||||
Reference in New Issue
Block a user