Package com.centraview.account.purchaseorder

Examples of com.centraview.account.purchaseorder.PurchaseOrderVO


          arrlCVID.add(new Integer(ID));
        }
      }
      else if (modulename.equals("PurchaseOrder")) {
        Iterator it = arrl.iterator();
        PurchaseOrderVO VO = new PurchaseOrderVO();
        while (it.hasNext()) {
          VO = (PurchaseOrderVO) it.next();
          int ID = VO.getPurchaseOrderId();
          arrlCVID.add(new Integer(ID));
        }
      }
      else if (modulename.equals("Expense")) {
        Iterator it = arrl.iterator();
        ExpenseVO VO = new ExpenseVO();
        while (it.hasNext()) {
          VO = (ExpenseVO) it.next();
          int ID = VO.getExpenseID();
          arrlCVID.add(new Integer(ID));
        }
      }
      else if (isItemModule(modulename)) {
        Iterator it = arrl.iterator();
        ItemVO VO = new ItemVO();
        while (it.hasNext()) {
          VO = (ItemVO) it.next();
          int ID = VO.getItemId();
          arrlCVID.add(new Integer(ID));
        }
      }
      else if (modulename.equals("Payment")) {
        Iterator it = arrl.iterator();
        PaymentVO VO = new PaymentVO();
        while (it.hasNext()) {
          VO = (PaymentVO) it.next();
          int ID = VO.getPaymentID();
          arrlCVID.add(new Integer(ID));
        }
      }
      else if (modulename.equals("PaymentMethod")) {
        Iterator it = arrl.iterator();
        PaymentMethodVO VO = new PaymentMethodVO();
        while (it.hasNext()) {
          VO = (PaymentMethodVO) it.next();
          int ID = VO.getMethodID();
          arrlCVID.add(new Integer(ID));
        }
      }
      else if (modulename.equals("GLAccount")) {
        Iterator it = arrl.iterator();
        GLAccountVO VO = new GLAccountVO();
        while (it.hasNext()) {
          VO = (GLAccountVO) it.next();
          int ID = VO.getGlaccountID();
          arrlCVID.add(new Integer(ID));
        }
      }
    }catch(Exception e)
    {
View Full Code Here


        }
      }
      else if (modulename.equals("PurchaseOrder"))
      {
        Iterator it = arrl.iterator();
        PurchaseOrderVO VO = new PurchaseOrderVO();
        while (it.hasNext())
        {
          VO = (PurchaseOrderVO) it.next();
          String extID = VO.getExternalID();
          arrlExtID.add(extID);
        }
      }
      else if (modulename.equals("Expense"))
      {
        Iterator it = arrl.iterator();
        ExpenseVO VO = new ExpenseVO();
        while (it.hasNext())
        {
          VO = (ExpenseVO) it.next();
          String extID = VO.getExternalID();
          arrlExtID.add(extID);
        }
      }
      else if( isItemModule(modulename))
      {
        Iterator it = arrl.iterator();
        ItemVO VO = new ItemVO();
        while (it.hasNext())
        {
          VO = (ItemVO) it.next();
          String extID = VO.getExternalID();
          arrlExtID.add(extID);
        }
      }
      else if (modulename.equals("Payment"))
      {
        Iterator it = arrl.iterator();
        PaymentVO VO = new PaymentVO();
        while (it.hasNext())
        {
          VO = (PaymentVO) it.next();
          String extID = VO.getExternalID();
          arrlExtID.add(extID);
        }
      }
      else if (modulename.equals("PaymentMethod"))
      {
        Iterator it = arrl.iterator();
        PaymentMethodVO VO = new PaymentMethodVO();
        while (it.hasNext())
        {
          VO = (PaymentMethodVO) it.next();
          String extID = VO.getExternalID();
          arrlExtID.add(extID);
        }
      }
      else if (modulename.equals("GLAccount"))
      {
        Iterator it = arrl.iterator();
        GLAccountVO VO = new GLAccountVO();
        while (it.hasNext())
        {
          VO = (GLAccountVO) it.next();
          String extID = VO.getExternalID();
          arrlExtID.add(extID);
        }
      }
    }
    catch(Exception e)
