Merge branch 'spidev' into 'master'
Zeiterfassung Update See merge request fronk/thetool!356
This commit is contained in:
@@ -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