diff --git a/erpnext/locale/fr.po b/erpnext/locale/fr.po index b5e92a90dad99b820cfd63816de278663c6446e5..b91872f134facea4a0272631e8a5dc0ed7367fe6 100644 --- a/erpnext/locale/fr.po +++ b/erpnext/locale/fr.po @@ -65670,3 +65670,9 @@ msgstr "🗃️ Données des projets" #: support/workspace/support/support.json venue/workspace/venue/venue.json msgid "🗃️ Reports & Masters" msgstr "🗃️ Rapports & Données de base" + +#. Option for the 'Recurrence' (Select) field in DocType 'Booking Credit +#. Allocation Rule' +#: bookings/bookings/doctype/booking_credit_allocation_rule/booking_credit_allocation_rule.json +msgid "Every 3 Months" +msgstr "Tout les 3 Mois" \ No newline at end of file diff --git a/erpnext/venue/doctype/booking_credit/booking_credit.py b/erpnext/venue/doctype/booking_credit/booking_credit.py index 53b7cc99e1252a0f202da715d1811f95ab1b43fd..cd88354123931a40df12fb01bcafe2abcf2622ca 100644 --- a/erpnext/venue/doctype/booking_credit/booking_credit.py +++ b/erpnext/venue/doctype/booking_credit/booking_credit.py @@ -183,18 +183,25 @@ def are_subscription_credits_due(date, rule, subscription): if rule.recurrence == "Every Day": frequency = rrule.DAILY + recurrence_interval = 1 elif rule.recurrence == "Every Week": frequency = rrule.WEEKLY + recurrence_interval = 1 elif rule.recurrence == "Every Month": frequency = rrule.MONTHLY + recurrence_interval = 1 + + elif rule.recurrence == "Every 3 Months": + frequency = rrule.MONTHLY + recurrence_interval = 3 end_date = getdate(subscription.cancellation_date or subscription.current_invoice_end) possible_dates = [ getdate(x) for x in rrule.rrule( - frequency, dtstart=get_datetime(subscription.start), until=get_datetime(end_date) + frequency, interval=recurrence_interval, dtstart=get_datetime(subscription.start), until=get_datetime(end_date) ) ] diff --git a/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.json b/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.json index 8c52f8cd5a1046071941e430275ed896c92122fc..02804f1bf824fcd824454add2d446884c420c71b 100644 --- a/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.json +++ b/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.json @@ -32,7 +32,7 @@ "fieldtype": "Select", "in_list_view": 1, "label": "Recurrence", - "options": "Once\nEvery Day\nEvery Week\nEvery Month\nEvery Billing Period", + "options": "Once\nEvery Day\nEvery Week\nEvery Month\nEvery 3 Months\nEvery Billing Period", "reqd": 1 }, { @@ -46,7 +46,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-03-20 14:50:07.592008", + "modified": "2025-06-23 10:05:25.580530", "modified_by": "Administrator", "module": "Venue", "name": "Booking Credit Allocation Rules", diff --git a/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.py b/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.py index c796093e996cff9ace697a93418cddfcf30d57f6..1900a04f1bacb9c82f12e479033b598bf4577320 100644 --- a/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.py +++ b/erpnext/venue/doctype/booking_credit_allocation_rules/booking_credit_allocation_rules.py @@ -5,4 +5,25 @@ import frappe from frappe.model.document import Document class BookingCreditAllocationRules(Document): + # begin: auto-generated types + # ruff: noqa + + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + booking_credit_type: DF.Link + expiration: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + quantity: DF.Int + recurrence: DF.Literal["Once", "Every Day", "Every Week", "Every Month", "Every 3 Months", "Every Billing Period"] + # ruff: noqa + # end: auto-generated types + + pass