Zeiterfassung Fahrzeugverwaltung neue Features:
* KM-Stand History * Journal * Neue Felder
This commit is contained in:
@@ -15,8 +15,8 @@ foreach ($timerecordingusers as $timerecordinguser) {
|
||||
ksort($timerecordingUsers);
|
||||
|
||||
$cartypes = TimerecordingCarModel::$carTypes;
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
.journal-textarea {
|
||||
height: 213px !important;
|
||||
@@ -261,7 +261,7 @@ $cartypes = TimerecordingCarModel::$carTypes;
|
||||
|
||||
<div class="col-lg-7">
|
||||
<textarea cols="9" name="journal" id="journal"
|
||||
class="form-control journal-textarea"><?= $timerecordingcars->service_station ?></textarea>
|
||||
class="form-control journal-textarea"><?= $timerecordingCarJounalLast->journal ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,6 +102,8 @@ class TimerecordingCarController extends mfBaseController
|
||||
$this->layout()->setFlash("Auto nicht gefunden", "error");
|
||||
$this->redirect("TimerecordingCar");
|
||||
}
|
||||
$timerecordingCarJounalLast=TimerecordingCarJournalModel::getFirst(["timerecordingCar_id"=>$id]);
|
||||
$this->layout()->set("timerecordingCarJounalLast", $timerecordingCarJounalLast);
|
||||
|
||||
$this->layout()->set("mimetypes", $mimetypes);
|
||||
$this->layout()->set("timerecordingcarDokuments", $timerecordingcarDokuments);
|
||||
@@ -258,8 +260,12 @@ class TimerecordingCarController extends mfBaseController
|
||||
// var_dump($filestore);
|
||||
// exit;
|
||||
$id = $timerecordingcars->save();
|
||||
$timerecordingCarJounalLast=TimerecordingCarJournalModel::getFirst(["timerecordingCar_id"=>$id]);
|
||||
|
||||
|
||||
|
||||
if ($journal && $timerecordingCarJounalLast->journal != $journal) {
|
||||
|
||||
if ($journal) {
|
||||
$journal_timestamp = $r->journal_timestamp;
|
||||
$dataJournal = [];
|
||||
$dataJournal['timerecordingCar_id'] = $id;
|
||||
|
||||
@@ -77,12 +77,12 @@ class TimerecordingCarJournalModel
|
||||
|
||||
}
|
||||
|
||||
public static function getFirst()
|
||||
public static function getFirst($filter)
|
||||
{
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
$res = $db->select("TimerecordingCarJournal", "*", "$where ");
|
||||
$res = $db->select("TimerecordingCarJournal", "*", "$where ORDER by timestamp DESC LIMIT 1");
|
||||
if ($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
$item = new TimerecordingCarJournal($data);
|
||||
|
||||
Reference in New Issue
Block a user