Moving average cancel delivery order error

If I cancel the DO within same day, I will get this message.

Error message

"Cannot edit a record in Sales order - update table (SalesParmTable).

An update conflict occurred due to another user process deleting the record or changing one or more fields in the record."

I commented out that error in the code, the real error shown

“The inventory value of 102,476.71 is not expected after the proportional expense calculation. The expected value is 85,397.25.”

However, we will be able to cancel DO if we pass the day.

I dig down to the code and see the code “if _inventTrans.DatePhysical >= today, then set amount to cache”, and after get amount from the cache, the error message occurs.

Not sure whether the moving average have a limitation canceling the DO within the same day ?