Added termination select to Product/Form
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user