First version of statistics (very ugly code)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user