Merge pull request #34195 from HarryPaulo/fix-performance-on-insert-item

fix: Performance improvement when adding a new item
This commit is contained in:
rohitwaghchaure 2023-03-01 10:10:14 +05:30 committed by GitHub
commit d88fe27be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -488,7 +488,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
() => {
var d = locals[cdt][cdn];
me.add_taxes_from_item_tax_template(d.item_tax_rate);
if (d.free_item_data) {
if (d.free_item_data && d.free_item_data.length > 0) {
me.apply_product_discount(d);
}
},