fixing an exception

This commit is contained in:
jstaerk
2025-04-17 09:42:45 +02:00
parent 17bc5c483f
commit 9e77433a13

View File

@@ -51,7 +51,7 @@ public class LineCalculator {
price=currentItem.getPrice();
BigDecimal delta=charge.subtract(allowanceItemTotal).subtract(allowance);
delta=delta.divide(currentItem.getQuantity());
delta=delta.divide(currentItem.getQuantity(), 18, RoundingMode.HALF_UP);
priceGross=currentItem.getPrice().add(delta);
// Division/Zero occurred here.
// Used the setScale only because that's also done in getBasisQuantity