fix bug with amount not matching

This commit is contained in:
omair saleh
2020-09-29 17:19:26 +08:00
parent df3972cf54
commit 89d13924fc
+1 -1
View File
@@ -99,7 +99,7 @@ class InvoiceController extends Controller
$adjustment = $request->adjustment;
$billing_charges = $booking->billing_charge;
$total = $subtotal + $adjustment + $billing_charges;
echo 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