mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix bug cant approve the refund because booking amount cant be updated, error - Booking Amount cannot be less than xxxxx
This commit is contained in:
@@ -81,7 +81,7 @@ class UpdateBookingAmountLogic extends AbstractControllerLogic
|
||||
|
||||
$minimum_amount = $booking->fix_amount - $this->calculatesBookingOutstanding->execute($booking);
|
||||
|
||||
if ((float)$input_amount < $minimum_amount) {
|
||||
if (((float)$input_amount + 0.01) < (float)$minimum_amount) {
|
||||
throw new MalformedRequestException('Booking Amount cannot be less than '. $minimum_amount .'.');
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ class UpdateRefundTransactionStatusLogic extends AbstractControllerLogic
|
||||
$this->updatesTransactionStatus->execute($po_transaction, (float) number_format($po_transaction->amount, 2, '.', '') === (float) number_format((float)$booking->fix_amount - $refundAmount, 2, '.', '') ? ApprovalStatus::PENDING_VERIFICATION : ApprovalStatus::PENDING_SUBMISSION);
|
||||
}
|
||||
|
||||
$request['fix_amount'] = $paidAmount;
|
||||
$request['fix_amount'] = $booking->fix_amount - $refundAmount;
|
||||
$request->route()->setParameter('id', $booking->id);
|
||||
$this->updateBookingAmountLogic->execute($request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user