use of org.mifos.accounting.struts.actionform.InterOfficeTransferActionForm in project head by mifos.
the class InterOfficeTransferAction method loadCreditAccount.
public ActionForward loadCreditAccount(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
InterOfficeTransferActionForm actionForm = (InterOfficeTransferActionForm) form;
List<GLCodeDto> accountingDtos = null;
/*
* if( (actionForm.getFromOfficeHierarchy().equals(actionForm.
* getToOfficeHierarchy())) &&
* (actionForm.getFromOffice().equals(actionForm.getToOffice()))){
* accountingDtos =
* accountingServiceFacade.loadCreditAccounts(actionForm
* .getDebitAccountHead());
*
* }else{ accountingDtos =
* accountingServiceFacade.loadCreditAccounts(actionForm
* .getDebitAccountHead()); }
*/
accountingDtos = accountingServiceFacade.loadCreditAccounts(actionForm.getDebitAccountHead());
storingSession(request, "CreditAccounts", accountingDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.accounting.struts.actionform.InterOfficeTransferActionForm in project head by mifos.
the class InterOfficeTransferAction method loadToOffices.
public ActionForward loadToOffices(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
InterOfficeTransferActionForm actionForm = (InterOfficeTransferActionForm) form;
List<OfficeGlobalDto> toOfficeDetailsDtos = null;
actionForm.getFromOfficeHierarchy();
actionForm.getFromOffice();
if (actionForm.getFromOfficeHierarchy().equals(actionForm.getToOfficeHierarchy())) {
if (actionForm.getFromOfficeHierarchy().equals("")) {
toOfficeDetailsDtos = null;
} else if (actionForm.getToOfficeHierarchy().equals("6")) {
// to
// recognize
// center
toOfficeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("3"), actionForm.getFromOffice());
} else if (actionForm.getToOfficeHierarchy().equals("7")) {
// to
// recognize
// group
toOfficeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("2"), actionForm.getFromOffice());
} else {
toOfficeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(Short.valueOf(actionForm.getToOfficeHierarchy()), actionForm.getFromOffice());
}
} else {
if (actionForm.getFromOfficeHierarchy().equals("")) {
toOfficeDetailsDtos = null;
} else if (actionForm.getToOfficeHierarchy().equals("6")) {
// to
// recognize
// center
toOfficeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("3"));
} else if (actionForm.getToOfficeHierarchy().equals("7")) {
// to
// recognize
// group
toOfficeDetailsDtos = accountingServiceFacade.loadCustomerForLevel(new Short("2"));
} else {
toOfficeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(Short.valueOf(actionForm.getToOfficeHierarchy()));
}
}
storingSession(request, "IOToOfficeHierarchy", toOfficeDetailsDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.accounting.struts.actionform.InterOfficeTransferActionForm in project head by mifos.
the class InterOfficeTransferAction method load.
public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
InterOfficeTransferActionForm actionForm = (InterOfficeTransferActionForm) form;
java.util.Date trxnDate = DateUtils.getCurrentDateWithoutTimeStamp();
actionForm.setTrxnDate(trxnDate);
List<GLCodeDto> interOfficeAccountingDtos = null;
List<GLCodeDto> accountingDtos = null;
interOfficeAccountingDtos = accountingServiceFacade.loadInterOfficeDebitAccounts();
storingSession(request, "InterOfficeDebitAccountGlCodes", interOfficeAccountingDtos);
storingSession(request, "IOFromOfficeHierarchy", null);
storingSession(request, "IOToOfficeHierarchy", null);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.accounting.struts.actionform.InterOfficeTransferActionForm in project head by mifos.
the class InterOfficeTransferAction method submit.
public ActionForward submit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
int stage = 1;
InterOfficeTransferActionForm actionForm = (InterOfficeTransferActionForm) form;
submitSaveAndStage(actionForm, request, stage);
return mapping.findForward("submit_success");
}
use of org.mifos.accounting.struts.actionform.InterOfficeTransferActionForm in project head by mifos.
the class InterOfficeTransferAction method saveStageSubmit.
public ActionForward saveStageSubmit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
InterOfficeTransferActionForm actionForm = (InterOfficeTransferActionForm) form;
int stage = 0;
submitSaveAndStage(actionForm, request, stage);
return mapping.findForward("submit_success");
}
Aggregations