From kde-commits Mon Apr 30 22:44:06 2012 From: Alvaro Soliverez Date: Mon, 30 Apr 2012 22:44:06 +0000 To: kde-commits Subject: [kmymoney] kmymoney/reports: CashFlow report: Reverse sign of income and expenses to keep consistenc Message-Id: <20120430224406.24AE5A60A9 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133582598110406 Git commit 435fdf0d4fb1d856fe0c475305581c0694b5a32f by Alvaro Soliverez. Committed on 29/04/2012 at 04:04. Pushed by asoliverez into branch 'master'. CashFlow report: Reverse sign of income and expenses to keep consistency with other reports and views BUG:267990 REVIEW:104776 M +5 -0 kmymoney/reports/querytable.cpp http://commits.kde.org/kmymoney/435fdf0d4fb1d856fe0c475305581c0694b5a32f diff --git a/kmymoney/reports/querytable.cpp b/kmymoney/reports/querytable.= cpp index ef809e8..4108144 100644 --- a/kmymoney/reports/querytable.cpp +++ b/kmymoney/reports/querytable.cpp @@ -1267,6 +1267,11 @@ void QueryTable::constructSplitsTable(void) xr =3D splitAcc.deepCurrencyPrice((*it_transaction).postDate()).re= duce(); } = + // reverse the sign of incomes and expenses to keep consistency in t= he way it is displayed in other reports + if (splitAcc.isIncomeExpense()) { + xr =3D -xr; + } + if (splitAcc.isInvest()) { = // use the institution of the parent for stock accounts