joanie icon indicating copy to clipboard operation
joanie copied to clipboard

Allow to configure how the withdrawal date is computed

Open lunika opened this issue 1 year ago • 0 comments

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.

The method computing the withdrawal date for the payment schedule is only relevant for a french calendar with the french law. We should allow to choose the calendar to use and how many days to the withdrawal.

Describe the solution you'd like

Add two new settings. One for the calendar to use and an other one for the withdrawal days and use them in this function https://github.com/openfun/joanie/blob/9503173fde2931701e17513b242aedae2a97354d/src/backend/joanie/core/utils/payment_schedule.py#L30-L55

The calendar is a class, so we have to manage them like a backend or use the import_string django helper.

lunika avatar May 15 '24 06:05 lunika