From c79415eb96a819e77e0df8716704cd1caf5505e7 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Mon, 18 Jan 2016 16:32:24 +0530 Subject: [PATCH] added rate and total margin in price_list --- erpnext/public/js/controllers/transaction.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 6de5154817..757dee0404 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -643,6 +643,12 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ "parenttype": d.parenttype, "parent": d.parent }); + + // if doctype is Quotation Item / Sales Order Iten then add Margin Type and rate in item_list + if (d.doctype == "Quotation Item" || d.doctype == "Sales Order Item"){ + item_list[0]["type"] = d.type + item_list[0]["rate_or_amount"] = d.rate_or_amount + } } }; @@ -957,5 +963,3 @@ frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) { frm.cscript.calculate_taxes_and_totals(); }); - -