view INVOICE again

This commit is contained in:
Ibnu Maksum
2023-10-18 17:49:54 +07:00
parent 1ae687bda2
commit 0d27503e8d
4 changed files with 21 additions and 2 deletions

View File

@ -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;

View File

@ -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';