mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fix: calculate discount amount (#24511)
This commit is contained in:
@@ -24,6 +24,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
|
|
||||||
if (item.discount_amount) {
|
if (item.discount_amount) {
|
||||||
item.rate = flt((item.rate_with_margin) - (item.discount_amount), precision('rate', item));
|
item.rate = flt((item.rate_with_margin) - (item.discount_amount), precision('rate', item));
|
||||||
|
item.discount_percentage = 100 * flt(item.discount_amount) / flt(item.rate_with_margin);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user