diff --git a/system/controllers/customers.php b/system/controllers/customers.php index d6a86c0f..8fb4689c 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -184,13 +184,18 @@ switch ($action) { $zero = 1; $gateway = 'Recharge Zero'; } + $usings = explode(',', $config['payment_usings']); + $usings = array_filter(array_unique($usings)); + if(count($usings)==0){ + $usings[] = Lang::T('Cash'); + } + $ui->assign('usings', $usings); $ui->assign('bills', $bills); $ui->assign('add_cost', $add_cost); $ui->assign('cust', $cust); $ui->assign('gateway', $gateway); $ui->assign('channel', $channel); $ui->assign('server', $b['routers']); - $ui->assign('using', 'cash'); $ui->assign('plan', $plan); $ui->display('recharge-confirm.tpl'); } else { diff --git a/system/controllers/plan.php b/system/controllers/plan.php index 4cb6c12d..a14053db 100644 --- a/system/controllers/plan.php +++ b/system/controllers/plan.php @@ -114,6 +114,12 @@ switch ($action) { $zero = 1; $gateway = 'Recharge Zero'; } + $usings = explode(',', $config['payment_usings']); + $usings = array_filter(array_unique($usings)); + if(count($usings)==0){ + $usings[] = Lang::T('Cash'); + } + $ui->assign('usings', $usings); $ui->assign('bills', $bills); $ui->assign('add_cost', $add_cost); $ui->assign('cust', $cust); diff --git a/ui/ui/recharge-confirm.tpl b/ui/ui/recharge-confirm.tpl index e4c987ab..2b841873 100644 --- a/ui/ui/recharge-confirm.tpl +++ b/ui/ui/recharge-confirm.tpl @@ -5,82 +5,91 @@
{Lang::T('Confirm')}
-
{Lang::T('Customer')}
- -
{Lang::T('Plan')}
- -
{Lang::T('Total')}
-
+
{Lang::T('Customer')}
+
    +
  • + {Lang::T('Username')} {$cust['username']} +
  • +
  • + {Lang::T('Name')} {$cust['fullname']} +
  • +
  • + {Lang::T('Phone Number')} {$cust['phonenumber']} +
  • +
  • + {Lang::T('Email')} {$cust['email']} +
  • +
  • + {Lang::T('Address')} {$cust['address']} +
  • +
  • + {Lang::T('Balance')} {Lang::moneyFormat($cust['balance'])} +
  • +
+
{Lang::T('Plan')}
+
    +
  • + {Lang::T('Plan Name')} {$plan['name_plan']} +
  • +
  • + {Lang::T('Location')} {if $plan['is_radius']}Radius{else}{$plan['routers']}{/if} +
  • +
  • + {Lang::T('Type')} {if $plan['prepaid'] eq 'yes'}Prepaid{else}Postpaid{/if} + {$plan['type']} +
  • +
  • + {Lang::T('Plan Price')} {if $using eq 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if} +
  • +
  • + {Lang::T('Plan Validity')} {$plan['validity']} + {$plan['validity_unit']} +
  • +
  • + {Lang::T('Using')} + + +
  • +
+
{Lang::T('Total')}
+
    + {if $using neq 'zero' and $add_cost>0} + {foreach $bills as $k => $v} +
  • + {$k} {Lang::moneyFormat($v)} +
  • + {/foreach} +
  • + {Lang::T('Additional Cost')} {Lang::moneyFormat($add_cost)} +
  • +
  • + {Lang::T('Total')} ({Lang::T('Plan Price')} +{Lang::T('Additional Cost')}){Lang::moneyFormat($plan['price']+$add_cost)} +
  • + {else} +
  • + {Lang::T('Total')} {if $using eq 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if} +
  • + {/if} +
-

diff --git a/ui/ui/recharge.tpl b/ui/ui/recharge.tpl index 5dc93716..ee767c7b 100644 --- a/ui/ui/recharge.tpl +++ b/ui/ui/recharge.tpl @@ -46,7 +46,7 @@