Added termination select to Product/Form

This commit is contained in:
Frank Schubert
2021-07-30 20:03:24 +02:00
parent ec0abff225
commit 0a5e447587
11 changed files with 249 additions and 28 deletions
+21
View File
@@ -10,6 +10,25 @@ class Termination extends mfBaseModel {
private $editor;
public function getAddress($singelLine = false) {
if(!$this->id) {
return false;
}
$b = $this->getProperty("building");
$address = $b->street;
if($this->name) {
$address .= " ".$this->name;
}
$address .= "\n".$b->zip." ".$b->city;
if($singelLine) {
$address = str_replace("\n", " ", $address);
}
return $address;
}
public function getNewObjectCode() {
if(!$this->building_id) {
return false;
@@ -51,6 +70,8 @@ class Termination extends mfBaseModel {
return $code;
}
public function getProperty($name) {
if($this->$name == null) {