solvd issue for cumulative chart
This commit is contained in:
@@ -106,7 +106,8 @@ class CumulativeChart extends ChartWidget
|
||||
// break;
|
||||
// }
|
||||
// Define date range with 8 AM shift boundaries
|
||||
switch ($activeFilter) {
|
||||
switch ($activeFilter)
|
||||
{
|
||||
case 'yesterday':
|
||||
$startDate = now()->subDay()->setTime(8, 0, 0);
|
||||
$endDate = now()->setTime(8, 0, 0);
|
||||
@@ -160,12 +161,9 @@ class CumulativeChart extends ChartWidget
|
||||
->where('created_at', '<', $endDate)
|
||||
->whereIn('line_id', $fgLineIds)
|
||||
->groupBy('line_id')
|
||||
->groupByRaw($groupBy)
|
||||
->orderByRaw($groupBy)
|
||||
->pluck('total_quantity', 'line_id')
|
||||
->toArray();
|
||||
|
||||
|
||||
//Non-FG production from production_quantities
|
||||
$nonFgProduction = ProductionQuantity::select('line_id', \DB::raw('COUNT(*) as total_quantity'))
|
||||
->whereBetween('created_at', [$startDate, $endDate])
|
||||
|
||||
Reference in New Issue
Block a user