Standard cost rounding adjustments posted as at system date and not as at the transaction date


There are many reasons why a customer may need to backdate an inventory transaction e.g.  when a count journal is created, if it takes more than a day to count the stock, the journal cannot be posted that same day.


This backdating will produce a financial voucher with two different dates (which may be in two different fiscal years), if a rounding adjustment occurs.


This behaviour has been reported several times since AX2009.  It is due to the Standard costing logic, and with the current architecture it cannot be addressed by a hotfix.  AX does not prevent users from back-dating a transaction to a date many months ago. The rounding adjustment is done on the current on-hand inventory, which does not have a specific transaction date, and therefore it is always posted as at the system date. If the variance were posted as at the transaction date, the system would potentially have to recalculate all other rounding posted since that date. This would require logic similar to that in the inventory close process to be executed at the time of posting, which would increase the response time greatly and prevent other transactions being posted until it completed.  


The rounding is calculated in \Classes\InventModelType_StdCost\updateLedgerFinancialRounding  

table\ InventTrans\ Method\ updateStdCostPriceRevaluationFin


The code suggestion below could be used to post the rounding as at the transaction date, and should be reverted as soon as the specific transactions (opening balances, or some specific transactions which must not show rounding at system date) have been posted, and would require thorough testing before use.


“Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This code suggestion assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures.”



financialRevaluation = _inventTrans.updateStdCostPriceRevaluationFin(_inventMovement.inventTable(),



today(),   //  Remove this line 

ledgerVoucher.lastTransDate(),   // add line