use of org.mifos.application.collectionsheet.business.CollectionSheetEntryDto in project head by mifos.
the class SaveCollectionSheetFromLegacyAssembler method fromWebTierLegacyStructuretoSaveCollectionSheetDto.
public SaveCollectionSheetDto fromWebTierLegacyStructuretoSaveCollectionSheetDto(CollectionSheetEntryGridDto previousCollectionSheetEntryDto, Short userId) {
List<CollectionSheetEntryDto> collectionSheetEntryDtos = new ArrayList<CollectionSheetEntryDto>();
convertTreeToList(previousCollectionSheetEntryDto.getBulkEntryParent(), collectionSheetEntryDtos);
SaveCollectionSheetDto saveCollectionSheet = null;
try {
saveCollectionSheet = new SaveCollectionSheetDto(assembleCustomers(collectionSheetEntryDtos), previousCollectionSheetEntryDto.getPaymentTypeId(), DateUtils.getLocalDateFromDate(previousCollectionSheetEntryDto.getTransactionDate()), previousCollectionSheetEntryDto.getReceiptId(), DateUtils.getLocalDateFromDate(previousCollectionSheetEntryDto.getReceiptDate()), userId);
} catch (SaveCollectionSheetException e) {
throw new MifosRuntimeException(e.printInvalidSaveCollectionSheetReasons());
}
return saveCollectionSheet;
}
Aggregations