Part Tran Average Costing Numbers not making sense

Hey all, at the end of my rope here as we are being audited and cannot explain a material cost for a part transaction. I have combed through the several articles on average costing, and I still cannot piece together why our system is acting the way it is. I am looking at all part transactions for a part ordered by TranNum, and trying to calculate what the Average should have been at a moment in time.

This is what I have found from other articles of how it seems the Material average is a calculated at the time of change:
image

I pulled in all transactions from the beginning of time and started to work up from the first transaction working towards the most recent calculating the running total, and the average at the certain point in time. Not too far in I cannot figure out how Epicor calculated the average. What am I missing?

Thank you all for your help.

You cannot depend on TranDate. Add SystemDate and Time along with TranNum. The 7/30/2021 transactions were most likely back-dated and that will NOT recalculate the average for subsequent transactions. The only transactions that matter are those that are received to stock in system date/time order.

Sorry, I should have clarified, I have run it sorted by SysDate, SysTime, TranNum. Is the so if the sys date was Today, and they back dated it to a month ago, would it use the average price from Today at the back dated transaction?

Our team ended up getting what they needed, so I am closing this out. This part ended up being more complicated since it is multi plant. Appreciate the feedback.