From 11506bb857ba1cb63e29a423e263d9862137afac Mon Sep 17 00:00:00 2001 From: Edmond Teh Date: Wed, 23 Sep 2020 22:09:36 +0800 Subject: [PATCH] validate total to bia instead of total in editPO --- app/Http/Controllers/InvoiceController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index c56f38ff..8da96f12 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -216,9 +216,9 @@ class InvoiceController extends Controller $total = array_reduce($subtotalArray, function ($v1, $v2) { return $v1 + $v2; }); - if ($total != $booking->amount) { + if ($total != $booking->bia) { return response()->json([ - 'message' => 'Booking amount expected is '.$booking->amount.'. Your Invoice amount is '.$total + 'message' => 'Booking amount expected is '.$booking->bia.'. Your Invoice amount is '.$total ], 400); }