erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

fix: logic: 'following calendar months' now allows yearly billing cycles

Open 0spinboson opened this issue 6 months ago • 1 comments

For my association I wanted to be able to create yearly memberships tied to open-ended subscriptions that follow the calendar year. This was impossible because of validation errors and missing logic.

In the current codebase, there is a check for the existence of a subscription end date when "follow calendar months" is enabled. It complains about the absence of a subscription end date when you create a subscription on a yearly billing cycle. This exception seems unintentional and I cannot think of a valid use case where you'd want to require a predefined subscription end date with yearly subscriptions but not monthly/quarterly. As such, I am submitting this fix (which otherwise leaves the validation check in place).

The second and third commit expand the get_current_invoice_end method invoicing logic to work with yearly subscriptions as well as amending the option description in the json file.

0spinboson avatar May 16 '25 10:05 0spinboson

bump

ruthra-kumar avatar Jun 10 '25 09:06 ruthra-kumar

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

stale[bot] avatar Jun 26 '25 03:06 stale[bot]

whoops, premature push, sorry.

0spinboson avatar Jul 24 '25 08:07 0spinboson

oh, this isn't better. sorry number 2

0spinboson avatar Jul 24 '25 08:07 0spinboson

PR hopefully superseded by https://github.com/frappe/erpnext/pull/48770

0spinboson avatar Jul 24 '25 09:07 0spinboson

⚠️ The sha of the head commit of this PR conflicts with #48770. Mergify cannot evaluate rules on this PR. ⚠️

mergify[bot] avatar Jul 24 '25 09:07 mergify[bot]