Order: highlighting Vororttermin if order has VOT product

This commit is contained in:
Frank Schubert
2022-11-16 15:08:58 +01:00
parent 08b29a4e13
commit 9265161644
3 changed files with 46 additions and 4 deletions

View File

@@ -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) {