Package com.centraview.account.common

Examples of com.centraview.account.common.ItemElement


      Set listkey = itemLines.keySet();
      Iterator it =  listkey.iterator();
      while (it.hasNext())
      {
        Object str = ( Object )it.next();
        ItemElement ele  = ( ItemElement)itemLines.get( str );
        this.addExpenseItem(ele,expenseID);
      }// end of while

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
View Full Code Here


          FloatMember  PriceEach = new FloatMember("Price",new Float(price),'D',"",'T',false,20);
          StringMember SKU = new StringMember("SKU",sku,'D',"",'T',false);
          StringMember Description = new StringMember("Description",description,'D',"",'T',false);
          FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(priceExtended),'D',"",'T',false,20);

          ItemElement ie = new ItemElement(11);
          ie.put ("LineId",LineId);
          ie.put ("ItemId",ItemId);
          ie.put ("Quantity",Quantity);
          ie.put ("Price",PriceEach);
          ie.put ("SKU",SKU);
          ie.put ("Description",Description);
          ie.put ("PriceExtended",PriceExtended);
          ie.setLineStatus(status);
          itemLines.put(""+count,ie);
          count ++;
        }
        this.expenseVO.setItemLines(itemLines);
      }// end of if
View Full Code Here

      this.orderForm.setOrderIdValue(orderID);
      Set listkey = itemLines.keySet();
      Iterator it = listkey.iterator();
      while (it.hasNext()) {
        Object str = it.next();
        ItemElement ele = (ItemElement) itemLines.get(str);
        this.addOrderItem(ele, orderID);
      }// end of while

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome) ic.lookup("local/Authorization");
View Full Code Here

          StringMember Description = new StringMember("Description", description, 'D', "", 'T', false);
          FloatMember PriceExtended = new FloatMember("PriceExtended", new Float(priceExtended), 'D', "", 'T', false,
              20);
          FloatMember TaxAmount = new FloatMember("TaxAmount", new Float(taxTotal), 'D', "", 'T', false, 20);

          ItemElement ie = new ItemElement(11);
          ie.put("LineId", LineId);
          ie.put("ItemId", ItemId);
          ie.put("Quantity", Quantity);
          ie.put("Price", PriceEach);
          ie.put("SKU", SKU);
          ie.put("Description", Description);
          ie.put("PriceExtended", PriceExtended);
          ie.put("TaxAmount", TaxAmount);
          ie.setLineStatus(status);
          itemLines.put("" + count, ie);
          count++;
        }
        this.orderForm.setItemLines(itemLines);
      }// end of if
View Full Code Here

        Set listkey = itemLines.keySet();
        Iterator it =  listkey.iterator();
        while (it.hasNext())
        {
          Object str = ( Object)it.next();
          ItemElement ele  = ( ItemElement)itemLines.get( str );
          String status    = ele.getLineStatus();

          if(status == null)
            status = "";
          status = status.trim();
View Full Code Here

        Set listkey = itemLines.keySet();
        Iterator it = listkey.iterator();
        while (it.hasNext()) {
          Object str = it.next();
          ItemElement ele = (ItemElement) itemLines.get(str);
          String status = ele.getLineStatus();

          if (status == null)
            status = "";
          status = status.trim();
View Full Code Here

        DoubleMember dblAmtDue = null;

        if(hm.get("amountdue") != null)
          dblAmtDue = new DoubleMember( "AmountDue"  ,new Double(Double.parseDouble(hm.get("amountdue").toString())) , 10 , "", 'T' , false , 10 );

        ItemElement ie = new ItemElement(11);

        ie.put ("LineId",LineId);
        ie.put ("InvoiceId",invoiceID);
        ie.put ("InvoiceNum",invoiceNum);
        ie.put ("Date",invDate);
        ie.put ("Total",dblTotal);
        ie.put ("AmountDue",dblAmtDue);
        ie.put ("AmountApplied",dblAppAmt);

        ie.setLineStatus("Active");

        paymentLines.put(""+count,ie);
        count ++;
      }
    }
