parent
0bdfe0ed92
commit
a7ef20bb74
1 changed files with 10 additions and 10 deletions
|
|
@ -118,16 +118,16 @@ public class PreCalculationCheckService {
|
||||||
throw new PremiseValidationError("In destination " + node.getName() + ": destination geo location not set. Please contact your administrator.");
|
throw new PremiseValidationError("In destination " + node.getName() + ": destination geo location not set. Please contact your administrator.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destination.getDisposalCost() != null && destination.getDisposalCost().compareTo(BigDecimal.ZERO) == 0) {
|
if (destination.getDisposalCost() != null && destination.getDisposalCost().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
throw new PremiseValidationError("In destination " + node.getName() + ": disposal costs entered as zero.");
|
throw new PremiseValidationError("In destination " + node.getName() + ": disposal costs are not set or entered value is less than zero.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destination.getHandlingCost() != null && destination.getHandlingCost().compareTo(BigDecimal.ZERO) == 0) {
|
if (destination.getHandlingCost() != null && destination.getHandlingCost().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
throw new PremiseValidationError("In destination " + node.getName() + ": handling costs entered as zero.");
|
throw new PremiseValidationError("In destination " + node.getName() + ": handling costs are not set or entered value is less than zero.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destination.getRepackingCost() != null && destination.getRepackingCost().compareTo(BigDecimal.ZERO) == 0) {
|
if (destination.getRepackingCost() != null && destination.getRepackingCost().compareTo(BigDecimal.ZERO) < 0) {
|
||||||
throw new PremiseValidationError("In destination " + node.getName() + ": repackaging costs enstered as zero.");
|
throw new PremiseValidationError("In destination " + node.getName() + ": repackaging costs are not set or entered value is less than zero.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -158,11 +158,11 @@ public class PreCalculationCheckService {
|
||||||
private void packagingCheck(Premise premise) {
|
private void packagingCheck(Premise premise) {
|
||||||
|
|
||||||
if (premise.getHuMixable() == null) {
|
if (premise.getHuMixable() == null) {
|
||||||
throw new PremiseValidationError("Mixable not set. Please contact administrator");
|
throw new PremiseValidationError("Mixable not set. Please contact administrator.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (premise.getHuStackable() == null) {
|
if (premise.getHuStackable() == null) {
|
||||||
throw new PremiseValidationError("Stackable not set. Please contact administrator");
|
throw new PremiseValidationError("Stackable not set. Please contact administrator.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (premise.getHuStackable() == false && premise.getHuMixable() == true) {
|
if (premise.getHuStackable() == false && premise.getHuMixable() == true) {
|
||||||
|
|
@ -190,11 +190,11 @@ public class PreCalculationCheckService {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (premise.getHuDisplayedWeightUnit() == null) {
|
if (premise.getHuDisplayedWeightUnit() == null) {
|
||||||
throw new PremiseValidationError("Packaging weight unit not set. Please contact administrator");
|
throw new PremiseValidationError("Packaging weight unit not set. Please contact administrator.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (premise.getHuDisplayedDimensionUnit() == null) {
|
if (premise.getHuDisplayedDimensionUnit() == null) {
|
||||||
throw new PremiseValidationError("Packaging dimension unit not set. Please contact administrator");
|
throw new PremiseValidationError("Packaging dimension unit not set. Please contact administrator.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var hu = dimensionTransformer.toDimensionEntity(premise).withTolerance(DIMENSION_TOLERANCE);
|
var hu = dimensionTransformer.toDimensionEntity(premise).withTolerance(DIMENSION_TOLERANCE);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue