Zeiterfassung Update
* Check der vorhandenen Buchungen geändert. * Exakte überschneidungen von Start und Endzeit können nun verbucht werden und muss nicht die 1 Minute differenz haben * Fix: Berechnung Mehrstunden wenn kein Startdatum festgelegt wurde * Fix: Arbeitswoche verbuchen kann nur mehr nach Buchungsstartdatum passieren
This commit is contained in:
@@ -723,21 +723,24 @@ class TimerecordingController extends mfBaseController
|
||||
if (!$holiDay[$dDate]) {
|
||||
if ($workingHours[$dDay]) {
|
||||
foreach ($workingHours[$dDay] as $workingHour) {
|
||||
|
||||
$starttime = strtotime($dDate . " " . $workingHour['start'] . ":00");
|
||||
$endtime = strtotime($dDate . " " . $workingHour['end'] . ":00");
|
||||
$check = $this->checkTimerecording($starttime, $endtime);
|
||||
if ($check['state'] == "success") {
|
||||
$update = 1;
|
||||
$data = [];
|
||||
$data['user_id'] = $this->me->id;
|
||||
$data['start'] = $starttime;
|
||||
$data['end'] = $endtime;
|
||||
$data['timerecordingCategory_id'] = 1;
|
||||
$data['comment'] = "Automatisch eingetragen";
|
||||
$data['businesstrip'] = 0;
|
||||
$data['businesstrip_info'] = NULL;
|
||||
$timerecordings = TimerecordingModel::create($data);
|
||||
$id = $timerecordings->save();
|
||||
if ($employee[0]->startdate <= $starttime) {
|
||||
if ($check['state'] == "success") {
|
||||
$update = 1;
|
||||
$data = [];
|
||||
$data['user_id'] = $this->me->id;
|
||||
$data['start'] = $starttime;
|
||||
$data['end'] = $endtime;
|
||||
$data['timerecordingCategory_id'] = 1;
|
||||
$data['comment'] = "Automatisch eingetragen";
|
||||
$data['businesstrip'] = 0;
|
||||
$data['businesstrip_info'] = NULL;
|
||||
$timerecordings = TimerecordingModel::create($data);
|
||||
$id = $timerecordings->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user