From 3f48beba3a8ca0fab05ecbd809a82ef4f8a369fd Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 29 Sep 2020 17:21:00 +0800 Subject: [PATCH] fix bug with amount not matching --- app/Http/Controllers/InvoiceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 141ad477..a7765b0f 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -99,7 +99,7 @@ class InvoiceController extends Controller $adjustment = $request->adjustment; $billing_charges = $booking->billing_charge; $total = $subtotal + $adjustment + $billing_charges; - +dd(abs($total-$booking->bia)); if (abs($total-$booking->bia) < PHP_FLOAT_EPSILON) { return response()->json([ 'message' => 'Booking amount expected is '.$booking->bia.'. Your Invoice amount is '.$total