From 3ddff134023a280a5f0ad2b42c2967b3c56bc7d8 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Fri, 28 Feb 2025 16:15:16 +0800 Subject: [PATCH] Merge branch 'dillon/74-admin-workflow' into dillon/74-admin-workflow-2-20250228 --- .../Bookings/Processors/CreateBookingPaymentProcessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/Bookings/Processors/CreateBookingPaymentProcessor.php b/app/Classes/Modules/Bookings/Processors/CreateBookingPaymentProcessor.php index ec1233ee..00fe657c 100644 --- a/app/Classes/Modules/Bookings/Processors/CreateBookingPaymentProcessor.php +++ b/app/Classes/Modules/Bookings/Processors/CreateBookingPaymentProcessor.php @@ -119,7 +119,7 @@ class CreateBookingPaymentProcessor if($conversionObject->getAmount() > round($outstanding, 2)) throw new MalformedRequestException('Your payment must not be greater than '. $outstanding .'.'); } - $configurations = $this->fetchBookingQuotation->execute($booking->company, $conversionObject, $voucherCode); + $configurations = $this->fetchBookingQuotation->execute($booking->company, $conversionObject, $voucherCode, null, $booking); $paymentAttemptLimit = $this->fetchesCompanyPaymentAttemptLimit->execute($booking->company); @@ -163,7 +163,7 @@ class CreateBookingPaymentProcessor $transaction = $this->createsTransaction->execute($booking, $object); // $cash_back_transaction = $this->createCashBackTransactionProcessor->execute($transaction); - $this->bookingToVoucherifyProcessor->execute($booking->company->employees()->first(), $transaction, $booking->company->id, $configurations->getSubTotal(), $configurations->getVoucherDiscountAmount(), $voucherCode); + $this->bookingToVoucherifyProcessor->execute($booking->company->employees()->first(), $transaction, $booking->company->id, $configurations->getSubTotal(), $configurations->getServiceCharge(), $configurations->getVoucherDiscountAmount(), $voucherCode); if(PaymentMethodType::PAYMENT_METHODS[$paymentMethod] == PaymentMethodType::WALLET){ $this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);