FINERACT-2181:improve code quality
This commit is contained in:
committed by
Adam Saghy
parent
62afd41182
commit
6d49d76e73
+3
-4
@@ -72,10 +72,9 @@ public class GLClosureWritePlatformServiceJpaRepositoryImpl implements GLClosure
|
||||
}
|
||||
// shouldn't be before an existing accounting closure
|
||||
final GLClosure latestGLClosure = this.glClosureRepository.getLatestGLClosureByBranch(officeId);
|
||||
if (latestGLClosure != null) {
|
||||
if (DateUtils.isAfter(latestGLClosure.getClosingDate(), closureDate)) {
|
||||
throw new GLClosureInvalidException(GlClosureInvalidReason.ACCOUNTING_CLOSED, latestGLClosure.getClosingDate());
|
||||
}
|
||||
if (latestGLClosure != null && DateUtils.isAfter(latestGLClosure.getClosingDate(), closureDate)) {
|
||||
throw new GLClosureInvalidException(GlClosureInvalidReason.ACCOUNTING_CLOSED, latestGLClosure.getClosingDate());
|
||||
|
||||
}
|
||||
final GLClosure glClosure = GLClosure.fromJson(office, command);
|
||||
|
||||
|
||||
+4
-4
@@ -31,17 +31,17 @@ public class GLAccountInvalidUpdateException extends AbstractPlatformDomainRuleE
|
||||
TRANSANCTIONS_LOGGED;
|
||||
|
||||
public String errorMessage() {
|
||||
if (name().toString().equalsIgnoreCase("TRANSANCTIONS_LOGGED")) {
|
||||
if (name().equalsIgnoreCase("TRANSANCTIONS_LOGGED")) {
|
||||
return "This Usage of this (detail) GL Account as it already has transactions logged against it";
|
||||
}
|
||||
return name().toString();
|
||||
return name();
|
||||
}
|
||||
|
||||
public String errorCode() {
|
||||
if (name().toString().equalsIgnoreCase("TRANSANCTIONS_LOGGED")) {
|
||||
if (name().equalsIgnoreCase("TRANSANCTIONS_LOGGED")) {
|
||||
return "error.msg.glaccount.glcode.invalid.update.transactions.logged";
|
||||
}
|
||||
return name().toString();
|
||||
return name();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public enum JournalEntryJsonInputParams {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().replaceAll("_", " ");
|
||||
return name().replace("_", " ");
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
|
||||
Reference in New Issue
Block a user