C Inventory Transactions

From Sage Evolution SDK | Documentation Portal
Revision as of 12:03, 23 October 2015 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The InventorTransaction class is the equivalent of a Inventory Adjustment. Stock can be increased decreased or the cost adjusted.

            //Create a instance of the InventoryTransaction class
            InventoryTransaction ItemInc = new InventoryTransaction();
            ItemInc.TransactionCode = new TransactionCode(Module.Inventory, "ADJ");// specify a inventory transaction type generally this will be ADJ
            ItemInc.InventoryItem = new InventoryItem("Item1");
            ItemInc.Operation = InventoryOperation.Increase;//Select the necessary enumerator increase , decrease or cost adjustment
            ItemInc.Quantity = 2;
            ItemInc.Reference = "F2";
            ItemInc.Reference2 = "ref2";
            ItemInc.Description = "desc";
            ItemInc.Post();
 
            //Create a instance of the InventoryTransaction class
            InventoryTransaction ITCost = new InventoryTransaction();
            ITCost.TransactionCode = new TransactionCode(Module.Inventory, "ADJ");// specify a inventory transaction type generally this will be ADJ
            ITCost.InventoryItem = new InventoryItem("Item1");
            ITCost.Operation = InventoryOperation.CostAdjustment;//Select the necessary enumerator increase , decrease or cost adjustment
            ITCost.UnitCost = 75;
            ITCost.Reference = "F2";
            ITCost.Reference2 = "ref2";
            ITCost.Description = "desc";
            ITCost.Post();