Formatting
This commit is contained in:
parent
a7502aa8fb
commit
8824489704
@ -138,8 +138,7 @@ switch ($action) {
|
||||
if (Package::rechargeUser($id_customer, $server, $plan, "Recharge", $admin['fullname'])) {
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
$ui->assign('in', $in);
|
||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||
Package::createInvoice($in);
|
||||
$ui->display('invoice.tpl');
|
||||
_log('[' . $admin['username'] . ']: ' . 'Recharge ' . $c['username'] . ' [' . $in['plan_name'] . '][' . Lang::moneyFormat($in['price']) . ']', $admin['user_type'], $admin['id']);
|
||||
} else {
|
||||
@ -152,19 +151,18 @@ switch ($action) {
|
||||
|
||||
case 'view':
|
||||
$id = $routes['2'];
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('in', $d);
|
||||
|
||||
$in = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('in', $in);
|
||||
if (!empty($routes['3']) && $routes['3'] == 'send') {
|
||||
$c = ORM::for_table('tbl_customers')->where('username', $d['username'])->find_one();
|
||||
$c = ORM::for_table('tbl_customers')->where('username', $in['username'])->find_one();
|
||||
if ($c) {
|
||||
Message::sendInvoice($c, $d);
|
||||
Message::sendInvoice($c, $in);
|
||||
r2(U . 'prepaid/view/' . $id, 's', "Success send to customer");
|
||||
}
|
||||
r2(U . 'prepaid/view/' . $id, 'd', "Customer not found");
|
||||
}
|
||||
Package::createInvoice($in);
|
||||
$ui->assign('_title', 'View Invoice');
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
||||
$ui->display('invoice.tpl');
|
||||
break;
|
||||
|
||||
@ -612,7 +610,7 @@ switch ($action) {
|
||||
$content .= Lang::pad("", '=') . "\n";
|
||||
$content .= Lang::pad($config['note'], ' ', 2) . "\n";
|
||||
$ui->assign('_title', Lang::T('View'));
|
||||
$ui->assign('wa', urlencode("```$content```"));
|
||||
$ui->assign('whatsapp', urlencode("```$content```"));
|
||||
$ui->display('voucher-view.tpl');
|
||||
} else {
|
||||
r2(U . 'prepaid/voucher/', 'e', Lang::T('Voucher Not Found'));
|
||||
@ -657,8 +655,7 @@ switch ($action) {
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $user['username'])->order_by_desc('id')->find_one();
|
||||
$ui->assign('in', $in);
|
||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||
Package::createInvoice($in);
|
||||
$ui->display('invoice.tpl');
|
||||
} else {
|
||||
r2(U . 'prepaid/refill', 'e', "Failed to refill account");
|
||||
@ -689,8 +686,7 @@ switch ($action) {
|
||||
if (Package::rechargeUser($user, 'balance', $plan, "Deposit", $admin['fullname'])) {
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $user)->find_one();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
$ui->assign('in', $in);
|
||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||
Package::createInvoice($in);
|
||||
$ui->display('invoice.tpl');
|
||||
} else {
|
||||
r2(U . 'prepaid/refill', 'e', "Failed to refill account");
|
||||
|
Loading…
x
Reference in New Issue
Block a user