WIP Contract 2024-05-07

This commit is contained in:
Frank Schubert
2024-05-07 18:57:20 +02:00
parent 4b52599209
commit 7b15b7a528
2 changed files with 74 additions and 30 deletions

View File

@@ -144,11 +144,19 @@ class Contract extends mfBaseModel {
$termination_address = $termination->building->street.", ".$termination->building->zip." ".$termination->building->city;
return $termination_address;
}
if(stripos($this->getProperty("product")->name, "dsl") != false) {
return $owner_address;
}
$product = $this->getProperty("product");
/*
* exceptions for certain products
*/
foreach(["dsl", "standortgeber", "funkinternet", "glasfaser", "brettljausn"] as $qname) {
$qname = strtolower($qname);
$product_name = strtolower($product->name);
if(stripos($product_name, $qname) !== false) {
return $owner_address;
}
}
return false;
}