Openprovider-WHMCS-domains icon indicating copy to clipboard operation
Openprovider-WHMCS-domains copied to clipboard

[BUG] Multi year registration/renewal calculation is off

Open mmitech opened this issue 1 week ago • 0 comments

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:

  1. change maxRegistrationPeriod to 10
  2. sync TLDs
  3. try to register/renew the domain for 10 years (an example is provided bellow) on my site the price shows as 16€ VAT inclusive
  4. 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

Image Image

Server info:

  • Distro: Ubuntu 22.04
  • PHP: PHP 8.1.31
  • Web server: nginx

mmitech avatar Feb 19 '25 09:02 mmitech