fix for issue with apply charges event
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ public class GLAccountReadPlatformServiceImpl implements GLAccountReadPlatformSe
|
|||||||
final EnumOptionData usage = AccountingEnumerations.gLAccountUsage(usageId);
|
final EnumOptionData usage = AccountingEnumerations.gLAccountUsage(usageId);
|
||||||
final String description = rs.getString("description");
|
final String description = rs.getString("description");
|
||||||
final String nameDecorated = rs.getString("nameDecorated");
|
final String nameDecorated = rs.getString("nameDecorated");
|
||||||
final Long codeId = rs.wasNull()? null : rs.getLong("codeId");
|
final Long codeId = rs.wasNull() ? null : rs.getLong("codeId");
|
||||||
final String codeValue = rs.getString("codeValue");
|
final String codeValue = rs.getString("codeValue");
|
||||||
CodeValueData tagId = CodeValueData.instance(codeId, codeValue);
|
CodeValueData tagId = CodeValueData.instance(codeId, codeValue);
|
||||||
return new GLAccountData(id, name, parentId, glCode, disabled, manualEntriesAllowed, accountType, usage, description,
|
return new GLAccountData(id, name, parentId, glCode, disabled, manualEntriesAllowed, accountType, usage, description,
|
||||||
|
|||||||
+3
-6
@@ -694,13 +694,13 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
final List<Long> existingReversedTransactionIds = new ArrayList<Long>();
|
final List<Long> existingReversedTransactionIds = new ArrayList<Long>();
|
||||||
this.loanChargeRepository.save(loanCharge);
|
this.loanChargeRepository.save(loanCharge);
|
||||||
|
|
||||||
final LoanTransaction applyLoanChargeTransaction = loan.handleChargeAppliedTransaction(loanCharge, null);
|
|
||||||
final ChangedTransactionDetail changedTransactionDetail = loan.addLoanCharge(loanCharge, existingTransactionIds,
|
final ChangedTransactionDetail changedTransactionDetail = loan.addLoanCharge(loanCharge, existingTransactionIds,
|
||||||
existingReversedTransactionIds);
|
existingReversedTransactionIds);
|
||||||
|
|
||||||
// we want to apply charge transactions only for those loans charges
|
// we want to apply charge transactions only for those loans charges
|
||||||
// that are applied when a loan is active
|
// that are applied when a loan is active
|
||||||
if (loan.status().isActive()) {
|
if (loan.status().isActive()) {
|
||||||
|
final LoanTransaction applyLoanChargeTransaction = loan.handleChargeAppliedTransaction(loanCharge, null);
|
||||||
this.loanTransactionRepository.save(applyLoanChargeTransaction);
|
this.loanTransactionRepository.save(applyLoanChargeTransaction);
|
||||||
/***
|
/***
|
||||||
* TODO Vishwas Batch save is giving me a
|
* TODO Vishwas Batch save is giving me a
|
||||||
@@ -714,12 +714,9 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
this.loanTransactionRepository.save(loanTransaction);
|
this.loanTransactionRepository.save(loanTransaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
this.loanRepository.save(loan);
|
this.loanRepository.save(loan);
|
||||||
|
// we post Journal entries only for loans in active status
|
||||||
// we post Journal entries only for loans in active status
|
|
||||||
if (loan.status().isActive()) {
|
|
||||||
postJournalEntries(loan, existingTransactionIds, existingReversedTransactionIds);
|
postJournalEntries(loan, existingTransactionIds, existingReversedTransactionIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user