Search in sources :

Example 1 with JournalVoucherActionForm

use of org.mifos.accounting.struts.actionform.JournalVoucherActionForm in project head by mifos.

the class JournalVoucherAction method loadCreditAccount.

public ActionForward loadCreditAccount(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    JournalVoucherActionForm actionForm = (JournalVoucherActionForm) form;
    List<GLCodeDto> accountingDtos = null;
    accountingDtos = accountingServiceFacade.loadCreditAccounts(actionForm.getDebitAccountHead());
    storingSession(request, "CreditAccounts", accountingDtos);
    return mapping.findForward(ActionForwards.load_success.toString());
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) JournalVoucherActionForm(org.mifos.accounting.struts.actionform.JournalVoucherActionForm)

Example 2 with JournalVoucherActionForm

use of org.mifos.accounting.struts.actionform.JournalVoucherActionForm in project head by mifos.

the class JournalVoucherAction method load.

public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    JournalVoucherActionForm actionForm = (JournalVoucherActionForm) form;
    List<GLCodeDto> accountingDtos = null;
    List<RolesActivityDto> rolesactivitydto = null;
    accountingDtos = accountingServiceFacade.loadDebitAccounts();
    java.util.Date voucherDate = DateUtils.getCurrentDateWithoutTimeStamp();
    actionForm.setVoucherDate(voucherDate);
    rolesactivitydto = accountingServiceFacade.jvloadRolesActivity();
    UserContext context = getUserContext(request);
    actionForm.setOfficeLevelId(String.valueOf(context.getOfficeLevelId()));
    List listOfOfficeHierarchyObject = getOfficeLevels(actionForm);
    boolean journalVoucherSave = rolesactivitydto.isEmpty();
    storingSession(request, "listOfOffices", listOfOfficeHierarchyObject);
    storingSession(request, "jvsave", journalVoucherSave);
    storingSession(request, "DebitAccountGlCodes", accountingDtos);
    return mapping.findForward(ActionForwards.load_success.toString());
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) UserContext(org.mifos.security.util.UserContext) JournalVoucherActionForm(org.mifos.accounting.struts.actionform.JournalVoucherActionForm) ArrayList(java.util.ArrayList) OfficesList(org.mifos.dto.domain.OfficesList) List(java.util.List) RolesActivityDto(org.mifos.dto.domain.RolesActivityDto)

Example 3 with JournalVoucherActionForm

use of org.mifos.accounting.struts.actionform.JournalVoucherActionForm in project head by mifos.

the class JournalVoucherAction method preview.

public ActionForward preview(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    JournalVoucherActionForm actionForm = (JournalVoucherActionForm) form;
    storingSession(request, "JournalVoucherActionForm", actionForm);
    monthClosingServiceFacade.validateTransactionDate(DateUtils.getDate(actionForm.getVoucherDate()));
    return mapping.findForward(ActionForwards.preview_success.toString());
}
Also used : JournalVoucherActionForm(org.mifos.accounting.struts.actionform.JournalVoucherActionForm)

Example 4 with JournalVoucherActionForm

use of org.mifos.accounting.struts.actionform.JournalVoucherActionForm in project head by mifos.

the class JournalVoucherAction method saveStageSubmit.

public ActionForward saveStageSubmit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    JournalVoucherActionForm actionForm = (JournalVoucherActionForm) form;
    int stage = 0;
    //
    insertionSaveAndStage(actionForm, request, stage);
    return mapping.findForward("submit_success");
}
Also used : JournalVoucherActionForm(org.mifos.accounting.struts.actionform.JournalVoucherActionForm)

Example 5 with JournalVoucherActionForm

use of org.mifos.accounting.struts.actionform.JournalVoucherActionForm in project head by mifos.

the class JournalVoucherAction method submit.

public ActionForward submit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    JournalVoucherActionForm actionForm = (JournalVoucherActionForm) form;
    int stage = 1;
    insertionSaveAndStage(actionForm, request, stage);
    return mapping.findForward("submit_success");
}
Also used : JournalVoucherActionForm(org.mifos.accounting.struts.actionform.JournalVoucherActionForm)

Aggregations

JournalVoucherActionForm (org.mifos.accounting.struts.actionform.JournalVoucherActionForm)6 ArrayList (java.util.ArrayList)2 GLCodeDto (org.mifos.dto.domain.GLCodeDto)2 OfficesList (org.mifos.dto.domain.OfficesList)2 UserContext (org.mifos.security.util.UserContext)2 List (java.util.List)1 DynamicOfficeDto (org.mifos.dto.domain.DynamicOfficeDto)1 OfficeGlobalDto (org.mifos.dto.domain.OfficeGlobalDto)1 RolesActivityDto (org.mifos.dto.domain.RolesActivityDto)1