diff --git a/src/frontend/src/components/layout/bulkoperation/BulkOperation.vue b/src/frontend/src/components/layout/bulkoperation/BulkOperation.vue
index fe2a83d..89e1cff 100644
--- a/src/frontend/src/components/layout/bulkoperation/BulkOperation.vue
+++ b/src/frontend/src/components/layout/bulkoperation/BulkOperation.vue
@@ -11,9 +11,10 @@
-
+
ERROR
+ ERROR
COMPLETED
SCHEDULED
diff --git a/src/main/java/de/avatic/lcc/service/precalculation/PreCalculationCheckService.java b/src/main/java/de/avatic/lcc/service/precalculation/PreCalculationCheckService.java
index ec74eb9..517e055 100644
--- a/src/main/java/de/avatic/lcc/service/precalculation/PreCalculationCheckService.java
+++ b/src/main/java/de/avatic/lcc/service/precalculation/PreCalculationCheckService.java
@@ -136,29 +136,28 @@ public class PreCalculationCheckService {
private void periodCheck(ValidityPeriod period, PropertySet set) {
-
- if(set == null)
+ if (set == null)
throw new PremiseValidationError("There are no system properties for the given date. Please contact your administrator.");
- if(period == null)
+ if (period == null)
throw new PremiseValidationError("There are no rates for the given date. Please contact your administrator.");
- if(ValidityPeriodState.VALID != period.getState() && ValidityPeriodState.EXPIRED != period.getState())
+ if (ValidityPeriodState.VALID != period.getState() && ValidityPeriodState.EXPIRED != period.getState())
throw new PremiseValidationError("There are no valid rates for the given date. Please contact your administrator.");
- if(ValidityPeriodState.VALID != set.getState() && ValidityPeriodState.EXPIRED != period.getState())
+ if (ValidityPeriodState.VALID != set.getState() && ValidityPeriodState.EXPIRED != period.getState())
throw new PremiseValidationError("There are no valid system properties for the given date. Please contact your administrator.");
//TODO: sicherstellen, dass die valid days für den zeitpunkt galten zu dem die valid period galt (wenn rückwirkend gerechnet wird)
var validDays = propertyRepository.getPropertyByMappingId(SystemPropertyMappingId.VALID_DAYS, set.getId());
var renewals = period.getRenewals();
- if(validDays.isEmpty())
+ if (validDays.isEmpty())
throw new PremiseValidationError("There are no valid days property. Please contact your administrator");
var validDaysInt = Integer.parseInt(validDays.get().getCurrentValue());
- if(!period.getStartDate().plusDays((((long) validDaysInt * renewals)+validDaysInt)).isAfter(LocalDateTime.now()))
+ if (!period.getStartDate().plusDays((((long) validDaysInt * renewals) + validDaysInt)).isAfter(LocalDateTime.now()))
throw new PremiseValidationError("There are no valid rates for the given date. Please contact your administrator.");
}
@@ -325,14 +324,14 @@ public class PreCalculationCheckService {
private void materialCheck(Premise premise) {
- if(premise.getHsCode() == null || premise.getHsCode().length() < 10)
- throw new PremiseValidationError("Invalid HS code.");
+ if (premise.getTariffUnlocked()) {
+ if (premise.getHsCode() == null || premise.getHsCode().length() < 10)
+ throw new PremiseValidationError("Invalid HS code (10 digits expected).");
+ var isDeclarable = eUTaxationResolverService.validate(premise.getHsCode());
- var isDeclarable = eUTaxationResolverService.validate(premise.getHsCode());
-
- if (!isDeclarable)
- throw new PremiseValidationError("Invalid HS code.");
+ if (!isDeclarable) throw new PremiseValidationError("Invalid HS code (not declarable).");
+ }
if (premise.getTariffRate() == null) {
throw new PremiseValidationError("Tariff rate not entered.");