From 0e1540b3b7bd246d05e6322df20a4478442d8d7b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 5 May 2015 17:26:35 +0530 Subject: [PATCH] material request saving issue fixed --- erpnext/public/js/controllers/accounts.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js index fc87b23a62..e19919d261 100644 --- a/erpnext/public/js/controllers/accounts.js +++ b/erpnext/public/js/controllers/accounts.js @@ -36,19 +36,17 @@ frappe.ui.form.on(cur_frm.doctype, { }, validate: function(frm) { // neither is absolutely mandatory - frm.get_docfield("taxes", "rate").reqd = 0; - frm.get_docfield("taxes", "tax_amount").reqd = 0; + if(frm.get_docfield("taxes")) { + frm.get_docfield("taxes", "rate").reqd = 0; + frm.get_docfield("taxes", "tax_amount").reqd = 0; + } + }, taxes_on_form_rendered: function(frm) { erpnext.taxes.set_conditional_mandatory_rate_or_amount(frm); } }); - - - - - cur_frm.cscript.account_head = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.account_head){