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)))