It is better to test before commiting ...
This commit is contained in:
parent
521596abd5
commit
7af9f1d9c2
|
@ -1308,12 +1308,16 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
|
||||||
req += wxT("')");
|
req += wxT("')");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
|
||||||
|
|
||||||
if (Fix == FIX_OP)
|
if (Fix == FIX_OP)
|
||||||
req += wxT(" AND fix_cost='1'");
|
{
|
||||||
|
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||||
|
req += wxT(" fix_cost='1'");
|
||||||
|
}
|
||||||
else if (Fix == NON_FIX_OP)
|
else if (Fix == NON_FIX_OP)
|
||||||
req += wxT(" AND fix_cost='0'");
|
{
|
||||||
|
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||||
|
req += wxT(" fix_cost='0'");
|
||||||
|
}
|
||||||
|
|
||||||
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
if (firstCond) req += wxT(" AND ") ; else firstCond = true;
|
||||||
|
|
||||||
|
|
|
@ -207,12 +207,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
|
||||||
if (_category->IsChecked(i))
|
if (_category->IsChecked(i))
|
||||||
categories.push_back(user->_categories[i].id);
|
categories.push_back(user->_categories[i].id);
|
||||||
|
|
||||||
if (_fix->IsItemEnabled(FIX_OP))
|
fix = _fix->GetSelection();
|
||||||
fix = FIX_OP;
|
|
||||||
if (_fix->IsItemEnabled(NON_FIX_OP))
|
|
||||||
fix = NON_FIX_OP;
|
|
||||||
else
|
|
||||||
fix = BOTH;
|
|
||||||
|
|
||||||
for(i=0; i<user->GetAccountsNumber(); i++)
|
for(i=0; i<user->GetAccountsNumber(); i++)
|
||||||
if (_account->IsChecked(i))
|
if (_account->IsChecked(i))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user