Skip to content

Commit

Permalink
fix: rate change on changing of the qty (backport #40241) (#40243)
Browse files Browse the repository at this point in the history
fix: rate change on changing of the qty (#40241)

(cherry picked from commit e7d7077)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Mar 2, 2024
1 parent 0b091aa commit 1d42171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/public/js/controllers/taxes_and_totals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1d42171

Please sign in to comment.