diff --git a/model/Database.cpp b/model/Database.cpp index d22881d..7017268 100644 --- a/model/Database.cpp +++ b/model/Database.cpp @@ -342,9 +342,7 @@ void Database::UpdateOperation(Operation op) req += wxT(", checked='0'"); req += wxT(" WHERE id='") + op.id + wxT("'"); - //std::cout << req.mb_str() << "\n"; EXECUTE_SQL_UPDATE(req, ); - } wxString Database::AddOperation(User* user, Operation op) @@ -704,15 +702,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 = wxT("SELECT amount FROM operation WHERE") ; + req = wxT("SELECT SUM(amount) AS total FROM operation WHERE") ; req += wxT(" account='") + it->id + wxT("'"); req += wxT(" AND year='") + wxString::Format(wxT("%d"), yearFrom) + wxT("'"); req += wxT(" AND month='") + wxString::Format(wxT("%d"), monthFrom) + wxT("'"); EXECUTE_SQL_QUERY(req, set, ); - while (set.NextRow()) - amount += set.GetDouble(wxT("amount")); + if (set.NextRow()) + amount += set.GetDouble(wxT("total")); req = wxT("SELECT amount FROM account_amount WHERE") ; req += wxT(" account='") + it->id + wxT("'"); diff --git a/ressources/Search-icon.png b/ressources/Search-icon.png new file mode 100644 index 0000000..ce9986c Binary files /dev/null and b/ressources/Search-icon.png differ diff --git a/ressources/system-log-out.png b/ressources/system-log-out.png new file mode 100644 index 0000000..c5b1fbf Binary files /dev/null and b/ressources/system-log-out.png differ diff --git a/ressources/tick-icon.png b/ressources/tick-icon.png new file mode 100644 index 0000000..f92dc0d Binary files /dev/null and b/ressources/tick-icon.png differ diff --git a/ressources/windows-users-icon.png b/ressources/windows-users-icon.png new file mode 100644 index 0000000..ebbe1c0 Binary files /dev/null and b/ressources/windows-users-icon.png differ