From 51c97cf1a2f3dfa16c2f05b72c3c8fd47826b420 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 12 Nov 2025 15:50:45 +0530 Subject: [PATCH] removed plant checking in invoice out validations --- app/Console/Commands/SendInvoiceDataReport.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/SendInvoiceDataReport.php b/app/Console/Commands/SendInvoiceDataReport.php index 44bc741..8546d4b 100644 --- a/app/Console/Commands/SendInvoiceDataReport.php +++ b/app/Console/Commands/SendInvoiceDataReport.php @@ -97,6 +97,7 @@ class SendInvoiceDataReport extends Command foreach ($distributions as $selectedDistribution) { + //where('plant_id', $plant->id) $invoices = InvoiceDataValidation::where('plant_id', $plant->id) ->where('distribution_channel_desc', $selectedDistribution) ->whereBetween('document_date', [$startDate, $endDate]) @@ -130,9 +131,9 @@ class SendInvoiceDataReport extends Command ->map(fn($n) => preg_replace('/\s+/', '', strtoupper((string) $n))) ->toArray(); - $wentOutInvoices = InvoiceOutValidation::where('plant_id', $plant->id) - ->whereIn('qr_code', $invoiceNumbers) - ->whereBetween('scanned_at', [$startDate, $endDate]) + //where('plant_id', $plant->id) + $wentOutInvoices = InvoiceOutValidation::whereIn('qr_code', $invoiceNumbers) + //->whereBetween('scanned_at', [$startDate, $endDate]) ->distinct('qr_code') ->pluck('qr_code') ->map(fn($n) => preg_replace('/\s+/', '', strtoupper((string) $n)))