Added icon for customer_type to Order list

This commit is contained in:
Frank Schubert
2022-05-31 17:50:55 +02:00
parent 93169470e1
commit 9a3adfed15
2 changed files with 20 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ class Order extends mfBaseModel {
private $owner;
private $billingaddress;
private $products;
private $customer_type;
private $contracts;
private $terminations;
private $journals;
@@ -196,6 +197,17 @@ class Order extends mfBaseModel {
return $this->products;
}
if($name == "customer_type") {
$this->customer_type = "residential";
foreach($this->getProperty("products") as $order_product) {
if($order_product->product->producttech->customer_type == "business") {
$this->customer_type = "business";
break;
}
}
return $this->customer_type;
}
if($name == "contracts") {
foreach($this->getProperty("products") as $product) {
//var_dump($product);