changed logic in today and yesterday filter in hourly production
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 2m50s
Laravel Larastan / larastan (pull_request) Failing after 7m47s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 2m50s
Laravel Larastan / larastan (pull_request) Failing after 7m47s
This commit is contained in:
@@ -159,10 +159,11 @@ class ItemOverview extends ChartWidget
|
|||||||
->whereMonth('created_at', $startDate->month)
|
->whereMonth('created_at', $startDate->month)
|
||||||
->sum('plan_quantity');
|
->sum('plan_quantity');
|
||||||
|
|
||||||
$weeksCount = (int) ceil($startDate->daysInMonth / 7);
|
$weeksCount = count($orderedData);
|
||||||
|
|
||||||
|
// Split the total monthly plan equally across all weeks
|
||||||
$weeklyPlan = $weeksCount > 0
|
$weeklyPlan = $weeksCount > 0
|
||||||
? $monthlyPlanQuantity / $weeksCount
|
? round($monthlyPlanQuantity / $weeksCount, 2)
|
||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
$hourlyPlan = round($weeklyPlan / 22.5, 2);
|
$hourlyPlan = round($weeklyPlan / 22.5, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user