From 96af1ccffb3073c2d1f14fa08feb5a9a444d592a Mon Sep 17 00:00:00 2001 From: Vishakh Desai <78500008+vishakhdesai@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:53:13 +0530 Subject: [PATCH] Merge pull request #46812 from vishakhdesai/fix-taxes-and-totals fix: revert resetting `rounding_adjustment` (cherry picked from commit 3a9dca056318ffcdd44cc5ae8ef2ed8cf05f498e) --- erpnext/controllers/taxes_and_totals.py | 2 +- erpnext/public/js/controllers/taxes_and_totals.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 4fa103c2e82..d2559241781 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -643,7 +643,7 @@ class calculate_taxes_and_totals: if self.doc.meta.get_field("rounded_total"): if self.doc.is_rounded_total_disabled(): - self.doc.rounded_total = self.doc.base_rounded_total = self.doc.rounding_adjustment = 0 + self.doc.rounded_total = self.doc.base_rounded_total = 0 return self.doc.rounded_total = round_based_on_smallest_currency_fraction( diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 1a6ca364aef..233c3d4c3b6 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -343,6 +343,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_taxes() { var me = this; + this.frm.doc.rounding_adjustment = 0; var actual_tax_dict = {}; // maintain actual tax rate based on idx @@ -626,7 +627,6 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (cint(disable_rounded_total)) { this.frm.doc.rounded_total = 0; this.frm.doc.base_rounded_total = 0; - this.frm.doc.rounding_adjustment = 0; return; }