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