use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class ViewStageTransactionAction 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();
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.setGlDetailBOList(glDetailBOList);
// default value
glMasterBO.setStatus("");
// default value
glMasterBO.setTransactionBy(0);
glMasterBO.setCreatedBy(getUserContext(request).getId());
glMasterBO.setCreatedDate(DateUtils.getCurrentDateWithoutTimeStamp());
accountingServiceFacade.savingStageAccountingTransactions(glMasterBO);
return mapping.findForward("submit_success");
}
use of org.mifos.application.accounting.business.GlDetailBO in project head by mifos.
the class AuditTransactionAction method getGlDetailBOList.
List<GlDetailBO> getGlDetailBOList(ViewStageTransactionActionForm actionForm, List<String> amountActionList, int transactionDetailID) {
List<GlDetailBO> glDetailBOList = new ArrayList<GlDetailBO>();
glDetailBOList.add(new GlDetailBO(transactionDetailID, actionForm.getStageAccountHead(), new BigDecimal(actionForm.getStageAmount()), amountActionList.get(1), actionForm.getStageChequeNo(), DateUtils.getDate(actionForm.getChequeDate()), actionForm.getStageBankName(), actionForm.getStageankBranch()));
return glDetailBOList;
}
Aggregations