fix bug with amount not matching

This commit is contained in:
omair saleh
2020-09-29 17:33:15 +08:00
parent 5d89d88194
commit 97fc1c9bd7
+4 -1
View File
@@ -102,9 +102,12 @@ class InvoiceController extends Controller
if (abs($total-$booking->bia) > 0.01) {
return response()->json([
'message' => 'Booking amount expected is '.$booking->bia.'. Your Invoice amount is '.$total.' '.PHP_FLOAT_EPSILON
'message' => 'Booking amount expected is '.$booking->bia.'. Your Invoice amount is '.$total
], 400);
}
return response()->json([
'message' => 'successful'
], 400);
// Write to database if does not exist
$exist = Invoice::where('booking_id', $id)->first();