Package com.centraview.common

Examples of com.centraview.common.StringMember


    CVDal dl = new CVDal(this.dataSource);
    try {

      IntMember lineid = (IntMember) ele.get("LineId");
      IntMember itemid = (IntMember) ele.get("ItemId");
      StringMember sku = (StringMember) ele.get("SKU");
      IntMember qty = (IntMember) ele.get("Quantity");
      FloatMember priceEach = (FloatMember) ele.get("Price");
      StringMember desc = (StringMember) ele.get("Description");

      int quantity = ((Number) qty.getMemberValue()).intValue();
      float price = ((Number) priceEach.getMemberValue()).floatValue();
      int itemID = ((Number) itemid.getMemberValue()).intValue();

      InitialContext ic = CVUtility.getInitialContext();
      AccountHelperLocalHome home = (AccountHelperLocalHome) ic.lookup("local/AccountHelper");
      AccountHelperLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      int taxClassID = remote.getTaxClassID(itemID);
      int taxJurisdictionId = (this.orderForm.getJurisdictionID()).intValue();
      float taxRate = 0;
      if (taxClassID != -1 && taxJurisdictionId != 0) {
        taxRate = remote.getTax(taxClassID, taxJurisdictionId);
      }// if (taxJurisdictionId !=0)
      float taxTotal = ((quantity * price) * (taxRate / 100));

      dl.setSql("order.updateorderitem");
      dl.setInt(1, itemID);
      dl.setInt(2, quantity);
      dl.setFloat(3, price);
      dl.setString(4, (String) sku.getMemberValue());
      dl.setString(5, (String) desc.getMemberValue());
      dl.setFloat(6, taxTotal);
      dl.setInt(7, ((Integer) lineid.getMemberValue()).intValue());
      dl.setInt(8, orderID);

      dl.executeUpdate();
View Full Code Here


    CVDal cvdal = new CVDal(this.dataSource);
    try
    {
      IntMember lineid = ( IntMember )ele.get("LineId");
      IntMember itemid = ( IntMember )ele.get("ItemId");
      StringMember sku   = ( StringMember )ele.get("SKU");
      IntMember qty   = ( IntMember )ele.get("Quantity");
      FloatMember priceEach = ( FloatMember )ele.get("Price");
      StringMember desc   = ( StringMember )ele.get("Description");
      String status    = ele.getLineStatus();

      int quantity = ((Number) qty.getMemberValue()).intValue();
      float price =  ((Number) priceEach.getMemberValue()).floatValue();
      int itemID = ((Number)itemid.getMemberValue()).intValue();

      cvdal.setSql("account.expense.addexpenseitem");
      cvdal.setInt(1,expenseID);
      cvdal.setInt(2,itemID );
      cvdal.setString(3,(String)sku.getMemberValue());
      cvdal.setString(4,(String)desc.getMemberValue());
      cvdal.setFloat(5,((Float)priceEach.getMemberValue()).floatValue());
      cvdal.setInt(6,quantity);
      cvdal.executeUpdate();
      cvdal.clearParameters();
    }
View Full Code Here

          IntMember LineId = new IntMember("LineId", lineID, 'D', "", 'T', false, 20);
          IntMember ItemId = new IntMember("ItemId", itemID, 'D', "", 'T', false, 20);
          IntMember Quantity = new IntMember("Quantity", quantity, 'D', "", 'T', false, 20);
          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);
          FloatMember TaxAmount = new FloatMember("TaxAmount", new Float(taxTotal), 'D', "", 'T', false, 20);

          ItemElement ie = new ItemElement(11);
