Fix nullpointer in bill chart controller.

This commit is contained in:
James Cole
2025-04-19 05:47:43 +02:00
parent afe9e88f9a
commit 96093e313a

View File

@@ -179,7 +179,7 @@ class BillController extends Controller
}
$amount = bcmul($journal['amount'], '-1');
if ($this->convertToNative && $currencyId !== $journal['currency_id']) {
$amount = bcmul($journal['native_amount'], '-1');
$amount = bcmul($journal['native_amount'] ?? '0', '-1');
}
if ($this->convertToNative && $currencyId === $journal['foreign_currency_id']) {
$amount = bcmul($journal['foreign_amount'], '-1');