Zeiterfassung Update
* Fix für BPA stunden Rückgängig
This commit is contained in:
@@ -33,6 +33,8 @@ for ($i = 1; $i <= 12; $i++) {
|
||||
$years[time() + 31536000] = date('Y', time() + 31536000);
|
||||
$years[time()] = date('Y', time());
|
||||
$years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
$closedmonth = strtotime("01." . $timerecordingBilling->month);
|
||||
$mindate = date("Y-m-d", strtotime("+ 1 Month", $closedmonth));
|
||||
?>
|
||||
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/select2-cstm.css?<?= date('U') ?>" rel="stylesheet"
|
||||
@@ -89,8 +91,8 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
.form-check-label {
|
||||
margin-top: 2px;
|
||||
}
|
||||
.holiday-text
|
||||
{
|
||||
|
||||
.holiday-text {
|
||||
color: #d70000;
|
||||
}
|
||||
|
||||
@@ -142,7 +144,7 @@ $years[time() - 31536000] = date('Y', time() - 31536000);
|
||||
<label class="col-form-label" for="date">Datum</label>
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<input type="date" id="date" name="date" class="form-control "
|
||||
<input type="date" min="<?= $mindate ?>" id="date" name="date" class="form-control "
|
||||
value="<?= date("Y-m-d", time()) ?>"
|
||||
placeholder="<?= date("d.m.Y", time()); ?>" required="required"/>
|
||||
</div>
|
||||
|
||||
@@ -20,10 +20,11 @@ class TimerecordingController extends mfBaseController
|
||||
{
|
||||
$this->updatePlushours($this->me->id);
|
||||
$this->updateHolidays($this->me->id);
|
||||
|
||||
$timerecordingBilling = TimerecordingBillingModel::getLast();
|
||||
$timerecordingCategoriess = TimerecordingCategoryModel::getAll();
|
||||
$timerecordingCars = TimerecordingCarModel::search(['timerecording' => 1]);
|
||||
$this->layout()->set("timerecordingCategoriess", $timerecordingCategoriess);
|
||||
$this->layout()->set("timerecordingBilling", $timerecordingBilling);
|
||||
$this->layout()->set("timerecordingCars", $timerecordingCars);
|
||||
$this->layout()->setTemplate("Timerecording/Index");
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ class TimerecordingBillingController extends mfBaseController
|
||||
$timerecordingEmployee = new TimerecordingEmployee($timerecordingbillingsemployee->timerecordingEmployee->id);
|
||||
$dataemployee = [];
|
||||
$dataemployee['bpahours'] = $timerecordingEmployee->bpahours + $this->request->overtimebpa * 3600;
|
||||
$data['transfer_bpahours'] = $timerecordingbillingsemployee->transfer_overtimebpa - $this->request->overtimebpa * 3600;
|
||||
$data['transfer_bpahours'] = $timerecordingbillingsemployee->transfer_bpahours - $this->request->overtimebpa * 3600;
|
||||
$sum += $this->request->overtimebpa * 3600;
|
||||
$timerecordingEmployee->update($dataemployee);
|
||||
$timerecordingEmployee->save();
|
||||
@@ -662,7 +662,7 @@ class TimerecordingBillingController extends mfBaseController
|
||||
$timerecordingEmployee = new TimerecordingEmployee($timerecordingbillingsemployee->timerecordingEmployee->id);
|
||||
$dataemployee = [];
|
||||
$dataemployee['bpahours'] = $timerecordingEmployee->bpahours + $this->request->overtimebpa * 3600;
|
||||
$data['transfer_bpahours'] = $timerecordingbillingsemployee->transfer_overtimebpa - $this->request->overtimebpa * 3600;
|
||||
$data['transfer_bpahours'] = $timerecordingbillingsemployee->transfer_bpahours - $this->request->overtimebpa * 3600;
|
||||
$sum += $this->request->overtimebpa * 3600;
|
||||
$timerecordingEmployee->update($dataemployee);
|
||||
$timerecordingEmployee->save();
|
||||
|
||||
@@ -76,12 +76,10 @@ class TimerecordingBillingModel
|
||||
|
||||
}
|
||||
|
||||
public static function getFirst()
|
||||
public static function getLast()
|
||||
{
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
$res = $db->select("TimerecordingBilling", "*", "$where ");
|
||||
$res = $db->select("TimerecordingBilling", "*", "1=1 ORDER BY id DESC LIMIT 1");
|
||||
if ($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
$item = new TimerecordingBilling($data);
|
||||
|
||||
Reference in New Issue
Block a user