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) {
|
||||
final LoanAdjustTransactionBusinessEvent.Data data = new LoanAdjustTransactionBusinessEvent.Data(oldTransaction);
|
||||
data.setNewTransactionDetail(newTransaction);
|
||||
if (newTransaction.isNotReversed()) {
|
||||
data.setNewTransactionDetail(newTransaction);
|
||||
}
|
||||
businessEventNotifierService.notifyPostBusinessEvent(new LoanAdjustTransactionBusinessEvent(data));
|
||||
}
|
||||
}
|
||||
|
||||
+10
-9
@@ -195,16 +195,17 @@ public class ReprocessLoanTransactionsServiceImpl implements ReprocessLoanTransa
|
||||
for (TransactionChangeData change : changedTransactionDetail.getTransactionChanges()) {
|
||||
final LoanTransaction newTransaction = change.getNewTransaction();
|
||||
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);
|
||||
if (oldTransaction == null && (newTransaction.isAccrual() || newTransaction.isAccrualAdjustment())) {
|
||||
final LoanTransactionBusinessEvent businessEvent = newTransaction.isAccrual()
|
||||
? new LoanAccrualTransactionCreatedBusinessEvent(newTransaction)
|
||||
: new LoanAccrualAdjustmentTransactionBusinessEvent(newTransaction);
|
||||
businessEventNotifierService.notifyPostBusinessEvent(businessEvent);
|
||||
// Create journal entries for new transaction
|
||||
loanJournalEntryPoster.postJournalEntriesForLoanTransaction(newTransaction, false, false);
|
||||
if (oldTransaction == null && (newTransaction.isAccrual() || newTransaction.isAccrualAdjustment())) {
|
||||
final LoanTransactionBusinessEvent businessEvent = newTransaction.isAccrual()
|
||||
? new LoanAccrualTransactionCreatedBusinessEvent(newTransaction)
|
||||
: new LoanAccrualAdjustmentTransactionBusinessEvent(newTransaction);
|
||||
businessEventNotifierService.notifyPostBusinessEvent(businessEvent);
|
||||
}
|
||||
}
|
||||
|
||||
if (oldTransaction != null) {
|
||||
|
||||
Reference in New Issue
Block a user