Fix amount, make it positive.

This commit is contained in:
James Cole 2015-09-30 19:43:02 +02:00
parent 05ddcc169d
commit 3750a00b5f

View File

@ -33,7 +33,7 @@ class ChartJsBillChartGenerator implements BillChartGenerator
/** @var TransactionJournal $entry */
foreach ($paid as $entry) { // loop paid and create single entry:
$paidDescriptions[] = $entry->description;
$paidAmount = bcadd($paidAmount, $entry->amount);
$paidAmount = bcadd($paidAmount, $entry->amount_positive);
}
/** @var Bill $entry */
foreach ($unpaid as $entry) { // loop unpaid: