From 13dd19d0a1348c979022de494fdd583813c431ae Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 12 Aug 2024 22:29:04 +0800 Subject: [PATCH] Fix an error with refund for transaction that used a voucher earlier, get discount amount for voucher so to get details breakdown --- .../Bookings/ControllersLogic/CreateBookingRefundLogic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php index 6a7510c2..6e6b2233 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php @@ -130,7 +130,7 @@ class CreateBookingRefundLogic extends AbstractControllerLogic $quotationBeforeCurrentRefund = $this->fetchBookingQuotation->execute($booking->company, $conversionObjectBeforeCurrentRefund, $voucherCode, $redemptionId); - $quotationAfterRefund = $this->fetchBookingQuotation->execute($booking->company, $conversionObjectAfterRefund, $voucherCode); + $quotationAfterRefund = $this->fetchBookingQuotation->execute($booking->company, $conversionObjectAfterRefund, $voucherCode, $redemptionId); $service_charges_to_refund = $isFullyRefund ? $quotationBeforeCurrentRefund->getServiceCharge() : $quotationBeforeCurrentRefund->getServiceCharge() - $quotationAfterRefund->getServiceCharge();