Zeiterfassung Update
* Script für tägliche Anpassungen der Mehrstunden
This commit is contained in:
@@ -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>
|
||||
|
||||
26
scripts/check_timerecording_plushours.php
Normal file
26
scripts/check_timerecording_plushours.php
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user