get real std cost
public static server InventItemPrice TEK_find( ItemId _itemId, InventSiteId _InventSiteId = "", boolean _forUpdate = false, // #! for TEK_ProdSTDvsActCost report date _date = today() ) { InventItemPrice inventItemPrice; InventDim InventDim; if (_InventSiteId) { select firstonly inventItemPrice order by ActivationDate desc, CreatedDateTime desc where inventItemPrice.ItemId == _itemId && inventItemPrice.PriceType == CostingVersionPriceType::Cost && inventItemPrice.ActivationDate <= _date join InventDim where InventDim.inventDimId == inventItemPrice.InventDimId && InventDim.InventSiteId == _InventSiteId; } else { select firstonly inventItemPrice order by ActivationDate desc, CreatedDateTime desc where inventItemPrice.ItemId == _itemId && inventItemPrice.PriceType == CostingVersionPriceType::Cost && inventItemPrice.ActivationDate <= _date ; } return inventItemPrice; }
留言评论
暂无留言