From 5ffbd4f492df9600c4e15df4727e393db27d4f2d Mon Sep 17 00:00:00 2001 From: Vishal Date: Tue, 5 Dec 2017 16:40:45 +0530 Subject: [PATCH] [fix] Reviewed Modification in Grant Application --- .../grant_application/grant_application.js | 2 +- .../grant_application/grant_application.json | 156 ++++++++++++------ .../grant_application/grant_application.py | 1 + .../templates/grant_application.html | 10 +- .../grant_application/grant_application.json | 13 +- 5 files changed, 123 insertions(+), 59 deletions(-) diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.js b/erpnext/non_profit/doctype/grant_application/grant_application.js index d560804d6a..70f319b828 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.js +++ b/erpnext/non_profit/doctype/grant_application/grant_application.js @@ -13,7 +13,7 @@ frappe.ui.form.on('Grant Application', { frappe.contacts.clear_address_and_contact(frm); } - if(frm.doc.status == 'Received'){ + if(frm.doc.status == 'Received' && !frm.doc.email_notification_sent){ frm.add_custom_button(__("Send Grant Review Email"), function() { frappe.call({ method: "erpnext.non_profit.doctype.grant_application.grant_application.send_grant_review_emails", diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.json b/erpnext/non_profit/doctype/grant_application/grant_application.json index 31da2af110..a2a76c4f28 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.json +++ b/erpnext/non_profit/doctype/grant_application/grant_application.json @@ -26,9 +26,9 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, - "label": "Organization", + "label": "Name", "length": 0, "no_copy": 0, "permlevel": 0, @@ -49,16 +49,77 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "grant_applicant_name", - "fieldtype": "Data", + "fieldname": "organization_type", + "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Organization Type", + "length": 0, + "no_copy": 0, + "options": "Individual\nOrganization", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "company", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Company", + "length": 0, + "no_copy": 0, + "options": "Company", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_5", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, "in_standard_filter": 0, - "label": "Name", "length": 0, "no_copy": 0, "permlevel": 0, @@ -68,7 +129,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -103,35 +164,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_5", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -181,7 +213,7 @@ "label": "Status", "length": 0, "no_copy": 0, - "options": "Open\nReceived\nIn Progress\nApproved\nRejected\nExpired\nWithdrawan", + "options": "Open\nReceived\nIn Progress\nApproved\nRejected\nExpired\nWithdrawn", "permlevel": 0, "precision": "", "print_hide": 0, @@ -478,7 +510,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Amount Requested ?", + "label": "Requested Amount", "length": 0, "no_copy": 0, "permlevel": 0, @@ -500,7 +532,7 @@ "collapsible": 0, "columns": 0, "fieldname": "grant_past_record", - "fieldtype": "Select", + "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -508,10 +540,10 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Have you received grant from us before ?", + "label": "Past Grant Record", "length": 0, "no_copy": 0, - "options": "YES\nNO", + "options": "", "permlevel": 0, "precision": "", "print_hide": 0, @@ -628,7 +660,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "assessment Result", + "label": "Assessment Result", "length": 0, "no_copy": 0, "permlevel": 0, @@ -649,8 +681,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "assessment_scale", - "fieldtype": "Int", + "fieldname": "assessment_mark", + "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -658,7 +690,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "assessment Scale", + "label": "Assessment Mark ( out of 10 )", "length": 0, "no_copy": 0, "permlevel": 0, @@ -747,7 +779,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "assessment Manager", + "label": "Assessment Manager", "length": 0, "no_copy": 0, "options": "User", @@ -763,6 +795,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "email_notification_sent", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Email Notification Sent", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -837,7 +899,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-12-01 12:55:35.934666", + "modified": "2017-12-05 06:08:15.602432", "modified_by": "Administrator", "module": "Non Profit", "name": "Grant Application", diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py index 6b9ba32477..b5b52b9d15 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/grant_application.py @@ -52,6 +52,7 @@ def send_grant_review_emails(grant_application): ) grant.status = 'In Progress' + grant.email_notification_sent = 1 grant.save() frappe.db.commit() diff --git a/erpnext/non_profit/doctype/grant_application/templates/grant_application.html b/erpnext/non_profit/doctype/grant_application/templates/grant_application.html index 7da8b5a9e4..ea8aa9eb9d 100644 --- a/erpnext/non_profit/doctype/grant_application/templates/grant_application.html +++ b/erpnext/non_profit/doctype/grant_application/templates/grant_application.html @@ -9,11 +9,11 @@ - + - + @@ -30,11 +30,11 @@
Organization/Indvidual{{ title }}{{ organization_type }}
Grant Applicant Name{{ grant_applicant_name }}{{ title}}
Date

Q. Please outline your current situation and why you are applying for a grant?

{{ grant_description }}

-

Q. Please Describe the purpose of the grant and how it will benfit your organization?

+

Q. Please describe the purpose of the grant and how it will benfit your organization?

{{ grant_purpose }}

-

Q. Amount Requested Details?

+

Q. Requested grant amount details?

{{ amount }}

-

Q. Have you Recevied grant from us before?

+

Q. Have you recevied grant from us before?

{{ grant_past_record }}

Contact

{% if frappe.user != 'Guest' %} diff --git a/erpnext/non_profit/web_form/grant_application/grant_application.json b/erpnext/non_profit/web_form/grant_application/grant_application.json index eccc33a62c..f8569ce06f 100644 --- a/erpnext/non_profit/web_form/grant_application/grant_application.json +++ b/erpnext/non_profit/web_form/grant_application/grant_application.json @@ -18,7 +18,7 @@ "is_standard": 1, "login_required": 1, "max_attachment_size": 0, - "modified": "2017-11-23 17:16:30.181215", + "modified": "2017-12-05 05:48:57.961053", "modified_by": "Administrator", "module": "Non Profit", "name": "grant-application", @@ -32,20 +32,21 @@ "title": "Grant Application", "web_form_fields": [ { - "fieldname": "title", - "fieldtype": "Data", + "fieldname": "organization_type", + "fieldtype": "Select", "hidden": 0, - "label": "Organization", + "label": "Organization Type", "max_length": 0, "max_value": 0, + "options": "Individual\nOrganization", "read_only": 0, "reqd": 1 }, { - "fieldname": "grant_applicant_name", + "fieldname": "title", "fieldtype": "Data", "hidden": 0, - "label": "Grant Applicant Name", + "label": "Name", "max_length": 0, "max_value": 0, "read_only": 0,