Fix tax-code keying function for tax-recalc (#5637)

This commit is contained in:
Richard Schreiber
2025-11-18 15:03:33 +01:00
committed by GitHub
parent 313f4f326b
commit 5e828ab8af

View File

@@ -231,7 +231,7 @@ def apply_rounding(rounding_mode: Literal["line", "sum_by_net", "sum_by_net_keep
"""
def _key(line):
return (line.tax_rate, line.tax_code)
return (line.tax_rate, line.tax_code or "")
places = settings.CURRENCY_PLACES.get(currency, 2)
minimum_unit = Decimal('1') / 10 ** places