From 0d27503e8d765232cf732dd05c18cf7947686312 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 18 Oct 2023 17:49:54 +0700 Subject: [PATCH] view INVOICE again --- system/controllers/prepaid.php | 17 ++++++++++++++++- system/lan/english/common.lan.php | 1 + ui/ui/customers-view.tpl | 2 +- ui/ui/invoice.tpl | 3 +++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php index b62dc12b..24f8619c 100644 --- a/system/controllers/prepaid.php +++ b/system/controllers/prepaid.php @@ -137,12 +137,27 @@ switch ($action) { } break; + case 'view': + $id = $routes['2']; + $d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one(); + $ui->assign('in', $d); + + if(!empty($routes['3'])){ + + r2(U . 'prepaid/view/'.$id, 'e', "Success send to customer"); + } + + $ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time'])); + $ui->display('invoice.tpl'); + break; + + case 'print': $id = _post('id'); $d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one(); $ui->assign('d', $d); - $ui->assign('date', date("Y-m-d H:i:s")); + $ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time'])); run_hook('print_invoice'); #HOOK $ui->display('invoice-print.tpl'); break; diff --git a/system/lan/english/common.lan.php b/system/lan/english/common.lan.php index 31a7431b..e5670719 100644 --- a/system/lan/english/common.lan.php +++ b/system/lan/english/common.lan.php @@ -407,3 +407,4 @@ $_L['Radius_Plans'] = 'Radius Plans'; $_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order'; $_L['Logs'] = 'Logs'; $_L['Voucher_Format'] = 'Voucher Format'; +$_L['Resend_To_Customer'] = 'Resend To Customer'; diff --git a/ui/ui/customers-view.tpl b/ui/ui/customers-view.tpl index 0041ce03..d3336e0c 100644 --- a/ui/ui/customers-view.tpl +++ b/ui/ui/customers-view.tpl @@ -135,7 +135,7 @@ {foreach $activation as $ds} - + {$ds['username']} {$ds['plan_name']} {Lang::moneyFormat($ds['price'])} diff --git a/ui/ui/invoice.tpl b/ui/ui/invoice.tpl index fdb48984..0228c9d9 100644 --- a/ui/ui/invoice.tpl +++ b/ui/ui/invoice.tpl @@ -19,6 +19,7 @@ {$_L['Type']} : {$in['type']}
{$_L['Plan_Name']} : {$in['plan_name']}
{$_L['Plan_Price']} : {Lang::moneyFormat($in['price'])}
+ {$in['method']}

{$_L['Username']} : {$in['username']}
{$_L['Password']} : **********
@@ -35,6 +36,8 @@ + {Lang::T("Resend To Customer")} {$_L['Finish']}