Zeiterfassung Update

* Script für tägliche Anpassungen der Mehrstunden
This commit is contained in:
Spitzer Daniel
2024-02-27 17:29:02 +01:00
parent f611f5201a
commit 31c7cf69e3
2 changed files with 27 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ $type[3] = "Lehrling";
<td><?= $timerecordinguser->name ?></td>
<td><?= $type[$timerecordingemployees[$timerecordinguser->id]['type']] ?></td>
<td class="text-center"><?= ($timerecordingemployees[$timerecordinguser->id]['startdate']) ? date("d.m.Y", $timerecordingemployees[$timerecordinguser->id]['startdate']) : "-" ?></td>
<td class="text-center"><?= ($timerecordingworkinghours) ? $timerecordingworkinghours[$timerecordinguser->id]['datetimetext'] : "" ?></td>
<td class="text-center text-nowrap"><?= ($timerecordingworkinghours) ? $timerecordingworkinghours[$timerecordinguser->id]['datetimetext'] : "" ?></td>
<td class="text-center"><?= $sum ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', ($timerecordingemployees[$timerecordinguser->id]['plushours_now']/ 3600),($timerecordingemployees[$timerecordinguser->id]['plushours_now']/ 60 % 60)) ?></td>
<td class="text-center"><?= sprintf('%02d:%02d', ($timerecordingemployees[$timerecordinguser->id]['overtime_now']/ 3600),($timerecordingemployees[$timerecordinguser->id]['overtime_now']/ 60 % 60)) ?></td>

View File

@@ -0,0 +1,26 @@
<?php
//require 'vendor/autoload.php';
require("../config/config.php");
define('FRONKDB_SQLDEBUG', false);
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED));
require_once(LIBDIR . "/mvcfronk/mfRouter/mfRouter.php");
require_once(LIBDIR . "/mvcfronk/mfBase/mfBaseModel.php");
require_once(LIBDIR . "/mvcfronk/mfBase/mfBaseController.php");
$me = new User(154);
define("INTERNAL_USER_ID", $me->id);
define("INTERNAL_USER_USERNAME", $me->username);
$timerecordingemployees = TimerecordingEmployeeModel::search(['startdate' => 1]);
//var_dump($timerecordingemployees);
foreach ($timerecordingemployees as $timerecordingemployee) {
$employee = new TimerecordingController();
$employee->updatePlushours($timerecordingemployee->user_id);
}