view INVOICE again

This commit is contained in:
Ibnu Maksum 2023-10-18 17:49:54 +07:00
parent 1ae687bda2
commit 0d27503e8d
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
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';

View file

@ -135,7 +135,7 @@
</thead>
<tbody>
{foreach $activation as $ds}
<tr>
<tr onclick="window.location.href = '{$_url}prepaid/view/{$ds['id']}'" style="cursor:pointer;">
<td>{$ds['username']}</td>
<td>{$ds['plan_name']}</td>
<td>{Lang::moneyFormat($ds['price'])}</td>

View file

@ -19,6 +19,7 @@
{$_L['Type']} : <b>{$in['type']}</b><br>
{$_L['Plan_Name']} : <b>{$in['plan_name']}</b><br>
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
{$in['method']}<br>
<br>
{$_L['Username']} : <b>{$in['username']}</b><br>
{$_L['Password']} : **********<br>
@ -35,6 +36,8 @@
<input type="hidden" name="id" value="{$in['id']}">
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-print"></i>
{$_L['Click_Here_to_Print']}</button>
<a href="{$_url}prepaid/view/{$in['id']}/print" class="btn btn-info"><i
class="glyphicon glyphicon-envelope"></i> {Lang::T("Resend To Customer")}</a>
<a href="{$_url}prepaid/list" class="btn btn-primary"><i
class="ion-reply-all"></i>{$_L['Finish']}</a>
</form>