From: <sie...@us...> - 2014-01-08 00:44:24
|
Revision: 5848 http://sourceforge.net/p/moneymanagerex/code/5848 Author: siena123 Date: 2014-01-08 00:44:21 +0000 (Wed, 08 Jan 2014) Log Message: ----------- [bugs:#274] fix - home page upcoming transaction value not shown as red negative text for withdraw Modified Paths: -------------- trunk/src/reports/html_widget_bills_and_deposits.cpp Modified: trunk/src/reports/html_widget_bills_and_deposits.cpp =================================================================== --- trunk/src/reports/html_widget_bills_and_deposits.cpp 2014-01-08 00:44:01 UTC (rev 5847) +++ trunk/src/reports/html_widget_bills_and_deposits.cpp 2014-01-08 00:44:21 UTC (rev 5848) @@ -80,7 +80,8 @@ if (payee) payeeStr = payee->PAYEENAME; } Model_Account::Data *account = Model_Account::instance().get(q1.ACCOUNTID); - bd_days.push_back(std::make_tuple(daysRemaining, payeeStr, daysRemainingStr, q1.TRANSAMOUNT, account)); + double amount = (Model_Billsdeposits::type(q1) == Model_Billsdeposits::DEPOSIT ? q1.TRANSAMOUNT : -q1.TRANSAMOUNT); + bd_days.push_back(std::make_tuple(daysRemaining, payeeStr, daysRemainingStr, amount, account)); } //std::sort(bd_days.begin(), bd_days.end()); @@ -102,8 +103,7 @@ hb.startTableRow(); hb.addTableCell(std::get<1>(item), false, true); //payee - hb.addTableCell(Model_Account::toCurrency(std::get<3>(item) - , std::get<4>(item)), true); + hb.addCurrencyCell(std::get<3>(item), Model_Account::currency(std::get<4>(item))); //Draw it as numeric that mean align right hb.addTableCell(std::get<2>(item), true, false, false, colorStr); hb.endTableRow(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |