diff --git a/app/Service/DepositService.php b/app/Service/DepositService.php index e7568b3..ec77ad1 100644 --- a/app/Service/DepositService.php +++ b/app/Service/DepositService.php @@ -39,10 +39,10 @@ class DepositService $totalHours = $start->copy()->diffInHours($end); // 191 часов $hoursRemainder = $totalHours - ($fullDays * 24); // остаток: 191 - 7*24 = 191 - 168 = 23 - $threshold = 10; // если остаток по часам больше этого порога, то добавим день + $threshold = 9; // если остаток по часам больше этого порога, то добавим день $days = $fullDays + ($hoursRemainder > $threshold ? 1 : 0); - + $tariffs = UniModel::model('pipi_auto_tariffs') ->where('model_id', $markId) ->get();