Valuation rate is messed up

Hello. I have a serialised item. The Valuation Rate is calculated correctly on purchase receipt and is also showing correctly in the Serial No doc and Sales invoice doc, but in the delivery note it is multiplied by 10 times and the GL posting for COGS is happening with this wrong rate. Completely spoils the accounting and P&L. Really need help ASAP !!

Can someone kindly help with this. The accounting is becoming really bad.

What version of ERPNext are you running?

ERPNext: v13.0.0-beta.12 (HEAD)
Frappe Framework: v13.0.0-beta.11 (HEAD)
Updated very recently

I’m not using V13 yet so I’m not sure. But I would suggest keeping production at V12 until V13 is fully released.

Is there a way to revert back to it?

I’ve never tried reverting back. Do you have database backup from before the upgrade? Usually bench creates one automatically when you run bench update

What is your valuation rate default setting FIFO or moving??

Yes I do have. But a lot of entries were made after the upgrade, before I found this fault.

Have set FIFO