Don't count virtual operations in check mode

This commit is contained in:
Grégory Soutadé 2018-02-18 10:30:00 +01:00
parent 4a8e0326aa
commit 9382a49821
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
v0.7 (06/01/2018) v0.7 (18/02/2018)
** User ** ** User **
Set background calendar color to red or yellow when one account is negative or less than 200€ (configurable) 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 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) Amount in SearchBanner were badly set (missing *100)
Prevent integer overflow when computing percents in CostRepartitionBanner Prevent integer overflow when computing percents in CostRepartitionBanner
Fix some bugs in yearTo selection & fill in GenerateDialog Fix some bugs in yearTo selection & fill in GenerateDialog
Don't count virtual operations in check mode
v0.6 (08/10/2016) v0.6 (08/10/2016)
** User ** ** User **

View File

@ -1778,6 +1778,7 @@ std::map<int, int>* Database::GetNotChecked(User* user, int month, int year)
req = "SELECT SUM(amount) AS amount FROM operation WHERE account='" + QString::number(accountIt->id) + "'"; req = "SELECT SUM(amount) AS amount FROM operation WHERE account='" + QString::number(accountIt->id) + "'";
req += " AND checked='0'"; req += " AND checked='0'";
req += " AND meta='0'"; req += " AND meta='0'";
req += " AND virtual='0'";
req += " AND (year < '" + QString::number(year) + "'" ; req += " AND (year < '" + QString::number(year) + "'" ;
req += " OR (year == '" + QString::number(year) + "'" ; req += " OR (year == '" + QString::number(year) + "'" ;
req += " AND month < '" + QString::number(month) + "'" ; req += " AND month < '" + QString::number(month) + "'" ;