corrected bundle logic for invoice quantity
This commit is contained in:
@@ -157,16 +157,14 @@ class SendInvoiceReport extends Command
|
|||||||
->count();
|
->count();
|
||||||
|
|
||||||
$totalBundleInvoiceQuan = InvoiceValidation::where('plant_id', $plantId)
|
$totalBundleInvoiceQuan = InvoiceValidation::where('plant_id', $plantId)
|
||||||
->where('quantity', null)
|
->where('quantity', '>', 1)
|
||||||
->whereBetween('created_at', [$startDate, $endDate])
|
->whereBetween('created_at', [$startDate, $endDate])
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
$scannedBundleInvoiceQuan = InvoiceValidation::where('plant_id', $plantId)
|
$scannedBundleInvoiceQuan = InvoiceValidation::where('plant_id', $plantId)
|
||||||
->where('scanned_status', 'Scanned')
|
->where('quantity', '>', 1)
|
||||||
->where(function($query) {
|
->whereNotNull('serial_number')
|
||||||
$query->whereNull('quantity')
|
->where('serial_number','!=', '')
|
||||||
->orWhere('quantity', 0);
|
|
||||||
})
|
|
||||||
->whereBetween('updated_at', [$startDate, $endDate])
|
->whereBetween('updated_at', [$startDate, $endDate])
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user