fix pppoe_username accounting radius rest

This commit is contained in:
iBNu Maksum 2025-02-19 11:16:57 +07:00
parent 92ce363b16
commit 1a2f2e24cd
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -304,6 +304,14 @@ try {
$d->dateAdded = date('Y-m-d H:i:s');
// pastikan data akunting yang disimpan memang customer aktif phpnuxbill
$tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY username = '$username' AND `status` = 'on' AND `routers` = 'radius'")->find_one();
if (!$tur) {
// check if pppoe_username
$c = ORM::for_table('tbl_customers')->select('username')->whereRaw("BINARY pppoe_username = '$username'")->find_one();
if ($c) {
$username = $c['username'];
$tur = ORM::for_table('tbl_user_recharges')->whereRaw("BINARY username = '$username'")->find_one();
}
}
if ($tur) {
$d->save();
if (_post('acctStatusType') == 'Start') {