update java.math.RoundingMode

This commit is contained in:
2026-02-25 21:18:04 +01:00
parent a7e76e00d3
commit 1866782111

View File

@ -1,6 +1,7 @@
package com.jFxKasse.datatypes; package com.jFxKasse.datatypes;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
public class Job { public class Job {
@ -97,7 +98,7 @@ public class Job {
jobvalue = jobvalue + (positionenQuantity.get(i) * positionenValue.get(i)); jobvalue = jobvalue + (positionenQuantity.get(i) * positionenValue.get(i));
} }
// Round to two decimal places // Round to two decimal places
jobvalue = BigDecimal.valueOf(jobvalue).setScale(2, BigDecimal.ROUND_HALF_UP).floatValue(); jobvalue = BigDecimal.valueOf(jobvalue).setScale(2, RoundingMode.HALF_UP).floatValue();
} }
public String createPosQuantityDBString() { public String createPosQuantityDBString() {