From a700345cee73ab7ba51e067572302d0d4dc5af7f Mon Sep 17 00:00:00 2001 From: Corentin Forler <10946971+cogk@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:08:05 +0100 Subject: [PATCH] refactor: Remove duplicate inherited method (#46030) The method add_taxes_from_item_tax_template is defined identically in the erpnext.taxes_and_totals class, that erpnext.TransactionController extends. --- erpnext/public/js/controllers/transaction.js | 21 -------------------- 1 file changed, 21 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index b30966836b0..0430bf71da9 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -765,27 +765,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }); } - add_taxes_from_item_tax_template(item_tax_map) { - let me = this; - - if(item_tax_map && cint(frappe.defaults.get_default("add_taxes_from_item_tax_template"))) { - if(typeof (item_tax_map) == "string") { - item_tax_map = JSON.parse(item_tax_map); - } - - $.each(item_tax_map, function(tax, rate) { - let found = (me.frm.doc.taxes || []).find(d => d.account_head === tax); - if(!found) { - let child = frappe.model.add_child(me.frm.doc, "taxes"); - child.charge_type = "On Net Total"; - child.account_head = tax; - child.rate = 0; - child.set_by_item_tax_template = true; - } - }); - } - } - serial_no(doc, cdt, cdn) { var me = this; var item = frappe.get_doc(cdt, cdn);