View Full Code Here

    try
    {

      IntMember lineid = ( IntMember )ele.get("LineId");
      IntMember itemid = ( IntMember )ele.get("ItemId");
      StringMember sku   = ( StringMember )ele.get("SKU");
      IntMember qty   = ( IntMember )ele.get("Quantity");
      FloatMember priceEach = ( FloatMember )ele.get("Price");
      StringMember desc   = ( StringMember )ele.get("Description");
      String status    = ele.getLineStatus();

      int quantity = ((Number) qty.getMemberValue()).intValue();
      float price =  ((Number) priceEach.getMemberValue()).floatValue();
      int itemID = ((Number)itemid.getMemberValue()).intValue();

      dl.setSql("account.expense.updateexpenseitem");
      dl.setInt(1, itemID);
      dl.setString(2,(String)sku.getMemberValue());
      dl.setString(3,(String)desc.getMemberValue());
      dl.setFloat(4,price);
      dl.setInt(5,quantity);
      dl.setString(6,ele.getLineStatus());
      dl.setInt(7,expenseID);
      dl.setInt(8,((Integer)lineid.getMemberValue()).intValue() );
View Full Code Here

          IntMember LineId = new IntMember("LineId",lineID,'D',"",'T',false,20);
          IntMember ItemId = new IntMember("ItemId",itemID,'D',"",'T',false,20);
          IntMember Quantity = new IntMember("Quantity",quantity,'D',"",'T',false,20);
          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);
View Full Code Here

          int customFieldID = ((Number) hm.get("customfieldid")).intValue();

          IntMember addId = new IntMember("CustomFieldID", customFieldID, 10, "/centraview/ViewHandler.do?customFieldID=" + customFieldID, 'T',
              false, 10);
          StringMember field = new StringMember("Field", (String) hm.get("name"), 10, "requestURL", 'T', true);
          StringMember value = new StringMember("Value", (String) hm.get("value"), 10, "requestURL", 'T', false);

          CustomFieldListElement listElement = new CustomFieldListElement(customFieldID);

          listElement.put("CustomFieldID", addId);
          listElement.put("Field", field);
