You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by na...@apache.org on 2017/03/22 06:16:53 UTC
[1/2] incubator-fineract git commit: FINERACT-321 - Manual Journal
entries should not allowed to reverse after accounting closure is done for
that branch
Repository: incubator-fineract
Updated Branches:
refs/heads/develop e444aca44 -> 1873db645
FINERACT-321 - Manual Journal entries should not allowed to reverse after accounting closure is done for that branch
Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/5f744536
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/5f744536
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/5f744536
Branch: refs/heads/develop
Commit: 5f74453606db080ae96fafbd58b0a5df96b5362c
Parents: 8cc560c
Author: nazeer1100126 <na...@confluxtechnologies.com>
Authored: Fri Mar 17 17:49:05 2017 +0530
Committer: nazeer1100126 <na...@confluxtechnologies.com>
Committed: Fri Mar 17 17:49:05 2017 +0530
----------------------------------------------------------------------
...rnalEntryWritePlatformServiceJpaRepositoryImpl.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5f744536/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java
index 207cdc9..b556014 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java
@@ -325,6 +325,19 @@ public class JournalEntryWritePlatformServiceJpaRepositoryImpl implements Journa
final boolean useDefaultComment = StringUtils.isBlank(reversalComment);
validateCommentForReversal(reversalComment);
+
+ //Before reversal validate accounting closure is done for that branch or not.
+ final Date journalEntriesTransactionDate = journalEntries.get(0).getTransactionDate();
+ final GLClosure latestGLClosureByBranch = this.glClosureRepository.getLatestGLClosureByBranch(officeId);
+ if (latestGLClosureByBranch != null) {
+ if (latestGLClosureByBranch.getClosingDate().after(journalEntriesTransactionDate)
+ || latestGLClosureByBranch.getClosingDate().equals(journalEntriesTransactionDate)) {
+ final String accountName = null;
+ final String accountGLCode = null;
+ throw new JournalEntryInvalidException(GL_JOURNAL_ENTRY_INVALID_REASON.ACCOUNTING_CLOSED,
+ latestGLClosureByBranch.getClosingDate(), accountName, accountGLCode);
+ }
+ }
for (final JournalEntry journalEntry : journalEntries) {
JournalEntry reversalJournalEntry;
[2/2] incubator-fineract git commit: Merge branch 'FINERACT-321' into
develop
Posted by na...@apache.org.
Merge branch 'FINERACT-321' into develop
Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/1873db64
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/1873db64
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/1873db64
Branch: refs/heads/develop
Commit: 1873db64513a4b06cdd40d7a7cc52cbfec055e70
Parents: e444aca 5f74453
Author: Nazeer Hussain Shaik <na...@confluxtechnologies.com>
Authored: Wed Mar 22 11:46:26 2017 +0530
Committer: Nazeer Hussain Shaik <na...@confluxtechnologies.com>
Committed: Wed Mar 22 11:46:26 2017 +0530
----------------------------------------------------------------------
...rnalEntryWritePlatformServiceJpaRepositoryImpl.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------