Search in sources :

Example 6 with ViewStageTransactionActionForm

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

the class AuditTransactionAction method load.

public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    java.util.Date trxnDate = DateUtils.getCurrentDateWithoutTimeStamp();
    actionForm.setToTrxnDate(trxnDate);
    return mapping.findForward("pickDate_success");
}
Also used : ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm)

Example 7 with ViewStageTransactionActionForm

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

the class AuditTransactionAction 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 8 with ViewStageTransactionActionForm

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

the class ViewStageTransactionAction 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 9 with ViewStageTransactionActionForm

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

the class ViewStageTransactionAction 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 10 with ViewStageTransactionActionForm

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

the class ViewStageTransactionAction method edit.

public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ViewStageTransactionActionForm actionForm = (ViewStageTransactionActionForm) form;
    String stageTransactionNo = request.getParameter("txnNo");
    ViewStageTransactionsDto viewStageTransactionsDto = accountingServiceFacade.getstagedAccountingTransactions(stageTransactionNo);
    actionForm.setStageTrxnDate(changeDateFormat(viewStageTransactionsDto.getTransactionDate().toString()));
    actionForm.setStageOfficeHierarchy(this.getOfficeHierarchy(viewStageTransactionsDto.getOfficeLevel()));
    actionForm.setStageTrxnType(getTranType(viewStageTransactionsDto.getTransactionType()));
    actionForm.setStageMainAccount(viewStageTransactionsDto.getMainAccount());
    viewStageTransactionsDto.getSubAccount();
    actionForm.setStageAccountHead(viewStageTransactionsDto.getSubAccount());
    actionForm.setStageOffice(viewStageTransactionsDto.getFromOfficeId());
    short s = new Integer(actionForm.getStageOfficeHierarchy()).shortValue();
    GlDetailDto glDetailDto = accountingServiceFacade.getChequeDetails(stageTransactionNo);
    if (glDetailDto != null) {
        actionForm.setStageChequeNo(glDetailDto.getChequeNo());
        if (glDetailDto.getChequeDate() != null) {
            actionForm.setChequeDate(changeDateFormat(glDetailDto.getChequeDate().toString()));
        }
        actionForm.setStageBankName(glDetailDto.getBankName());
        actionForm.setStageankBranch(glDetailDto.getBankBranch());
    }
    // load offices
    List<OfficeGlobalDto> officeDetailsDtos = null;
    if (actionForm.getStageOfficeHierarchy() == "0") {
        officeDetailsDtos = null;
    // To recognize center
    } else if (actionForm.getStageOfficeHierarchy() == "6") {
        officeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("3"));
    // to recognize group
    } else if (actionForm.getStageOfficeHierarchy() == "7") {
        officeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("2"));
    } else {
        officeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(s);
    }
    storingSession(request, "OfficesOnHierarchy", officeDetailsDtos);
    // load main accounts
    List<GLCodeDto> accountingDtos = null;
    if (actionForm.getStageTrxnType().equals("CR") || actionForm.getStageTrxnType().equals("CP") || actionForm.getStageTrxnType().equals("BR") || actionForm.getStageTrxnType().equals("BP") || actionForm.getStageTrxnType().equals("JV")) {
        accountingDtos = accountingServiceFacade.auditAccountHeads();
    }
    storingSession(request, "MainAccountGlCodes", accountingDtos);
    storingSession(request, "stageTransactionNo", stageTransactionNo);
    actionForm.setTransactionDetailID(new Integer(viewStageTransactionsDto.getTransactionID()).toString());
    actionForm.setStageMainAccount(viewStageTransactionsDto.getMainAccount());
    actionForm.setStageAccountHead(viewStageTransactionsDto.getSubAccount());
    actionForm.setStageNotes(viewStageTransactionsDto.getNarration());
    actionForm.setStageAmount(String.format("%.2f", Double.parseDouble(viewStageTransactionsDto.getTransactionAmount())));
    storingSession(request, "ViewStageTransactionsDto", viewStageTransactionsDto);
    List<GLCodeDto> accountingGlDtos = null;
    accountingGlDtos = accountingServiceFacade.accountHead(actionForm.getStageMainAccount());
    storingSession(request, "AccountHeadGlCodes", accountingGlDtos);
    return mapping.findForward("edit_success");
}
Also used : OfficeGlobalDto(org.mifos.dto.domain.OfficeGlobalDto) GLCodeDto(org.mifos.dto.domain.GLCodeDto) ViewStageTransactionActionForm(org.mifos.accounting.struts.actionform.ViewStageTransactionActionForm) GlDetailDto(org.mifos.dto.domain.GlDetailDto) ViewStageTransactionsDto(org.mifos.dto.domain.ViewStageTransactionsDto)

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