diff --git a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php index 5a5c5001..0ad1680c 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountWithPOLogic.php @@ -86,7 +86,9 @@ class UpdateBookingAmountWithPOLogic extends AbstractControllerLogic return $product['quantity'] * floatval(str_replace(',', '', $product['unit_price'])); }); $bookingAmountUpdate = (float)$bookingAttribute->value; - $isTally = $total === $bookingAmountUpdate ? true : false; + // $isTally = ($total === $bookingAmountUpdate) ? true : false; + $isTally = bccomp($total, $bookingAmountUpdate, 3) === 0; + if(!$isTally){ throw new MalformedRequestException('Purchase Order total not tally with updated booking amount of ' . $bookingAmountUpdate); }