payment for disbursal
This commit is contained in:
+2
@@ -91,6 +91,8 @@ public class LoanTransactionsApiResource {
|
|||||||
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
||||||
} else if (is(commandParam, "close")) {
|
} else if (is(commandParam, "close")) {
|
||||||
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
transactionData = this.loanReadPlatformService.retrieveNewClosureDetails();
|
||||||
|
} else if (is(commandParam, "disburse")) {
|
||||||
|
transactionData = this.loanReadPlatformService.retrieveDisbursalTemplate(loanId);
|
||||||
} else {
|
} else {
|
||||||
throw new UnrecognizedQueryParamException("command", commandParam);
|
throw new UnrecognizedQueryParamException("command", commandParam);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1988,7 +1988,7 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LocalDate getExpectedDisbursedOnLocalDate() {
|
public LocalDate getExpectedDisbursedOnLocalDate() {
|
||||||
LocalDate expectedDisbursementDate = null;
|
LocalDate expectedDisbursementDate = null;
|
||||||
if (this.expectedDisbursementDate != null) {
|
if (this.expectedDisbursementDate != null) {
|
||||||
expectedDisbursementDate = new LocalDate(this.expectedDisbursementDate);
|
expectedDisbursementDate = new LocalDate(this.expectedDisbursementDate);
|
||||||
|
|||||||
+2
@@ -32,5 +32,7 @@ public interface LoanReadPlatformService {
|
|||||||
|
|
||||||
LoanTransactionData retrieveNewClosureDetails();
|
LoanTransactionData retrieveNewClosureDetails();
|
||||||
|
|
||||||
|
LoanTransactionData retrieveDisbursalTemplate(Long loanId);
|
||||||
|
|
||||||
LoanAccountData retrieveTemplateWithCompleteGroupAndProductDetails(Long groupId, Long productId);
|
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);
|
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
|
@Override
|
||||||
public LoanTransactionData retrieveLoanTransaction(final Long loanId, final Long transactionId) {
|
public LoanTransactionData retrieveLoanTransaction(final Long loanId, final Long transactionId) {
|
||||||
|
|
||||||
@@ -740,4 +750,5 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
|||||||
interestPortion, feeChargesPortion, penaltyChargesPortion);
|
interestPortion, feeChargesPortion, penaltyChargesPortion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user