27 Ağustos 2019 Salı

InventTrans'a update işleminden sonra yeniden hesaplama yapılmalı (ReCalc) | Dynamics Ax

İnventTrans'ta update işlemi yaptıktan sonra InventSum'ı Eldeki'nin doğru çalışması için hesaplatmak gerekiyor. Tek bir kayıtta çalıştıracaksanız;

static void MAA_ReCalc_InventSumReCalcItem(Args _args)
{
    InventSumRecalcItem InventSumRecalcItem;
    ;
    InventSumRecalcItem = new InventSumRecalcItem("GUB0021", true, checkfix::Fix );
    InventSumRecalcItem.updatenow();
}
Bütün madde kartlarında çalıştırmak için;

static void MAA_ReCalc_IInventSumRecalcAllItems(Args _args)
{  
 InventTable InventTable;
   InventSumRecalcItem InventSumRecalcItem;
   ;
 
   while select InventTable
     where (InventTable.ItemType == ItemType::Item) || (InventTable.ItemType == ItemType::BOM)
   {
     InventSumRecalcItem = new InventSumRecalcItem(InventTable.ItemId, true, checkfix::fix);
     InventSumRecalcItem.updatenow();
   }
}

Hiç yorum yok:

Yorum Gönder

Total ciro

static void MAA_SalesTableTotal(Args _args) { SalesTable SalesTable; utcDateTime dateTime; dateTime ...