View Full Code Here

          i++;
          HashMap hm = (HashMap) it.next();
          int custfieldID = ((Long) hm.get("customfieldid")).intValue();
          try {
            IntMember intCustFieldID = new IntMember("CustomFieldID", custfieldID, 10, "", 'T', false, 10);
            StringMember strName = null;
            if ((hm.get("name") != null)) {
              strName = new StringMember("Name", (String) hm.get("name"), 10, "", 'T', true);
            } else {
              strName = new StringMember("Name", null, 10, "", 'T', true);
            }
            String typeValue = (hm.get("type") == null) ? "SCALAR" : (String) hm.get("type");
            if (typeValue.equals("SCALAR")) {
              typeValue = "Single";
            } else {
              typeValue = "Multiple";
            }
            StringMember strType = new StringMember("Type", typeValue, 10, "", 'T', false);
            StringMember strModule = null;
            if ((hm.get("module") != null)) {
              strModule = new StringMember("Module", (String) hm.get("module"), 10, "", 'T', false);
            } else {
              strModule = new StringMember("Module", "", 10, "", 'T', false);
            }
            StringMember strRecord = null;
            if ((hm.get("record") != null)) {
              strRecord = new StringMember("Record", (String) hm.get("record"), 10, "", 'T', false);
            } else {
              strRecord = new StringMember("Record", "", 10, "", 'T', false);
            }
            CustomFieldListElement cflistelement = new CustomFieldListElement(custfieldID);
            cflistelement.put("CustomFieldID", intCustFieldID);
            cflistelement.put("Name", strName);
            cflistelement.put("Type", strType);
View Full Code Here

        String strGLAccountID = new String();
        strGLAccountID = String.valueOf(glAccID);

        try
        {
          StringMember strName = null;

          if ((hm.get("Name") != null))
          {
            strName =
              new StringMember("Name", (String) hm.get("Name"), 10, "", 'T',
                false);
          }
          else
          {
            strName = new StringMember("Name", null, 10, "", 'T', false);
          }

          StringMember strType =
            new StringMember("Type", (String) hm.get("Type"), 10, "", 'T', false);

          DoubleMember dblBalance =
            new DoubleMember("Balance",
              new Double(Double.parseDouble(hm.get("Balance").toString())), 10,
              "", 'T', false, 10);

          StringMember strParentAccount =
            new StringMember("ParentAccount", (String) hm.get("ParentAccount"),
              10, "", 'T', false);

          GLAccountListElement glListElement =
            new GLAccountListElement(glAccID);
View Full Code Here

          IntMember intInvID =
            new IntMember("InventoryID", invID, 10, null, 'T', true, 10);
          IntMember intEntityID =
            new IntMember("EntityID", entityID, 10, null, 'T', false, 10);

          StringMember strItemName = null;

          if ((hm.get("ItemName") != null))
          {
            strItemName =
              new StringMember("ItemName", (String) hm.get("ItemName"), 10,
                null, 'T', false);
          }
          else
          {
            strItemName =
              new StringMember("ItemName", null, 10, null, 'T', false);
          }

          StringMember strIdentifier =
            new StringMember("Identifier", (String) hm.get("Identifier"), 10,
              null, 'T', false);

          StringMember strManufacturer =
            new StringMember("Manufacturer", (String) hm.get("Manufacturer"),
              10, null, 'T', false);

          StringMember strVendor =
            new StringMember("Vendor", (String) hm.get("Vendor"), 10, "", 'T',
              true);

          InventoryListElement invListElement = new InventoryListElement(invID);

          invListElement.put("InventoryID", intInvID);
View Full Code Here

        try
        {
          IntMember intListID =
            new IntMember("ItemID", id, 10, "", 'T', false, 10);

          StringMember strSku = null;

          if ((hm.get("sku") != null))
          {
            strSku =
              new StringMember("SKU", (String) hm.get("sku"), 10, "", 'T', true);
          }
          else
          {
            strSku = new StringMember("SKU", null, 10, "", 'T', true);
          }

          StringMember strName =
            new StringMember("Name", (String) hm.get("Name"), 10, "", 'T', false);

          //          StringMember strCatagory = new StringMember("Category", (String)hm.get("categoryname"), 10, "", 'T', false);new Float(((Double) hm.get( "cost" )).floatValue())
          StringMember strType =
            new StringMember("Type", (String) hm.get("type"), 10, "", 'T', false);

          FloatMember price = null;

          if (hm.get("Price") != null)
          {
            price =
              new FloatMember("Price",
                new Float(Float.parseFloat((hm.get("Price")).toString())), 10,
                "", 'T', false, 10);
          }
          else
          {
            price =
              new FloatMember("Price", new Float(0), 10, "", 'T', false, 10);
          }

          DoubleMember intQty = null;

          if (hm.get("OnHand") != null)
          {
            intQty =
              new DoubleMember("OnHand",
                new Double(Double.parseDouble((hm.get("OnHand")).toString())),
                10, "", 'T', false, 10);
          }
          else
          {
            intQty =
              new DoubleMember("OnHand", new Double(0), 10, "", 'T', false, 10);
          }

          StringMember strtaxClass =
            new StringMember("TaxClass", (String) hm.get("taxclass"), 10, "",
              'T', false);


          int taxClassId = ((Number) hm.get("taxclassid")).intValue();

          IntMember intTaxClassID = new IntMember("TaxClassID", taxClassId, 10, "", 'T', false, 10);

          FloatMember cost =
            new FloatMember("Cost",
              new Float(Float.parseFloat((hm.get("cost")).toString())), 10, "",
              'T', false, 10);

          //Added by Shilpa for getting Manufacture and Vendor for item
          int manid = 0;
          int venid = 0;

          if (hm.get("manid") != null)
          {
            manid = ((Long) hm.get("manid")).intValue();
          }

          IntMember manufacturerID =
            new IntMember("ManufacturerID", manid, 10, "", 'T', false, 10);

          if (hm.get("vendorid") != null)
          {
            venid = ((Long) hm.get("vendorid")).intValue();
          }

          IntMember vendorID =
            new IntMember("VendorID", venid, 10, "", 'T', false, 10);

          StringMember strVendor = null;
          StringMember strManufacturer = null;

          if (hm.get("vendor") != null)
          {
            strVendor =
              new StringMember("Vendor", (String) hm.get("vendor"), 10, "",
                'T', false);
          }

          if (hm.get("manufacturer") != null)
          {
            strManufacturer =
              new StringMember("Manufacturer", (String) hm.get("manufacturer"),
                10, "", 'T', false);
          }

          //Added by shilpa ends here
          ItemListElement listElement = new ItemListElement(id);
View Full Code Here

TOP

Related Classes of com.centraview.common.StringMember

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.