View Full Code Here

  public PurchaseOrderVO createPurchaseOrder(PurchaseOrderVO poDetail, int userID)
      throws AuthorizationFailedException
  {
    if (!CVUtility.isModuleVisible("PurchaseOrder", userID, this.dataSource))
      throw new AuthorizationFailedException("PurchaseOrder- createPurchaseOrder");
    PurchaseOrderVO returnVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      PurchaseOrderLocalHome home = (PurchaseOrderLocalHome) ic.lookup("local/PurchaseOrder");
      PurchaseOrderLocal remote = home.create(poDetail, userID, this.dataSource);
      remote.setDataSource(this.dataSource);
View Full Code Here

  public PurchaseOrderVO getPurchaseOrderVO(int poID, int individualID)
      throws AuthorizationFailedException
  {
    if (!CVUtility.isModuleVisible("PurchaseOrder", individualID, this.dataSource))
      throw new AuthorizationFailedException("PurchaseOrder- getPurchaseOrder");
    PurchaseOrderVO invoiceVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      PurchaseOrderLocalHome home = (PurchaseOrderLocalHome) ic.lookup("local/PurchaseOrder");
      PurchaseOrderLocal invoice = home
          .findByPrimaryKey(new PurchaseOrderPK(poID, this.dataSource));
View Full Code Here

        * @param params HashMap operation type + last synchronization date
        * @return ArrayList with purchaseorders
        */
       public ArrayList getPurchaseOrders(HashMap params, int indId)
       {
         PurchaseOrderVO porderVO= null;
         ArrayList porders = new ArrayList();
         AccountFacadeLocal porderL = null;

         try
         {
View Full Code Here

        * @param indId int individual id
        * @return boolean status of operation
        */
       public boolean addPurchaseOrders(ArrayList PVOs,int indId)
       {
         PurchaseOrderVO pvo = null;
         AccountFacadeLocal porderL = null;
         ContactHelperLocal chl = null;

         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           AccountFacadeLocalHome home = (AccountFacadeLocalHome)ic.lookup("local/AccountFacade");
           porderL = home.create();
           porderL.setDataSource(this.dataSource);
           ContactHelperLocalHome chlh = (ContactHelperLocalHome) ic.lookup("local/ContactHelper");
           chl = chlh.create();

           int size = PVOs.size();
           int primAddId = 0;

           for ( int i=0;i<size;i++)
           {
             pvo = (PurchaseOrderVO) PVOs.get(i);
             primAddId = ((AddressVO)chl.getPrimaryAddressForContact(indId,pvo.getVendorId() ,1)).getAddressID();
             pvo.setBillToId(primAddId);
             pvo.setShipToId(primAddId);
             pvo = porderL.createPurchaseOrder(pvo,indId);
             logger.info("Added " + pvo.getPurchaseOrderId() + " purchaseorder record");
           }
         }catch(Exception e)
         {
           logger.debug("Error in adding PurchaseOrders : "+e);
           e.printStackTrace();
View Full Code Here

        * @param arl ArrayList list with purchaseorders
        * @param indId int individual id
        */
       public void deletePurchaseOrders(String modulename, ArrayList arl, int indId)
       {
         PurchaseOrderVO ivo = new PurchaseOrderVO();
         String extId = "";
         int intId = 0;

         Iterator it = arl.iterator();

         AccountFacadeLocal helperL = null;
         try
         {
           InitialContext ic = CVUtility.getInitialContext();
           AccountFacadeLocalHome home = (AccountFacadeLocalHome ) ic.lookup("local/AccountFacade");
           helperL = home.create();

           while(it.hasNext())
           {
             ivo = (PurchaseOrderVO)it.next();
             extId = ivo.getExternalID();
             intId = this.getCVidForExtid(modulename,extId);
             helperL.deleteInvoice(indId, intId);
             logger.info("PurchaseOrder " + intId +" object deleted");
           }

View Full Code Here

TOP

Related Classes of com.centraview.account.purchaseorder.PurchaseOrderVO

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.