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);
}
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);
}
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());
}
Aggregations