From d43c6bfdfb709690cf36ff471e7234b3b5d202cd Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 24 Oct 2013 11:57:02 +0530 Subject: [PATCH] [fix] [merge conflict] --- .../purchase_taxes_and_charges_master.js | 17 ----------------- .../sales_taxes_and_charges_master.js | 18 ------------------ selling/doctype/opportunity/opportunity.js | 15 ++++----------- selling/doctype/quotation/quotation.js | 14 ++++---------- 4 files changed, 8 insertions(+), 56 deletions(-) diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js index 294923c14f..9e497e4ef5 100644 --- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js +++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js @@ -136,23 +136,6 @@ cur_frm.fields_dict['purchase_tax_details'].grid.get_field("cost_center").get_qu } } -<<<<<<< HEAD -cur_frm.cscript.account_head = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if(!d.charge_type && d.account_head){ - alert(wn._("Please select Charge Type first")); - validated = false; - d.account_head = ''; - } - else if(d.account_head && d.charge_type) { - arg = "{'charge_type' : '" + d.charge_type + "', 'account_head' : '" + d.account_head + "'}"; - return get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1); - } - refresh_field('account_head',d.name,'purchase_tax_details'); -} - -======= ->>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js index 0e623a1dc7..9841783f76 100644 --- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js +++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js @@ -145,24 +145,6 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f } } -<<<<<<< HEAD - -cur_frm.cscript.account_head = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if(!d.charge_type && d.account_head){ - alert(wn._("Please select Charge Type first")); - validated = false; - d.account_head = ''; - } - else if(d.account_head && d.charge_type) { - arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}"; - return get_server_fields('get_rate', arg, 'other_charges', doc, cdt, cdn, 1); - } - refresh_field('account_head',d.name,'other_charges'); -} - -======= ->>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js index e65ef50951..75fde277ec 100644 --- a/selling/doctype/opportunity/opportunity.js +++ b/selling/doctype/opportunity/opportunity.js @@ -101,21 +101,14 @@ $.extend(cur_frm.cscript, new erpnext.selling.Opportunity({frm: cur_frm})); cur_frm.cscript.refresh = function(doc, cdt, cdn){ erpnext.hide_naming_series(); - cur_frm.clear_custom_buttons(); -<<<<<<< HEAD - if(doc.docstatus === 1 && doc.status!=="Opportunity Lost") { - cur_frm.add_custom_button( wn._('Create Quotation'), cur_frm.cscript.create_quotation); - cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']); - cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); -======= + if(doc.docstatus === 1 && doc.status!=="Lost") { - cur_frm.add_custom_button('Create Quotation', cur_frm.cscript.create_quotation); + cur_frm.add_custom_button(wn._('Create Quotation'), cur_frm.cscript.create_quotation); if(doc.status!=="Quotation") { - cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']); + cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']); } - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); ->>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } cur_frm.toggle_display("contact_info", doc.customer || doc.lead); diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index 776167229d..f890b28d76 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -25,17 +25,12 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ refresh: function(doc, dt, dn) { this._super(doc, dt, dn); -<<<<<<< HEAD - if(doc.docstatus == 1 && doc.status!=='Order Lost') { - cur_frm.add_custom_button(wn._('Make Sales Order'), cur_frm.cscript['Make Sales Order']); - if(doc.status!=="Order Confirmed") { - cur_frm.add_custom_button(wn._('Set as Lost'), cur_frm.cscript['Declare Order Lost']); -======= if(doc.docstatus == 1 && doc.status!=='Lost') { - cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']); + cur_frm.add_custom_button(wn._('Make Sales Order'), + cur_frm.cscript['Make Sales Order']); if(doc.status!=="Ordered") { - cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']); ->>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b + cur_frm.add_custom_button(wn._('Set as Lost'), + cur_frm.cscript['Declare Order Lost']); } cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } @@ -57,7 +52,6 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ }) }); } - if (!doc.__islocal) { cur_frm.communication_view = new wn.views.CommunicationList({