mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
* fix: improved rounding adjustment when applying discount (#46720) * fix: rounding adjustment in apply_discount_amount taxes_and_totals * refactor: minor changes * fix: set the rounding difference while calculating tax total in the last tax row and add test case * fix: failing test case * fix: made changes in get_total_for_discount_amount in taxes_and_totals * fix: failing test cases * fix: changes as per review * refactor: remove unnecessary use of flt * refactor: improve logic * refactor: minor change * refactor: minor changes * fix: add a test case for applying discount with previous row total in taxes * fix: failing test case * refactor: flatter code, remove `flt` usage for accuracy --------- Co-authored-by: Vishakh Desai <78500008+vishakhdesai@users.noreply.github.com> Co-authored-by: Sagar Vora <sagar@resilient.tech>