use of org.mifos.dto.domain.HolidayDetails in project head by mifos.
the class HolidayAssembler method translateHolidayFormBeanToDto.
public HolidayDetails translateHolidayFormBeanToDto(HolidayFormBean formBean) {
Date fromDate = new DateTime().withDate(Integer.parseInt(formBean.getFromYear()), formBean.getFromMonth(), formBean.getFromDay()).toDate();
Date thruDate = null;
if (formBean.getToDay() != null) {
thruDate = new DateTime().withDate(Integer.parseInt(formBean.getToYear()), formBean.getToMonth(), formBean.getToDay()).toDate();
}
return new HolidayDetails(formBean.getName(), fromDate, thruDate, Short.valueOf(formBean.getRepaymentRuleId()));
}
use of org.mifos.dto.domain.HolidayDetails in project head by mifos.
the class SavingsScheduleIntegrationTest method buildAndPersistHoliday.
private void buildAndPersistHoliday(DateTime start, DateTime through, RepaymentRuleTypes rule) throws Exception {
HolidayDetails holidayDetails = new HolidayDetails("testHoliday", start.toDate(), through.toDate(), rule.getValue());
List<Short> officeIds = new LinkedList<Short>();
officeIds.add((short) 1);
IntegrationTestObjectMother.createHoliday(holidayDetails, officeIds);
}
Aggregations