Order: highlighting Vororttermin if order has VOT product
This commit is contained in:
@@ -9,6 +9,7 @@ class Order extends mfBaseModel {
|
||||
private $contracts;
|
||||
private $terminations;
|
||||
private $journals;
|
||||
private $install_products;
|
||||
private $files;
|
||||
private $creator;
|
||||
private $editor;
|
||||
@@ -269,6 +270,21 @@ class Order extends mfBaseModel {
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
if($name == "install_products") {
|
||||
$this->install_products = [];
|
||||
|
||||
foreach($this->getProperty("products") as $orderproduct) {
|
||||
$product = $orderproduct->product;
|
||||
//$atrribs = $product->attributes;
|
||||
//var_dump($attribs);exit;
|
||||
if(is_array($product->attributes) && array_key_exists("vot", $product->attributes) && $product->attributes["vot"] == 1) {
|
||||
$this->install_products[] = $product;
|
||||
}
|
||||
}
|
||||
//var_dump($this->install_products);exit;
|
||||
return $this->install_products;
|
||||
}
|
||||
|
||||
if($name == "customer_type") {
|
||||
$this->customer_type = "residential";
|
||||
foreach($this->getProperty("products") as $order_product) {
|
||||
|
||||
Reference in New Issue
Block a user