Openprovider-WHMCS-domains
Openprovider-WHMCS-domains copied to clipboard
[BUG] Multi year registration/renewal calculation is off
Describe the bug
changing the maxRegistrationPeriod from 1 to 10 results in strange multi-year registration and renewal calculations,
On my site all prices are VAT inclusive, but the module syncs VAT-exclusive pricing, for the 1 year we can fix that by raising the margin and accounting for VAT, for instance instead of a 10-20% margin we account for the 22% VAT by adding a 30-35% margin, however, the margin doesn't seem to be calculated in years after the first year?
To Reproduce Steps to reproduce the behavior:
- change maxRegistrationPeriod to 10
- sync TLDs
- try to register/renew the domain for 10 years (an example is provided bellow) on my site the price shows as 16€ VAT inclusive
- in Openproviders dashboard the price is 35.34€
This results in a loss for the provider.
Expected behavior
syncing prices longer than 1 year should also sync the margin for creation and renewal.
Screenshots
Server info:
- Distro: Ubuntu 22.04
- PHP: PHP 8.1.31
- Web server: nginx