First version of statistics (very ugly code)

This commit is contained in:
2010-08-17 18:59:19 +02:00
parent 023b1def9d
commit 74c401c8c7
15 changed files with 417 additions and 21 deletions

View File

@@ -336,3 +336,15 @@ bool KissCount::SearchPreviousOperation(Operation* res, wxString& description, i
return true;
}
void KissCount::GetStats(int monthFrom, int yearFrom, int monthTo, int yearTo,
std::map<wxString, std::map<int, std::map<int, double> > >* accountAmounts,
std::map<wxString, double>* categories)
{
wxString monthF = wxString::Format(wxT("%d"), monthFrom);
wxString monthT = wxString::Format(wxT("%d"), monthTo);
wxString yearF = wxString::Format(wxT("%d"), yearFrom);
wxString yearT = wxString::Format(wxT("%d"), yearTo);
_db->GetStats(_user, monthF, yearF, monthT, yearT, accountAmounts, categories);
}

View File

@@ -75,6 +75,11 @@ class KissCount
std::vector<wxString> categories, std::vector<wxString> accounts);
bool SearchPreviousOperation(Operation* res, wxString& description, int month, int year);
void GetStats(int monthFrom, int yearFrom, int monthTo, int yearTo,
std::map<wxString, std::map<int, std::map<int, double> > >* accountAmounts,
std::map<wxString, double>* categories);
private:
wxUI* _wxUI;
Database* _db;