Zeiterfassung Update

* Gesammtsumme bei Admin Only Mitarbeitern einfeführt
This commit is contained in:
Daniel Spitzer
2025-02-14 12:30:21 +01:00
parent 5e8ec1d07d
commit d0404f515d
4 changed files with 46 additions and 8 deletions

View File

@@ -73,6 +73,21 @@ class TimerecordingModel
}
return $item;
}
public static function getAllHours($user_id)
{
$items = [];
$db = FronkDB::singleton();
$sql="SELECT SUM(`end` - `start`) AS gesamt_summe FROM Timerecording where user_id=$user_id AND `timerecordingCategory_id` =1";
$res = $db->query($sql);
if ($db->num_rows($res)) {
while ($data = $db->fetch_object($res)) {
$items[] = new Timerecording($data);
}
}
return $items;
}
public static function getAll()
{