View Full Code Here

      Iterator itr = s.iterator();
      while(itr.hasNext() )
      {
        float taxRate = 0.0f;
        //ItemElement ie = (ItemElement)itr.next();
        ItemElement ie = (ItemElement)itemLines.get(itr.next());
        int id = ((Integer)((IntMember)ie.get("ItemId")).getMemberValue()).intValue();
        try
        {
          InitialContext ic = CVUtility.getInitialContext();
          ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
          ItemLocal itemLocal = home.create();
          itemLocal.setDataSource(this.dataSource);
          ItemVO item = itemLocal.getItem(userId,id);
          int taxClassId = item.getTaxClassId();
          int taxJurisdictionId = 0;

          if (invoiceVO.getShipToId()!=0)
          {
            ContactHelperLocalHome home1 = ( ContactHelperLocalHome )ic.lookup("local/ContactHelper");
            ContactHelperLocal contactHelperLocal = home1.create();
            contactHelperLocal.setDataSource(this.dataSource);

            AddressVO addVO = contactHelperLocal.getAddress(invoiceVO.getShipToId());
            taxJurisdictionId = 0;
            if (taxJurisdictionId !=0)
            {
              taxRate = getTax(taxClassId, taxJurisdictionId);
            }//if (taxJurisdictionId !=0)
          }//if InvoiceVO.shipToId!=null
          ((FloatMember)ie.get("UnitTaxrate")).setMemberValue(taxRate);
        }catch (Exception e)
        {
          ((FloatMember)ie.get("UnitTaxrate")).setMemberValue(0.0f);

        }
      }//while


    }//if counter!=0


    if (newItemID != null && !newItemID.equals("") )
      {
        st = new StringTokenizer(newItemID, ",");

        while (st.hasMoreTokens())
        {
          try
          {
          float taxRate = 0.0f;
          token   = (String)st.nextToken();
          int intToken = Integer.parseInt(token);
          InitialContext ic = CVUtility.getInitialContext();
          ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
          ItemLocal itemLocal = home.create();
          itemLocal.setDataSource(this.dataSource);
          ItemVO item = itemLocal.getItem(userId,intToken);


          //Get the Required Fields from the Item VO
          String name = item.getItemName();
          String sku = item.getSku();
          float price = (float)item.getPrice();
          int id = item.getItemId();
          int taxClassId = item.getTaxClassId();
          int taxJurisdictionId = 0;
          if (invoiceVO.getShipToId()!=0)
          {
            try
            {
            ContactHelperLocalHome home2 =( ContactHelperLocalHome)ic.lookup("local/ContactHelper");
            ContactHelperLocal contactHelperLocal = home2.create();
            contactHelperLocal.setDataSource(this.dataSource);
            AddressVO addVO = contactHelperLocal.getAddress(invoiceVO.getShipToId());
            taxJurisdictionId = 0;
            if (taxJurisdictionId !=0)
            {
              taxRate = getTax(taxClassId, taxJurisdictionId);
            }//if (taxJurisdictionId !=0)
            }catch(Exception e)
              {
                System.out.println("[Exception][AccountHelperEJB.calculateInvoiceItems] Exception Thrown: "+e);
                e.printStackTrace();
              }
          }//if shipToId !=null
          //Form the ItemLines
              counter += 1;
              IntMember LineId = new IntMember("LineId",counter,10,"",'T',false,20);
              IntMember ItemId = new IntMember("ItemId",id,10,"",'T',false,20);
              StringMember SKU = new StringMember("SKU",sku,10,"",'T',false);
              StringMember Description = new StringMember("Description",name,10,"",'T',false);
              FloatMember  Quantity = new FloatMember("Quantity",new Float(1.0f),10,"",'T',false,20);
              FloatMember  PriceEach = new FloatMember("PriceEach",new Float(price),10,"",'T',false,20);
              FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(0.0f),10,"",'T',false,20);
              FloatMember  UnitTax = new FloatMember("UnitTax",new Float(0.0f),10,"",'T',false,20);
              FloatMember  TaxRate = new FloatMember("UnitTaxrate",new Float(taxRate),10,"",'T',false,20);
              FloatMember  OrderQuantity = new FloatMember("OrderQuantity",new Float(1.0f),10,"",'T',false,20);
              FloatMember  PendingQuantity = new FloatMember("PendingQuantity",new Float(0.0f),10,"",'T',false,20);


              ItemElement ie = new ItemElement(counter);
              ie.put ("LineId",LineId);
              ie.put ("ItemId",ItemId);
              ie.put ("SKU",SKU);
              ie.put ("Description",Description);
              ie.put ("Quantity",Quantity);
              ie.put ("PriceEach",PriceEach);
              ie.put ("PriceExtended",PriceExtended);
              ie.put ("UnitTax",UnitTax);
              ie.put ("UnitTaxrate",TaxRate);
              ie.put ("OrderQuantity",OrderQuantity);
              ie.put ("PendingQuantity",PendingQuantity);

              ie.setLineStatus("New");

              itemLines.put(new Integer(counter), ie);
          }catch(Exception e)
            {
              System.out.println("[Exception][AccountHelperEJB.calculateInvoiceItems] Exception Thrown: "+e);
View Full Code Here

      Iterator itr = s.iterator();
      while(itr.hasNext() )
      {
        float taxRate = 0.0f;

        ItemElement ie = (ItemElement)itemLines.get(itr.next());
        int id = ((Integer)((IntMember)ie.get("ItemId")).getMemberValue()).intValue();
        try
        {
          InitialContext ic = CVUtility.getInitialContext();
          ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
          ItemLocal itemLocal = home.create();
          itemLocal.setDataSource(this.dataSource);
          ItemVO item = itemLocal.getItem(userId,id);
          int taxClassId = item.getTaxClassId();
          int taxJurisdictionId = 0;

          if (orderVO.getShipToAddIdValue()!=0)
          {
            ContactHelperLocalHome home1 = ( ContactHelperLocalHome )ic.lookup("local/ContactHelper");
            ContactHelperLocal contactHelperLocal = home1.create();
            contactHelperLocal.setDataSource(this.dataSource);
            AddressVO addVO = contactHelperLocal.getAddress(orderVO.getShipToAddIdValue());
            taxJurisdictionId = 0;
            if (taxJurisdictionId !=0)
            {
              taxRate = getTax(taxClassId, taxJurisdictionId);
            }//if (taxJurisdictionId !=0)
          }//if InvoiceVO.shipToId!=null
          ((FloatMember)ie.get("UnitTaxrate")).setMemberValue(taxRate);
        }catch (Exception e)
        {
          ((FloatMember)ie.get("UnitTaxrate")).setMemberValue(0.0f);
          System.out.println("[Exception][AccountHelperEJB.calculateOrderItems] Exception Thrown: "+e);
        }
      }//while


    }//if counter!=0


    if (newItemID != null && !newItemID.equals("") )
      {
        st = new StringTokenizer(newItemID, ",");

        while (st.hasMoreTokens())
        {
          try
          {
          float taxRate = 0.0f;
          token   = (String)st.nextToken();
          int intToken = Integer.parseInt(token);
          InitialContext ic = CVUtility.getInitialContext();
          ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
          ItemLocal itemLocal = home.create();
          itemLocal.setDataSource(this.dataSource);
          ItemVO item = itemLocal.getItem(userId,intToken);


          //Get the Required Fields from the Item VO
          String name = item.getItemName();
          String sku = item.getSku();
          float price = (float)item.getPrice();
          int id = item.getItemId();
          int taxClassId = item.getTaxClassId();
          int taxJurisdictionId = 0;
          if (orderVO.getShipToAddIdValue()!=0)
          {
            try
            {
            ContactHelperLocalHome home2 =( ContactHelperLocalHome)ic.lookup("local/ContactHelper");
            ContactHelperLocal contactHelperLocal = home2.create();
            contactHelperLocal.setDataSource(this.dataSource);
            AddressVO addVO = contactHelperLocal.getAddress(orderVO.getShipToAddIdValue());
            taxJurisdictionId = 0;
            if (taxJurisdictionId !=0)
            {
              taxRate = getTax(taxClassId, taxJurisdictionId);
            }//if (taxJurisdictionId !=0)
            }catch(Exception e)
              {
                System.out.println("[Exception][AccountHelperEJB.calculateOrderItems] Exception Thrown: "+e);
                e.printStackTrace();
              }
          }//if shipToId !=null
          //Form the ItemLines
              counter += 1;
              IntMember LineId = new IntMember("LineId",counter,10,"",'T',false,20);
              IntMember ItemId = new IntMember("ItemId",id,10,"",'T',false,20);
              StringMember SKU = new StringMember("SKU",sku,10,"",'T',false);
              StringMember Description = new StringMember("Description",name,10,"",'T',false);
              FloatMember  Quantity = new FloatMember("Quantity",new Float(1.0f),10,"",'T',false,20);
              FloatMember  PriceEach = new FloatMember("PriceEach",new Float(price),10,"",'T',false,20);
              FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(0.0f),10,"",'T',false,20);
              FloatMember  UnitTax = new FloatMember("UnitTax",new Float(0.0f),10,"",'T',false,20);
              FloatMember  TaxRate = new FloatMember("UnitTaxrate",new Float(taxRate),10,"",'T',false,20);
              FloatMember  OrderQuantity = new FloatMember("OrderQuantity",new Float(1.0f),10,"",'T',false,20);
              FloatMember  PendingQuantity = new FloatMember("PendingQuantity",new Float(0.0f),10,"",'T',false,20);


              ItemElement ie = new ItemElement(counter);
              ie.put ("LineId",LineId);
              ie.put ("ItemId",ItemId);
              ie.put ("SKU",SKU);
              ie.put ("Description",Description);
              ie.put ("Quantity",Quantity);
              ie.put ("PriceEach",PriceEach);
              ie.put ("PriceExtended",PriceExtended);
              ie.put ("UnitTax",UnitTax);
              ie.put ("UnitTaxrate",TaxRate);
              ie.put ("OrderQuantity",OrderQuantity);
              ie.put ("PendingQuantity",PendingQuantity);

              ie.setLineStatus("New");

              itemLines.put(new Integer(counter), ie);
          }catch(Exception e)
            {
              System.out.println("[Exception][AccountHelperEJB.calculateOrderItems] Exception Thrown: "+e);
View Full Code Here

      Iterator itr = s.iterator();
      while(itr.hasNext() )
      {
        float taxRate = 0.0f;

        ItemElement ie = (ItemElement)itemLines.get(itr.next());
        int id = ((Integer)((IntMember)ie.get("ItemId")).getMemberValue()).intValue();
        try
        {
          InitialContext ic = CVUtility.getInitialContext();
          ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
          ItemLocal itemLocal = home.create();
          itemLocal.setDataSource(this.dataSource);
          ItemVO item = itemLocal.getItem(userId,id);
          int taxClassId = item.getTaxClassId();
          int taxJurisdictionId = 0;
          if (purchaseOrderVO.getShipToId()!=0)
          {
            ContactHelperLocalHome home1 = ( ContactHelperLocalHome )ic.lookup("local/ContactHelper");
            ContactHelperLocal contactHelperLocal = home1.create();
            contactHelperLocal.setDataSource(this.dataSource);
            AddressVO addVO = contactHelperLocal.getAddress(purchaseOrderVO.getShipToId());
            taxJurisdictionId = 0;
            if (taxJurisdictionId !=0)
            {
              taxRate = getTax(taxClassId, taxJurisdictionId);
            }//if (taxJurisdictionId !=0)
          }//if InvoiceVO.shipToId!=null
          ((FloatMember)ie.get("UnitTaxrate")).setMemberValue(taxRate);
        }catch (Exception e)
        {
          ((FloatMember)ie.get("UnitTaxrate")).setMemberValue(0.0f);
          System.out.println("[Exception][AccountHelperEJB.calculatePurchaseOrderItems] Exception Thrown: "+e);
        }
      }//while


    }//if counter!=0


    if (newItemID != null && !newItemID.equals("") )
      {
        st = new StringTokenizer(newItemID, ",");

        while (st.hasMoreTokens())
        {
          try
          {
          float taxRate = 0.0f;
          token   = (String)st.nextToken();
          int intToken = Integer.parseInt(token);
          InitialContext ic = CVUtility.getInitialContext();
          ItemLocalHome home = (ItemLocalHome)ic.lookup("local/Item");
          ItemLocal itemLocal = home.create();
          itemLocal.setDataSource(this.dataSource);
          ItemVO item = itemLocal.getItem(userId,intToken);


          //Get the Required Fields from the Item VO
          String name = item.getItemName();
          String sku = item.getSku();
          float price = (float)item.getPrice();
          int id = item.getItemId();
          int taxClassId = item.getTaxClassId();
          int taxJurisdictionId = 0;
          if (purchaseOrderVO.getShipToId()!=0)
          {
            try
            {
            ContactHelperLocalHome home2 =( ContactHelperLocalHome)ic.lookup("local/ContactHelper");
            ContactHelperLocal contactHelperLocal = home2.create();
            contactHelperLocal.setDataSource(this.dataSource);
            AddressVO addVO = contactHelperLocal.getAddress(purchaseOrderVO.getShipToId());
            taxJurisdictionId = 0;
            if (taxJurisdictionId !=0)
            {
              taxRate = getTax(taxClassId, taxJurisdictionId);
            }//if (taxJurisdictionId !=0)
            }catch(Exception e)
              {
                System.out.println("[Exception][AccountHelperEJB.calculatePurchaseOrderItems] Exception Thrown: "+e);
                e.printStackTrace();
              }
          }//if shipToId !=null
          //Form the ItemLines
              counter += 1;
              IntMember LineId = new IntMember("LineId",counter,10,"",'T',false,20);
              IntMember ItemId = new IntMember("ItemId",id,10,"",'T',false,20);
              StringMember SKU = new StringMember("SKU",sku,10,"",'T',false);
              StringMember Description = new StringMember("Description",name,10,"",'T',false);
              FloatMember  Quantity = new FloatMember("Quantity",new Float(1.0f),10,"",'T',false,20);
              FloatMember  PriceEach = new FloatMember("PriceEach",new Float(price),10,"",'T',false,20);
              FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(0.0f),10,"",'T',false,20);
              FloatMember  UnitTax = new FloatMember("UnitTax",new Float(0.0f),10,"",'T',false,20);
              FloatMember  TaxRate = new FloatMember("UnitTaxrate",new Float(taxRate),10,"",'T',false,20);
              FloatMember  OrderQuantity = new FloatMember("OrderQuantity",new Float(1.0f),10,"",'T',false,20);
              FloatMember  PendingQuantity = new FloatMember("PendingQuantity",new Float(0.0f),10,"",'T',false,20);


              ItemElement ie = new ItemElement(counter);
              ie.put ("LineId",LineId);
              ie.put ("ItemId",ItemId);
              ie.put ("SKU",SKU);
              ie.put ("Description",Description);
              ie.put ("Quantity",Quantity);
              ie.put ("PriceEach",PriceEach);
              ie.put ("PriceExtended",PriceExtended);
              ie.put ("UnitTax",UnitTax);
              ie.put ("UnitTaxrate",TaxRate);
              ie.put ("OrderQuantity",OrderQuantity);
              ie.put ("PendingQuantity",PendingQuantity);

              ie.setLineStatus("New");

              itemLines.put(new Integer(counter), ie);
          }catch(Exception e)
            {
              System.out.println("[Exception][AccountHelperEJB.calculatePurchaseOrderItems] Exception Thrown: "+e);
View Full Code Here

TOP

Related Classes of com.centraview.account.common.ItemElement

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.