Added minor things to Order; fixed saving patcher in Patching

This commit is contained in:
Frank Schubert
2021-11-09 21:04:29 +01:00
parent 33c9f7b2be
commit 8dd3831c0a
11 changed files with 159 additions and 32 deletions

View File

@@ -177,14 +177,15 @@ class PatchingController extends mfBaseController {
$mode = "add";
$patch_data["termination_id"] = $term_id;
}
//var_dump($mode, $r);exit;
if($mode == "add") {
$patch_data['create_by'] = 1;
$patching = PatchingModel::create($patch_data);
if($patch_data["patched"]) {
$patch_data["patched_by"] = $this->me->id;
$patch_data["patched_date"] = date("U");
}
$patch_data['create_by'] = $this->me_id;
$patching = PatchingModel::create($patch_data);
} else {
if($patch_data["patched"] && !$patching->patched) {
$patch_data["patched_by"] = $this->me->id;
@@ -192,7 +193,7 @@ class PatchingController extends mfBaseController {
}
$patching->update($patch_data);
}
//var_dump($patching);exit;
$id = $patching->save();
if(!$id) {
$this->layout()->setFlash("Fehler beim Speichern", "error");