Various Bugfixes

This commit is contained in:
Frank Schubert
2021-10-07 19:54:28 +02:00
parent e27da7ec55
commit d150b4e7b5
8 changed files with 167 additions and 39 deletions
+4 -1
View File
@@ -38,6 +38,7 @@ class Termination extends mfBaseModel {
}
$bcode = $this->getProperty("building")->code;
var_dump($bcode);
if(!$bcode) {
return false;
}
@@ -50,6 +51,8 @@ class Termination extends mfBaseModel {
while($data = $this->db->fetch_object($res)) {
$codes[] = $data->code;
}
} else {
return $bcode.".001";
}
if(count($codes)) {
@@ -156,7 +159,7 @@ class Termination extends mfBaseModel {
}
if($name == "patching") {
$this->patching = PatchingModel::getFirst(["termination_i" => $this->id]);
$this->patching = PatchingModel::getFirst(["termination_id" => $this->id]);
return $this->patching;
}