diff --git a/system/autoload/Package.php b/system/autoload/Package.php index 6d906ff..a9bdd1a 100644 --- a/system/autoload/Package.php +++ b/system/autoload/Package.php @@ -690,6 +690,8 @@ class Package } else { $admin['fullname'] = 'Customer'; } + $cust = ORM::for_table('tbl_customers')->where('username', $in['username'])->findOne(); + $note = ''; //print $invoice = Lang::pad($config['CompanyName'], ' ', 2) . "\n"; @@ -724,6 +726,9 @@ class Package $invoice .= Lang::pad($note, ' ', 2) . "\n"; } $invoice .= Lang::pad("", '=') . "\n"; + if($cust){ + $invoice .= Lang::pads(Lang::T('Full Name'), $cust['fullname'], ' ') . "\n"; + } $invoice .= Lang::pads(Lang::T('Username'), $in['username'], ' ') . "\n"; $invoice .= Lang::pads(Lang::T('Password'), '**********', ' ') . "\n"; if ($in['type'] != 'Balance') { @@ -765,6 +770,9 @@ class Package $invoice .= Lang::pad($note, ' ', 2) . "\n"; } $invoice .= Lang::pad("", '=') . "\n"; + if($cust){ + $invoice .= Lang::pads(Lang::T('Full Name'), $cust['fullname'], ' ') . "\n"; + } $invoice .= Lang::pads(Lang::T('Username'), $in['username'], ' ') . "\n"; $invoice .= Lang::pads(Lang::T('Password'), '**********', ' ') . "\n"; if ($in['type'] != 'Balance') { diff --git a/system/controllers/order.php b/system/controllers/order.php index c8ca1fc..0607297 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -127,6 +127,7 @@ switch ($action) { if (empty($trx)) { r2(U . "order/package", 'e', Lang::T("Transaction Not found")); } + $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']); @@ -220,7 +221,7 @@ switch ($action) { if ($active && $active['plan_id'] != $plan['id']) { r2(U . "order/package", 'e', Lang::T("Target has active plan, different with current plant.") . " [ $active[namebp] ]"); } - if (Package::rechargeUser($target['id'], $router_name, $plan['id'], $user['fullname'], 'Balance')) { + if (Package::rechargeUser($target['id'], $router_name, $plan['id'], $user['username'], 'Balance')) { // if success, then get the balance Balance::min($user['id'], $plan['price']); //sender diff --git a/system/lan/indonesia.json b/system/lan/indonesia.json index e1dfdb5..2109408 100644 --- a/system/lan/indonesia.json +++ b/system/lan/indonesia.json @@ -420,5 +420,7 @@ "Resend": "Kirim ulang", "Login": "Masuk", "success": "Sukses", - "Click_Here": "Klik disini" + "Click_Here": "Klik disini", + "Your_friend_do_not_have_active_package": "Teman Anda tidak memiliki paket aktif", + "If_your_friend_have_Additional_Cost__you_will_pay_for_that_too": "Jika teman Anda memiliki Biaya Tambahan, Anda juga akan membayarnya" } \ No newline at end of file diff --git a/ui/ui/user-orderView.tpl b/ui/ui/user-orderView.tpl index 4195404..01979a2 100644 --- a/ui/ui/user-orderView.tpl +++ b/ui/ui/user-orderView.tpl @@ -41,6 +41,10 @@ {Lang::T('Balance')} {Lang::moneyFormat($trx['price'])} + + {Lang::T('Balance')} + {$trx['note']} + {else}