Zeiterfassungs Update
* Implementerung Fahrzeugverwaltung * neue Buchungsart Fahrtenbuch * Diverse Bugfixes
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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, ";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user