branch icon

commercial.abp: calculate license remaining duration more stable #10538

Localizations: https://github.com/abpframework/abp/pull/12821 Resolves #8999

  • calculate by days when upgrading the organization if it has more than 1-year remaining license end-time.

‼️ Risk

This PR must be tested with the 2Checkout gateway before being merged. It probably won't work for 2Checkout. We should talk about this separately after the test for 2Checkout.

For additional developer acquisition and license upgrades

OLD behavior

Case-1: While the license has 390 (more than one year) days to expire: 730 (2 years) daily fee is charged.

Case-2: With 1090 (more than 2 years) days until the license expires: 1095 (3 years) daily fee is charged.

In other words, it was always rounded up to the next year. In this case, the user can be profitable or harmful depending on the month he bought.

New behavior

Case-1: While the license has 390 (more than one year) days to expire: 390 days fee is charged.

Case-2: With 1090 (more than 2 years) days until the license expires: 1090 daily fee is charged.

In other words, the calculation is made according to how many days there are and the user is charged accordingly.

NOTE: Leap years are taken into account.

Screenshots

Screen Shot 2022-05-31 at 10 56 05 Screen Shot 2022-05-31 at 10 56 13
Version
6.0.0
Release Date
05 října, 2022
Labels
enhancement abp-io