fix bug with balance payment by rounding up to 2 decimal

This commit is contained in:
omair saleh
2021-10-11 16:33:21 +08:00
parent fd99a7863b
commit f5d7da493c
@@ -80,7 +80,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic
$outstanding = $this->calculatesBookingOutstanding->execute($booking);
if($conversionObject->getAmount() > $outstanding) throw new MalformedRequestException('Your payment must not be greater than '. $outstanding .'.');
if($conversionObject->getAmount() > round($outstanding, 2)) throw new MalformedRequestException('Your payment must not be greater than '. $outstanding .'.');
$configurations = $this->fetchBookingQuotation->execute($booking->company, $conversionObject);