gerardojbaez / laraplans

SaaS style recurring plans for Laravel.
http://laraplans.readthedocs.io
MIT License
180 stars 81 forks source link

Bug with features reset date, they should always be generated after now. #61

Open julienarcin opened 3 years ago

julienarcin commented 3 years ago

@gerardojbaez There is a bug with features reset dates. Reset dates should never be set before today.

If a user subscribes to a yearly plan, uses a feature monthly resettable feature in January, and uses it again on April, the code to regenerate the feature reset date is not correct. It will generate a reset date 1 month after on the first use, then regenerate the date 1 month after on the second use, etc.

I'm submitting the PR (with tests) now.

gerardojbaez commented 3 years ago

Hey @julienarcin, thanks for the report and the PR.