fix partial refund bug

This commit is contained in:
JiaSheng
2024-05-08 12:58:23 +08:00
parent be0c7cfaba
commit 26f8ca87cd
@@ -100,7 +100,7 @@ class UpdateRefundTransactionStatusLogic extends AbstractControllerLogic
$booking = $paymentTransaction->owner;
$reference = $refundTransaction->amount == $paymentTransaction->amount ? 'Fully Refund for Ref. ' . $booking->marking : 'Partially Refund for Ref. ' . $booking->marking;
$reference = $refundTransaction->amount - $paymentTransaction->amount < 0.01 ? 'Fully Refund for Ref. ' . $booking->marking : 'Partially Refund for Ref. ' . $booking->marking;
$refundAmount = $this->calculatesBookingRefundAmount->calculateRefundAmount($paymentTransaction, $booking->fix_currency_id);
@@ -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'] = $booking->fix_amount - $refundAmount;
$request['fix_amount'] = $paidAmount;
$request->route()->setParameter('id', $booking->id);
$this->updateBookingAmountLogic->execute($request);
}