From 9a3adfed152f5229f95dd6416db3c64bcbc8d998 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Tue, 31 May 2022 17:50:55 +0200 Subject: [PATCH] Added icon for customer_type to Order list --- Layout/default/Order/Index.php | 10 ++++++++-- application/Order/Order.php | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Layout/default/Order/Index.php b/Layout/default/Order/Index.php index 4a91d66ef..e49ca8a9e 100644 --- a/Layout/default/Order/Index.php +++ b/Layout/default/Order/Index.php @@ -182,7 +182,10 @@ " id="order-id?>"> - id?> + + customer_type == "business") ? "" : ""?> + id?> + log->debug("blah: ".print_r($order->terminations[0]->workflowitems["customer_setup_date"]->value,true)); ?> " id="order-id?>"> - id?> + + customer_type == "business") ? "" : ""?> + id?> + terminations) && count($order->terminations)): ?> terminations[0]->status->code >= TT_TERMSTATUS_CONNECTED): ?> diff --git a/application/Order/Order.php b/application/Order/Order.php index d125e2b51..1cbd3770e 100644 --- a/application/Order/Order.php +++ b/application/Order/Order.php @@ -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);