mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
Merge branch 'fixinvoice' into 'master'
fixed compare double values validation See merge request CIEFWorldwideSdnBhd/exchange!157
This commit is contained in:
@@ -100,7 +100,7 @@ class InvoiceController extends Controller
|
||||
$billing_charges = $booking->billing_charge;
|
||||
$total = $subtotal + $adjustment + $billing_charges;
|
||||
|
||||
if ($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
|
||||
], 400);
|
||||
@@ -227,7 +227,7 @@ class InvoiceController extends Controller
|
||||
$billing_charges = $booking->billing_charge;
|
||||
$total = $subtotal + $adjustment + $billing_charges;
|
||||
|
||||
if ($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
|
||||
], 400);
|
||||
|
||||
Reference in New Issue
Block a user