while the ax programmer using x++ to creating customization that connect to inventtrans, sometimes they have a forget code that invent trans effect to inventsum
or sometimes when the proses working, aos hang etc
so the solution is we must recalculate the inventsum so the sum of inventtrans = inventsum
this is my source code to calculate invent sum
(remember, doing this at non working hours, especially all items)
static void RON_RecalcinventSum(Args _args) { //membersihkan ulang inventsum di kalkulasi ulang dari inventtrans agar nilainya kurang lebih sama InventTable InventTable; InventSumRecalcItem InventSumRecalcItem; ; WHILE SELECT InventTable WHERE (InventTable.ItemType == ItemType::Item) { InventSumRecalcItem = new InventSumRecalcItem(InventTable.ItemId, true, checkfix::fix); InventSumRecalcItem.updatenow(); } /* InventSumRecalcItem InventSumRecalcItem; ; InventSumRecalcItem = new InventSumRecalcItem("QL10145GN", true, checkfix::fix); InventSumRecalcItem.updatenow(); */ }