use of org.mifos.application.admin.servicefacade.InvalidDateException in project head by mifos.
the class CustomerBO method updateCenterDetails.
public void updateCenterDetails(UserContext userContext, CenterUpdate centerUpdate) throws CustomerException {
this.setUserContext(userContext);
this.setUpdateDetails();
this.setExternalId(centerUpdate.getExternalId());
AddressDto dto = centerUpdate.getAddress();
if (dto != null) {
Address address = new Address(dto.getLine1(), dto.getLine2(), dto.getLine3(), dto.getCity(), dto.getState(), dto.getCountry(), dto.getZip(), dto.getPhoneNumber());
this.updateAddress(address);
}
try {
if (centerUpdate.getMfiJoiningDate() != null) {
DateTime mfiJoiningDate = CalendarUtils.getDateFromString(centerUpdate.getMfiJoiningDate(), userContext.getPreferredLocale());
this.setMfiJoiningDate(mfiJoiningDate.toDate());
}
} catch (InvalidDateException e) {
throw new CustomerException(CustomerConstants.MFI_JOINING_DATE_MANDATORY, e);
}
}
Aggregations