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;