Изменил пороги цвета и привязку процента к выбранной дате
This commit is contained in:
@@ -43,12 +43,12 @@ class Department extends Model
|
||||
return $this->belongsTo(UserDepartment::class, 'department_id', 'rf_department_id');
|
||||
}
|
||||
|
||||
public function recipientPlanOfYear()
|
||||
public function recipientPlanOfYear(?Carbon $asOf = null)
|
||||
{
|
||||
$now = Carbon::now();
|
||||
$asOf = $asOf ?? Carbon::now();
|
||||
|
||||
return $this->metrikaDefault()
|
||||
->where('date_end', '>', $now)
|
||||
->where('date_end', '>', $asOf)
|
||||
->where('rf_metrika_item_id', 23)
|
||||
->first();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user