| $pieces = explode("-", $c->ranges); | $pieces = explode("-", $c->ranges); | ||||
| if ($countD24_1 >= intval($pieces[0]) && $countD24_1 <= intval($pieces[1])) { | |||||
| if ($countD24_2 >= intval($pieces[0]) && $countD24_2 <= intval($pieces[1])) { | |||||
| if (strpos($c->comm, 'RM') !== false) { | if (strpos($c->comm, 'RM') !== false) { | ||||
| $comm24_1 = '+ ' . $c->comm; | |||||
| $commV24_1 = ''; | |||||
| $addRM24_1 = $c->comm; | |||||
| $comm24_2 = '+ ' . $c->comm; | |||||
| $commV24_2 = ''; | |||||
| $addRM24_2 = $c->comm; | |||||
| } else { | } else { | ||||
| $comms = explode("RM", $c->comm); | $comms = explode("RM", $c->comm); | ||||
| if (!empty($comms[1])) { | if (!empty($comms[1])) { | ||||
| $comm24_1 = 'RM ' . $comms[1]; | |||||
| $commV24_1 = floatval($comms[1]); | |||||
| $comm24_2 = 'RM ' . $comms[1]; | |||||
| $commV24_2 = floatval($comms[1]); | |||||
| } else { | } else { | ||||
| if ($comms[0] != '') { | if ($comms[0] != '') { | ||||
| $comm24_1 = $comms[0] . '%'; | |||||
| $commV24_1 = floatval($comms[0]) / 100; | |||||
| $comm24_2 = $comms[0] . '%'; | |||||
| $commV24_2 = floatval($comms[0]) / 100; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } else if ($c->contract == '24' && $c->packageR == "500") { | } else if ($c->contract == '24' && $c->packageR == "500") { | ||||
| if (strpos($c->ranges, '-') !== false) { | if (strpos($c->ranges, '-') !== false) { | ||||
| $pieces = explode("-", $c->ranges); | $pieces = explode("-", $c->ranges); | ||||
| if ($countD24_1 >= intval($pieces[0]) && $countD24_1 <= intval($pieces[1])) { | |||||
| if ($countD24_3 >= intval($pieces[0]) && $countD24_3 <= intval($pieces[1])) { | |||||
| if (strpos($c->comm, 'RM') !== false) { | if (strpos($c->comm, 'RM') !== false) { | ||||
| $comm24_1 = '+ ' . $c->comm; | |||||
| $commV24_1 = ''; | |||||
| $addRM24_1 = $c->comm; | |||||
| $comm24_3 = '+ ' . $c->comm; | |||||
| $commV24_3 = ''; | |||||
| $addRM24_3 = $c->comm; | |||||
| } else { | } else { | ||||
| $comms = explode("RM", $c->comm); | $comms = explode("RM", $c->comm); | ||||
| if (!empty($comms[1])) { | if (!empty($comms[1])) { | ||||
| $comm24_1 = 'RM ' . $comms[1]; | |||||
| $commV24_1 = floatval($comms[1]); | |||||
| $comm24_3 = 'RM ' . $comms[1]; | |||||
| $commV24_3 = floatval($comms[1]); | |||||
| } else { | } else { | ||||
| if ($comms[0] != '') { | if ($comms[0] != '') { | ||||
| $comm24_1 = $comms[0] . '%'; | |||||
| $commV24_1 = floatval($comms[0]) / 100; | |||||
| $comm24_3 = $comms[0] . '%'; | |||||
| $commV24_3 = floatval($comms[0]) / 100; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| $pieces = explode("-", $c->ranges); | $pieces = explode("-", $c->ranges); | ||||
| if ($countD24_1 >= intval($pieces[0]) && $countD24_1 <= intval($pieces[1])) { | |||||
| if ($countD24_4 >= intval($pieces[0]) && $countD24_4 <= intval($pieces[1])) { | |||||
| if (strpos($c->comm, 'RM') !== false) { | if (strpos($c->comm, 'RM') !== false) { | ||||
| $comm24_1 = '+ ' . $c->comm; | |||||
| $commV24_1 = ''; | |||||
| $addRM24_1 = $c->comm; | |||||
| $comm24_4 = '+ ' . $c->comm; | |||||
| $commV24_4 = ''; | |||||
| $addRM24_4 = $c->comm; | |||||
| } else { | } else { | ||||
| $comms = explode("RM", $c->comm); | $comms = explode("RM", $c->comm); | ||||
| if (!empty($comms[1])) { | if (!empty($comms[1])) { | ||||
| $comm24_1 = 'RM ' . $comms[1]; | |||||
| $commV24_1 = floatval($comms[1]); | |||||
| $comm24_4 = 'RM ' . $comms[1]; | |||||
| $commV24_4 = floatval($comms[1]); | |||||
| } else { | } else { | ||||
| if ($comms[0] != '') { | if ($comms[0] != '') { | ||||
| $comm24_1 = $comms[0] . '%'; | |||||
| $commV24_1 = floatval($comms[0]) / 100; | |||||
| $comm24_4 = $comms[0] . '%'; | |||||
| $commV24_4 = floatval($comms[0]) / 100; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (strpos($c->ranges, '>') !== false) { | if (strpos($c->ranges, '>') !== false) { | ||||
| $pieces = explode(">", $c->ranges); | $pieces = explode(">", $c->ranges); | ||||