From 142837b59eb9b519b96fa80bfc1b8c964e749a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 10 Feb 2011 20:04:33 +0100 Subject: [PATCH] Bug in previous commit --- src/model/Database.cpp | 2 +- src/view/SearchPanel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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;