add length Menu 5, 10, 25, 50, 100 and All, as suggested by one of our member and also use 5 as default page length to make the page fit the screen when loaded
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.