diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.json b/crm/fcrm/doctype/crm_deal/crm_deal.json index 0f3f8b4a..94d3345b 100644 --- a/crm/fcrm/doctype/crm_deal/crm_deal.json +++ b/crm/fcrm/doctype/crm_deal/crm_deal.json @@ -19,10 +19,15 @@ "contacts_tab", "email", "mobile_no", + "phone", "contacts", "others_tab", "naming_series", "status", + "section_break_sygz", + "no_of_employees", + "column_break_nwob", + "job_title", "section_break_eepu", "lead", "column_break_bqvs", @@ -221,11 +226,36 @@ "fieldtype": "Link", "label": "Source", "options": "CRM Lead Source" + }, + { + "fieldname": "no_of_employees", + "fieldtype": "Select", + "label": "No. of Employees", + "options": "1-10\n11-50\n51-200\n201-500\n501-1000\n1000+" + }, + { + "fieldname": "section_break_sygz", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_nwob", + "fieldtype": "Column Break" + }, + { + "fieldname": "job_title", + "fieldtype": "Data", + "label": "Job Title" + }, + { + "fieldname": "phone", + "fieldtype": "Data", + "label": "Phone", + "options": "Phone" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-04 20:53:31.618792", + "modified": "2024-01-05 16:10:59.595577", "modified_by": "Administrator", "module": "FCRM", "name": "CRM Deal", diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.py b/crm/fcrm/doctype/crm_deal/crm_deal.py index ee03ef52..71ae96e3 100644 --- a/crm/fcrm/doctype/crm_deal/crm_deal.py +++ b/crm/fcrm/doctype/crm_deal/crm_deal.py @@ -45,6 +45,7 @@ class CRMDeal(Document): if not self.contacts: self.email = "" self.mobile_no = "" + self.phone = "" return if len([contact for contact in self.contacts if contact.is_primary]) > 1: @@ -56,11 +57,13 @@ class CRMDeal(Document): primary_contact_exists = True self.email = d.email.strip() self.mobile_no = d.mobile_no.strip() + self.phone = d.phone.strip() break if not primary_contact_exists: self.email = "" self.mobile_no = "" + self.phone = "" def update_organization(self): if self.organization: diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index 6164cc22..0e0d0d70 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -125,6 +125,7 @@ export function setupAssignees(data) { } export function setupCustomActions(data, obj) { + if (!data._form_script) return [] let script = new Function(data._form_script + '\nreturn setupForm')() let formScript = script(obj) data._customActions = formScript?.actions || []