[quotation][improvement] when made from lead
This commit is contained in:
parent
ff3106c7d4
commit
1e3fc88940
15
patches/april_2013/p03_fixes_for_lead_in_quotation.py
Normal file
15
patches/april_2013/p03_fixes_for_lead_in_quotation.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import webnotes
|
||||||
|
def execute():
|
||||||
|
webnotes.conn.sql("""update `tabQuotation` set customer_name = organization
|
||||||
|
where quotation_to = 'Lead' and ifnull(lead, '') != ''
|
||||||
|
and ifnull(organization, '') != ''""")
|
||||||
|
|
||||||
|
webnotes.conn.sql("""update `tabQuotation` set customer_name = lead_name
|
||||||
|
where quotation_to = 'Lead' and ifnull(lead, '') != ''
|
||||||
|
and ifnull(organization, '') = '' and ifnull(lead_name, '') != ''""")
|
||||||
|
|
||||||
|
webnotes.conn.sql("""update `tabQuotation` set contact_display = lead_name
|
||||||
|
where quotation_to = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""")
|
||||||
|
|
||||||
|
webnotes.conn.sql("""update `tabOpportunity` set contact_display = lead_name
|
||||||
|
where enquiry_from = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""")
|
@ -229,4 +229,9 @@ patch_list = [
|
|||||||
"patches.march_2013.p12_set_item_tax_rate_in_json",
|
"patches.march_2013.p12_set_item_tax_rate_in_json",
|
||||||
"patches.april_2013.p01_update_serial_no_valuation_rate",
|
"patches.april_2013.p01_update_serial_no_valuation_rate",
|
||||||
"patches.april_2013.p02_add_country_and_currency",
|
"patches.april_2013.p02_add_country_and_currency",
|
||||||
|
"patches.april_2013.p03_fixes_for_lead_in_quotation",
|
||||||
|
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Classic") # 2013-04-02',
|
||||||
|
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02',
|
||||||
|
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02',
|
||||||
|
|
||||||
]
|
]
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
|
|||||||
// ===============================================================
|
// ===============================================================
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||||
|
|
||||||
if(!doc.enquiry_from) hide_field(['customer', 'customer_address', 'contact_person', 'customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
if(!doc.enquiry_from) hide_field(['customer', 'customer_address', 'contact_person', 'customer_name','lead', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
||||||
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
||||||
if(!doc.date) doc.transaction_date = date.obj_to_str(new Date());
|
if(!doc.date) doc.transaction_date = date.obj_to_str(new Date());
|
||||||
if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
|
if(!doc.company && sys_defaults.company) set_multiple(cdt,cdn,{company:sys_defaults.company});
|
||||||
@ -42,10 +42,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
if(doc.enquiry_from) {
|
if(doc.enquiry_from) {
|
||||||
if(doc.enquiry_from == 'Customer') {
|
if(doc.enquiry_from == 'Customer') {
|
||||||
hide_field(['lead', 'lead_name']);
|
hide_field('lead');
|
||||||
}
|
}
|
||||||
else if (doc.enquiry_from == 'Lead') {
|
else if (doc.enquiry_from == 'Lead') {
|
||||||
hide_field(['customer', 'customer_address', 'contact_person', 'customer_name', 'contact_display', 'customer_group']);
|
hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,13 +85,14 @@ cur_frm.cscript.enquiry_from = function(doc,cdt,cdn){
|
|||||||
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
||||||
if(doc.enquiry_from == 'Lead'){
|
if(doc.enquiry_from == 'Lead'){
|
||||||
unhide_field(['lead']);
|
unhide_field(['lead']);
|
||||||
hide_field(['lead_name','customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
hide_field(['customer','customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||||
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
doc.lead = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||||
}
|
}
|
||||||
else if(doc.enquiry_from == 'Customer'){
|
else if(doc.enquiry_from == 'Customer'){
|
||||||
unhide_field(['customer']);
|
unhide_field(['customer']);
|
||||||
hide_field(['lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory', 'customer_group']);
|
hide_field(['lead', 'address_display', 'contact_display', 'contact_mobile',
|
||||||
doc.lead = doc.lead_name = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
'contact_email', 'territory', 'customer_group']);
|
||||||
|
doc.lead = doc.customer = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,8 +155,11 @@ cur_frm.fields_dict['lead'].get_query = function(doc,cdt,cdn){
|
|||||||
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
cur_frm.cscript.lead = function(doc, cdt, cdn) {
|
||||||
cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
|
cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
|
||||||
|
|
||||||
if(doc.lead) get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
|
if(doc.lead) {
|
||||||
if(doc.lead) unhide_field(['lead_name','address_display','contact_mobile','contact_email','territory']);
|
get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
|
||||||
|
unhide_field(['customer_name', 'address_display','contact_mobile', 'contact_email',
|
||||||
|
'territory']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@ class DocType(TransactionBase):
|
|||||||
else:
|
else:
|
||||||
desc = 'Contact customer '+cstr(self.doc.customer)
|
desc = 'Contact customer '+cstr(self.doc.customer)
|
||||||
elif self.doc.lead:
|
elif self.doc.lead:
|
||||||
if self.doc.lead_name:
|
if self.doc.contact_display:
|
||||||
desc = 'Contact '+cstr(self.doc.lead_name)
|
desc = 'Contact '+cstr(self.doc.contact_display)
|
||||||
else:
|
else:
|
||||||
desc = 'Contact lead '+cstr(self.doc.lead)
|
desc = 'Contact lead '+cstr(self.doc.lead)
|
||||||
desc = desc+ '. By : ' + cstr(self.doc.contact_by)
|
desc = desc+ '. By : ' + cstr(self.doc.contact_by)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"creation": "2013-01-23 19:57:18",
|
"creation": "2013-03-07 18:50:30",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-01-29 14:23:07",
|
"modified": "2013-04-02 16:28:08",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -53,6 +53,7 @@
|
|||||||
"oldfieldname": "naming_series",
|
"oldfieldname": "naming_series",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "OPPT",
|
"options": "OPPT",
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -64,6 +65,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nLead\nCustomer",
|
"options": "\nLead\nCustomer",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
@ -79,6 +81,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Customer",
|
"options": "Customer",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
@ -93,13 +96,15 @@
|
|||||||
"oldfieldname": "lead",
|
"oldfieldname": "lead",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Lead",
|
"options": "Lead",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -124,6 +129,7 @@
|
|||||||
"oldfieldname": "enquiry_type",
|
"oldfieldname": "enquiry_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nSales\nMaintenance",
|
"options": "\nSales\nMaintenance",
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -131,7 +137,8 @@
|
|||||||
"fieldname": "items",
|
"fieldname": "items",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Items",
|
"label": "Items",
|
||||||
"oldfieldtype": "Section Break"
|
"oldfieldtype": "Section Break",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Items which do not exist in Item master can also be entered on customer's request",
|
"description": "Items which do not exist in Item master can also be entered on customer's request",
|
||||||
@ -141,14 +148,16 @@
|
|||||||
"label": "Opportunity Items",
|
"label": "Opportunity Items",
|
||||||
"oldfieldname": "enquiry_details",
|
"oldfieldname": "enquiry_details",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Opportunity Item"
|
"options": "Opportunity Item",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Keep a track of communication related to this enquiry which will help for future reference.",
|
"description": "Keep a track of communication related to this enquiry which will help for future reference.",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "communication_history",
|
"fieldname": "communication_history",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"oldfieldtype": "Section Break"
|
"oldfieldtype": "Section Break",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
@ -157,13 +166,15 @@
|
|||||||
"fieldtype": "HTML",
|
"fieldtype": "HTML",
|
||||||
"label": "Communication HTML",
|
"label": "Communication HTML",
|
||||||
"oldfieldname": "follow_up",
|
"oldfieldname": "follow_up",
|
||||||
"oldfieldtype": "Table"
|
"oldfieldtype": "Table",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "contact_info",
|
"fieldname": "contact_info",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Contact Info"
|
"label": "Contact Info",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -172,7 +183,8 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"label": "Contact Person",
|
"label": "Contact Person",
|
||||||
"options": "Contact",
|
"options": "Contact",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -181,7 +193,8 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"label": "Customer Address",
|
"label": "Customer Address",
|
||||||
"options": "Address",
|
"options": "Address",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -204,7 +217,8 @@
|
|||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "column_break3",
|
"fieldname": "column_break3",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -227,16 +241,6 @@
|
|||||||
"label": "Contact Mobile No",
|
"label": "Contact Mobile No",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"doctype": "DocField",
|
|
||||||
"fieldname": "lead_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"label": "Name",
|
|
||||||
"oldfieldname": "lead_name",
|
|
||||||
"oldfieldtype": "Data",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.enquiry_from==\"Customer\"",
|
"depends_on": "eval:doc.enquiry_from==\"Customer\"",
|
||||||
"description": "<a href=\"#Sales Browser/Customer Group\">To manage Territory, click here</a>",
|
"description": "<a href=\"#Sales Browser/Customer Group\">To manage Territory, click here</a>",
|
||||||
@ -250,6 +254,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
@ -262,6 +267,7 @@
|
|||||||
"label": "Territory",
|
"label": "Territory",
|
||||||
"options": "Territory",
|
"options": "Territory",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
@ -271,13 +277,15 @@
|
|||||||
"fieldname": "more_info",
|
"fieldname": "more_info",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "More Info",
|
"label": "More Info",
|
||||||
"oldfieldtype": "Section Break"
|
"oldfieldtype": "Section Break",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "column_break1",
|
"fieldname": "column_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -289,6 +297,7 @@
|
|||||||
"label": "Opportunity Date",
|
"label": "Opportunity Date",
|
||||||
"oldfieldname": "transaction_date",
|
"oldfieldname": "transaction_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"width": "50px"
|
"width": "50px"
|
||||||
},
|
},
|
||||||
@ -302,6 +311,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Fiscal Year",
|
"options": "link:Fiscal Year",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
@ -312,7 +322,8 @@
|
|||||||
"label": "Source",
|
"label": "Source",
|
||||||
"oldfieldname": "source",
|
"oldfieldname": "source",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In"
|
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enter name of campaign if source of enquiry is campaign",
|
"description": "Enter name of campaign if source of enquiry is campaign",
|
||||||
@ -322,7 +333,8 @@
|
|||||||
"label": "Campaign",
|
"label": "Campaign",
|
||||||
"oldfieldname": "campaign",
|
"oldfieldname": "campaign",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Campaign"
|
"options": "Campaign",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:!doc.__islocal",
|
"depends_on": "eval:!doc.__islocal",
|
||||||
@ -346,6 +358,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
@ -354,6 +367,7 @@
|
|||||||
"fieldname": "column_break2",
|
"fieldname": "column_break2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -366,6 +380,7 @@
|
|||||||
"oldfieldname": "contact_by",
|
"oldfieldname": "contact_by",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Profile",
|
"options": "Profile",
|
||||||
|
"read_only": 0,
|
||||||
"width": "75px"
|
"width": "75px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -375,7 +390,8 @@
|
|||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"label": "Next Contact Date",
|
"label": "Next Contact Date",
|
||||||
"oldfieldname": "contact_date",
|
"oldfieldname": "contact_date",
|
||||||
"oldfieldtype": "Date"
|
"oldfieldtype": "Date",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -398,7 +414,8 @@
|
|||||||
"label": "To Discuss",
|
"label": "To Discuss",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "to_discuss",
|
"oldfieldname": "to_discuss",
|
||||||
"oldfieldtype": "Small Text"
|
"oldfieldtype": "Small Text",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
|
@ -29,7 +29,10 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
|||||||
// ===================================================================================
|
// ===================================================================================
|
||||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||||
cur_frm.cscript.manage_rounded_total();
|
cur_frm.cscript.manage_rounded_total();
|
||||||
if(!doc.quotation_to) hide_field(['customer','customer_address','contact_person','customer_name','lead', 'lead_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']);
|
if(!doc.quotation_to)
|
||||||
|
hide_field(['customer','customer_address','contact_person','customer_name','lead',
|
||||||
|
'address_display', 'contact_display', 'contact_mobile', 'contact_email',
|
||||||
|
'territory', 'customer_group']);
|
||||||
if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
if(!doc.price_list_name) set_multiple(cdt,cdn,{price_list_name:sys_defaults.price_list_name});
|
||||||
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
||||||
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
|
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
|
||||||
@ -42,10 +45,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
if(doc.quotation_to) {
|
if(doc.quotation_to) {
|
||||||
if(doc.quotation_to == 'Customer') {
|
if(doc.quotation_to == 'Customer') {
|
||||||
hide_field(['lead', 'lead_name', 'organization']);
|
hide_field('lead');
|
||||||
}
|
}
|
||||||
else if (doc.quotation_to == 'Lead') {
|
else if (doc.quotation_to == 'Lead') {
|
||||||
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
|
hide_field(['customer', 'customer_address', 'contact_person', 'customer_group']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,13 +64,13 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
|||||||
// hide - unhide fields based on lead or customer..
|
// hide - unhide fields based on lead or customer..
|
||||||
// =======================================================================================================================
|
// =======================================================================================================================
|
||||||
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
cur_frm.cscript.lead_cust_show = function(doc,cdt,cdn){
|
||||||
hide_field(['lead', 'lead_name','customer','customer_address','contact_person',
|
hide_field(['lead', 'customer','customer_address','contact_person',
|
||||||
'customer_name','address_display','contact_display','contact_mobile','contact_email',
|
'customer_name','address_display','contact_display','contact_mobile','contact_email',
|
||||||
'territory','customer_group', 'organization']);
|
'territory','customer_group']);
|
||||||
if(doc.quotation_to == 'Lead') unhide_field(['lead']);
|
if(doc.quotation_to == 'Lead') unhide_field(['lead']);
|
||||||
else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
|
else if(doc.quotation_to == 'Customer') unhide_field(['customer']);
|
||||||
|
|
||||||
doc.lead = doc.lead_name = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = doc.organization = "";
|
doc.lead = doc.customer = doc.customer_name = doc.customer_address = doc.contact_person = doc.address_display = doc.contact_display = doc.contact_mobile = doc.contact_email = doc.territory = doc.customer_group = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -185,7 +188,9 @@ cur_frm.cscript.pull_enquiry_detail = function(doc,cdt,cdn){
|
|||||||
else if(doc.quotation_to == 'Customer') {
|
else if(doc.quotation_to == 'Customer') {
|
||||||
unhide_field(['customer','customer_address','contact_person','territory','customer_group']);
|
unhide_field(['customer','customer_address','contact_person','territory','customer_group']);
|
||||||
}
|
}
|
||||||
refresh_many(['quotation_details','quotation_to','customer','customer_address','contact_person','lead','lead_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','order_type']);
|
refresh_many(['quotation_details','quotation_to','customer','customer_address',
|
||||||
|
'contact_person', 'lead', 'address_display', 'contact_display', 'contact_mobile',
|
||||||
|
'contact_email', 'territory', 'customer_group', 'order_type']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:19",
|
"creation": "2013-03-07 18:50:30",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-01-29 16:27:53",
|
"modified": "2013-04-02 16:02:45",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -46,6 +46,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -59,6 +60,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "QTN",
|
"options": "QTN",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -71,6 +73,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nLead\nCustomer",
|
"options": "\nLead\nCustomer",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
@ -85,6 +88,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Customer",
|
"options": "Customer",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -97,17 +101,8 @@
|
|||||||
"oldfieldname": "lead",
|
"oldfieldname": "lead",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Lead",
|
"options": "Lead",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
},
|
"read_only": 0
|
||||||
{
|
|
||||||
"doctype": "DocField",
|
|
||||||
"fieldname": "lead_name",
|
|
||||||
"fieldtype": "Text",
|
|
||||||
"hidden": 1,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Lead Name",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -118,14 +113,6 @@
|
|||||||
"label": "Customer Name",
|
"label": "Customer Name",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"doctype": "DocField",
|
|
||||||
"fieldname": "organization",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 1,
|
|
||||||
"label": "Organization",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "address_display",
|
"fieldname": "address_display",
|
||||||
@ -173,6 +160,7 @@
|
|||||||
"fieldname": "column_break1",
|
"fieldname": "column_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -186,6 +174,7 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "transaction_date",
|
"oldfieldname": "transaction_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1,
|
"search_index": 1,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
@ -201,6 +190,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nSales\nMaintenance",
|
"options": "\nSales\nMaintenance",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
@ -211,6 +201,7 @@
|
|||||||
"label": "Items",
|
"label": "Items",
|
||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -222,18 +213,21 @@
|
|||||||
"oldfieldname": "quotation_details",
|
"oldfieldname": "quotation_details",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Quotation Item",
|
"options": "Quotation Item",
|
||||||
|
"read_only": 0,
|
||||||
"width": "40px"
|
"width": "40px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "sec_break23",
|
"fieldname": "sec_break23",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"options": "Simple"
|
"options": "Simple",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "col_break34",
|
"fieldname": "col_break34",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -256,12 +250,14 @@
|
|||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"label": "Re-Calculate Values",
|
"label": "Re-Calculate Values",
|
||||||
"oldfieldtype": "Button",
|
"oldfieldtype": "Button",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "col_break35",
|
"fieldname": "col_break35",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -277,6 +273,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Opportunity",
|
"options": "Opportunity",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
@ -289,13 +286,15 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Button",
|
"oldfieldtype": "Button",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0
|
"report_hide": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "section_break0",
|
"fieldname": "section_break0",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Price List and Currency"
|
"label": "Price List and Currency",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
"description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.",
|
||||||
@ -306,8 +305,9 @@
|
|||||||
"label": "Price List",
|
"label": "Price List",
|
||||||
"oldfieldname": "price_list_name",
|
"oldfieldname": "price_list_name",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Price List",
|
"options": "\n1000 sms\n10000 sms\n25000 sms\n5000 sms\nEast\nEast Price List\nEnterprise Plan\nGeneral\nPL\nSolo Plan",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
@ -320,6 +320,7 @@
|
|||||||
"label": "Price List Currency",
|
"label": "Price List Currency",
|
||||||
"options": "Currency",
|
"options": "Currency",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -329,12 +330,14 @@
|
|||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Price List Currency Conversion Rate",
|
"label": "Price List Currency Conversion Rate",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "column_break2",
|
"fieldname": "column_break2",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -348,6 +351,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "Currency",
|
"options": "Currency",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
@ -362,6 +366,7 @@
|
|||||||
"oldfieldname": "conversion_rate",
|
"oldfieldname": "conversion_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
@ -370,7 +375,8 @@
|
|||||||
"fieldname": "taxes",
|
"fieldname": "taxes",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Taxes",
|
"label": "Taxes",
|
||||||
"oldfieldtype": "Section Break"
|
"oldfieldtype": "Section Break",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -381,7 +387,8 @@
|
|||||||
"oldfieldname": "charge",
|
"oldfieldname": "charge",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Sales Taxes and Charges Master",
|
"options": "Sales Taxes and Charges Master",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -390,7 +397,8 @@
|
|||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Get Taxes and Charges",
|
"label": "Get Taxes and Charges",
|
||||||
"oldfieldtype": "Button",
|
"oldfieldtype": "Button",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -399,7 +407,8 @@
|
|||||||
"label": "Sales Taxes and Charges",
|
"label": "Sales Taxes and Charges",
|
||||||
"oldfieldname": "other_charges",
|
"oldfieldname": "other_charges",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Sales Taxes and Charges"
|
"options": "Sales Taxes and Charges",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -407,7 +416,8 @@
|
|||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"label": "Calculate Taxes and Charges",
|
"label": "Calculate Taxes and Charges",
|
||||||
"oldfieldtype": "Button",
|
"oldfieldtype": "Button",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -426,7 +436,8 @@
|
|||||||
"fieldtype": "HTML",
|
"fieldtype": "HTML",
|
||||||
"label": "Taxes and Charges Calculation",
|
"label": "Taxes and Charges Calculation",
|
||||||
"oldfieldtype": "HTML",
|
"oldfieldtype": "HTML",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -434,7 +445,8 @@
|
|||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Totals",
|
"label": "Totals",
|
||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -482,6 +494,7 @@
|
|||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -532,7 +545,8 @@
|
|||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Terms and Conditions",
|
"label": "Terms and Conditions",
|
||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"print_hide": 0
|
"print_hide": 0,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -543,6 +557,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Terms and Conditions",
|
"options": "Terms and Conditions",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 1
|
"report_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -551,7 +566,8 @@
|
|||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"label": "Get Terms and Conditions",
|
"label": "Get Terms and Conditions",
|
||||||
"oldfieldtype": "Button",
|
"oldfieldtype": "Button",
|
||||||
"options": "get_tc_details"
|
"options": "get_tc_details",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -560,7 +576,8 @@
|
|||||||
"label": "Terms and Conditions HTML",
|
"label": "Terms and Conditions HTML",
|
||||||
"oldfieldtype": "HTML",
|
"oldfieldtype": "HTML",
|
||||||
"options": "You can add Terms and Notes that will be printed in the Transaction",
|
"options": "You can add Terms and Notes that will be printed in the Transaction",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -568,18 +585,21 @@
|
|||||||
"fieldtype": "Text Editor",
|
"fieldtype": "Text Editor",
|
||||||
"label": "Term Details",
|
"label": "Term Details",
|
||||||
"oldfieldname": "terms",
|
"oldfieldname": "terms",
|
||||||
"oldfieldtype": "Text Editor"
|
"oldfieldtype": "Text Editor",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "contact_section",
|
"fieldname": "contact_section",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Contact Info"
|
"label": "Contact Info",
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "col_break98",
|
"fieldname": "col_break98",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -590,7 +610,8 @@
|
|||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
"label": "Customer Address",
|
"label": "Customer Address",
|
||||||
"options": "Address",
|
"options": "Address",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
@ -603,12 +624,14 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Contact",
|
"options": "Contact",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "col_break99",
|
"fieldname": "col_break99",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -621,6 +644,7 @@
|
|||||||
"label": "Territory",
|
"label": "Territory",
|
||||||
"options": "Territory",
|
"options": "Territory",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
@ -634,6 +658,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
@ -644,7 +669,8 @@
|
|||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "More Info",
|
"label": "More Info",
|
||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
@ -654,8 +680,9 @@
|
|||||||
"label": "Letter Head",
|
"label": "Letter Head",
|
||||||
"oldfieldname": "letter_head",
|
"oldfieldname": "letter_head",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Letter Head",
|
"options": "\nDefault\nERP Grey Large\nERP LOGO\nERPNext Logo Black\nERPNext WT Logo",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Select the relevant company name if you have multiple companies.",
|
"description": "Select the relevant company name if you have multiple companies.",
|
||||||
@ -668,6 +695,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
@ -683,6 +711,7 @@
|
|||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
|
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0
|
"report_hide": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -693,8 +722,9 @@
|
|||||||
"label": "Fiscal Year",
|
"label": "Fiscal Year",
|
||||||
"oldfieldname": "fiscal_year",
|
"oldfieldname": "fiscal_year",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "link:Fiscal Year",
|
"options": "\n2008-2009\n2009-2010\n2010-2011\n2011-2012\n2012-2013\n2013-2014",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
@ -717,6 +747,7 @@
|
|||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"oldfieldtype": "Column Break",
|
"oldfieldtype": "Column Break",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -747,6 +778,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Campaign",
|
"options": "Campaign",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 0
|
"report_hide": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -758,7 +790,8 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "order_lost_reason",
|
"oldfieldname": "order_lost_reason",
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldtype": "Small Text",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
@ -771,6 +804,7 @@
|
|||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Print Heading",
|
"options": "Print Heading",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"report_hide": 1
|
"report_hide": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -795,6 +829,7 @@
|
|||||||
"oldfieldname": "amendment_date",
|
"oldfieldname": "amendment_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -804,7 +839,8 @@
|
|||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"label": "Communication History",
|
"label": "Communication History",
|
||||||
"oldfieldtype": "Section Break",
|
"oldfieldtype": "Section Break",
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
|
"read_only": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
@ -815,6 +851,7 @@
|
|||||||
"oldfieldname": "follow_up",
|
"oldfieldname": "follow_up",
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
|
"read_only": 0,
|
||||||
"width": "40px"
|
"width": "40px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -824,16 +861,8 @@
|
|||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"label": "File List",
|
"label": "File List",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"print_hide": 1
|
"print_hide": 1,
|
||||||
},
|
"read_only": 0
|
||||||
{
|
|
||||||
"amend": 1,
|
|
||||||
"cancel": 1,
|
|
||||||
"create": 1,
|
|
||||||
"doctype": "DocPerm",
|
|
||||||
"role": "Sales Manager",
|
|
||||||
"submit": 1,
|
|
||||||
"write": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 1,
|
||||||
@ -845,13 +874,18 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"role": "Customer",
|
"match": "customer_name",
|
||||||
"submit": 0,
|
"role": "Customer"
|
||||||
"write": 0
|
},
|
||||||
|
{
|
||||||
|
"amend": 1,
|
||||||
|
"cancel": 1,
|
||||||
|
"create": 1,
|
||||||
|
"doctype": "DocPerm",
|
||||||
|
"role": "Sales Manager",
|
||||||
|
"submit": 1,
|
||||||
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 1,
|
||||||
|
@ -161,12 +161,12 @@ class TransactionBase(DocListController):
|
|||||||
if address_display.startswith('\n'): address_display = address_display[1:]
|
if address_display.startswith('\n'): address_display = address_display[1:]
|
||||||
|
|
||||||
ret = {
|
ret = {
|
||||||
'lead_name' : extract('lead_name'),
|
'contact_display' : extract('lead_name'),
|
||||||
'address_display' : address_display,
|
'address_display' : address_display,
|
||||||
'territory' : extract('territory'),
|
'territory' : extract('territory'),
|
||||||
'contact_mobile' : extract('mobile_no'),
|
'contact_mobile' : extract('mobile_no'),
|
||||||
'contact_email' : extract('email_id'),
|
'contact_email' : extract('email_id'),
|
||||||
'organization' : extract('company_name')
|
'customer_name' : extract('company_name') or extract('lead_name')
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user