show Additional Billing in the customer

This commit is contained in:
Ibnu Maksum
2024-07-23 14:43:43 +07:00
parent 694428f804
commit c32e921cab
5 changed files with 75 additions and 21 deletions

View File

@ -56,6 +56,22 @@ class User
return [$bills, $addcost];
}
public static function getBillNames($id = 0)
{
if (!$id) {
$id = User::getID();
if (!$id) {
return [];
}
}
$bills = [];
$attrs = User::getAttributes('Bill', $id);
foreach ($attrs as $k => $v) {
$bills[] = str_replace(' Bill', '', $k);
}
return $bills;
}
public static function billsPaid($bills, $id = 0)
{
if (!$id) {

View File

@ -29,7 +29,7 @@ switch ($action) {
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
die('<a href="' . U . 'home&mikrotik=login&id=' . $bill['id'] . '" onclick="return confirm(\'' . Lang::T('Connect to Internet?') . '\')" class="btn btn-danger btn-xs btn-block">' . Lang::T('Not Online, Login now?') . '</a>');
} else {
die(Lang::T('Your account not connected to internet'));
die(Lang::T('-'));
}
}
} else {

View File

@ -291,5 +291,9 @@ $ui->assign('unpaid', ORM::for_table('tbl_payment_gateway')
->where('status', 1)
->find_one());
$ui->assign('code', alphanumeric(_get('code'), "-"));
$abills = User::getAttributes("Bill");
$ui->assign('abills', $abills);
run_hook('view_customer_dashboard'); #HOOK
$ui->display('user-dashboard.tpl');

View File

@ -658,6 +658,8 @@
"Activate_Voucher": "Activate Voucher",
"Voucher_invalid": "Voucher invalid",
"Account_Not_Found": "Account Not Found",
"Voucher_activation_success__now_you_can_login": "Voucher activation success, now you can login",
"Internet_Voucher_Expired": "Internet Voucher Expired"
"Internet_Voucher_Expired": "Internet Voucher Expired",
"": "",
"Additional_Billing": "Additional Billing",
"_": "-"
}