MIFOSX-1267 and fix for view loan audit entry
This commit is contained in:
+1
-1
@@ -379,7 +379,7 @@ public class AuditReadPlatformServiceImpl implements AuditReadPlatformService {
|
||||
if (entityName.equalsIgnoreCase("LOAN") || entityName.equalsIgnoreCase("LOANPRODUCT")) {
|
||||
|
||||
final String[] enumTypes = { "loanTermFrequencyType", "termFrequencyType", "repaymentFrequencyType", "amortizationType",
|
||||
"interestType", "interestCalculationPeriodType", "interestRateFrequencyType", "loanType", "accountingRule" };
|
||||
"interestType", "interestCalculationPeriodType", "interestRateFrequencyType", "accountingRule" };
|
||||
|
||||
for (final String typeName : enumTypes) {
|
||||
if (commandAsJsonMap.containsKey(typeName)) {
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ public class LoanTransactionsApiResource {
|
||||
} else if (is(commandParam, "waiveinterest")) {
|
||||
transactionData = this.loanReadPlatformService.retrieveWaiveInterestDetails(loanId);
|
||||
} else if (is(commandParam, "writeoff")) {
|
||||
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
||||
transactionData = this.loanReadPlatformService.retrieveLoanWriteoffTemplate(loanId);
|
||||
} else if (is(commandParam, "close-rescheduled")) {
|
||||
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
||||
} else if (is(commandParam, "close")) {
|
||||
|
||||
+4
@@ -1145,5 +1145,9 @@ public class LoanAccountData {
|
||||
public Long loanProductId() {
|
||||
return this.loanProductId;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalOutstandingAmount(){
|
||||
return this.summary.getTotalOutstanding();
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -98,4 +98,8 @@ public class LoanSummaryData {
|
||||
this.totalOverdue = totalOverdue;
|
||||
this.overdueSinceDate = overdueSinceDate;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalOutstanding() {
|
||||
return this.totalOutstanding;
|
||||
}
|
||||
}
|
||||
+2
@@ -82,4 +82,6 @@ public interface LoanReadPlatformService {
|
||||
Collection<LoanScheduleAccrualData> retriveScheduleAccrualData();
|
||||
|
||||
LoanTransactionData retrieveRecoveryPaymentTemplate(Long loanId);
|
||||
|
||||
LoanTransactionData retrieveLoanWriteoffTemplate(Long loanId);
|
||||
}
|
||||
+10
@@ -1389,4 +1389,14 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoanTransactionData retrieveLoanWriteoffTemplate(final Long loanId) {
|
||||
|
||||
final LoanAccountData loan = this.retrieveOne(loanId);
|
||||
|
||||
final LoanTransactionEnumData transactionType = LoanEnumerations.transactionType(LoanTransactionType.WRITEOFF);
|
||||
return new LoanTransactionData(null, null, null, transactionType, null, loan.currency(), DateUtils.getLocalDateOfTenant(),
|
||||
loan.getTotalOutstandingAmount(), null, null, null, null, null, null, null, null);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user