Search in sources :

Example 16 with FeeDto

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

the class LoanControllerHelper method findFeeById.

public FeeDto findFeeById(final List<FeeDto> defaultFees, final Integer feeId, final BigDecimal amountOrRate) {
    FeeDto found = null;
    for (FeeDto feeDto : defaultFees) {
        if (Integer.valueOf(feeDto.getId()).equals(feeId)) {
            feeDto.setAmount(amountOrRate.toPlainString());
            if (feeDto.isRateBasedFee()) {
                feeDto.setRate(amountOrRate.doubleValue());
            }
            found = feeDto;
        }
    }
    return found;
}
Also used : FeeDto(org.mifos.dto.domain.FeeDto)

Aggregations

FeeDto (org.mifos.dto.domain.FeeDto)16 BigDecimal (java.math.BigDecimal)4 ArrayList (java.util.ArrayList)4 LocalDate (org.joda.time.LocalDate)4 Test (org.junit.Test)4 FeeActionForm (org.mifos.accounts.fees.struts.actionforms.FeeActionForm)4 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)4 CreateAccountFeeDto (org.mifos.dto.domain.CreateAccountFeeDto)3 CreateAccountPenaltyDto (org.mifos.dto.domain.CreateAccountPenaltyDto)3 PenaltyDto (org.mifos.dto.domain.PenaltyDto)3 AmountFeeBO (org.mifos.accounts.fees.business.AmountFeeBO)2 FeeBO (org.mifos.accounts.fees.business.FeeBO)2 LoanOfferingBO (org.mifos.accounts.productdefinition.business.LoanOfferingBO)2 MeetingBO (org.mifos.application.meeting.business.MeetingBO)2 RankOfDay (org.mifos.application.meeting.util.helpers.RankOfDay)2 WeekDay (org.mifos.application.meeting.util.helpers.WeekDay)2 ConfigurationBusinessService (org.mifos.config.business.service.ConfigurationBusinessService)2 CustomerBO (org.mifos.customers.business.CustomerBO)2 LoanAccountDetailsDto (org.mifos.dto.domain.LoanAccountDetailsDto)2 LoanCreationLoanDetailsDto (org.mifos.dto.screen.LoanCreationLoanDetailsDto)2