Fixed not being able to unset Baufreigabe in Pipe- and Linework
This commit is contained in:
@@ -326,6 +326,16 @@ class LineworkController extends mfBaseController {
|
||||
$termination->save();
|
||||
}
|
||||
}
|
||||
if(!$r->isset("linework_enabled") && $this->me->is(["Admin", "pipeplanner", "lineplanner"])) {
|
||||
if($termination->linework_enabled == 1) {
|
||||
$termination->linework_enabled = 0;
|
||||
$termination->linework_enabled_date = 0;
|
||||
if($termination->status_id == 3) {
|
||||
$termination->status_id = 1;
|
||||
}
|
||||
$termination->save();
|
||||
}
|
||||
}
|
||||
|
||||
if($this->me->is(["Admin", "netowner"])) {
|
||||
if($r->linework_doku_delay == 1 && $termination->linework_doku_delay != 1) {
|
||||
|
||||
@@ -317,7 +317,15 @@ class PipeworkController extends mfBaseController {
|
||||
$building->pipework_enabled_by = $this->me->id;
|
||||
$building->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!$r->isset("pipework_enabled") && $this->me->is(["Admin", "pipeplanner"])) {
|
||||
if($building->pipework_enabled == 1) {
|
||||
$building->pipework_enabled = 0;
|
||||
$building->pipework_enabled_date = date('U');
|
||||
$building->pipework_enabled_by = $this->me->id;
|
||||
$building->save();
|
||||
}
|
||||
}
|
||||
|
||||
if($building->workflow_comment != $r->workflow_comment) {
|
||||
|
||||
Reference in New Issue
Block a user