From 30f256107e14b466b622edd7479f8f533b3cc422 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Tue, 23 Nov 2021 20:35:40 +0100 Subject: [PATCH] saving customer_passive_finished value if not existing when saving Linework --- application/Linework/LineworkController.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/application/Linework/LineworkController.php b/application/Linework/LineworkController.php index 82139fa4c..715ae2107 100644 --- a/application/Linework/LineworkController.php +++ b/application/Linework/LineworkController.php @@ -206,6 +206,8 @@ class LineworkController extends mfBaseController { } } + + //var_dump($items);exit; foreach($items as $name => $value) { $item = WorkflowitemModel::getFirst(["name" => $name, "object_type" => "termination"]); @@ -245,6 +247,13 @@ class LineworkController extends mfBaseController { } } + $item = WorkflowitemModel::getFirst(["name" => "customer_passive_finished", "object_type" => "termination"]); + if(!$item->value) { + $item->setObjectId($termination_id); + $item->value->value_int = 0; + $item->value->save(); + } + /* * Custom checks */