From 545b1917352fe12bc91b57b7eec7ef75a102b51c Mon Sep 17 00:00:00 2001 From: omair saleh Date: Wed, 9 Mar 2022 16:23:06 +0800 Subject: [PATCH] fix wallet balance --- .../Bookings/ControllersLogic/CreateBookingPaymentLogic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php index 332c9104..ba568543 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingPaymentLogic.php @@ -121,7 +121,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic /** @var Wallet $wallet */ $wallet = $booking->company->wallets()->first(); - if($wallet->amount < round($amount, 2)){ + if(round($wallet->amount) < round($amount, 2)){ dd($wallet->amount, round($amount, 2)); throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.'); }