FINERACT-2387: Fix zero amount reversed transaction creation issue
This commit is contained in:
committed by
Arnold Gálovics
parent
09bacb8827
commit
e0e4415727
+3
-1
@@ -47,7 +47,9 @@ public class ReplayedTransactionBusinessEventServiceImpl implements ReplayedTran
|
|||||||
|
|
||||||
if (oldTransaction != null) {
|
if (oldTransaction != null) {
|
||||||
final LoanAdjustTransactionBusinessEvent.Data data = new LoanAdjustTransactionBusinessEvent.Data(oldTransaction);
|
final LoanAdjustTransactionBusinessEvent.Data data = new LoanAdjustTransactionBusinessEvent.Data(oldTransaction);
|
||||||
data.setNewTransactionDetail(newTransaction);
|
if (newTransaction.isNotReversed()) {
|
||||||
|
data.setNewTransactionDetail(newTransaction);
|
||||||
|
}
|
||||||
businessEventNotifierService.notifyPostBusinessEvent(new LoanAdjustTransactionBusinessEvent(data));
|
businessEventNotifierService.notifyPostBusinessEvent(new LoanAdjustTransactionBusinessEvent(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-9
@@ -195,16 +195,17 @@ public class ReprocessLoanTransactionsServiceImpl implements ReprocessLoanTransa
|
|||||||
for (TransactionChangeData change : changedTransactionDetail.getTransactionChanges()) {
|
for (TransactionChangeData change : changedTransactionDetail.getTransactionChanges()) {
|
||||||
final LoanTransaction newTransaction = change.getNewTransaction();
|
final LoanTransaction newTransaction = change.getNewTransaction();
|
||||||
final LoanTransaction oldTransaction = change.getOldTransaction();
|
final LoanTransaction oldTransaction = change.getOldTransaction();
|
||||||
|
if (newTransaction.isNotReversed()) {
|
||||||
|
loanAccountService.saveLoanTransactionWithDataIntegrityViolationChecks(newTransaction);
|
||||||
|
|
||||||
loanAccountService.saveLoanTransactionWithDataIntegrityViolationChecks(newTransaction);
|
// Create journal entries for new transaction
|
||||||
|
loanJournalEntryPoster.postJournalEntriesForLoanTransaction(newTransaction, false, false);
|
||||||
// Create journal entries for new transaction
|
if (oldTransaction == null && (newTransaction.isAccrual() || newTransaction.isAccrualAdjustment())) {
|
||||||
loanJournalEntryPoster.postJournalEntriesForLoanTransaction(newTransaction, false, false);
|
final LoanTransactionBusinessEvent businessEvent = newTransaction.isAccrual()
|
||||||
if (oldTransaction == null && (newTransaction.isAccrual() || newTransaction.isAccrualAdjustment())) {
|
? new LoanAccrualTransactionCreatedBusinessEvent(newTransaction)
|
||||||
final LoanTransactionBusinessEvent businessEvent = newTransaction.isAccrual()
|
: new LoanAccrualAdjustmentTransactionBusinessEvent(newTransaction);
|
||||||
? new LoanAccrualTransactionCreatedBusinessEvent(newTransaction)
|
businessEventNotifierService.notifyPostBusinessEvent(businessEvent);
|
||||||
: new LoanAccrualAdjustmentTransactionBusinessEvent(newTransaction);
|
}
|
||||||
businessEventNotifierService.notifyPostBusinessEvent(businessEvent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldTransaction != null) {
|
if (oldTransaction != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user