Fixed showing some orders with termination in special orders in Order/Index
This commit is contained in:
@@ -225,6 +225,7 @@ class OrderController extends mfBaseController {
|
|||||||
|
|
||||||
$has_bras = false;
|
$has_bras = false;
|
||||||
$has_voice = false;
|
$has_voice = false;
|
||||||
|
$has_term = false;
|
||||||
foreach($order->products as $lop) {
|
foreach($order->products as $lop) {
|
||||||
if(is_array($lop->product->attributes) && array_key_exists("bras_type", $lop->product->attributes) && $lop->product->attributes['bras_type']) {
|
if(is_array($lop->product->attributes) && array_key_exists("bras_type", $lop->product->attributes) && $lop->product->attributes['bras_type']) {
|
||||||
$has_bras = true;
|
$has_bras = true;
|
||||||
@@ -232,12 +233,20 @@ class OrderController extends mfBaseController {
|
|||||||
if(is_array($lop->product->attributes) && array_key_exists("voip_chan", $lop->product->attributes) && $lop->product->attributes['voip_chan']) {
|
if(is_array($lop->product->attributes) && array_key_exists("voip_chan", $lop->product->attributes) && $lop->product->attributes['voip_chan']) {
|
||||||
$has_voice = true;
|
$has_voice = true;
|
||||||
}
|
}
|
||||||
|
if(
|
||||||
|
is_array($lop->product->attributes)
|
||||||
|
&& array_key_exists("termination_required", $lop->product->attributes)
|
||||||
|
&& $lop->product->attributes['termination_required']
|
||||||
|
&& $lop->termination_id
|
||||||
|
) {
|
||||||
|
$has_term = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!$has_bras && !$has_voice) {
|
if(!$has_bras && !$has_voice && !$has_term) {
|
||||||
$special_orders[] = $order;
|
$special_orders[] = $order;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if($has_voice && !$has_bras) {
|
if($has_voice && !$has_bras && !$has_term) {
|
||||||
$voice_orders[] = $order;
|
$voice_orders[] = $order;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user