Thank you for visiting our Partner Zone. This area is an exclusive space for MYOB Partners. Find out how to Partner with MYOB.
With the help of MYOB API support, I have some answers to my questions so thought I would post them here:
The 9603 and 4059 errors are caused by the item being 'out of balance'. See this link for more information:
If the solution given there does not fix it, it may require the MYOB support team to correct the data.
Currently, if a batch of Inventory Adjustments fails there is no way of knowing which item in the batch caused the exception. I have asked that they consider changing this in future. A workaround it just to process them one item at a time.
Using AccountRight 2018.2 and the latest version of the SDK.
I am getting exceptions when posting a batch of Inventory Adjustments. (InventoryAdjustmentService.Insert)
ErrorCode: 9603 Message: CurrentValue of Item must be reduced to zero when QuantityOnHand of Item is reduced to zero Name CurrentValueOfItemNotZero
ErrorCode:4059 Message: Inventory_ValueMustNotLessThanZero Name ValidationError
These are caused by what I believe to be a bug in AccountRight but more on that later.
My problem is that I cannot tell which item(s) within the batch are causing the problem, and the whole batch is failing.
Is there a way of finding out from the exception, or by any other method, which item is causing the problem?
The underlying problem is caused when trying to reduce the stock on hand quantity to zero.
My theory is that AR tries to adjust the value of the stock using the average cost which it calculates based on previous purchase prices.
Somehow this may be different from what it calculates is the total value of the adjustment so the resulting total value is not zero.
I can reproduce this problem in AR itself. I have an item which has be bought and sold several times at different prIces and I cannot adjust the quantity to zero.
This may be just a rounding issue as in my example in Inventory Adjustment, AR displays the 'Unit Cost' as $208.579999 and the 'Amount' as -$208.58.
Adding those two values would not give zero, unless the underlying values were rounded to the same number of decimal places.
Any thoughts or suggestions welcome.