mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 05:28:27 +00:00
Merge pull request #31110 from ruchamahabal/fix-npo-membership
This commit is contained in:
@@ -100,7 +100,9 @@ def capture_razorpay_donations(*args, **kwargs):
|
||||
return
|
||||
|
||||
# to avoid capturing subscription payments as donations
|
||||
if payment.description and "subscription" in str(payment.description).lower():
|
||||
if payment.invoice_id or (
|
||||
payment.description and "subscription" in str(payment.description).lower()
|
||||
):
|
||||
return
|
||||
|
||||
donor = get_donor(payment.email)
|
||||
|
||||
@@ -61,10 +61,6 @@ class Membership(Document):
|
||||
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("Non Profit Settings", "billing_cycle") == "Yearly":
|
||||
self.to_date = add_years(self.from_date, 1)
|
||||
|
||||
Reference in New Issue
Block a user