Package com.centraview.account.helper

Examples of com.centraview.account.helper.AccountHelper


    convertItemLines();

    //Incase if the Form is having some error then we must have to carry the jurisdiction Vec
    try{
      AccountHelperHome accountHelperHome = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome","AccountHelper");
      AccountHelper accHelper =(AccountHelper)accountHelperHome.create();
      accHelper.setDataSource(dataSource);
      this.jurisdictionVec = accHelper.getTaxJurisdiction();
    }catch(Exception e){
      this.jurisdictionVec = new Vector();
    }

    try
View Full Code Here


      request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.ORDER);
      request.setAttribute("body", AccountConstantKeys.ADD );

      ItemLines itemLines = null;
     
      AccountHelper accHelper = (AccountHelper)accountHelperHome.create();
      accHelper.setDataSource(dataSource);
      Vector taxJurisdiction = accHelper.getTaxJurisdiction();
     
      OrderForm orderForm = (OrderForm)form;
      orderForm.setJurisdictionVec(taxJurisdiction);
     
      String typeOfOperation = request.getParameter(AccountConstantKeys.TYPEOFOPERATION);
View Full Code Here

      if(entityIdStr != null && !entityIdStr.equals(""))
        entityId = Integer.parseInt(entityIdStr);
      com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );

      AccountHelperHome hm = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome","AccountHelper");
      AccountHelper remote =(AccountHelper)hm.create();
      remote.setDataSource(dataSource);
      remote.addVendor(entityId,IndividualId);

      request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.VENDOR);
      request.setAttribute("body", "list");
   
      // forward to jsp page 
View Full Code Here

      setSupportLists();

      AccountHelperHome hm = (AccountHelperHome)CVUtility.getHomeObject(
          "com.centraview.account.helper.AccountHelperHome", "AccountHelper");
      AccountHelper accHelper = hm.create();
      accHelper.setDataSource(this.dataSource);

      Vector itemTypesVec = accHelper.getItemTypes();
      this.put("ItemTypes", itemTypesVec);

      Vector glAccountsVec = accHelper.getGLAccounts();
      this.put("GLAccounts", glAccountsVec);

      Vector accountingStatusVec = accHelper.getAccountingStatus();
      this.put("AccountingStatus", accountingStatusVec);

      Vector accountingTermsVec = accHelper.getAccountingTerms();
      this.put("AccountingTerms", accountingTermsVec);

      Vector paymentMethodsVec = accHelper.getPaymentMethods();
      this.put("PaymentMethods", paymentMethodsVec);

      Vector locationsVector = accHelper.getLocations();
      this.put("AccountingLocations", locationsVector);

      CommonHelperHome commonHelperHome = (CommonHelperHome)CVUtility.getHomeObject(
          "com.centraview.common.helper.CommonHelperHome", "CommonHelper");
      CommonHelper commonRemote = commonHelperHome.create();
View Full Code Here

    Vector taxClassesVec = new Vector();

    try {
      AccountHelperHome hm = (AccountHelperHome)CVUtility.getHomeObject(
          "com.centraview.account.helper.AccountHelperHome", "AccountHelper");
      AccountHelper remote = hm.create();
      remote.setDataSource(this.dataSource);
      taxClassesVec = remote.getTaxClasses();
    } catch (Exception e) {
      logger.error("[getTaxClasses] Exception thrown.", e);
    }
    return taxClassesVec;
  }
