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();