update java.math.RoundingMode
This commit is contained in:
@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user