You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "oleksii-novikov-onix (via GitHub)" <gi...@apache.org> on 2025/05/13 09:40:12 UTC

Re: [PR] FINERACT-2181: Improve code quality [fineract]

oleksii-novikov-onix commented on code in PR #4660:
URL: https://github.com/apache/fineract/pull/4660#discussion_r2086379372


##########
fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -72,10 +72,9 @@ public CommandProcessingResult createGLClosure(final JsonCommand command) {
             }
             // 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());
+

Review Comment:
   Please remove the unnecessary new line



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org