Search in sources :

Example 6 with BulkEntryActionForm

use of org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm in project head by mifos.

the class CollectionSheetEntryAction method get.

/**
     * This method is called once the search criteria have been entered by the user to generate the bulk entry details
     * for a particular customer It retrieves the loan officer office, and parent customer that was selected and sets
     * them into the bulk entry business object. The list of attendance types and product list associated with the
     * center, and its children are also retrieved
     */
@TransactionDemarcate(joinToken = true)
public ActionForward get(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    logTrackingInfo("get", request, form);
    final BulkEntryActionForm collectionSheetEntryActionForm = (BulkEntryActionForm) form;
    final CollectionSheetEntryFormDto previousCollectionSheetEntryFormDto = retrieveFromRequestCollectionSheetEntryFormDto(request);
    final CollectionSheetEntryFormDtoDecorator dtoDecorator = new CollectionSheetEntryFormDtoDecorator(previousCollectionSheetEntryFormDto);
    final CollectionSheetFormEnteredDataDto formEnteredDataDto = new FormEnteredDataAssembler(collectionSheetEntryActionForm, dtoDecorator).toDto();
    final MifosCurrency currency = Configuration.getInstance().getSystemConfig().getCurrency();
    final CollectionSheetEntryGridDto collectionSheetEntry = collectionSheetServiceFacade.generateCollectionSheetEntryGridView(formEnteredDataDto, currency);
    storeOnRequestCollectionSheetEntryDto(request, collectionSheetEntry);
    return mapping.findForward(CollectionSheetEntryConstants.GETSUCCESS);
}
Also used : BulkEntryActionForm(org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm) FormEnteredDataAssembler(org.mifos.application.servicefacade.FormEnteredDataAssembler) CollectionSheetFormEnteredDataDto(org.mifos.application.servicefacade.CollectionSheetFormEnteredDataDto) CollectionSheetEntryFormDtoDecorator(org.mifos.application.servicefacade.CollectionSheetEntryFormDtoDecorator) MifosCurrency(org.mifos.application.master.business.MifosCurrency) CollectionSheetEntryFormDto(org.mifos.application.servicefacade.CollectionSheetEntryFormDto) CollectionSheetEntryGridDto(org.mifos.application.collectionsheet.business.CollectionSheetEntryGridDto) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 7 with BulkEntryActionForm

use of org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm in project head by mifos.

the class CollectionSheetEntryAction method loadCustomerList.

@TransactionDemarcate(joinToken = true)
public ActionForward loadCustomerList(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    final BulkEntryActionForm bulkEntryActionForm = (BulkEntryActionForm) form;
    final Short personnelId = Short.valueOf(bulkEntryActionForm.getLoanOfficerId());
    final Short officeId = Short.valueOf(bulkEntryActionForm.getOfficeId());
    final CollectionSheetEntryFormDto previousCollectionSheetEntryFormDto = retrieveFromRequestCollectionSheetEntryFormDto(request);
    final CollectionSheetEntryFormDto latestCollectionSheetEntryFormDto = collectionSheetServiceFacade.loadCustomersForBranchAndLoanOfficer(personnelId, officeId, previousCollectionSheetEntryFormDto);
    // add reference data for view
    storeOnRequestCollectionSheetEntryFormDto(request, latestCollectionSheetEntryFormDto);
    return mapping.findForward(CollectionSheetEntryConstants.LOADSUCCESS);
}
Also used : BulkEntryActionForm(org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm) CollectionSheetEntryFormDto(org.mifos.application.servicefacade.CollectionSheetEntryFormDto) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 8 with BulkEntryActionForm

use of org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm in project head by mifos.

the class CollectionSheetEntryAction method logTrackingInfo.

private void logTrackingInfo(final String actionMethodName, final HttpServletRequest request, final ActionForm form) {
    BulkEntryActionForm bulkEntryForm = (BulkEntryActionForm) form;
    StringBuilder message = getLogMessage(actionMethodName, request);
    String receiptId = bulkEntryForm.getReceiptId();
    message.append(", receipt Id:" + receiptId);
    String centerId = bulkEntryForm.getCustomerId();
    message.append(", center:" + centerId);
    message.append(", ");
    logger.info(message.toString());
}
Also used : BulkEntryActionForm(org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm)

Aggregations

BulkEntryActionForm (org.mifos.application.collectionsheet.struts.actionforms.BulkEntryActionForm)8 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)5 CollectionSheetEntryFormDto (org.mifos.application.servicefacade.CollectionSheetEntryFormDto)4 CollectionSheetEntryGridDto (org.mifos.application.collectionsheet.business.CollectionSheetEntryGridDto)2 UserContext (org.mifos.security.util.UserContext)2 Date (java.util.Date)1 Before (org.junit.Before)1 Test (org.junit.Test)1 MifosCurrency (org.mifos.application.master.business.MifosCurrency)1 MeetingBO (org.mifos.application.meeting.business.MeetingBO)1 CollectionSheetEntryDecomposedDto (org.mifos.application.servicefacade.CollectionSheetEntryDecomposedDto)1 CollectionSheetEntryFormDtoDecorator (org.mifos.application.servicefacade.CollectionSheetEntryFormDtoDecorator)1 CollectionSheetEntryViewTranslator (org.mifos.application.servicefacade.CollectionSheetEntryViewTranslator)1 CollectionSheetErrorsDto (org.mifos.application.servicefacade.CollectionSheetErrorsDto)1 CollectionSheetFormEnteredDataDto (org.mifos.application.servicefacade.CollectionSheetFormEnteredDataDto)1 FormEnteredDataAssembler (org.mifos.application.servicefacade.FormEnteredDataAssembler)1