payment for disbursal
This commit is contained in:
+2
@@ -91,6 +91,8 @@ public class LoanTransactionsApiResource {
|
||||
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
||||
} else if (is(commandParam, "close")) {
|
||||
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
||||
} else if (is(commandParam, "disburse")) {
|
||||
transactionData = this.loanReadPlatformService.retrieveDisbursalTemplate(loanId);
|
||||
} else {
|
||||
throw new UnrecognizedQueryParamException("command", commandParam);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1988,7 +1988,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
return date;
|
||||
}
|
||||
|
||||
private LocalDate getExpectedDisbursedOnLocalDate() {
|
||||
public LocalDate getExpectedDisbursedOnLocalDate() {
|
||||
LocalDate expectedDisbursementDate = null;
|
||||
if (this.expectedDisbursementDate != null) {
|
||||
expectedDisbursementDate = new LocalDate(this.expectedDisbursementDate);
|
||||
|
||||
+2
@@ -31,6 +31,8 @@ public interface LoanReadPlatformService {
|
||||
LoanTransactionData retrieveLoanTransaction(Long loanId, Long transactionId);
|
||||
|
||||
LoanTransactionData retrieveNewClosureDetails();
|
||||
|
||||
LoanTransactionData retrieveDisbursalTemplate(Long loanId);
|
||||
|
||||
LoanAccountData retrieveTemplateWithCompleteGroupAndProductDetails(Long groupId, Long productId);
|
||||
}
|
||||
+11
@@ -253,6 +253,16 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
return new LoanTransactionData(null, transactionType, null, null, DateUtils.getLocalDateOfTenant(), null, null, null, null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoanTransactionData retrieveDisbursalTemplate(final Long loanId) {
|
||||
final Loan loan = this.loanRepository.findOne(loanId);
|
||||
if (loan == null) { throw new LoanNotFoundException(loanId); }
|
||||
final LoanTransactionEnumData transactionType = LoanEnumerations.transactionType(LoanTransactionType.DISBURSEMENT);
|
||||
final List<EnumOptionData> paymentOptions = loanDropdownReadPlatformService.retrievePaymentTypeOptions();
|
||||
return new LoanTransactionData(null, transactionType, null, null, loan.getExpectedDisbursedOnLocalDate(), null, null, null, null,
|
||||
null, paymentOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoanTransactionData retrieveLoanTransaction(final Long loanId, final Long transactionId) {
|
||||
|
||||
@@ -740,4 +750,5 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
interestPortion, feeChargesPortion, penaltyChargesPortion);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user