Search in sources :

Example 16 with CollectionSheetEntryDto

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;
}
Also used : ArrayList(java.util.ArrayList) CollectionSheetEntryDto(org.mifos.application.collectionsheet.business.CollectionSheetEntryDto) MifosRuntimeException(org.mifos.core.MifosRuntimeException)

Aggregations

CollectionSheetEntryDto (org.mifos.application.collectionsheet.business.CollectionSheetEntryDto)16 CollectionSheetEntryGridDto (org.mifos.application.collectionsheet.business.CollectionSheetEntryGridDto)6 ArrayList (java.util.ArrayList)5 SavingsAccountDto (org.mifos.accounts.savings.util.helpers.SavingsAccountDto)5 Money (org.mifos.framework.util.helpers.Money)5 Date (java.util.Date)4 LoanAccountDto (org.mifos.accounts.loan.util.helpers.LoanAccountDto)4 LoanAccountsProductDto (org.mifos.accounts.loan.util.helpers.LoanAccountsProductDto)4 OfficeDetailsDto (org.mifos.dto.domain.OfficeDetailsDto)4 PersonnelDto (org.mifos.dto.domain.PersonnelDto)4 LoanOfferingBO (org.mifos.accounts.productdefinition.business.LoanOfferingBO)3 SavingsOfferingBO (org.mifos.accounts.productdefinition.business.SavingsOfferingBO)3 CustomValueListElementDto (org.mifos.application.master.business.CustomValueListElementDto)3 MeetingBO (org.mifos.application.meeting.business.MeetingBO)3 ProductDto (org.mifos.application.servicefacade.ProductDto)3 MifosCurrency (org.mifos.application.master.business.MifosCurrency)2 MifosRuntimeException (org.mifos.core.MifosRuntimeException)2 CustomerAccountDto (org.mifos.customers.util.helpers.CustomerAccountDto)2 Date (java.sql.Date)1 Locale (java.util.Locale)1