Project60 / org.project60.sepa

SEPA direct debit integration with civicrm
19 stars 46 forks source link

Recurring mandate with yearly interval: wrong date for next collection #696

Open fsnet opened 8 months ago

fsnet commented 8 months ago

Since the selectable collection days are limited to 1-28 it is not possible to configure a recurring mandate with a yearly interval and a collection day > 28. Thus it is impossible to establish a recurring mandate with a yearly collection on (e.g.) 01-31 Is there a compelling reason for the limit?

Bildschirmfoto 2024-01-08 um 11 55 01

Bildschirmfoto 2024-01-08 um 11 59 16

eptbertram commented 6 months ago

Not all month have more than 28 days.

Maybe you can use the settings on buffer days to archieve your goal?

bjendres commented 6 months ago

Is there a compelling reason for the limit?

The "compelling reason" is simply that allowing something like "31" as a collection day would require additional logic to enable the system to still generate valid collection dates, e.g. in monthly collections. The same check would have to be done in your proposed scenario with annual collections, but then it would be able to validate this in at configuration time. And don't get me started on leap days...

Since this could be implemented in a sensible way, even though it would require quite some work and testing, I'll mark this as feature request.

bjendres commented 6 months ago

One addition: Of course you could always implement the alter_next_collection_date hook here to implement the behaviour you want.