fix: apply discount on item after applying price list (#36317)

This commit is contained in:
Anand Baburajan
2023-07-25 21:55:17 +05:30
committed by GitHub
parent eead2bba9f
commit 11a9d4124f
2 changed files with 13 additions and 10 deletions

View File

@@ -142,16 +142,6 @@ erpnext.sales_common = {
this.apply_discount_on_item(doc, cdt, cdn, 'discount_amount');
}
apply_discount_on_item(doc, cdt, cdn, field) {
var item = frappe.get_doc(cdt, cdn);
if(!item.price_list_rate) {
item[field] = 0.0;
} else {
this.price_list_rate(doc, cdt, cdn);
}
this.set_gross_profit(item);
}
commission_rate() {
this.calculate_commission();
}