["code" => $term->building->code]])?>" target="_blank">=$term->code?>
+ building->pipeworker_id): ?>
+
=($term->building->lineworker_id) ? $term->building->lineworker->getCompanyOrName() : ""?>
+
+
-- Keiner Baufirma zugewiesen --
+
+
name): ?>
=$term->name?>
diff --git a/Layout/default/Pipework/Index.php b/Layout/default/Pipework/Index.php
index 3beddf78f..1d153fa22 100644
--- a/Layout/default/Pipework/Index.php
+++ b/Layout/default/Pipework/Index.php
@@ -168,6 +168,11 @@
=$building->street?>
=$building->code?>
+ pipeworker_id): ?>
+ =($building->pipeworker_id) ? $building->pipeworker->getCompanyOrName() : ""?>
+
+ -- Keiner Baufirma zugewiesen --
+
=$building->contact?>
diff --git a/application/Building/Building.php b/application/Building/Building.php
index abf734f3a..2aeca7ac4 100644
--- a/application/Building/Building.php
+++ b/application/Building/Building.php
@@ -10,6 +10,7 @@ class Building extends mfBaseModel {
private $type;
private $status;
private $pipeworker;
+ private $lineworker;
private $terminations;
private $termination_workflow_comments;
private $workflowitems;
@@ -56,6 +57,7 @@ class Building extends mfBaseModel {
$this->type = null;
$this->status = null;
$this->pipeworker = null;
+ $this->lineworker = null;
$this->terminations = null;
$this->workflowitems = null;
$this->files = null;
@@ -292,6 +294,17 @@ class Building extends mfBaseModel {
//$this->pipeworker = new Address($this->pipeworker_id);
return $this->pipeworker;
}
+
+ if($name == "lineworker") {
+ $lineworker = mfValuecache::singleton()->get("mfObjectmodel-Address-".$this->lineworker_id);
+ if(!$lineworker) {
+ $lineworker = new Address($this->lineworker_id);
+ mfValuecache::singleton()->set("mfObjectmodel-Address-".$this->lineworker_id, $lineworker);
+ }
+ $this->lineworker = $lineworker;
+ //$this->lineworker = new Address($this->lineworker_id);
+ return $this->lineworker;
+ }
if($name == "terminations") {
$this->terminations = TerminationModel::search(['building_id' => $this->id]);