mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
Merge branch 'fixinvoice' into 'master'
changing epsilon float to 0.01 See merge request CIEFWorldwideSdnBhd/exchange!158
This commit is contained in:
@@ -100,7 +100,7 @@ class InvoiceController extends Controller
|
||||
$billing_charges = $booking->billing_charge;
|
||||
$total = $subtotal + $adjustment + $billing_charges;
|
||||
|
||||
if (abs($total-$booking->bia) < PHP_FLOAT_EPSILON) {
|
||||
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
|
||||
], 400);
|
||||
@@ -227,9 +227,9 @@ class InvoiceController extends Controller
|
||||
$billing_charges = $booking->billing_charge;
|
||||
$total = $subtotal + $adjustment + $billing_charges;
|
||||
|
||||
if (abs($total-$booking->bia) < PHP_FLOAT_EPSILON) {
|
||||
if (abs($total-$booking->bia) > 0.01) {
|
||||
return response()->json([
|
||||
'message' => 'Booking amount expected is '.$booking->bia.'. Your Invoice amount is '.$total
|
||||
'message' => 'Booking amount expected is '.gettype($booking->bia).'. Your Invoice amount is '.gettype($total)
|
||||
], 400);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user