Sheernox
New Member
Env: ClientExec 7.3.0 stable (ionCube), PHP 8.5.12, MariaDB 11.4.14. Reproduced on staging on 2026-12-01.
Where:
Bug: Once a package has a recurring coupon fee (billing type -3), the method returns the coupon line's amount instead of the service price. A service priced at 8.99 with a 20% recurring coupon returns 1.798. Stock downgrade proration uses the same value, so its prorated credit is wrong while the coupon lasts.
Repro:
Fix: Resolve the package price from its base recurring fee's billing cycle and the client's currency (or the custom price when enabled), and keep the coupon amount separate from it.
Where:
modules/clients/models/UserPackage.php, UserPackage::getRecurringAmount(). The release model is encoded.Bug: Once a package has a recurring coupon fee (billing type -3), the method returns the coupon line's amount instead of the service price. A service priced at 8.99 with a 20% recurring coupon returns 1.798. Stock downgrade proration uses the same value, so its prorated credit is wrong while the coupon lasts.
Repro:
- Take a package with a recurring price of 8.99 and call getRecurringAmount() for it: it returns 8.99.
- Add a 20% recurring coupon that creates a billing type -3 fee for the same package.
- Call getRecurringAmount() again: it returns 1.798, while the catalog price (or the enabled custom price) is still 8.99.
Fix: Resolve the package price from its base recurring fee's billing cycle and the client's currency (or the custom price when enabled), and keep the coupon amount separate from it.