From cbf650c8be75a66b750027e2b41d698d0b9ac893 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sun, 10 Aug 2025 22:50:37 +0800 Subject: [PATCH] E-Invoice - Sales Invoice Report, updated filtering logic --- .../Modules/Exports/Services/ExportsSalesInvoiceReport.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php index cf0a7fe7..5ecc250c 100644 --- a/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php +++ b/app/Classes/Modules/Exports/Services/ExportsSalesInvoiceReport.php @@ -96,6 +96,10 @@ class ExportsSalesInvoiceReport implements FromQuery, WithHeadings, WithHeadingR return $records; } + if($company->e_invoice === 1){ + $documentDate = $documentDate->copy()->endOfMonth(); + } + $invoiceTransaction = $booking->transactions()->where('type', TransactionType::INVOICE)->complete()->first(); $currencyId = $booking->fix_currency_id;