diff --git a/erpnext/patches/v14_0/delete_non_profit_doctypes.py b/erpnext/patches/v14_0/delete_non_profit_doctypes.py index 3b3dbe457697e..1967848abe33d 100644 --- a/erpnext/patches/v14_0/delete_non_profit_doctypes.py +++ b/erpnext/patches/v14_0/delete_non_profit_doctypes.py @@ -6,6 +6,14 @@ def execute(): frappe.delete_doc("Workspace", "Non Profit", ignore_missing=True, force=True) + print_formats = frappe.get_all("Print Format", {"module": "Non Profit", "standard": "Yes"}, pluck='name') + for print_format in print_formats: + frappe.delete_doc("Print Format", print_format, ignore_missing=True, force=True) + + print_formats = ['80G Certificate for Membership', '80G Certificate for Donation'] + for print_format in print_formats: + frappe.delete_doc("Print Format", print_format, ignore_missing=True, force=True) + reports = frappe.get_all("Report", {"module": "Non Profit", "is_standard": "Yes"}, pluck='name') for report in reports: frappe.delete_doc("Report", report, ignore_missing=True, force=True) @@ -17,3 +25,11 @@ def execute(): doctypes = frappe.get_all("DocType", {"module": "Non Profit", "custom": 0}, pluck='name') for doctype in doctypes: frappe.delete_doc("DocType", doctype, ignore_missing=True) + + custom_fields = [ + {"dt": "Member", "fieldname": "pan_number"}, + {"dt": "Donor", "fieldname": "pan_number"}, + ] + for field in custom_fields: + custom_field = frappe.db.get_value("Custom Field", field) + frappe.delete_doc("Custom Field", custom_field, ignore_missing=True) diff --git a/erpnext/regional/print_format/80g_certificate_for_donation/80g_certificate_for_donation.json b/erpnext/regional/print_format/80g_certificate_for_donation/80g_certificate_for_donation.json deleted file mode 100644 index a8da0bd2097de..0000000000000 --- a/erpnext/regional/print_format/80g_certificate_for_donation/80g_certificate_for_donation.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "absolute_value": 0, - "align_labels_right": 0, - "creation": "2021-02-22 00:17:33.878581", - "css": ".details {\n font-size: 15px;\n font-family: Tahoma, sans-serif;;\n line-height: 150%;\n}\n\n.certificate-footer {\n font-size: 15px;\n font-family: Tahoma, sans-serif;\n line-height: 140%;\n margin-top: 120px;\n}\n\n.company-address {\n color: #666666;\n font-size: 15px;\n font-family: Tahoma, sans-serif;;\n}", - "custom_format": 1, - "default_print_language": "en", - "disabled": 0, - "doc_type": "Tax Exemption 80G Certificate", - "docstatus": 0, - "doctype": "Print Format", - "font": "Default", - "html": "{% if letter_head and not no_letterhead -%}\n
{{ letter_head }}
\n{%- endif %}\n\n
\n

{{ doc.company }} 80G Donor Certificate

\n
\n

\n\n
\n

{{ _(\"Certificate No. : \") }} {{ doc.name }}

\n

\n \t{{ _(\"Date\") }} : {{ doc.get_formatted(\"date\") }}
\n

\n

\n \n
\n\n This is to confirm that the {{ doc.company }} received an amount of {{doc.get_formatted(\"amount\")}}\n from {{ doc.donor_name }}\n {% if doc.pan_number -%}\n bearing PAN Number {{ doc.member_pan_number }}\n {%- endif %}\n\n via the Mode of Payment {{doc.mode_of_payment}}\n\n {% if doc.razorpay_payment_id -%}\n bearing RazorPay Payment ID {{ doc.razorpay_payment_id }}\n {%- endif %}\n\n on {{ doc.get_formatted(\"date_of_donation\") }}\n

\n \n

\n We thank you for your contribution towards the corpus of the {{ doc.company }} and helping support our work.\n

\n\n
\n
\n\n

\n

{{doc.company_address_display }}

\n\n", - "idx": 0, - "line_breaks": 0, - "modified": "2021-02-22 00:20:08.516600", - "modified_by": "Administrator", - "module": "Regional", - "name": "80G Certificate for Donation", - "owner": "Administrator", - "print_format_builder": 0, - "print_format_type": "Jinja", - "raw_printing": 0, - "show_section_headings": 0, - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/regional/print_format/80g_certificate_for_donation/__init__.py b/erpnext/regional/print_format/80g_certificate_for_donation/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/erpnext/regional/print_format/80g_certificate_for_membership/80g_certificate_for_membership.json b/erpnext/regional/print_format/80g_certificate_for_membership/80g_certificate_for_membership.json deleted file mode 100644 index f1b15aab2984b..0000000000000 --- a/erpnext/regional/print_format/80g_certificate_for_membership/80g_certificate_for_membership.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "absolute_value": 0, - "align_labels_right": 0, - "creation": "2021-02-15 16:53:55.026611", - "css": ".details {\n font-size: 15px;\n font-family: Tahoma, sans-serif;;\n line-height: 150%;\n}\n\n.certificate-footer {\n font-size: 15px;\n font-family: Tahoma, sans-serif;\n line-height: 140%;\n margin-top: 120px;\n}\n\n.company-address {\n color: #666666;\n font-size: 15px;\n font-family: Tahoma, sans-serif;;\n}", - "custom_format": 1, - "default_print_language": "en", - "disabled": 0, - "doc_type": "Tax Exemption 80G Certificate", - "docstatus": 0, - "doctype": "Print Format", - "font": "Default", - "html": "{% if letter_head and not no_letterhead -%}\n
{{ letter_head }}
\n{%- endif %}\n\n
\n

{{ doc.company }} Members 80G Donor Certificate

\n

Financial Cycle {{ doc.fiscal_year }}

\n
\n

\n\n
\n

{{ _(\"Certificate No. : \") }} {{ doc.name }}

\n

\n \t{{ _(\"Date\") }} : {{ doc.get_formatted(\"date\") }}
\n

\n

\n \n
\n This is to confirm that the {{ doc.company }} received a total amount of {{doc.get_formatted(\"total\")}}\n from {{ doc.member_name }}\n {% if doc.pan_number -%}\n bearing PAN Number {{ doc.member_pan_number }}\n {%- endif %}\n as per the payment details given below:\n \n

\n \n \t\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\n \t\n \t\t{%- for payment in doc.payments -%}\n \t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\n \t\t{%- endfor -%}\n \t\n
{{ _(\"Date\") }}{{ _(\"Amount\") }}{{ _(\"Invoice ID\") }}
{{ payment.date }} {{ payment.get_formatted(\"amount\") }}{{ payment.invoice_id }}
\n \n
\n \n

\n We thank you for your contribution towards the corpus of the {{ doc.company }} and helping support our work.\n

\n\n
\n
\n\n

\n

{{doc.company_address_display }}

\n\n", - "idx": 0, - "line_breaks": 0, - "modified": "2021-02-21 23:29:00.778973", - "modified_by": "Administrator", - "module": "Regional", - "name": "80G Certificate for Membership", - "owner": "Administrator", - "print_format_builder": 0, - "print_format_type": "Jinja", - "raw_printing": 0, - "show_section_headings": 0, - "standard": "Yes" -} \ No newline at end of file diff --git a/erpnext/regional/print_format/80g_certificate_for_membership/__init__.py b/erpnext/regional/print_format/80g_certificate_for_membership/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000