Zeiterfassung Fahrzeugverwaltung neue Features:
* KM-Stand History * Journal * Neue Felder
This commit is contained in:
@@ -32,6 +32,12 @@ class TimerecordingCarController extends mfBaseController
|
||||
case "deleteDocument":
|
||||
$return = $this->deleteDocument();
|
||||
break;
|
||||
case "deleteJournal":
|
||||
$return = $this->deleteJournal();
|
||||
break;
|
||||
case "deleteMilageHistory":
|
||||
$return = $this->deleteMilageHistory();
|
||||
break;
|
||||
default:
|
||||
$return = false;
|
||||
}
|
||||
@@ -57,7 +63,7 @@ class TimerecordingCarController extends mfBaseController
|
||||
{
|
||||
$timerecordingcarid = $this->request->id;
|
||||
$timeRecordingCarMileageHistory = TimerecordingCarMileageHistoryModel::search(["timerecordingCar_id" => $timerecordingcarid]);
|
||||
$timerecordingCarJournal=TimerecordingCarJournalModel::search(["timerecordingCar_id" => $timerecordingcarid]);
|
||||
$timerecordingCarJournal = TimerecordingCarJournalModel::search(["timerecordingCar_id" => $timerecordingcarid]);
|
||||
$mimetypes = TimerecordingCarDocumentsModel::$mimetypes;
|
||||
$timerecordingcarDokuments = TimerecordingCarDocumentsModel::search(["timerecordingCar_id" => $timerecordingcarid]);
|
||||
$this->layout()->set("mimetypes", $mimetypes);
|
||||
@@ -373,4 +379,42 @@ class TimerecordingCarController extends mfBaseController
|
||||
$timerecordingCarDokument->delete();
|
||||
}
|
||||
|
||||
protected function deleteJournal()
|
||||
{
|
||||
$r = $this->request;
|
||||
$id = $r->id;
|
||||
$timerecordingCarJournal = new TimerecordingCarJournal($id);
|
||||
$data = [];
|
||||
$data['deleted'] = 1;
|
||||
$data['edit_by'] = $this->me->id;
|
||||
$timerecordingCarJournal->update($data);
|
||||
$id = $timerecordingCarJournal->save();
|
||||
if (!$id) {
|
||||
|
||||
} else {
|
||||
$result["success"] = true;
|
||||
echo json_encode($result);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
protected function deleteMilageHistory()
|
||||
{
|
||||
$r = $this->request;
|
||||
$id = $r->id;
|
||||
$timerecordingCarMileageHistory = new TimerecordingCarMileageHistory($id);
|
||||
$data = [];
|
||||
$data['deleted'] = 1;
|
||||
$data['edit_by'] = $this->me->id;
|
||||
$timerecordingCarMileageHistory->update($data);
|
||||
$id = $timerecordingCarMileageHistory->save();
|
||||
if (!$id) {
|
||||
|
||||
} else {
|
||||
$result["success"] = true;
|
||||
echo json_encode($result);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user