fix: Item tax template not getting mapped from source to traget doc (#21862)

This commit is contained in:
Deepesh Garg 2020-05-22 12:28:45 +05:30 committed by Nabin Hait
parent f42408c003
commit bd24a07459

View File

@ -1652,8 +1652,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(!r.exc) {
$.each(me.frm.doc.items || [], function(i, item) {
if(item.item_code && r.message.hasOwnProperty(item.item_code)) {
item.item_tax_template = r.message[item.item_code].item_tax_template;
item.item_tax_rate = r.message[item.item_code].item_tax_rate;
if (!item.item_tax_template) {
item.item_tax_template = r.message[item.item_code].item_tax_template;
item.item_tax_rate = r.message[item.item_code].item_tax_rate;
}
me.add_taxes_from_item_tax_template(item.item_tax_rate);
} else {
item.item_tax_template = "";