mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 14:33:59 +00:00
E-Invoice - Fix a problem reported by Brian, PO not tally with updated booking amount
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user