diff --git a/mirzaev/ebala/system/controllers/task.php b/mirzaev/ebala/system/controllers/task.php index 065e38c..580ad44 100755 --- a/mirzaev/ebala/system/controllers/task.php +++ b/mirzaev/ebala/system/controllers/task.php @@ -443,7 +443,8 @@ final class task extends core $link->task['start'] instanceof datetime && $link->task['end'] instanceof datetime ) { - $generated['hours'] = (float) $link->task['end']->diff($link->task['start'])->format('%H.%i'); + $generated['hours'] = (float) $link->task['start']->diff($link->task['end'])->format('%R%H.%i'); + if ($generated['hours'] < 0) $generated['hours'] += 24; if ($generated['hours'] >= 6.5 && $generated['hours'] < 9) $generated['hours'] -= 0.5; else if ($generated['hours'] >= 9 && $generated['hours'] < 12.5) $generated['hours'] -= 1; else if ($generated['hours'] >= 12.5) $generated['hours'] -= 1.5;