浏览代码

undo flag

ifah
父节点
当前提交
cc2bff8cc8
共有 1 个文件被更改,包括 17 次插入5 次删除
  1. 17
    5
      app/Http/Controllers/DS/DealerController.php

+ 17
- 5
app/Http/Controllers/DS/DealerController.php 查看文件

// Contract => 24 // Contract => 24
if ($countD24 != 0) { if ($countD24 != 0) {
if (strpos($c->ranges, '>') !== false) { if (strpos($c->ranges, '>') !== false) {
info('if yang pertama ' . $c->ranges);


$pieces = explode(">", $c->ranges); $pieces = explode(">", $c->ranges);


$comm24 = '+ ' . $c->comm; $comm24 = '+ ' . $c->comm;
$commV24 = ''; $commV24 = '';
$addRM24 = $c->comm; $addRM24 = $c->comm;
info($commV24 . ' first if ' . $addRM24);
} else { } else {
$comms = explode("RM", $c->comm); $comms = explode("RM", $c->comm);
if (!empty($comms[1])) { if (!empty($comms[1])) {
} }
} }
if (strpos($c->ranges, '-') !== false) { if (strpos($c->ranges, '-') !== false) {
info('if yang kedua ' .$c->ranges);


$pieces = explode("-", $c->ranges); $pieces = explode("-", $c->ranges);


if ($countD24 >= intval($pieces[0]) && $countD24 <= intval($pieces[1])) { if ($countD24 >= intval($pieces[0]) && $countD24 <= intval($pieces[1])) {
$commV24 = floatval($c->comm) / 100;
$comm24 = $c->comm . '%';
if (strpos($c->comm, 'RM') !== false) {
$comm24 = '+ ' . $c->comm;
$commV24 = '';
$addRM24 = $c->comm;
info($commV24 . ' first if ' . $addRM24);
} else {
$comms = explode("RM", $c->comm);
if (!empty($comms[1])) {
$comm24 = 'RM ' . $comms[1];
$commV24 = floatval($comms[1]);
} else {
if ($comms[0] != '') {
$comm24 = $comms[0] . '%';
$commV24 = floatval($comms[0]) / 100;
}
}
}
} }
} }
} }

正在加载...
取消
保存