Fix two bugs (No entry in Search Panel and Date in Search (Database))

Add auto detection for account and category using description
Auto add date with curMonth & curYear for new operation
This commit is contained in:
2010-07-17 12:33:39 +02:00
parent de0e7fa1d9
commit cc70c0f804
6 changed files with 72 additions and 9 deletions

View File

@@ -36,13 +36,12 @@ END_EVENT_TABLE()
SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : wxScrolledWindow(&(*parent)), _kiss(kiss), _wxUI(parent), _operations(NULL)
{
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
DEFAULT_FONT(font);
User* user = _kiss->GetUser();
std::vector<Account>::iterator accountIt;
std::vector<Category>::iterator categoryIt;
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
SetSizer(vbox);
_checkDateFrom = new wxCheckBox(this, wxID_ANY, _("Date from"));
@@ -206,7 +205,10 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event)
else if (_operations->size() == 1)
wxMessageBox(_("1 entry found"), wxT("KissCount"), wxICON_INFORMATION | wxOK);
else
wxMessageBox(_("No entry found"), wxT("KissCount"), wxICON_INFORMATION | wxOK);
{
wxMessageBox(_("No entry found"), wxT("KissCount"), wxICON_INFORMATION | wxOK);
return;
}
for(i=1, it = _operations->begin(); it != _operations->end(); it++, i++)
{