ConstructionConsent live

This commit is contained in:
Frank Schubert
2025-01-27 02:12:55 +01:00
parent 39cf386638
commit 9657fc56fb
10 changed files with 532 additions and 29 deletions
@@ -14,6 +14,8 @@ class ConstructionConsent extends mfBaseModel {
private $preorder_count;
private $journal;
private $history;
private $inspection_protocol_planner;
private $inspection_protocol_electrician;
private $footer_text = "Energie Steiermark Breitband GmbH, A-8010 Graz, Leonhardgürtel 10, Telefon +43 (0)316 9000-0\nSitz Graz, FN 576705x, Landesgericht für ZRS Graz, ATU 77949678, breitband@e-steiermark.com, www.e-steiermark.com";
private $footer_font = "ITC Officina Sans Std";
@@ -184,6 +186,23 @@ class ConstructionConsent extends mfBaseModel {
return $this->file;
}
if($name == "inspection_protocol_planner") {
if(!$this->id) return [];
$file = ConstructionConsentFile::getFirst(["constructionconsent_id" => $this->id, "filename" => "inspection_protocol_planner"]);
if($file) {
$this->inspection_protocol_planner = $file;
}
return $this->inspection_protocol_planner;
}
if($name == "inspection_protocol_electrician") {
if(!$this->id) return [];
$file = ConstructionConsentFile::getFirst(["constructionconsent_id" => $this->id, "filename" => "inspection_protocol_electrician"]);
if($file) {
$this->inspection_protocol_electrician = $file;
}
return $this->inspection_protocol_electrician;
}
if($name == "creator") {
$this->creator = mfValuecache::singleton()->get("Worker-id-".$this->create_by);