Package com.centraview.account.accountfacade

Examples of com.centraview.account.accountfacade.AccountFacade


        if (itemid != 0) {
          if(actionType != null && actionType.equals("lookup")){
            AccountFacadeHome accountFacadeHome = (AccountFacadeHome)CVUtility.getHomeObject("com.centraview.account.accountfacade.AccountFacadeHome","AccountFacade");
            int parentItemID = 0;
            try {
        AccountFacade remote =(AccountFacade)accountFacadeHome.create();
        remote.setDataSource(dataSource);
        parentItemID = remote.getParentItemID(itemid);
            } catch (CreateException e) {
              logger.error("[execute] Exception thrown.", e);
              throw new ServletException(e);
            }         
            buttonList.add(new Button("Back", "back", "lu_backList('Item'," + parentItemID + ",'" + presentID + "');", false));
View Full Code Here


  {
    int elementID = Integer.parseInt(key);
    AccountFacadeHome accountFacadeHome = (AccountFacadeHome)CVUtility.getHomeObject("com.centraview.account.accountfacade.AccountFacadeHome","AccountFacade");
    try
    {
      AccountFacade remote =(AccountFacade)accountFacadeHome.create();
      remote.setDataSource(this.dataSource);
      remote.deleteInvoice(elementID,indvID);
    }
    catch(Exception e)
    {
      logger.error("[Exception] InvoiceList.deleteElement( int indvID, String key )", e);
    }
View Full Code Here

    ArrayList resultDeleteLog = new ArrayList();
    AccountFacadeHome accountFacadeHome = (AccountFacadeHome)CVUtility.getHomeObject("com.centraview.account.accountfacade.AccountFacadeHome","AccountFacade");
    try
    {
      //call to EJB server
      AccountFacade remote =(AccountFacade)accountFacadeHome.create();
      remote.setDataSource(this.dataSource);
      for (int i=0; i<recordID.length; i++)
      {
        if(recordID[i] != null && !recordID[i].equals("")){
          int elementID = Integer.parseInt(recordID[i]);
          try{
            remote.deleteInvoice(elementID,individualID);
          }//end of try block
          catch(AuthorizationFailedException ae){
            String errorMessage = ae.getExceptionDescription();
            resultDeleteLog.add(errorMessage);
          }//end of catch block
View Full Code Here

    ArrayList deleteLog = new ArrayList();
    String rowId[] = request.getParameterValues("rowId");
    AccountFacadeHome accountFacadeHome = (AccountFacadeHome)CVUtility.getHomeObject("com.centraview.account.accountfacade.AccountFacadeHome","AccountFacade");
    try
    {
      AccountFacade remote = (AccountFacade)accountFacadeHome.create();
      remote.setDataSource(dataSource);
      for (int i=0; i<rowId.length; i++)
      {
        if(rowId[i] != null && !rowId[i].equals(""))
        {
          int elementID = Integer.parseInt(rowId[i]);
          try
          {
      remote.deleteInvoice(elementID,individualId);
          } catch(AuthorizationFailedException ae) {
            String errorMessage = ae.getExceptionDescription();
            deleteLog.add(errorMessage);
          } catch(RemoteException re) {
            logger.error("[execute] Exception thrown.", re);
View Full Code Here

      if (request.getParameter("buttonpress") != null)
      typeOfSave = request.getParameter("buttonpress");


      AccountFacade remote =(AccountFacade)accountFacadeHome.create();
      remote.setDataSource(dataSource);

      InvoiceForm invoiceForm = (InvoiceForm) form;
      InvoiceVOX vox  = new InvoiceVOX(invoiceForm);
      InvoiceVO invoiceVO = vox.getVO();

      int jurisdictionID = 0;
      int billingAddressID = 0;
      if(invoiceForm.getJurisdictionID() != null && !((invoiceForm.getJurisdictionID()).equals(""))){
        jurisdictionID = (invoiceForm.getJurisdictionID()).intValue();
      }//end of if(invoiceForm.getJurisdictionID() != null && !((invoiceForm.getJurisdictionID()).equals("")))
      if(invoiceForm.getBilltoID() != null && !((invoiceForm.getBilltoID()).equals(""))){
        billingAddressID = Integer.parseInt(invoiceForm.getBilltoID());
      }//end of if(invoiceForm.getBilltoID() != null && !((invoiceForm.getBilltoID()).equals("")))
      if(billingAddressID != 0 && jurisdictionID != 0){
        remote.setJurisdictionForAddress(billingAddressID,jurisdictionID);
      }//end of if(billingAddressID != 0 && jurisdictionID != 0)

      invoiceVO = remote.createInvoice(invoiceVO,userId);

      if (typeOfSave.equals("save"))
      {
        FORWARD_final = FORWARD_save;

        int invoiceid = invoiceVO.getInvoiceId();//getInvoiceId
        InvoiceForm newinvoiceform=new InvoiceForm();
        newinvoiceform.setInvoiceid(invoiceVO.getInvoiceId()+"");
        newinvoiceform.setOrderid(invoiceVO.getOrderId()+"");
        newinvoiceform.setCustomerId(invoiceVO.getCustomerId()+"");

        newinvoiceform.setBillto(invoiceVO.getBillToAddress()+"");
        newinvoiceform.setBilltoID(invoiceVO.getBillToId()+"");

        newinvoiceform.setShiptoID(invoiceVO.getShipToId()+"");
        newinvoiceform.setShipto(invoiceVO.getShipToAddress()+"");

        newinvoiceform.setStatusid(invoiceVO.getStatusId()+"");
        newinvoiceform.setInvoiceDate(invoiceVO.getInvoiceDate());
        newinvoiceform.setExternalid(invoiceVO.getExternalId());

        newinvoiceform.setPoid(invoiceVO.getPo());
        newinvoiceform.setTermid(invoiceVO.getTermId()+"");
        newinvoiceform.setAccountmanagerid(invoiceVO.getAccountManagerId()+"");

        newinvoiceform.setProjectid(invoiceVO.getProjectId()+"");
        newinvoiceform.setNotes(invoiceVO.getDescription()+"");
        newinvoiceform.setProjectName(invoiceVO.getProjectName());
        newinvoiceform.setAccountmanagerName(invoiceVO.getAccountManagerName());
        newinvoiceform.setItemLines(invoiceVO.getItemLines());
        newinvoiceform.setOrdername(invoiceVO.getCustomerName());
        java.sql.Date invDate = invoiceVO.getInvoiceDate();

        if (invDate != null)
        {
          int month = invDate.getMonth();
          month=month+1;
          newinvoiceform.setMonth(month+"");

          int date = invDate.getDate();
          newinvoiceform.setDate(date+"");

          int year= invDate.getYear();
          newinvoiceform.setYear(year+"");
        }// end of if (invDate != null)
        request.setAttribute("newinvoiceform",newinvoiceform);
        request.setAttribute(AccountConstantKeys.TYPEOFOPERATION, AccountConstantKeys.EDIT);
      }// end of if (typeOfSave.equals("save"))
      else if (typeOfSave.equals("savenew"))
      {
        Vector taxJurisdiction = remote.getTaxJurisdiction();
        invoiceform.setJurisdictionVec(taxJurisdiction);

        FORWARD_final = FORWARD_savenew;
        request.setAttribute(AccountConstantKeys.TYPEOFOPERATION, AccountConstantKeys.ADD);
        request.setAttribute("clearform", "true");
View Full Code Here

        proposalListForm.setEntityID(oppVO.getEntityID());
        proposalListForm.setEntity(oppVO.getEntityname());
      }

      AccountFacadeHome accountFacadeHome = (AccountFacadeHome)CVUtility.getHomeObject("com.centraview.account.accountfacade.AccountFacadeHome","AccountFacade");
      AccountFacade accountFacade = (AccountFacade)accountFacadeHome.create();
      accountFacade.setDataSource(dataSource);
     
      Vector taxJurisdiction = accountFacade.getTaxJurisdiction();
      proposalListForm.setJurisdictionVec(taxJurisdiction);
      proposalListForm.convertItemLines();

      ItemLines itemLines = null;
View Full Code Here

        row = Integer.parseInt(request.getParameter("eventid"));
      } catch (Exception ex) {
        row = Integer.parseInt(proposallistform.getProposalid());
      }

      AccountFacade accountFacade = accountFacadeHome.create();
      accountFacade.setDataSource(dataSource);
      Vector taxJurisdiction = accountFacade.getTaxJurisdiction();
      proposallistform.setJurisdictionVec(taxJurisdiction);

      EmailFacade remoteEmail = emailFacade.create();
      remoteEmail.setDataSource(dataSource);
      String emailDisableFlag = "";
View Full Code Here

   
    try  {
      SaleFacade saleRemote =(SaleFacade) sfh.create();
      saleRemote.setDataSource(dataSource);
     
      AccountFacade orderRemote = (AccountFacade) afh.create();
      orderRemote.setDataSource(dataSource);
      HashMap hm  = (HashMap) saleRemote.viewProposal(individualID, proposalID , proposallistform);
      ItemLines itemLines = (ItemLines)hm.get("itemLines");
      proposallistform = (ProposalListForm) hm.get("dyna");
     
      com.centraview.account.common.ItemLines accItemLines = new com.centraview.account.common.ItemLines();
     
      if (itemLines != null) {
        Set s = itemLines.keySet();
        Iterator itr = s.iterator();
        int id = 0;
        int counter = 0;
       
        while (itr.hasNext()) {
          ItemElement ie2 = (ItemElement)itemLines.get(itr.next());
          IntMember LineId = (IntMember)ie2.get("LineId");
          IntMember ItemId = (IntMember)ie2.get("ItemId");
          StringMember SKU = (StringMember)ie2.get("SKU");
          StringMember Description = (StringMember)ie2.get("Description");
          IntMember Quantity = (IntMember)ie2.get("Quantity");
          FloatMember PriceEach = (FloatMember)ie2.get("Price");
          FloatMember PriceExtended = (FloatMember)ie2.get("PriceExtended");
          FloatMember taxAmount = (FloatMember)ie2.get("TaxAmount");
          com.centraview.account.common.ItemElement ie = new com.centraview.account.common.ItemElement(counter);
          ie.put("LineId", LineId);
          ie.put("ItemId", ItemId);
          ie.put("SKU", SKU);
          ie.put("Description", Description);
          ie.put("Quantity", Quantity);
          ie.put("Price", PriceEach);
          ie.put("PriceExtended", PriceExtended);
          ie.put("TaxAmount", taxAmount);
          accItemLines.put(new Integer(counter), ie);
          counter++;
        }
      }
     
      of.setItemLines(accItemLines);
     
      int billingID = 0;
      int shippingID = 0;
      if (proposallistform.getBillingaddressid() != null && !proposallistform.getBillingaddressid().equals("")) {
        billingID = Integer.parseInt(proposallistform.getBillingaddressid());
      }
     
      if (proposallistform.getShippingaddressid() != null && !proposallistform.getShippingaddressid().equals("")) {
        shippingID = Integer.parseInt(proposallistform.getShippingaddressid());
      }
     
      of.setShipToAddIdValue(shippingID);
      of.setBillToAddIdValue(billingID);
      of.setCustomerIdValue(entityID);
      of.setOrderDate(new java.sql.Date(System.currentTimeMillis()));
      of.setJurisdictionID(new Integer(proposallistform.getJurisdictionID()));
      of.setNotes(proposallistform.getProposal() + "-" + proposallistform.getProdescription());
     
      GlobalMasterLists gml = GlobalMasterLists.getGlobalMasterLists(dataSource);
      Vector statusVector = null;
      statusVector = (Vector)gml.get("AccountingStatus");
     
      for (int i = 0; i < statusVector.size(); i++) {
        if (((DDNameValue) statusVector.get(i)).getName().equals("Pending")) {
          of.setStatusIdValue(((DDNameValue) statusVector.get(i)).getId());
          break;
        }
      }
     
      // hardcoded to today() as orderDate will be today when order is created
      // set after calling convert.. as that method sets date from day month yr var.s
      // and that date will be null
      OrderForm createdForm = orderRemote.createOrder(of, individualID);
      int orderID = createdForm.getOrderIdValue();
      request.setAttribute("GeneratedOrderId",new Integer(orderID));
     
      if (orderID != 0) {
        saleRemote.setOrderIsGenerated(true,proposalID,orderID);
View Full Code Here

TOP

Related Classes of com.centraview.account.accountfacade.AccountFacade

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.