removed plant checking in invoice out validations

This commit is contained in:
dhanabalan
2025-11-12 15:50:45 +05:30
parent 9a7ea00846
commit 51c97cf1a2

View File

@@ -97,6 +97,7 @@ class SendInvoiceDataReport extends Command
foreach ($distributions as $selectedDistribution) foreach ($distributions as $selectedDistribution)
{ {
//where('plant_id', $plant->id)
$invoices = InvoiceDataValidation::where('plant_id', $plant->id) $invoices = InvoiceDataValidation::where('plant_id', $plant->id)
->where('distribution_channel_desc', $selectedDistribution) ->where('distribution_channel_desc', $selectedDistribution)
->whereBetween('document_date', [$startDate, $endDate]) ->whereBetween('document_date', [$startDate, $endDate])
@@ -130,9 +131,9 @@ class SendInvoiceDataReport extends Command
->map(fn($n) => preg_replace('/\s+/', '', strtoupper((string) $n))) ->map(fn($n) => preg_replace('/\s+/', '', strtoupper((string) $n)))
->toArray(); ->toArray();
$wentOutInvoices = InvoiceOutValidation::where('plant_id', $plant->id) //where('plant_id', $plant->id)
->whereIn('qr_code', $invoiceNumbers) $wentOutInvoices = InvoiceOutValidation::whereIn('qr_code', $invoiceNumbers)
->whereBetween('scanned_at', [$startDate, $endDate]) //->whereBetween('scanned_at', [$startDate, $endDate])
->distinct('qr_code') ->distinct('qr_code')
->pluck('qr_code') ->pluck('qr_code')
->map(fn($n) => preg_replace('/\s+/', '', strtoupper((string) $n))) ->map(fn($n) => preg_replace('/\s+/', '', strtoupper((string) $n)))