From ea83ba13d4f0b68656f957012c24e37987fae98a Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sun, 13 Mar 2022 00:13:26 +0800 Subject: [PATCH] clean up development --- .../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 e6275dad..74e92fa6 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingRefundLogic.php @@ -87,7 +87,7 @@ class CreateBookingRefundLogic extends AbstractControllerLogic $refund = $transaction->transactions()->refunds()->sum('amount'); - if($refund + $request->input('amount') > $transaction->amount) throw new MalformedRequestException('Your refund must not be greater than '. $transaction->original_amount .'.'); + if($refund + $request->input('amount') > $transaction->original_amount) throw new MalformedRequestException('Your refund must not be greater than '. $transaction->original_amount .'.'); $transactionRefundCalculationObject = new TransactionRefundCalculationObject($booking, $transaction, $request->input('amount')); $transactionRefundCalculationObject->init();