use of org.mifos.dto.domain.OfficeGlobalDto 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.dto.domain.OfficeGlobalDto 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");
}
use of org.mifos.dto.domain.OfficeGlobalDto in project head by mifos.
the class CoaBranchMappingAction method load.
public ActionForward load(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
logger.debug("start Load method of loan Product Action");
CoaBranchMappingActionForm actionForm = (CoaBranchMappingActionForm) form;
List<OfficeGlobalDto> officeDetailsDtos = null;
List<GLCodeDto> accountingDtos = null;
short branches = 5;
officeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(branches);
CoaBranchMappingActionForm acti = (CoaBranchMappingActionForm) form;
accountingDtos = accountingServiceFacade.coaBranchAccountHead();
List<GLCodeDto> emptyaccountingDtos = new ArrayList<GLCodeDto>();
storingSession(request, "CoaNamesList", accountingDtos);
storingSession(request, "emptycoanames", emptyaccountingDtos);
actionForm.setBranchoffice("");
storingSession(request, "OfficesOnHierarchy", null);
storingSession(request, "OfficesOnHierarchy", officeDetailsDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.dto.domain.OfficeGlobalDto in project head by mifos.
the class ConsolidatedTransactionAction method approveCPBPTransactions.
public void approveCPBPTransactions(ConsolidatedTransactionActionForm actionForm, String TransactioncpbpNoValue, HttpServletRequest request) {
ViewStageTransactionsDto viewStageTransactionsDto = accountingServiceFacade.getstagedAccountingTransactions(TransactioncpbpNoValue);
try {
if (viewStageTransactionsDto.getTransactionDate().toString() != null)
actionForm.setStageTrxnDate(changeDateFormat(viewStageTransactionsDto.getTransactionDate().toString()));
//actionForm.setStageTrxnDate(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());
} catch (Exception e) {
e.printStackTrace();
}
GlDetailDto glDetailDto = accountingServiceFacade.getChequeDetails(TransactioncpbpNoValue);
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());
}
short s = new Integer(actionForm.getStageOfficeHierarchy()).shortValue();
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();
}
actionForm.setTransactionDetailID(viewStageTransactionsDto.getTransactionID());
actionForm.setStageMainAccount(viewStageTransactionsDto.getMainAccount());
actionForm.setStageAccountHead(viewStageTransactionsDto.getSubAccount());
actionForm.setStageNotes(viewStageTransactionsDto.getNarration());
actionForm.setStageAmount(viewStageTransactionsDto.getTransactionAmount());
String[] cpbpTransactionNO1 = actionForm.getTransactionCpBpNo();
for (int j = 0; j < cpbpTransactionNO1.length; j++) {
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(cpbpTransactionNO1[j]));
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);
}
}
use of org.mifos.dto.domain.OfficeGlobalDto in project head by mifos.
the class ConsolidatedTransactionAction method load.
public ActionForward load(ActionMapping mapping, @SuppressWarnings("unused") ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
logger.debug("start Load method of loan Product Action");
ConsolidatedTransactionActionForm actionForm = (ConsolidatedTransactionActionForm) form;
java.util.Date trxnDate = DateUtils.getCurrentDateWithoutTimeStamp();
List<OfficeGlobalDto> officeDetailsDtos = null;
UserContext context = getUserContext(request);
actionForm.setOfficeLevelId(String.valueOf(context.getOfficeLevelId()));
List<OfficesList> offices = new ArrayList<OfficesList>();
short branches = 5;
officeDetailsDtos = accountingServiceFacade.loadOfficesForLevel(branches);
List<GLCodeDto> accountingDtos = accountingServiceFacade.coaBranchAccountHead();
storingSession(request, "viewStageTransactionsDtoCRBRListValues", null);
storingSession(request, "viewStageTransactionsDtoCPBPListValues", null);
storingSession(request, "viewStageTransactionsDtoCRMisListValues", null);
storingSession(request, "viewStageTransactionsDtoCPMisListValues", null);
storingSession(request, "viewStageTransactionsDtoInterOfficeList", null);
storingSession(request, "OfficesOnHierarchy", null);
actionForm.setTransactiondate("");
actionForm.setCptotal("0");
actionForm.setCrtotal("0");
actionForm.setBranch("");
storingSession(request, "OfficesOnHierarchy", officeDetailsDtos);
return mapping.findForward(ActionForwards.load_success.toString());
}
Aggregations