Search in sources :

Example 1 with MeetingHelper

use of org.mifos.application.meeting.util.helpers.MeetingHelper in project head by mifos.

the class AccountBusinessService method populaleApplicableCharge.

private void populaleApplicableCharge(List<ApplicableCharge> applicableChargeList, List<FeeBO> feeList, UserContext userContext) {
    for (FeeBO fee : feeList) {
        ApplicableCharge applicableCharge = new ApplicableCharge();
        applicableCharge.setFeeId(fee.getFeeId().toString());
        applicableCharge.setFeeName(fee.getFeeName());
        applicableCharge.setIsPenaltyType(false);
        if (fee.getFeeType().getValue().equals(RateAmountFlag.RATE.getValue())) {
            applicableCharge.setAmountOrRate(new LocalizationConverter().getDoubleStringForInterest(((RateFeeBO) fee).getRate()));
            applicableCharge.setFormula(((RateFeeBO) fee).getFeeFormula().getFormulaStringThatHasName());
            applicableCharge.setIsRateType(true);
        } else {
            applicableCharge.setAmountOrRate(((AmountFeeBO) fee).getFeeAmount().toString());
            applicableCharge.setIsRateType(false);
        }
        MeetingBO meeting = fee.getFeeFrequency().getFeeMeetingFrequency();
        if (meeting != null) {
            applicableCharge.setPeriodicity(new MeetingHelper().getDetailMessageWithFrequency(meeting, userContext));
        } else {
            applicableCharge.setPaymentType(fee.getFeeFrequency().getFeePayment().getName());
        }
        applicableChargeList.add(applicableCharge);
    }
}
Also used : RateFeeBO(org.mifos.accounts.fees.business.RateFeeBO) LocalizationConverter(org.mifos.framework.util.LocalizationConverter) MeetingBO(org.mifos.application.meeting.business.MeetingBO) ApplicableCharge(org.mifos.dto.domain.ApplicableCharge) FeeBO(org.mifos.accounts.fees.business.FeeBO) RateFeeBO(org.mifos.accounts.fees.business.RateFeeBO) AmountFeeBO(org.mifos.accounts.fees.business.AmountFeeBO) MeetingHelper(org.mifos.application.meeting.util.helpers.MeetingHelper) AmountFeeBO(org.mifos.accounts.fees.business.AmountFeeBO)

Aggregations

AmountFeeBO (org.mifos.accounts.fees.business.AmountFeeBO)1 FeeBO (org.mifos.accounts.fees.business.FeeBO)1 RateFeeBO (org.mifos.accounts.fees.business.RateFeeBO)1 MeetingBO (org.mifos.application.meeting.business.MeetingBO)1 MeetingHelper (org.mifos.application.meeting.util.helpers.MeetingHelper)1 ApplicableCharge (org.mifos.dto.domain.ApplicableCharge)1 LocalizationConverter (org.mifos.framework.util.LocalizationConverter)1