Zeiterfassungs Update

* Implementerung Fahrzeugverwaltung
 * neue Buchungsart Fahrtenbuch
 * Diverse Bugfixes
This commit is contained in:
Spitzer Daniel
2024-03-28 11:16:03 +01:00
parent 88702030e2
commit 1c648168be
3 changed files with 14 additions and 4 deletions

View File

@@ -199,11 +199,11 @@ class TimerecordingModel
$id = $filter['id'];
if (is_numeric($starttime) && is_numeric($endtime)) {
if ($id && is_numeric($id)) {
$where .= " AND `id` != $id AND `days`='0'";
$where .= " AND `id` != $id ";
}
$where .= " AND (((`start` <= $starttime AND `end` > $starttime ) OR (`start` > $endtime AND `end` < $endtime) OR (`start` > $starttime AND `end` > $starttime AND `start` <= $endtime AND `end` <= $endtime) OR (`start` > $starttime AND `end` > $starttime AND `start` < $endtime AND `end` > $endtime) OR (`start` = $starttime AND `end` = $endtime )) OR ( `start` <= $starttime AND `end` IS NULL)) ORDER by user_id,start ASC";
$where .= " AND (((`start` <= $starttime AND `end` > $starttime ) OR (`start` > $endtime AND `end` < $endtime) OR (`start` > $starttime AND `end` > $starttime AND `start` <= $endtime AND `end` <= $endtime) OR (`start` > $starttime AND `end` > $starttime AND `start` < $endtime AND `end` > $endtime) OR (`start` = $starttime AND `end` = $endtime )) OR ( `start` <= $starttime AND `end` IS NULL)) AND `days` = 0 ORDER by user_id,start ASC";
//var_dump($where);exit;
//echo ($where);die();
}
}
if (array_key_exists("type", $filter)) {

View File

@@ -159,10 +159,18 @@ class TimerecordingBillingController extends mfBaseController
$time = $nlztime['minutes'] / 60;
$time = round($time, 2);
$time = str_replace(".", ",", $time);
if ($nlztime['unpaid'] == "0") {
$pay = $time;
} else {
$pay = 0;
}
} else {
$time = "";
$pay = "";
}
$bodyarray = [$companybmd, $employee_number, 1, $nlztime['categoryshort'], "", "3", $nlztime['start'], $nlztime['end'], $time, $hours];
$bodyarray = [$companybmd, $employee_number, 1, $nlztime['categoryshort'], "", "3", $nlztime['start'], $nlztime['end'], $time, $pay];
fputcsv($file, $bodyarray, ";");
}
}

View File

@@ -563,6 +563,7 @@ class TimerecordingReportController extends mfBaseController
$nlzTimes[$timerecording->id]['start'] = date("d.m.Y", $timerecording->start);
$nlzTimes[$timerecording->id]['end'] = date("d.m.Y", $timerecording->end);
$nlzTimes[$timerecording->id]['minutes'] = $seconds / 60;
$nlzTimes[$timerecording->id]['unpaid'] = $timerecording->timerecordingCategory->unpaid;
$nlzTimes[$timerecording->id]['category'] = $timerecording->timerecordingCategory->name;
$nlzTimes[$timerecording->id]['categoryshort'] = $timerecording->timerecordingCategory->short;
}
@@ -622,6 +623,7 @@ class TimerecordingReportController extends mfBaseController
$nlzTimes[$timerecording->id]['start'] = date("d.m.Y", $timerecording->start);
$nlzTimes[$timerecording->id]['end'] = date("d.m.Y", $timerecording->end);
$nlzTimes[$timerecording->id]['days'] = $sumdays;
$nlzTimes[$timerecording->id]['unpaid'] = $timerecording->timerecordingCategory->unpaid;
$nlzTimes[$timerecording->id]['category'] = $timerecording->timerecordingCategory->name;
$nlzTimes[$timerecording->id]['categoryshort'] = $timerecording->timerecordingCategory->short;