View Full Code Here

    DynaActionForm dynaform = (DynaActionForm) form;
    AccountHelperHome home = (AccountHelperHome)
    CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome", "AccountHelper");
   
    try {
      AccountHelper remote = home.create();
      remote.setDataSource(dataSource);
     
      Vector taxJurisdiction = remote.getTaxJurisdiction();
     
      dynaform.set("jurisdictionVec",taxJurisdiction);
      dynaform.set("recordID", request.getParameter("recordID"));
      dynaform.set("recordName", request.getParameter("recordName"));
      dynaform.set("listType", request.getParameter("listType"));
View Full Code Here

      }

      if (entityID != 0)
      {
        AccountHelperHome hm1 = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome","AccountHelper");
        AccountHelper accHelper = (AccountHelper)hm1.create();
        accHelper.setDataSource(dataSource);
   
        paymentLines = accHelper.getPaymentInvoices(entityID);   
       
          paymentForm.setPaymentLines(paymentLines);
        request.setAttribute("PaymentLines", paymentLines);
         
        form = paymentForm;
View Full Code Here

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    ActionErrors errors = new ActionErrors();
    try {
      try {
        AccountHelperHome accountHelperHome = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome","AccountHelper");
        AccountHelper accHelper = accountHelperHome.create();
        accHelper.setDataSource(dataSource);
        this.jurisdictionVec = accHelper.getTaxJurisdiction();
      } catch (Exception e) {
        this.jurisdictionVec = new Vector();
      }
     
      if (this.getCustomerName() == null || this.getCustomerName().trim().length() <= 0) {
View Full Code Here

        }

        dynaForm.set("jurisdictionID", avo.getJurisdictionID() + "");
      }

      AccountHelper accountRemote = accountHome.create();
      accountRemote.setDataSource(dataSource);

      Vector taxJurisdiction = accountRemote.getTaxJurisdiction();

      dynaForm.set("jurisdictionVec", taxJurisdiction);
      dynaForm.set("operation", "edit");

      returnStatus = ".view.contacts.view_related_address";
View Full Code Here

    FORWARD_final = FORWARD_save;

    if (actionType != null && actionType.equals("ADD")){
      AccountHelperHome home = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome", "AccountHelper");
      try {
        AccountHelper remote = home.create();
        remote.setDataSource(dataSource);
        if (taxClassValue != null && ! taxClassValue.equals("")) {
          remote.insertTaxClassOrJurisdiction(taxClassValue,"taxClass");
        }
        if (taxJurisdictionsValue != null && !taxJurisdictionsValue.equals("")) {
          remote.insertTaxClassOrJurisdiction(taxJurisdictionsValue,"taxJurisdiction");
        }
      } catch (Exception e) {
        logger.error("[Exception] ViewSourceSettingHandler.Execute Handler ", e);
      }
    }
   
    if (actionType != null && actionType.equals("REMOVE")) {
      AccountHelperHome home = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome", "AccountHelper");
      try {
        AccountHelper remote = home.create();
        remote.setDataSource(dataSource);
        if (tempTaxClassID != null && !tempTaxClassID.equals("")) {
          int taxClassID = Integer.parseInt(tempTaxClassID);
          remote.removeTaxClassOrJurisdiction(taxClassID, "taxClass");
        }
        if (tempTaxJurisdictionsID != null && !tempTaxJurisdictionsID.equals("")) {
          int taxJurisdictionsID = Integer.parseInt(tempTaxJurisdictionsID);
          remote.removeTaxClassOrJurisdiction(taxJurisdictionsID,"taxJurisdiction");
        }
      } catch (Exception e) {
        logger.error("[Exception] ViewSourceSettingHandler.Execute Handler ", e);
      }
    }
    if (actionType != null && actionType.startsWith("SAVE")) {
      AccountHelperHome home = (AccountHelperHome)CVUtility.getHomeObject("com.centraview.account.helper.AccountHelperHome", "AccountHelper");
      try {
        AccountHelper remote = home.create();
        remote.setDataSource(dataSource);
        Vector taxClass = remote.getTaxClasses();
        Vector taxJurisdiction = remote.getTaxJurisdiction();
        ArrayList taxMatrixValue = new ArrayList();
       
        if (taxJurisdiction != null && taxJurisdiction.size() != 0) {
          for (int i = 0; i < taxJurisdiction.size(); i++) {
            DDNameValue taxJurisdictionNameValue = (DDNameValue)taxJurisdiction.get(i);
            if (taxJurisdictionNameValue != null) {
              int taxJurisdictionID = taxJurisdictionNameValue.getId();
              String taxJurisdictionName = taxJurisdictionNameValue.getName();
             
              if (taxClass != null && taxClass.size() != 0) {
                for (int j = 0; j < taxClass.size(); j++) {
                  DDNameValue taxClassNameValue = (DDNameValue)taxClass.get(j);
                  if (taxClassNameValue != null) {
                    int taxClassID = taxClassNameValue.getId();
                    String taxClassName = taxClassNameValue.getName();
                   
                    String textBoxName = "J" + taxJurisdictionID + "C" + taxClassID;
                    String taxRate = request.getParameter(textBoxName);
                    if (taxRate == null || taxRate.length() <= 0) {
                      allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", taxJurisdictionName+"/"+taxClassName));
                    } else {
                      float floatTaxRate = Float.parseFloat(taxRate);
                      if (floatTaxRate < 0 || floatTaxRate > 100) {
                        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.rangeField", taxJurisdictionName+"/"+taxClassName));
                      }
                      taxMatrixValue.add(new TaxMartixForm(taxClassID,taxJurisdictionID,floatTaxRate));
                    }
                  }
                }
              }
            }
          }
        }
       
        if (! allErrors.isEmpty()) {
          saveErrors(request, allErrors);
          return(mapping.findForward(FORWARD_save));
        }
       
        if (actionType != null && actionType.equals("SAVEANDCLOSE")){
          FORWARD_final = FORWARD_saveandclose;
        }
        remote.setTaxMatrix(taxMatrixValue);
      } catch (Exception e) {
        logger.error("[Exception] ViewSourceSettingHandler.Execute Handler ", e);
        e.printStackTrace();
      }
    }
View Full Code Here

TOP

Related Classes of com.centraview.account.helper.AccountHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.