fix: rate change on changing of the qty (#40241)

This commit is contained in:
rohitwaghchaure 2024-03-02 16:44:07 +05:30 committed by GitHub
parent f2f5c1a0eb
commit e7d707797a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
item_rate = flt(item.rate_with_margin , precision("rate", item));
if (item.discount_percentage) {
if (item.discount_percentage && !item.discount_amount) {
item.discount_amount = flt(item.rate_with_margin) * flt(item.discount_percentage) / 100;
}