diff --git a/system/controllers/home.php b/system/controllers/home.php index 624ec876..d9a7c351 100644 --- a/system/controllers/home.php +++ b/system/controllers/home.php @@ -77,15 +77,16 @@ if (_post('send') == 'balance') { r2(U . 'home', 'd', Lang::T('Failed, balance is not available')); } } else if (_post('send') == 'plan') { - $active = ORM::for_table('tbl_user_recharges') + $actives = ORM::for_table('tbl_user_recharges') ->where('username', _post('username')) - ->find_one(); + ->find_many(); + foreach($actives as $active){ $router = ORM::for_table('tbl_routers')->where('name', $active['routers'])->find_one(); - if ($router) { - r2(U . "order/send/$router[id]/$active[plan_id]&u=" . trim(_post('username')), 's', Lang::T('Review package before recharge')); - } else { - r2(U . 'home', 'w', Lang::T('Your friend do not have active package')); + if ($router) { + r2(U . "order/send/$router[id]/$active[plan_id]&u=" . trim(_post('username')), 's', Lang::T('Review package before recharge')); + } } + r2(U . 'home', 'w', Lang::T('Your friend do not have active package')); } $ui->assign('_bills', User::_billing()); diff --git a/system/controllers/order.php b/system/controllers/order.php index cca30dcc..4aa29efb 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -131,9 +131,8 @@ switch ($action) { $router = Mikrotik::info($trx['routers']); $plan = ORM::for_table('tbl_plans')->find_one($trx['plan_id']); $bandw = ORM::for_table('tbl_bandwidth')->find_one($plan['id_bw']); - list($bills, $add_cost) = User::getBills($id_customer); - $ui->assign('bills', $bills); - $ui->assign('add_cost', $add_cost); + $invoice = ORM::for_table('tbl_transactions')->where("invoice",$trx['trx_invoice'])->find_one(); + $ui->assign('invoice', $invoice); $ui->assign('trx', $trx); $ui->assign('router', $router); $ui->assign('plan', $plan); diff --git a/system/lan/indonesia.json b/system/lan/indonesia.json index af3cc8ae..50e10242 100644 --- a/system/lan/indonesia.json +++ b/system/lan/indonesia.json @@ -425,5 +425,6 @@ "If_your_friend_have_Additional_Cost__you_will_pay_for_that_too": "Jika teman Anda memiliki Biaya Tambahan, Anda juga akan membayarnya", "Select_Payment_Gateway": "Pilih Gerbang Pembayaran", "Available_Payment_Gateway": "Gerbang Pembayaran yang Tersedia", - "Pay_Now": "Bayar sekarang" + "Pay_Now": "Bayar sekarang", + "Notes": "Catatan" } \ No newline at end of file diff --git a/ui/ui/user-orderView.tpl b/ui/ui/user-orderView.tpl index 01979a27..f1de1117 100644 --- a/ui/ui/user-orderView.tpl +++ b/ui/ui/user-orderView.tpl @@ -38,13 +38,17 @@