Friday, October 10, 2025
1 change · saas-18.3
Enhancements to existing features
Tax calculation helpers now handle proportional distribution internally instead of relying on callers to prepare values in advance. This reduces the risk of rounding or sign-related inconsistencies in accounting calculations and makes future maintenance safer.
Original PR description
At the moment, `_distribute_delta_amounts_smoothly` requires the factors to be pre-nomalized. However, normalizing the factors robustly requires more logic than just dividing by the sum of factors, especially if the factors have different signs. This commit moves the normalization into `_distribute_delta_amounts_smoothly` itself meaning the calling code doesn't need to take care of it anymore. task-none