Fix null error [skip ci]

This commit is contained in:
James Cole
2016-03-03 10:46:23 +01:00
parent 4a9b693da8
commit c7250bfcba

View File

@@ -75,7 +75,8 @@ class ChartJsBillChartGenerator implements BillChartGeneratorInterface
/*
* journalAmount has been collected in BillRepository::getJournals
*/
$actualAmount[] = round(bcmul($entry->journalAmount, '-1'), 2);
$journalAmount = $entry->journalAmount ?? '0';
$actualAmount[] = round(bcmul($journalAmount, '-1'), 2);
}
$data['datasets'][] = [