Kalender Anpassungen
- Kalender Freigaben für Conny
This commit is contained in:
@@ -192,9 +192,16 @@ class TimerecordingModel
|
||||
if (array_key_exists("start", $filter) && array_key_exists("days", $filter)) {
|
||||
$days = $filter['days'];
|
||||
$start = $filter['start'];
|
||||
$end= $filter['endsdate'];
|
||||
if ($days === 1) {
|
||||
$where .= " AND `start` >= $start AND `days` !=0 ORDER by start ASC";
|
||||
$where .= " AND `start` >= $start AND `days` !=0 ";
|
||||
}
|
||||
if ($end) {
|
||||
if (is_numeric($end)) {
|
||||
$where .= " AND `start` <= $end ";
|
||||
}
|
||||
}
|
||||
$where.=" ORDER by start ASC";
|
||||
}
|
||||
if (array_key_exists("timerecordingCar_id", $filter)) {
|
||||
$timerecordingCar = $filter['timerecordingCar_id'];
|
||||
|
||||
@@ -44,13 +44,13 @@ class TimerecordingBillingController extends mfBaseController
|
||||
$timerecordingBillingsEmployees = TimerecordingBillingEmployeeModel::getAllOrderbyNameDate();
|
||||
|
||||
$timerecordingemployees = TimerecordingEmployeeModel::getAll();
|
||||
$enddate = strtotime("2024-12-31 23:59:59");
|
||||
$enddate = strtotime("01." . '12.2024');
|
||||
$enddate = strtotime("last day of this month", $enddate);
|
||||
$enddate = strtotime("23:59:59", $enddate);
|
||||
foreach ($timerecordingemployees as $timerecordingemployee) {
|
||||
if ($timerecordingemployee->bmd_active == 0 && empty($timerecordingemployee->startdate) && empty($timerecordingemployee->enddate)) continue;
|
||||
echo $timerecordingemployee->user_id . "<br>";
|
||||
echo $enddate. "<br>";
|
||||
$holidays[$timerecordingemployee->user_id] = $this->getholidays($timerecordingemployee->user_id, $enddate);
|
||||
}
|
||||
|
||||
$this->layout()->setTemplate("TimerecordingBilling/Overview");
|
||||
$this->layout()->set("timerecordingbillings", $timerecordingBillings);
|
||||
|
||||
@@ -859,7 +859,7 @@ class TimerecordingBillingController extends mfBaseController
|
||||
|
||||
protected function getholidays($userid, $enddate)
|
||||
{
|
||||
// $enddate = strtotime("01." . $date);
|
||||
// $enddate = strtotime("01." . '12.2024');
|
||||
// $enddate = strtotime("last day of this month", $enddate);
|
||||
// $enddate = strtotime("23:59:59", $enddate);
|
||||
|
||||
@@ -881,7 +881,7 @@ class TimerecordingBillingController extends mfBaseController
|
||||
$holidays_now = $holidays;
|
||||
}
|
||||
$timerecordings = TimerecordingModel::search(['user_id' => $userid, 'start' => $holidays_timestamp, 'timerecordingCategory_id' => 3]);
|
||||
$timerecordingscorrections = TimerecordingModel::search(['user_id' => $userid, 'start' => $holidays_timestamp, 'days' => 1]);
|
||||
$timerecordingscorrections = TimerecordingModel::search(['user_id' => $userid, 'start' => $holidays_timestamp,'endsdate' => $enddate, 'days' => 1]);
|
||||
foreach ($timerecordings as $timerecording) {
|
||||
|
||||
if ($timerecording->end > $enddate) {
|
||||
|
||||
Reference in New Issue
Block a user