From 9382a49821e3634f96b06f82f458ac0f1149fdfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sun, 18 Feb 2018 10:30:00 +0100 Subject: [PATCH] Don't count virtual operations in check mode --- ChangeLog | 3 ++- src/model/Database.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8cabea2..739ece5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -v0.7 (06/01/2018) +v0.7 (18/02/2018) ** User ** Set background calendar color to red or yellow when one account is negative or less than 200€ (configurable) Add start date and end date for accounts, so don't need to hide it when it's closed @@ -22,6 +22,7 @@ v0.7 (06/01/2018) Amount in SearchBanner were badly set (missing *100) Prevent integer overflow when computing percents in CostRepartitionBanner Fix some bugs in yearTo selection & fill in GenerateDialog + Don't count virtual operations in check mode v0.6 (08/10/2016) ** User ** diff --git a/src/model/Database.cpp b/src/model/Database.cpp index 74dbe82..4d80c3b 100644 --- a/src/model/Database.cpp +++ b/src/model/Database.cpp @@ -1778,6 +1778,7 @@ std::map* Database::GetNotChecked(User* user, int month, int year) req = "SELECT SUM(amount) AS amount FROM operation WHERE account='" + QString::number(accountIt->id) + "'"; req += " AND checked='0'"; req += " AND meta='0'"; + req += " AND virtual='0'"; req += " AND (year < '" + QString::number(year) + "'" ; req += " OR (year == '" + QString::number(year) + "'" ; req += " AND month < '" + QString::number(month) + "'" ;