Search in sources :

Example 1 with ViewStageTransactionActionForm

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

the class ApproveTransactions method submit.

public ActionForward submit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    HttpSession session = request.getSession(true);
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    GlMasterBO glMasterBO = new GlMasterBO();
    int stage = 1;
    List<String> amountActionList = getAmountAction(actionForm);
    List<GlDetailBO> glDetailBOList = getGlDetailBOList(actionForm, amountActionList, Integer.parseInt(actionForm.getTransactionDetailID()));
    glMasterBO.setTransactionMasterId(Integer.parseInt(actionForm.getStageTransactionNo()));
    glMasterBO.setTransactionDate(DateUtils.getDate(actionForm.getStageTrxnDate()));
    glMasterBO.setTransactionType(actionForm.getStageTrxnType());
    glMasterBO.setFromOfficeLevel(new Integer(actionForm.getStageOfficeHierarchy()));
    glMasterBO.setFromOfficeId(actionForm.getStageOffice());
    glMasterBO.setToOfficeLevel(new Integer(actionForm.getStageOfficeHierarchy()));
    glMasterBO.setToOfficeId(actionForm.getStageOffice());
    glMasterBO.setMainAccount(actionForm.getStageMainAccount());
    glMasterBO.setTransactionAmount(new BigDecimal(actionForm.getStageAmount()));
    glMasterBO.setAmountAction(amountActionList.get(0));
    glMasterBO.setTransactionNarration(actionForm.getStageNotes());
    glMasterBO.setStage(stage);
    glMasterBO.setGlDetailBOList(glDetailBOList);
    // default value
    glMasterBO.setStatus("");
    // default value
    glMasterBO.setTransactionBy(0);
    glMasterBO.setCreatedBy(getUserContext(request).getId());
    glMasterBO.setCreatedDate(DateUtils.getCurrentDateWithoutTimeStamp());
    accountingServiceFacade.savingAccountingTransactions(glMasterBO);
    return mapping.findForward("submit_success");
}
Also used : HttpSession(javax.servlet.http.HttpSession) GlMasterBO(org.mifos.application.accounting.business.GlMasterBO) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm) BigDecimal(java.math.BigDecimal) GlDetailBO(org.mifos.application.accounting.business.GlDetailBO)

Example 2 with ViewStageTransactionActionForm

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

the class ApproveTransactions method loadOffices.

public ActionForward loadOffices(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    List<OfficeGlobalDto> officeDetailsDtos = null;
    if (actionForm.getStageOfficeHierarchy().equals("")) {
        officeDetailsDtos = null;
    } else if (actionForm.getStageOfficeHierarchy().equals("6")) {
        // to
        // recognize
        // center
        officeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("3"));
    } else if (actionForm.getStageOfficeHierarchy().equals("7")) {
        // to
        // recognize
        // group
        officeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("2"));
    } else {
        officeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(Short.valueOf(actionForm.getStageOfficeHierarchy()));
    }
    storingSession(request, "OfficesOnHierarchy", officeDetailsDtos);
    return mapping.findForward("load_stage_success");
}
Also used : OfficeGlobalDto(org.mifos.dto.domain.OfficeGlobalDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Example 3 with ViewStageTransactionActionForm

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

the class ApproveTransactions method loadMainAccounts.

public ActionForward loadMainAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    List<GLCodeDto> accountingDtos = null;
    if (actionForm.getStageTrxnType().equals("CR") || actionForm.getStageTrxnType().equals("CP")) {
        accountingDtos = accountingServiceFacade.mainAccountForCash();
    } else if (actionForm.getStageTrxnType().equals("BR") || actionForm.getStageTrxnType().equals("BP")) {
        accountingDtos = accountingServiceFacade.mainAccountForBank();
    }
    storingSession(request, "MainAccountGlCodes", accountingDtos);
    return mapping.findForward("load_stage_success");
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Example 4 with ViewStageTransactionActionForm

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

the class AuditTransactionAction method loadMainAccounts.

public ActionForward loadMainAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    List<GLCodeDto> accountingDtos = null;
    if (actionForm.getStageTrxnType().equals("CR") || actionForm.getStageTrxnType().equals("CP")) {
        accountingDtos = accountingServiceFacade.mainAccountForCash();
    } else if (actionForm.getStageTrxnType().equals("BR") || actionForm.getStageTrxnType().equals("BP")) {
        accountingDtos = accountingServiceFacade.mainAccountForBank();
    }
    storingSession(request, "MainAccountGlCodes", accountingDtos);
    return mapping.findForward("load_stage_success");
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Example 5 with ViewStageTransactionActionForm

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

the class AuditTransactionAction method loadAccountHeads.

public ActionForward loadAccountHeads(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    List<GLCodeDto> accountingDtos = null;
    accountingDtos = accountingServiceFacade.accountHead(actionForm.getStageMainAccount());
    storingSession(request, "AccountHeadGlCodes", accountingDtos);
    return mapping.findForward("load_stage_success");
}
Also used : GLCodeDto(org.mifos.dto.domain.GLCodeDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Aggregations

ViewStageTransactionActionForm (org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)20 GLCodeDto (org.mifos.dto.domain.GLCodeDto)9 OfficeGlobalDto (org.mifos.dto.domain.OfficeGlobalDto)6 ViewStageTransactionsDto (org.mifos.dto.domain.ViewStageTransactionsDto)5 GlDetailDto (org.mifos.dto.domain.GlDetailDto)3 BigDecimal (java.math.BigDecimal)2 HttpSession (javax.servlet.http.HttpSession)2 GlDetailBO (org.mifos.application.accounting.business.GlDetailBO)2 GlMasterBO (org.mifos.application.accounting.business.GlMasterBO)2 ViewGlTransactionPaginaitonVariablesDto (org.mifos.dto.domain.ViewGlTransactionPaginaitonVariablesDto)2