wip
This commit is contained in:
@@ -142,3 +142,27 @@ std::map<int, std::vector<int> > KissCount::GetAllOperations()
|
||||
{
|
||||
return _db->GetAllOperations(_user);
|
||||
}
|
||||
|
||||
void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo)
|
||||
{
|
||||
std::vector<operation>::iterator it;
|
||||
operation op;
|
||||
|
||||
_db->GenerateMonth(_user, monthFrom, yearFrom, monthTo, yearTo);
|
||||
if (monthFrom != -1 && yearFrom != -1)
|
||||
{
|
||||
LoadYear(yearFrom, false);
|
||||
|
||||
for(it = (*_user->_operations[yearFrom])[monthFrom].begin();
|
||||
it != (*_user->_operations[yearFrom])[monthFrom].end()
|
||||
&& it->fix_cost;
|
||||
it++)
|
||||
{
|
||||
op = *it;
|
||||
op.month = monthTo;
|
||||
op.year = yearTo;
|
||||
AddOperation(op);
|
||||
}
|
||||
}
|
||||
_wxUI->GenerateMonth(monthTo, yearTo);
|
||||
}
|
||||
|
@@ -37,6 +37,8 @@ class KissCount
|
||||
void DeleteCategory(struct category category);
|
||||
|
||||
std::map<int, std::vector<int> > GetAllOperations();
|
||||
|
||||
void GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo);
|
||||
private:
|
||||
wxUI* _wxUI;
|
||||
Database* _db;
|
||||
|
Reference in New Issue
Block a user