From 96093e313a35713c49286db8f558893aad809f72 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 19 Apr 2025 05:47:43 +0200 Subject: [PATCH] Fix nullpointer in bill chart controller. --- app/Http/Controllers/Chart/BillController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index a5ab00b99b..737698fc6e 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -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');