Added icon for customer_type to Order list
This commit is contained in:
@@ -182,7 +182,10 @@
|
||||
<?php $order_count = 0; ?>
|
||||
<?php foreach($lonelyOrders as $order): ?>
|
||||
<tr class="order-list-tr pb-0 <?=($order_count % 2 == 0) ? "table-bg-even" : ""?>" id="order-<?=$order->id?>">
|
||||
<td onclick="toggleOrder(<?=$order->id?>)"><?=$order->id?></td>
|
||||
<td onclick="toggleOrder(<?=$order->id?>)">
|
||||
<?=($order->customer_type == "business") ? "<i class='fas fa-buildings text-primary mr-1' title='Businessprodukt vorhanden'></i>" : "<i class='fas fa-user text-danger mr-1' title='Nur Residential Produkte'></i>"?>
|
||||
<?=$order->id?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$voip = false;
|
||||
@@ -578,7 +581,10 @@
|
||||
<?php foreach($orders as $order): ?>
|
||||
<?php //$this->log->debug("blah: ".print_r($order->terminations[0]->workflowitems["customer_setup_date"]->value,true)); ?>
|
||||
<tr class="order-list-tr pb-0 <?=($order_count % 2 == 0) ? "table-bg-even" : ""?>" id="order-<?=$order->id?>">
|
||||
<td><?=$order->id?></td>
|
||||
<td>
|
||||
<?=($order->customer_type == "business") ? "<i class='fas fa-buildings text-primary mr-1' title='Businessprodukt vorhanden'></i>" : "<i class='fas fa-user text-danger mr-1' title='Nur Residential Produkte'></i>"?>
|
||||
<?=$order->id?>
|
||||
</td>
|
||||
<td onclick="toggleOrder(<?=$order->id?>)">
|
||||
<?php if(is_array($order->terminations) && count($order->terminations)): ?>
|
||||
<?php if($order->terminations[0]->status->code >= TT_TERMSTATUS_CONNECTED): ?>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user