Try ERPNext Buy Support Partners Foundation

Back-dating memberships

How can I back-date a membership period? for some reason, the “validity” from date can only be today’s date or later.

For my annual memberships, I need to show that a some users paid for the period from Apr1 2020 to Mar31 2021. It keeps forcing the dates to May18 2020 and May18 2021.

Thx
S

Aha, so it appears it is hardcoded that you can’t change the “from date” unless you are logged in as “administrator” as you can see from:

https://github.com/frappe/erpnext/blob/develop/erpnext/non_profit/doctype/membership/membership.py:

	# if person applied for offline membership
	if last_membership and not frappe.session.user == "Administrator":
		# if last membership does not expire in 30 days, then do not allow to renew
		if getdate(add_days(last_membership.to_date, -30)) > getdate(nowdate()) :
			frappe.throw(_('You can only renew if your membership expires within 30 days'))

		self.from_date = add_days(last_membership.to_date, 1)
	elif frappe.session.user == "Administrator":
		self.from_date = self.from_date
	else:
		self.from_date = nowdate()

	if frappe.db.get_single_value("Membership Settings", "billing_cycle") == "Yearly":
		self.to_date = add_years(self.from_date, 1)
	else:
		self.to_date = add_months(self.from_date, 1)

Now, my next question is, where is the “Membership settings” doctype? I see that it is what they call a “Single DocType” but I can’t find it in the GUI anywhere.