Merge branch 'dillon/74-admin-workflow' into dillon/74-admin-workflow-2-20250228

This commit is contained in:
Dillon Ngo
2025-02-28 16:15:16 +08:00
parent 45b005944d
commit 3ddff13402
@@ -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);