Fix radius plan base
*uptime limit
*burst bw profile limit
*data limit
*user can't login after recharge radius plan base
please add this variable in "mods-available/sqlcounter" for freeradius installation wiki
sqlcounter uptimelimit {
counter_name = 'Max-All-Session-Time'
check_name = 'Max-All-Session'
sql_module_instance = sql
key = 'User-Name'
reset = never
query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{${key}}'"
}
and this variable in "sites-enabled/default"
authorize {
expiration
quotalimit
accessperiod
uptimelimit
}
separated case csv now we will have one for all customers and another one for prepaid users.
for all customers csv will be downloaded from list and prepaid csv will be from prepaid users.
Also added columns instead of the previous one
Tax System Feature Added
The Tax System feature allows you to apply taxes to the prices of Internet plans. This feature is useful for businesses that are required to collect taxes on their services. With the Tax System, you can define tax rates based on your local tax regulations.
Enable Tax System: Choose whether to enable or disable the Tax System. When enabled, taxes will be calculated and added to the prices of Internet plans.
Tax Rate: Select from predefined tax rates such as 0.5%, 1%, 1.5%, 2%, 5%, and 10%. These rates are commonly used and can be selected easily.
Custom Tax Rate: If you have a specific tax rate that is not listed, you can enter a custom tax rate. This allows flexibility in configuring the tax rate to match your local tax requirements.
Changes made:
1. Use the $recharges variable to hold the query results to clarify the context.
2. Use the ternary operator to determine whether the application is running in a CLI environment or not
3. Simplify the logic by combining several redundant code blocks.
4. Unify Mikrotik client retrieval logic based on type (Hotspot or PPPOE) to reduce code duplication.
5. Tidy up the indents to make them consistent and easier to read.