Search in sources :

Example 1 with SavingsPerformanceHistoryDto

use of org.mifos.dto.domain.SavingsPerformanceHistoryDto in project head by mifos.

the class SavingsBO method toDto.

public SavingsAccountDetailDto toDto() {
    List<SavingsRecentActivityDto> recentActivity = this.getRecentAccountActivity(3);
    List<CustomerNoteDto> recentNoteDtos = new ArrayList<CustomerNoteDto>();
    List<AccountNotesEntity> recentNotes = this.getRecentAccountNotes();
    for (AccountNotesEntity accountNotesEntity : recentNotes) {
        recentNoteDtos.add(new CustomerNoteDto(accountNotesEntity.getCommentDate(), accountNotesEntity.getComment(), accountNotesEntity.getPersonnelName()));
    }
    SavingsPerformanceHistoryDto savingsPerformanceHistoryDto = new SavingsPerformanceHistoryDto(getActivationDate(), savingsPerformance.getTotalDeposits().toString(), savingsPerformance.getTotalWithdrawals().toString(), savingsPerformance.getTotalInterestEarned().toString(), savingsPerformance.getMissedDeposits() != null ? savingsPerformance.getMissedDeposits().toString() : "0");
    AccountActionDateEntity nextInstallment = getDetailsOfNextInstallment();
    return new SavingsAccountDetailDto(this.savingsOffering.toFullDto(), recentActivity, recentNoteDtos, this.recommendedAmount.toString(), this.globalAccountNum, getAccountId(), getState().getValue(), getState().name(), getSavingsBalance().toString(), nextInstallment != null ? nextInstallment.getActionDate() : null, getTotalAmountDue().toString(), getTotalAmountDueForNextInstallment().toString(), getTotalAmountInArrears().toString(), savingsPerformanceHistoryDto, this.savingsOffering.getSavingsTypeAsEnum().name(), this.customer.getCustomerId());
}
Also used : AccountActionDateEntity(org.mifos.accounts.business.AccountActionDateEntity) CustomerNoteDto(org.mifos.dto.domain.CustomerNoteDto) ArrayList(java.util.ArrayList) SavingsRecentActivityDto(org.mifos.dto.screen.SavingsRecentActivityDto) AccountNotesEntity(org.mifos.accounts.business.AccountNotesEntity) SavingsPerformanceHistoryDto(org.mifos.dto.domain.SavingsPerformanceHistoryDto) SavingsAccountDetailDto(org.mifos.dto.domain.SavingsAccountDetailDto)

Aggregations

ArrayList (java.util.ArrayList)1 AccountActionDateEntity (org.mifos.accounts.business.AccountActionDateEntity)1 AccountNotesEntity (org.mifos.accounts.business.AccountNotesEntity)1 CustomerNoteDto (org.mifos.dto.domain.CustomerNoteDto)1 SavingsAccountDetailDto (org.mifos.dto.domain.SavingsAccountDetailDto)1 SavingsPerformanceHistoryDto (org.mifos.dto.domain.SavingsPerformanceHistoryDto)1 SavingsRecentActivityDto (org.mifos.dto.screen.SavingsRecentActivityDto)1