use of org.mifos.accounting.struts.actionform.SingleGeneralLedgerActionForm in project head by mifos.
the class SingleGeneralLedgerAction method loadMainAccounts.
public ActionForward loadMainAccounts(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
SingleGeneralLedgerActionForm actionForm = (SingleGeneralLedgerActionForm) form;
List<GLCodeDto> accountingDtos = null;
if (actionForm.getTrxnType().equals("CR") || actionForm.getTrxnType().equals("CP")) {
accountingDtos = accountingServiceFacade.mainAccountForCash();
} else if (actionForm.getTrxnType().equals("BR") || actionForm.getTrxnType().equals("BP")) {
accountingDtos = accountingServiceFacade.mainAccountForBank();
}
storingSession(request, "MainAccountGlCodes", accountingDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.accounting.struts.actionform.SingleGeneralLedgerActionForm in project head by mifos.
the class SingleGeneralLedgerAction method submit.
public ActionForward submit(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
SingleGeneralLedgerActionForm actionForm = (SingleGeneralLedgerActionForm) form;
int stage = 1;
/*List<String> amountActionList = getAmountAction(actionForm);
List<GlDetailBO> glDetailBOList = getGlDetailBOList(actionForm,
amountActionList);
//
GlMasterBO glMasterBO = new GlMasterBO();
glMasterBO.setTransactionDate(DateUtils.getDate(actionForm
.getTrxnDate()));
glMasterBO.setTransactionType(actionForm.getTrxnType());
glMasterBO.setFromOfficeLevel(new Integer(actionForm
.getOfficeHierarchy()));
glMasterBO.setFromOfficeId(actionForm.getOffice());
glMasterBO
.setToOfficeLevel(new Integer(actionForm.getOfficeHierarchy()));
glMasterBO.setToOfficeId(actionForm.getOffice());
glMasterBO.setMainAccount(actionForm.getMainAccount());
glMasterBO.setTransactionAmount(new BigDecimal(actionForm.getAmount()));
glMasterBO.setAmountAction(amountActionList.get(0));
glMasterBO.setTransactionNarration(actionForm.getNotes());
glMasterBO.setGlDetailBOList(glDetailBOList);
glMasterBO.setStatus("");// default value
glMasterBO.setTransactionBy(0); // default value
glMasterBO.setCreatedBy(getUserContext(request).getId());
glMasterBO.setCreatedDate(DateUtils.getCurrentDateWithoutTimeStamp());
accountingServiceFacade.savingAccountingTransactions(glMasterBO);*/
insertionSaveAndStage(actionForm, request, stage);
return mapping.findForward("submit_success");
}
use of org.mifos.accounting.struts.actionform.SingleGeneralLedgerActionForm in project head by mifos.
the class SingleGeneralLedgerAction method loadAccountHeads.
public ActionForward loadAccountHeads(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
SingleGeneralLedgerActionForm actionForm = (SingleGeneralLedgerActionForm) form;
List<GLCodeDto> accountingDtos = null;
accountingDtos = accountingServiceFacade.accountHead(actionForm.getMainAccount());
storingSession(request, "AccountHeadGlCodes", accountingDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.accounting.struts.actionform.SingleGeneralLedgerActionForm in project head by mifos.
the class SingleGeneralLedgerAction method preview.
public ActionForward preview(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
SingleGeneralLedgerActionForm actionForm = (SingleGeneralLedgerActionForm) form;
storingSession(request, "SingleGeneralLedgerActionForm", actionForm);
monthClosingServiceFacade.validateTransactionDate(DateUtils.getDate(actionForm.getTrxnDate()));
return mapping.findForward(ActionForwards.preview_success.toString());
}
use of org.mifos.accounting.struts.actionform.SingleGeneralLedgerActionForm in project head by mifos.
the class SingleGeneralLedgerAction method load.
public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
List<RolesActivityDto> rolesactivitydto = null;
SingleGeneralLedgerActionForm actionForm = (SingleGeneralLedgerActionForm) form;
java.util.Date trxnDate = DateUtils.getCurrentDateWithoutTimeStamp();
actionForm.setTrxnDate(trxnDate);
rolesactivitydto = accountingServiceFacade.glloadRolesActivity();
actionForm.setMemberId("");
boolean generalledgersave = rolesactivitydto.isEmpty();
UserContext context = getUserContext(request);
actionForm.setOfficeLevelId(String.valueOf(context.getOfficeLevelId()));
List listOfOfficeHierarchyObject = getOfficeLevels(actionForm);
storingSession(request, "listOfOffices", listOfOfficeHierarchyObject);
storingSession(request, "officeLevelId", actionForm.getOfficeLevelId());
storingSession(request, "glsave", generalledgersave);
storingSession(request, "OfficesOnHierarchy", null);
storingSession(request, "MainAccountGlCodes", null);
storingSession(request, "AccountHeadGlCodes", null);
storingSession(request, "DynamicOfficesOnHierarchy", null);
return mapping.findForward(ActionForwards.load_success.toString());
}
Aggregations