diff --git a/Layout/default/Order/Index.php b/Layout/default/Order/Index.php index 50fe54238..41652ac2a 100644 --- a/Layout/default/Order/Index.php +++ b/Layout/default/Order/Index.php @@ -285,7 +285,19 @@
">Versandtermin: shippingdate) ? "".date("d.m.Y", $order->shippingdate)."" : "--.--.----"?>
-
">Vorortinstallation: install_date) ? "".date("d.m.Y",$order->install_date)."" : "--.--.----"?>
+ install_date): ?> +
+ Vorortinstallation: install_date)?> +
+ install_products)): ?> +
+ Vorortinstallation: --.--.---- +
+ +
+ Vorortinstallation: --.--.---- +
+
@@ -625,7 +637,6 @@ - log->debug("blah: ".print_r($order->terminations[0]->workflowitems["customer_setup_date"]->value,true)); ?> " id="order-id?>"> customer_type == "business") ? "" : ""?> @@ -731,7 +742,22 @@
value->value_string) ? "active" : ""?>">Leitungsbau Backbone: terminations) && $order->terminations[0]->workflowitems["backbone_setup_date"]->value->value_string) ? "".$order->terminations[0]->workflowitems["backbone_setup_date"]->value->value_string."" : "--.--.----"?>
">Leitungsbau Kunde: terminations) && $order->terminations[0]->getWorkflowvalue("customer_setup_date")) ? "".$order->terminations[0]->getWorkflowvalue("customer_setup_date")."" : "--.--.----"?>
">Versandtermin: shippingdate) ? "".date("d.m.Y", $order->shippingdate)."" : "--.--.----"?>
-
" id="order-install-date-id?>">Vorortinstallation: install_date) ? "".date("d.m.Y",$order->install_date)."" : "--.--.----"?>
+ + install_date): ?> +
+ Vorortinstallation: install_date)?> +
+ install_products)): ?> +
+ Vorortinstallation: --.--.---- +
+ +
+ Vorortinstallation: --.--.---- +
+ + +
diff --git a/application/Order/Order.php b/application/Order/Order.php index f084cb28b..e7148fc52 100644 --- a/application/Order/Order.php +++ b/application/Order/Order.php @@ -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) { diff --git a/application/Product/Product.php b/application/Product/Product.php index 71779737c..4a87e12b5 100644 --- a/application/Product/Product.php +++ b/application/Product/Product.php @@ -9,7 +9,7 @@ class Product extends mfBaseModel { public function loadAttributes() { if(!$this->producttech_id) { - return false; + return []; } $this->attributes = [];