Изменил пороги цвета и привязку процента к выбранной дате
This commit is contained in:
@@ -68,7 +68,7 @@ class PlanCalculator extends BaseMetricService implements MetricCalculatorInterf
|
||||
$department = Department::find($departmentId);
|
||||
|
||||
// Получаем годовой план
|
||||
$annualPlanModel = $department->recipientPlanOfYear();
|
||||
$annualPlanModel = $department->recipientPlanOfYear($endDate);
|
||||
$annualPlan = $annualPlanModel ? (int) $annualPlanModel->value : 0;
|
||||
|
||||
// План на 1 месяц (равномерно)
|
||||
|
||||
@@ -829,7 +829,7 @@ class ReportService
|
||||
*/
|
||||
public function getRecipientPlanOfYear(Department $department, DateRange $dateRange): array
|
||||
{
|
||||
$periodPlanModel = $department->recipientPlanOfYear();
|
||||
$periodPlanModel = $department->recipientPlanOfYear($dateRange->endDate);
|
||||
$monthsInPeriod = ceil($dateRange->startDate->diffInMonths($dateRange->endDate));
|
||||
$annualPlan = $periodPlanModel ? (int) $periodPlanModel->value : 0;
|
||||
$oneMonthPlan = ceil($annualPlan / 12);
|
||||
|
||||
Reference in New Issue
Block a user