mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-20 03:47:11 +00:00
feat(Non Profit): 80G Certificates and Donations (#24657)
* feat: 80G Certificates * feat: add non-profit custom fields for India * feat: 80G Certificate print format for memberships * feat: Donation doctype and API endpoint to capture donations via razorpay * chore: Rename Membership Settings to Non Profit Settings * chore: clean up Non Profit Settings - Rename fields, better labels - patch for renaming * feat: Webhook secret generation for Razorpay donations in Non-Profit Settings * feat: Payment Entry for donations - added Donor as Party Type - setting for automating payment entries for donations created via web form * fix: linter and sider issues * fix: translation syntax * feat: PAN Details custom field for Indian donors * feat: 80G certificates for Donations with Print Format * fix: sider * feat: validations for donor and donation - create donor for website user from donations - validate donor email * feat: extract member name from subscription notes * test: Donation * test: Tax Exemption 80G Certificate * chore: styling fixes * fix: tests * fix: sider * feat: extract PAN number from additional subscription notes * feat: Add creation user field in Non Profit Settings fix: Payment Entry not generating for memberships and donations * feat: update desk page * fix: tests
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
|
||||
def execute():
|
||||
if frappe.db.table_exists("Membership Settings"):
|
||||
frappe.rename_doc("DocType", "Membership Settings", "Non Profit Settings")
|
||||
frappe.reload_doctype("Non Profit Settings", force=True)
|
||||
|
||||
if frappe.db.table_exists("Non Profit Settings"):
|
||||
rename_fields_map = {
|
||||
"enable_invoicing": "allow_invoicing",
|
||||
"create_for_web_forms": "automate_membership_invoicing",
|
||||
"make_payment_entry": "automate_membership_payment_entries",
|
||||
"enable_razorpay": "enable_razorpay_for_memberships",
|
||||
"debit_account": "membership_debit_account",
|
||||
"payment_account": "membership_payment_account",
|
||||
"webhook_secret": "membership_webhook_secret"
|
||||
}
|
||||
|
||||
for old_name, new_name in rename_fields_map.items():
|
||||
rename_field("Non Profit Settings", old_name, new_name)
|
||||
@@ -0,0 +1,16 @@
|
||||
import frappe
|
||||
from erpnext.regional.india.setup import make_custom_fields
|
||||
|
||||
def execute():
|
||||
company = frappe.get_all('Company', filters = {'country': 'India'})
|
||||
if not company:
|
||||
return
|
||||
|
||||
make_custom_fields()
|
||||
|
||||
if not frappe.db.exists('Party Type', 'Donor'):
|
||||
frappe.get_doc({
|
||||
'doctype': 'Party Type',
|
||||
'party_type': 'Donor',
|
||||
'account_type': 'Receivable'
|
||||
}).insert(ignore_permissions=True)
|
||||
Reference in New Issue
Block a user