edit delay and penalty calculations

This commit is contained in:
2026-07-22 17:38:35 +03:30
parent e1f86e6ffe
commit e9f397d759
4 changed files with 57 additions and 12 deletions
@@ -71,7 +71,9 @@ class AttendanceController extends Controller
}
if ($user && !empty($user->attendances)) {
foreach ($user->attendances as $att) {
$date = $att->entered_at != null ? Jalalian::fromCarbon(Carbon::parse($att->entered_at)) : null;
$date = $att->entered_at != null
? \App\Support\JalaliHelper::fromDateTime($att->entered_at)
: null;
$att->date = $date != null ? $date->format('Y/m/d') : null;
if ($att->duration != null && $date != null && $now->getMonth() == $date->getMonth()) {
[$h, $m, $sec] = explode(':', $att->duration);