Month generation OK
This commit is contained in:
@@ -632,15 +632,15 @@ void Database::GenerateMonth(User* user, int monthFrom, int yearFrom, int monthT
|
||||
for (it = user->_accounts.begin(); it != user->_accounts.end(); it++)
|
||||
{
|
||||
amount = 0.0;
|
||||
req = _("SELECT SUM(amount) FROM operation WHERE") ;
|
||||
req = _("SELECT amount FROM operation WHERE") ;
|
||||
req += _(" account='") + it->id + _("'");
|
||||
req += _(" AND year='") + wxString::Format(_("%d"), yearFrom) + _("'");
|
||||
req += _(" AND month='") + wxString::Format(_("%d"), monthFrom) + _("'");
|
||||
|
||||
EXECUTE_SQL_QUERY(req, set, );
|
||||
|
||||
if (set.NextRow())
|
||||
amount = set.GetDouble(_("amount"));
|
||||
while (set.NextRow())
|
||||
amount += set.GetDouble(_("amount"));
|
||||
|
||||
req = _("SELECT amount FROM account_amount WHERE") ;
|
||||
req += _(" account='") + it->id + _("'");
|
||||
|
||||
Reference in New Issue
Block a user