From 069a6a51d8f93e0d6ec0d28c4b2805845ea66ac2 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Wed, 25 Jun 2025 20:35:45 +0800 Subject: [PATCH] E-Invoice - Fix a problem reported by Sin Yee where e invoice or e credit note not using address submitted for einvoicing --- resources/views/pages/pdfs/e_credit_note.blade.php | 2 +- resources/views/pages/pdfs/e_invoice.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/pages/pdfs/e_credit_note.blade.php b/resources/views/pages/pdfs/e_credit_note.blade.php index 82698014..aa4c67d8 100644 --- a/resources/views/pages/pdfs/e_credit_note.blade.php +++ b/resources/views/pages/pdfs/e_credit_note.blade.php @@ -57,7 +57,7 @@
@php - $addresses = $supplier->addresses()->where('billing', '=', true)->first(); + $addresses = $supplier->addresses()->where('e_invoice', '=', true)->latest()->first(); @endphp {{ $addresses->street_one }} {{ $addresses->street_two }} , diff --git a/resources/views/pages/pdfs/e_invoice.blade.php b/resources/views/pages/pdfs/e_invoice.blade.php index b43c371c..2a133bb8 100644 --- a/resources/views/pages/pdfs/e_invoice.blade.php +++ b/resources/views/pages/pdfs/e_invoice.blade.php @@ -43,7 +43,7 @@ @endif
@php - $billingAddress = $supplier->addresses()->where('billing', '=', true)->first(); + $billingAddress = $supplier->addresses()->where('e_invoice', '=', true)->latest()->first(); @endphp
{{ $billingAddress->street_one }}