use of org.mifos.dto.domain.AdminDocumentDto in project head by mifos.
the class ViewLoanAccountDetailsController method showLoanAccountPayments.
@RequestMapping(value = "/viewLoanAccountPayments", method = RequestMethod.GET)
public ModelAndView showLoanAccountPayments(HttpServletRequest request, HttpServletResponse response, @RequestParam String globalAccountNum) {
ModelAndView modelAndView = new ModelAndView("viewLoanAccountPayments");
List<AccountPaymentDto> loanAccountPayments = loanAccountServiceFacade.getLoanAccountPayments(globalAccountNum);
for (AccountPaymentDto accountPaymentDto : loanAccountPayments) {
List<AdminDocumentDto> adminDocuments = adminDocumentsServiceFacade.getAdminDocumentsForAccountPayment(accountPaymentDto.getPaymentId());
if (adminDocuments != null && !adminDocuments.isEmpty()) {
accountPaymentDto.setAdminDocuments(adminDocuments);
}
}
modelAndView.addObject("loanType", loanAccountServiceFacade.getGroupLoanType(globalAccountNum));
modelAndView.addObject("loanAccountPayments", loanAccountPayments);
return modelAndView;
}
Aggregations