From fa4e16a7211df6e1f9dd85508bf82b93a1d6b9a7 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Wed, 15 Feb 2023 15:46:01 +0800 Subject: [PATCH] update customer's account --- app/Http/Resources/WalletTransactionResource.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Http/Resources/WalletTransactionResource.php b/app/Http/Resources/WalletTransactionResource.php index 95db6492..53f18364 100644 --- a/app/Http/Resources/WalletTransactionResource.php +++ b/app/Http/Resources/WalletTransactionResource.php @@ -29,9 +29,14 @@ class WalletTransactionResource extends JsonResource break; case 1: $booking = Transaction::where('payment_reference', $this->bill_no)->first()->owner; - $marking = $booking ? $booking->marking : null; - $description = 'Payment For booking refs.'. $marking ? ''.$marking.'' : 'Please ask Tech Support'; + if(!$booking) { + $description = 'Payment for unknown booking, please contact tech support.'; + break; + } + + $marking = $booking->marking; + $description = 'Payment For booking refs.'.''.$marking.''; break; case 11: $description = 'Debit Voucher for '.$this->payment_reference;