Simplify UpdateNextMonths function

Add "create_if_not_exsits" to Database::GetAccountAmount
This commit is contained in:
2013-02-17 18:58:32 +01:00
parent fcc7d09071
commit e0efe42b14
6 changed files with 48 additions and 93 deletions

View File

@@ -99,9 +99,9 @@ User* KissCount::GetUser()
return _user;
}
int KissCount::GetAccountAmount(int id, int month, int year, bool* had_value)
int KissCount::GetAccountAmount(int id, int month, int year, bool* had_value, bool create_if_not_exsits)
{
return _db->GetAccountAmount(id, month, year, had_value);
return _db->GetAccountAmount(id, month, year, had_value, create_if_not_exsits);
}
int KissCount::CalcAccountAmount(int id, int month, int year, bool* had_values)

View File

@@ -77,7 +77,7 @@ public:
int MetaAmount(int id);
int MetaPositiveAmount(int id);
int GetAccountAmount(int id, int month, int year, bool* had_values=0);
int GetAccountAmount(int id, int month, int year, bool* had_values=0, bool create_if_not_exsits=true);
void SetAccountAmount(int accountId, int month, int year, int value);
int CalcAccountAmount(int id, int month, int year, bool* had_values);