Merge pull request 'chnaged logic in invoice chart' (#212) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #212
This commit was merged in pull request #212.
This commit is contained in:
@@ -80,7 +80,7 @@ class InvoiceChart extends ChartWidget
|
||||
$completedInvoicesCount = InvoiceValidation::select('invoice_number')
|
||||
->where('plant_id', $selectedPlant)
|
||||
->whereNull('quantity')
|
||||
->whereBetween('updated_at', [$startDate, $endDate])
|
||||
->whereBetween('created_at', [$startDate, $endDate])
|
||||
->groupBy('invoice_number')
|
||||
->havingRaw(
|
||||
"COUNT(*) = SUM(CASE WHEN scanned_status = 'Scanned' THEN 1 ELSE 0 END)"
|
||||
@@ -99,7 +99,7 @@ class InvoiceChart extends ChartWidget
|
||||
$completedInvoicesCount = InvoiceValidation::select('invoice_number')
|
||||
->where('plant_id', $selectedPlant)
|
||||
->where('quantity', '>', 1)
|
||||
->whereBetween('updated_at', [$startDate, $endDate])
|
||||
->whereBetween('created_at', [$startDate, $endDate])
|
||||
->groupBy('invoice_number')
|
||||
->havingRaw(
|
||||
"COUNT(*) = SUM(CASE WHEN serial_number IS NOT NULL AND serial_number != '' THEN 1 ELSE 0 END)"
|
||||
|
||||
Reference in New Issue
Block a user