diff --git a/system/controllers/order.php b/system/controllers/order.php index d80522b6..f439d3de 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -208,18 +208,18 @@ switch ($action) { } else { $router_name = $plan['routers']; } - $add_rem = User::getAttribute("Additional Remaining", $id_customer); - if ($add_rem != 0) { - $add_cost = User::getAttribute("Additional Cost", $id_customer); - if (!empty($add_cost)) { - $bills = User::getAttributes("Bill", $id_customer); - $ui->assign('bills', $bills); - $ui->assign('add_cost', $add_cost); - $plan['price'] += $add_cost; - } - } if (isset($_POST['send']) && $_POST['send'] == 'plan') { $target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one(); + $add_rem = User::getAttribute("Additional Remaining", $target['id']); + if ($add_rem != 0) { + $add_cost = User::getAttribute("Additional Cost", $target['id']); + if (!empty($add_cost)) { + $bills = User::getAttributes("Bill", $target['id']); + $ui->assign('bills', $bills); + $ui->assign('add_cost', $add_cost); + $plan['price'] += $add_cost; + } + } if (!$target) { r2(U . 'home', 'd', Lang::T('Username not found')); } diff --git a/system/lan/english.json b/system/lan/english.json index b5ffc5ed..e07b9d38 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -489,5 +489,7 @@ "Remaining": "Remaining", "": "", "Not_Found": "Not Found", - "Cash": "Cash" + "Cash": "Cash", + "Payment_not_found": "Payment not found", + "If_your_friend_have_Additional_Cost__you_will_pay_for_that_too": "If your friend have Additional Cost, you will pay for that too" } \ No newline at end of file diff --git a/ui/ui/user-orderPlan.tpl b/ui/ui/user-orderPlan.tpl index 7fcb9f7c..79852912 100644 --- a/ui/ui/user-orderPlan.tpl +++ b/ui/ui/user-orderPlan.tpl @@ -113,8 +113,8 @@
  • {if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}
  • {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
  • -
    - {if Lang::arrayCount($radius_pppoe)>0} + {if Lang::arrayCount($radius_pppoe)>0} +
    {foreach $radius_pppoe as $plan}
    @@ -157,13 +157,14 @@
    {/foreach} - {/if} - - {if Lang::arrayCount($radius_hotspot)>0} - +
    + {/if} + {if Lang::arrayCount($radius_hotspot)>0} + +
    {foreach $radius_hotspot as $plan}
    @@ -206,8 +207,8 @@
    {/foreach} - {/if} -
    +
    + {/if} {/if} {/if} {foreach $routers as $router} diff --git a/ui/ui/user-sendPlan.tpl b/ui/ui/user-sendPlan.tpl index 8dd9e7bd..c2ab0e4b 100644 --- a/ui/ui/user-sendPlan.tpl +++ b/ui/ui/user-sendPlan.tpl @@ -47,6 +47,7 @@ value="plan"> +

    {Lang::T('If your friend have Additional Cost, you will pay for that too')}