public void GetCalculatedAvailability()
        {
            var im = new InventoryManagerClient();

            var av = im.getCalculatedAvailability(new getCalculatedAvailability()
            {
                branchPlantList = "",
                itemPrimary = "",
                itemSecond = "",
                itemShort = 0,
                itemShortSpecified = true,
                itemThird = "",
                omitZeroQty = true,
                unitOfMeasure = ""
            });

            var a = av.e1MessageList;
            var b = av.item;
            var c = av.showCalculatedAvailability1;
            foreach (var availabilitySummary in c)
            {
                var c1 = availabilitySummary.availabilityDetails;
                foreach (var detail in c1)
                {
                    var c11 = detail.availableQuantity; //mathNumeric
                    var c12 = detail.businessUnit; //string
                    var c13 = detail.glCategory; //string
                    var c14 = detail.location; //string
                    var c15 = detail.lotNumber; //string
                    var c16 = detail.lotStatus; //string
                    var c17 = detail.primaryBin; //string
                }
                var c2 = availabilitySummary.availableQuantity;
                var c21 = c2.currencyCode; //string
                var c22 = c2.currencyDecimals; //int
                var c23 = c2.value; //decimal
                var c24 = c2.valueSpecified; //bool

                var c3 = availabilitySummary.businessUnit; //string
                var c4 = availabilitySummary.businessUnitDesc;//string
            }
            var d = av.totalQtyAvailable; //decimal
            var e = av.totalQtyAvailableSpecified; //bool
            var f = av.unitOfMeasure; //string
        }
 public InventoryManager(JdeConfiguration configuration)
 {
     _svc = new InventoryManagerClient();
     _svc.Endpoint.EndpointBehaviors.Add(new JdeSecurityBehavior(configuration.Username, configuration.Password));
 }
        public void UpdateQuantities()
        {
            var inv = new InventoryManagerClient();
            inv.processInventoryItem(new processInventoryItem
            {
                daysShelfLife = 0,
                daysShelfLifeSpecified = true,
                description1 = "",
                description2 = "",
                glClassCode = "",

            });
        }
        public void ProcessSupplierPrice()
        {
            var im = new InventoryManagerClient();

            im.processSupplierCatalogPrice(new processSupplierCatalogPrice
            {
                businessUnit = "",
                catalogName = "",
                currencyCode = "",
                dateEffectiveEnd = new DateTime(),
                dateEffectiveEndSpecified = true,
                dateEffectiveStart = new DateTime(),
                dateEffectiveStartSpecified = true,
                item = new itemGroupSupplier
                {
                    itemCatalog = "",
                    itemFreeForm = "",
                    itemId = 0,
                    itemIdSpecified = true,
                    itemProduct = "",
                    itemSupplier = ""
                },
                priceUnit = 0,
                priceUnitSpecified = true,
                processing = new supplierCatalogPriceProcessing
                {
                    actionType = ""
                },
                quantityActual = 0,
                quantityActualSpecified = true,
                supplier = new entity1
                {
                    entityId = 0,
                    entityIdSpecified = true,
                    entityLongId = "",
                    entityTaxId = ""
                },
                unitOfMeasureCode = ""
            });
        }
        public void GetBranchPlantItem()
        {
            var im = new InventoryManagerClient();

            var item = im.getBranchPlantItem(new getBranchPlantItem()
            {
                branchPlant = "",
                buyer = new entity1(),
                description1 = "",
                description2 = "",
                item = new item
                {
                    itemProduct = ""
                },
                lineTypeCode = "",
                planner = new entity1(),
                purchasingCategoryCodes =  new purchasingCategoryCodes(),
                salesCategoryCodes = new salesCategoryCodes(),
                stockingTypeCode = "",
                supplier = new entity1()
            });

            //Brand Part Number
            item = im.getBranchPlantItem(new getBranchPlantItem
            {
                item = new item
                {
                    itemProduct = ""
                }
            });

            //JDE Primary Key
            item = im.getBranchPlantItem(new getBranchPlantItem
            {
                item = new item
                {
                    itemId = 123,
                    itemIdSpecified = true
                }
            });

            foreach (var e1Message in item.e1MessageList)
            {
                var a = e1Message.message;
                var b = e1Message.messagePrefix;
            }
            foreach (var bpi in item.branchPlant)
            {
                var a = bpi.additionalUnitsOfMeasure;
                var b = bpi.grade;
                var c = bpi.item;
                var d = bpi.itemBranch;
                var e = bpi.itemMaster;
                var f = bpi.lotProcessing;
                var g = bpi.plantManufacturing;
                var h = bpi.potency;
                var i = bpi.purchasingCategoryCodes;
                var j = bpi.quantities; //reorder levels
                var k = bpi.salesCategoryCodes;
                var l = bpi.userReservedData;
            }
        }
        public void ProcessInventoryItem()
        {
            var im = new InventoryManagerClient();

            //Modify the item master
            var o= im.processInventoryItem(new processInventoryItem
            {
                daysShelfLife = 0,
                daysShelfLifeSpecified = true,
                description1 = "",
                description2 = "",
                glClassCode = "",
                itemDimensions = new inputItemDimensions
                {
                    unitOfMeasureCodePrimary = "",
                    unitOfMeasureCodeVolume = "",
                    unitOfMeasureCodeWeight = ""
                },
                item = new itemGroupSupplier
                {
                    itemCatalog = "",
                    itemFreeForm = "",
                    itemId = 0,
                    itemIdSpecified = true,
                    itemProduct = "",
                    itemSupplier = ""
                },
                lineTypeCode = "",
                lotProcessCode = "",
                lotStatusCode = "",
                processing = new inventoryItemProcessing
                {
                    actionTypeCode = "",
                    version = ""
                },
                serialNumberFlag = "",
                stockingTypeCode = "",
            });

            im.processInventoryItemV2(new processInventoryItemV2
            {
                daysShelfLife = 0,
                daysShelfLifeSpecified = true,
                description1 = "",
                description2 = "",
                glClassCode = "",
                isCountryOfOriginRequired = true,
                isCountryOfOriginRequiredSpecified = true,
                item = new itemGroupSupplier
                {
                    itemCatalog = "",
                    itemFreeForm = "",
                    itemId = 0,
                    itemIdSpecified = true,
                    itemProduct = "",
                    itemSupplier = ""
                },
                itemDimensions = new inputItemDimensions
                {
                    unitOfMeasureCodeVolume = "",
                    unitOfMeasureCodeWeight = "",
                    unitOfMeasureCodePrimary = ""
                },
                lineTypeCode = "",
                lotProcessCode = "",
                lotStatusCode = "",
                processing = new inventoryItemProcessing
                {
                    actionTypeCode = "",
                    version = ""
                },
                serialNumberFlag = "",
                stockingTypeCode = "",
            });
        }