master
parent
ef9750f729
commit
7f72804ce0
|
|
@ -39,10 +39,10 @@ class DepositService
|
||||||
$totalHours = $start->copy()->diffInHours($end); // 191 часов
|
$totalHours = $start->copy()->diffInHours($end); // 191 часов
|
||||||
$hoursRemainder = $totalHours - ($fullDays * 24); // остаток: 191 - 7*24 = 191 - 168 = 23
|
$hoursRemainder = $totalHours - ($fullDays * 24); // остаток: 191 - 7*24 = 191 - 168 = 23
|
||||||
|
|
||||||
$threshold = 10; // если остаток по часам больше этого порога, то добавим день
|
$threshold = 9; // если остаток по часам больше этого порога, то добавим день
|
||||||
|
|
||||||
$days = $fullDays + ($hoursRemainder > $threshold ? 1 : 0);
|
$days = $fullDays + ($hoursRemainder > $threshold ? 1 : 0);
|
||||||
|
|
||||||
$tariffs = UniModel::model('pipi_auto_tariffs')
|
$tariffs = UniModel::model('pipi_auto_tariffs')
|
||||||
->where('model_id', $markId)
|
->where('model_id', $markId)
|
||||||
->get();
|
->get();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue