Possibility to find operations with unknown category/account
This commit is contained in:
parent
aec66e7212
commit
ab176b9fc3
|
@ -1,4 +1,4 @@
|
||||||
v0.2_dev (29/01/2011)
|
v0.2_dev (09/02/2011)
|
||||||
|
|
||||||
** User **
|
** User **
|
||||||
Better use of sizers (so better interface!)
|
Better use of sizers (so better interface!)
|
||||||
|
@ -6,6 +6,7 @@ v0.2_dev (29/01/2011)
|
||||||
Better fit of interface when displaying grouped operations
|
Better fit of interface when displaying grouped operations
|
||||||
Show stats for current month even if next month has not been generated
|
Show stats for current month even if next month has not been generated
|
||||||
Possibility to choose a replacement when deleting accounts and categories
|
Possibility to choose a replacement when deleting accounts and categories
|
||||||
|
Possibility to find operations with unknown category/account
|
||||||
|
|
||||||
** Dev **
|
** Dev **
|
||||||
Use a factory to create panels (prepare for plug-in)
|
Use a factory to create panels (prepare for plug-in)
|
||||||
|
|
|
@ -1421,8 +1421,8 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||||
for (; it != accounts.end(); it++)
|
for (; it != accounts.end(); it++)
|
||||||
req += wxT("', '") + *it ;
|
req += wxT("', '") + *it ;
|
||||||
|
|
||||||
req += wxT("')");
|
req += wxT("'))");
|
||||||
req += wxT(" OR user ='") + user->_id + wxT("')");
|
// req += wxT(" OR user ='") + user->_id + wxT("')");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1443,7 +1443,7 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||||
req += wxT(", month ") + user->_preferences[wxT("operation_order")] ;
|
req += wxT(", month ") + user->_preferences[wxT("operation_order")] ;
|
||||||
req += wxT(", day ") + 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);
|
EXECUTE_SQL_QUERY(req, set, res);
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : KissPanel(kiss, parent
|
||||||
_amountTo = new wxTextCtrl(this, wxID_ANY);
|
_amountTo = new wxTextCtrl(this, wxID_ANY);
|
||||||
|
|
||||||
_category = new wxCheckListBox(this, wxID_ANY);
|
_category = new wxCheckListBox(this, wxID_ANY);
|
||||||
|
_category->Append(_("Unknown"));
|
||||||
for(categoryIt = user->_categories.begin(); categoryIt != user->_categories.end(); categoryIt++)
|
for(categoryIt = user->_categories.begin(); categoryIt != user->_categories.end(); categoryIt++)
|
||||||
_category->Append(categoryIt->name);
|
_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);
|
_optype = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, stypes);
|
||||||
|
|
||||||
_account = new wxCheckListBox(this, wxID_ANY);
|
_account = new wxCheckListBox(this, wxID_ANY);
|
||||||
|
_account->Append(_("Unknown"));
|
||||||
for(accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); accountIt++)
|
for(accountIt = user->_accounts.begin(); accountIt != user->_accounts.end(); accountIt++)
|
||||||
_account->Append(accountIt->name);
|
_account->Append(accountIt->name);
|
||||||
|
|
||||||
|
@ -223,7 +225,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||||
|
|
||||||
for(i=0; i<user->GetCategoriesNumber(); i++)
|
for(i=0; i<user->GetCategoriesNumber(); i++)
|
||||||
if (_category->IsChecked(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(0)) ? FIX_OP : 0;
|
||||||
types |= (_optype->IsChecked(1)) ? NON_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++)
|
for(i=0; i<user->GetAccountsNumber(); i++)
|
||||||
if (_account->IsChecked(i))
|
if (_account->IsChecked(i))
|
||||||
accounts.push_back(user->_accounts[i].id);
|
accounts.push_back((i) ? user->_accounts[i].id : wxT("0"));
|
||||||
|
|
||||||
if (_operations)
|
if (_operations)
|
||||||
delete _operations;
|
delete _operations;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user