查找物料/仓库的总可用量和可用实物
我有一个显示字段的方法,它执行以下操作;
return InventSum::find(_salesLine.ItemId, InventDim::_salesLine.InventDimId).AvailPhysical();
这为我提供了该线路站点/仓库/位置的现有可用实物。
我需要查看站点/仓库的可用总数。我想我需要按项目/仓库搜索 inventDim 来获取我的 inventdimid,但我找不到该方法,所以我怀疑这是不正确的。
有人可以帮忙吗?
I have a method for a display field which does the following;
return InventSum::find(_salesLine.ItemId, InventDim::_salesLine.InventDimId).AvailPhysical();
This gives me the on-hand Available Physical for the line site/warehouse/location.
I need to see the total available for just the site/warehouse. I think I need to search inventDim by Item/Warehouse to get my inventdimid, but I cannot find the method so I am suspicious that this is incorrect.
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我的工作解决方案...
我知道这是针对availOrdered() 但它的工作原理与availPhysical() 完全相同
My working solution...
I know this is for availOrdered() but it works exactly the same for availPhysical()
您应该使用
InventOnhand
类。它根据商品 ID 和库存尺寸等标准对现有发明值进行求和。
AX有很多用途,搜索Class节点。
You should use the
InventOnhand
class.It sums the invent on-hand values based on criteria like item id and inventory dimensions.
There are lots of uses in AX, search the Class node.
以下作业查找所有处于“未结订单”状态的销售行,这些销售行的现有可用实物数量与销售行上指定的所有维度(位置除外)相匹配:
The following job finds all Sales Lines with the Open Order status, which have an Available Physical quantity on hand matching all dimensions specified on the Sales Lines except location:
您基本上按照要搜索的方式设置 inventDim 值,然后执行 InventDim::FindOrCreate 来查看库存维度是否已存在,或者需要创建它并使用新的编号规则。使用它是为了使 InventDim 表不会存储所有可能的维度组合。另外,因为如果您有任何序列化产品,则该表不可能存储所有组合,因此它只存储它需要的组合。
You basically set your inventDim values the way you want to search for them, and then do an InventDim::FindOrCreate to see if either the inventory dimension already exists, or it needs to be created and a new number sequence will be consumed. This is used so that the InventDim table doesn't store every single possible combination of dimensions. Also because if you have any serialized products, it's not feasible for the table to store all of the combinations, so it only stores the ones it needs.