diff --git a/src/model/Database.cpp b/src/model/Database.cpp index 7543b48..7172458 100644 --- a/src/model/Database.cpp +++ b/src/model/Database.cpp @@ -1443,7 +1443,7 @@ std::vector* Database::Search(User* user, wxString* description, wxDa req += wxT(", month ") + user->_preferences[wxT("operation_order")] ; req += wxT(", day ") + user->_preferences[wxT("operation_order")] ; - std::cout << req.mb_str() << "\n"; + // std::cout << req.mb_str() << "\n"; EXECUTE_SQL_QUERY(req, set, res); diff --git a/src/view/SearchPanel.cpp b/src/view/SearchPanel.cpp index d7ed322..f8aae6f 100644 --- a/src/view/SearchPanel.cpp +++ b/src/view/SearchPanel.cpp @@ -225,7 +225,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event) for(i=0; iGetCategoriesNumber(); i++) if (_category->IsChecked(i)) - categories.push_back((i) ? user->_categories[i].id : wxT("0")); + categories.push_back((i) ? user->_categories[i-1].id : wxT("0")); types |= (_optype->IsChecked(0)) ? FIX_OP : 0; types |= (_optype->IsChecked(1)) ? NON_FIX_OP : 0; @@ -234,7 +234,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event) for(i=0; iGetAccountsNumber(); i++) if (_account->IsChecked(i)) - accounts.push_back((i) ? user->_accounts[i].id : wxT("0")); + accounts.push_back((i) ? user->_accounts[i-1].id : wxT("0")); if (_operations) delete _operations;