2012年11月5日星期一

How to using code recalculation Inventsum with Item number

Question?

I have a big problem ... I have a diference between inventtrans and inventsum for some items ...
I want to say that the qty in invetsum is not equal to the sum of qty in Inventrans.What can i do to solve this problem without trying to have a job to correct that.
reply as below :

1)The tools to Check and Fix the problem are in Basic/Periodic/Consistency check.

2)with the class InventSumRecalcItem you can do a recalculation of the inventsum based on the inventtrans data.But befor you run this, please take a backup of db.
Sample script to recalc the inventsum.
Hope this helps you.
--------------------------------------------------------------------
You can rebuild InventSum.Very simple example for a particular ItemId in InventTable:

void clicked() //from button in InventTable Form
{
    InventSumReCalcItem inventSumReCalcItem;
;
    super();
    ttsbegin;

    inventSumReCalcItem = new InventSumReCalcItem(inventTable.ItemId,                  true,CheckFix::Fix);

    inventSumReCalcItem.updateNow();
}

1 条评论:

  1. 学习了。另,不是该说HOW TO DO STH么?怎么来你的BLOG一对HOW TO DOING。。。

    回复删除