AX2012 為什麼有些情況舍入差異是以標準價格乘數量的形式計算? 請舉例
- User
AX2012 為什麼有些情況舍入差異是以標準價格乘數量的形式計算? 請舉例
- Assistant
一些情况下,AX2012使用标准价格乘以数量来计算舍入差异,因为这可以更准确地反映出实际成本的变化。例如,在生产过程中,成本可能会因为生产速度,材料价格,人工成本等原因发生变化。在这种情况下,成本价格的变化可以通过标准价格与实际数量的乘积来计算,从而可以更准确地反映出实际成本的变化。
具体的例子如下:假设一个公司使用标准成本法核算,其中制造的产品每个单价为 80,每个产品的成本差异为 2000,在这种情况下,标准价格乘以数量是不变的,计算起来更加简单。
- User
AX 2012 R3 x++ how to convert qty from bom unit to invent unit?
- Assistant
To convert quantity from BOM unit to the Invent unit in X++ in AX 2012 R3, you can use the following code:
InventTable inventTable; EcoResProduct ecoResProduct; EcoResProductTranslation ecoResProductTranslation; EcoResDistinctProduct ecoResDistinctProduct; // Get the product record inventTable = InventTable::findByItemId(itemId); // Get the product translation record to get the BOM unit ecoResProduct = EcoResProduct::find(inventTable.Product); ecoResProductTranslation = EcoResProductTranslation::findByLanguageId(ecoResProduct.LanguageId, ecoResProduct.RecId); unitId bomUnit = ecoResProductTranslation.ExtendedUnit; // Get the number of BOM units needed EcoResDistinctProduct::getDistinctProduct(inventTable.Product, ecoResDistinctProduct); Real bomQty = ecoResDistinctProduct.BOMQty * quantity; // Convert from BOM unit to Invent unit Real inventQty = UnitOfMeasureConversion::convertToBase(inventTable.ItemId, bomUnit, bomQty, inventTable.InventUnit);