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;
}
Aggregations