From e63e3e707f2f05c036fbf5bd8a4273fd45b99f97 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sun, 9 Jun 2024 12:44:19 +0800 Subject: [PATCH] 'Your Payment Proof' feature missing for order with storage invoices through group payment --- app/Http/Resources/TransactionWithStorageResource.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Resources/TransactionWithStorageResource.php b/app/Http/Resources/TransactionWithStorageResource.php index 42f42cc0..52f35fdf 100644 --- a/app/Http/Resources/TransactionWithStorageResource.php +++ b/app/Http/Resources/TransactionWithStorageResource.php @@ -92,8 +92,10 @@ class TransactionWithStorageResource extends JsonResource //For 'Your Payment Proof' at frontend if($group_payment_history_query && count($group_payment_history_query) > 0){ - foreach ($payment_history as $item) { - $item['payment_reference'] = $this->getReferenceForGroupPayment($group_payment_history_query); + if($this->getReferenceForGroupPayment($group_payment_history_query)){ + foreach ($payment_history as $item) { + $item['payment_reference'] = $this->getReferenceForGroupPayment($group_payment_history_query); + } } }