[fix] pull tax rate in item tax
This commit is contained in:
parent
79c94426f7
commit
7a39d51366
@ -78,11 +78,6 @@ frappe.ui.form.on("Item", {
|
||||
frm.set_value("description", frm.doc.item_code);
|
||||
},
|
||||
|
||||
tax_type: function(frm, cdt, cdn){
|
||||
var d = locals[cdt][cdn];
|
||||
return get_server_fields('get_tax_rate', d.tax_type, 'taxes', doc, cdt, cdn, 1);
|
||||
},
|
||||
|
||||
copy_from_item_group: function(frm) {
|
||||
return frm.call({
|
||||
doc: frm.doc,
|
||||
@ -315,3 +310,4 @@ cur_frm.add_fetch('attribute', 'numeric_values', 'numeric_values');
|
||||
cur_frm.add_fetch('attribute', 'from_range', 'from_range');
|
||||
cur_frm.add_fetch('attribute', 'to_range', 'to_range');
|
||||
cur_frm.add_fetch('attribute', 'increment', 'increment');
|
||||
cur_frm.add_fetch('tax_type', 'tax_rate', 'tax_rate');
|
||||
|
@ -398,9 +398,6 @@ class Item(WebsiteGenerator):
|
||||
item_description=%s, modified=NOW() where item_code=%s""",
|
||||
(self.item_name, self.description, self.name))
|
||||
|
||||
def get_tax_rate(self, tax_type):
|
||||
return { "tax_rate": frappe.db.get_value("Account", tax_type, "tax_rate") }
|
||||
|
||||
def on_trash(self):
|
||||
super(Item, self).on_trash()
|
||||
frappe.db.sql("""delete from tabBin where item_code=%s""", self.item_code)
|
||||
|
Loading…
x
Reference in New Issue
Block a user