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.


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:

	# 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
		self.from_date = nowdate()

	if frappe.db.get_single_value("Membership Settings", "billing_cycle") == "Yearly":
		self.to_date = add_years(self.from_date, 1)
		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.

Were you able to update this somehow? Any progress on this? We receive the following error on member:

App Versions

	"erpnext": "13.34.0",
	"frappe": "13.33.0",
	"iflliler": "0.0.1"




Traceback (most recent call last):
  File "apps/frappe/frappe/", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/", line 76, in execute_cmd
    return, **frappe.form_dict)
  File "apps/frappe/frappe/", line 1448, in call
    return fn(*args, **newargs)
TypeError: get_last_membership() missing 1 required positional argument: 'member'

Request Data

	"type": "POST",
	"args": {},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/erpnext.get_last_membership"

Response Data

	"exception": "TypeError: get_last_membership() missing 1 required positional argument: 'member'"