Fix Print Invoice
This commit is contained in:
parent
5a10c19853
commit
51416626fb
@ -114,7 +114,6 @@ switch ($action) {
|
||||
|
||||
case 'print':
|
||||
$id = _post('id');
|
||||
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('d', $d);
|
||||
|
||||
@ -367,19 +366,17 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'refill-post':
|
||||
$user = _post('id_customer');
|
||||
$code = _post('code');
|
||||
|
||||
$user = ORM::for_table('tbl_customers')->where('id', _post('id_customer'))->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||
|
||||
run_hook('refill_customer'); #HOOK
|
||||
if ($v1) {
|
||||
if (Package::rechargeUser($user, $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $c['username'];
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
$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();
|
||||
$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"));
|
||||
$ui->display('invoice.tpl');
|
||||
|
@ -33,7 +33,7 @@
|
||||
============================================<br>
|
||||
{$_L['Type']} : <b>{$d['type']}</b><br>
|
||||
{$_L['Plan_Name']} : <b>{$d['plan_name']}</b><br>
|
||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
|
||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($d['price'])}</b><br>
|
||||
<br>
|
||||
{$_L['Username']} : <b>{$d['username']}</b><br>
|
||||
{$_L['Password']} : **********<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user