Exemple #1
0
            public XElement GenerateAddRq(decimal?TotalValue = null, DateTime?InventoryDate = null)
            {
                XElement Add = new XElement(typeof(ItemInventory).Name + "Add");

                Add.Add(Name?.ToQBXML(nameof(Name)));
                Add.Add(BarCode?.ToQBXML(nameof(BarCode)));
                Add.Add(IsActive.ToQBXML(nameof(IsActive)));
                Add.Add(ClassRef?.ToQBXML(nameof(ClassRef)));
                Add.Add(ParentRef?.ToQBXML(nameof(ParentRef)));
                Add.Add(ManufacturerPartNumber?.ToQBXML(nameof(ManufacturerPartNumber)));
                Add.Add(UnitOfMeasureSetRef?.ToQBXML(nameof(UnitOfMeasureSetRef)));
                Add.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef)));
                Add.Add(SalesDesc?.ToQBXML(nameof(SalesDesc)));
                Add.Add(SalesPrice?.ToQBXML(nameof(SalesPrice)));
                Add.Add(IncomeAccountRef?.ToQBXML(nameof(IncomeAccountRef)));
                Add.Add(PurchaseDesc?.ToQBXML(nameof(PurchaseDesc)));
                Add.Add(PurchaseCost?.ToQBXML(nameof(PurchaseCost)));
                Add.Add(COGSAccountRef?.ToQBXML(nameof(COGSAccountRef)));
                Add.Add(PrefVendorRef?.ToQBXML(nameof(PrefVendorRef)));
                Add.Add(AssetAccountRef?.ToQBXML(nameof(AssetAccountRef)));
                Add.Add(ReorderPoint?.ToQBXML(nameof(ReorderPoint)));
                Add.Add(Max?.ToQBXML(nameof(Max)));
                Add.Add(QuantityOnHand?.ToQBXML(nameof(QuantityOnHand)));
                Add.Add(TotalValue?.ToQBXML(nameof(TotalValue)));
                Add.Add(InventoryDate?.ToQBXML(nameof(InventoryDate)));
                Add.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID)));

                XElement AddRq = new XElement(typeof(ItemInventory).Name + "AddRq", Add);

                foreach (var value in IncludeRetElement)
                {
                    AddRq.Add(value.ToQBXML(nameof(IncludeRetElement)));
                }
                return(AddRq);
            }
Exemple #2
0
            public XElement GenerateModRq(bool?ForceUOMChange = null, bool?ApplyIncomeAccountRefToExistingTxns = null, bool?ApplyCOGSAccountRefToExistingTxns = null)
            {
                XElement Mod = new XElement(typeof(ItemInventory).Name + "Mod");

                Mod.Add(ListID?.ToQBXML(nameof(ListID)));
                Mod.Add(EditSequence?.ToQBXML(nameof(EditSequence)));
                Mod.Add(Name?.ToQBXML(nameof(Name)));
                Mod.Add(BarCode?.ToQBXML(nameof(BarCode)));
                Mod.Add(IsActive.ToQBXML(nameof(IsActive)));
                Mod.Add(ClassRef?.ToQBXML(nameof(ClassRef)));
                Mod.Add(ParentRef?.ToQBXML(nameof(ParentRef)));
                Mod.Add(ManufacturerPartNumber?.ToQBXML(nameof(ManufacturerPartNumber)));
                Mod.Add(UnitOfMeasureSetRef?.ToQBXML(nameof(UnitOfMeasureSetRef)));
                Mod.Add(ForceUOMChange?.ToQBXML(nameof(ForceUOMChange)));
                Mod.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef)));
                Mod.Add(SalesDesc?.ToQBXML(nameof(SalesDesc)));
                Mod.Add(SalesPrice?.ToQBXML(nameof(SalesPrice)));
                Mod.Add(IncomeAccountRef?.ToQBXML(nameof(IncomeAccountRef)));
                Mod.Add(ApplyIncomeAccountRefToExistingTxns?.ToQBXML(nameof(ApplyIncomeAccountRefToExistingTxns)));
                Mod.Add(PurchaseDesc?.ToQBXML(nameof(PurchaseDesc)));
                Mod.Add(PurchaseCost?.ToQBXML(nameof(PurchaseCost)));
                Mod.Add(COGSAccountRef?.ToQBXML(nameof(COGSAccountRef)));
                Mod.Add(ApplyCOGSAccountRefToExistingTxns?.ToQBXML(nameof(ApplyCOGSAccountRefToExistingTxns)));
                Mod.Add(PrefVendorRef?.ToQBXML(nameof(PrefVendorRef)));
                Mod.Add(AssetAccountRef?.ToQBXML(nameof(AssetAccountRef)));
                Mod.Add(ReorderPoint?.ToQBXML(nameof(ReorderPoint)));
                Mod.Add(Max?.ToQBXML(nameof(Max)));

                XElement ModRq = new XElement(typeof(ItemInventory).Name + "ModRq", Mod);

                foreach (var value in IncludeRetElement)
                {
                    ModRq.Add(value.ToQBXML(nameof(IncludeRetElement)));
                }
                return(ModRq);
            }