Stock Entry for Material Transfer generates GL Entry with unexpected rounding

Hi all!

I just ran into a strange issue. Some Material Transfer stock entry I create (moving a product from warehouse A to warehouse B) generate an unbalanced entry.

Although on the actual form the values actually match:

I am using moving average for stock evaluation. At first I thought this was due to some rounding function, but turns out it’s not because the amount tends to increase for larger quantities:

This is for 25pcs of something:

This is for 50pcs of the same thing:

Can anybody shed some light on this? Cheers!
@nabinhait @rmehta

Can you please replicate the issue in demo.erpnext.com and provide a link of the document?

Here:

https://demo.erpnext.com/desk#Form/Stock%20Entry/STE-00234

Steps:

  1. Create 2 purchase orders with different purchase rate

https://demo.erpnext.com/desk#Form/Purchase%20Order/PO-00197
https://demo.erpnext.com/desk#Form/Purchase%20Order/PO-00198

  1. Receive the stock

https://demo.erpnext.com/desk#Form/Purchase%20Receipt/PREC-00154
https://demo.erpnext.com/desk#Form/Purchase%20Receipt/PREC-00153

  1. Create material transfer to another warehouse

https://demo.erpnext.com/desk#Form/Stock%20Entry/STE-00234

Seems like the rounding precision is not the same:

Cheers!

1 Like

Thanks for replicating the issue in demo account. I checked into it and got the issue. It is related to field precision and rounding. But it is really difficult to fix immediately. To fix it, we have to major change in design and logic of valuation rate and how it is handling. The change is already in our to-do list. But it’s not really a easy fix.

For now, if you want to get rid off it, you can set precision of basic_rate and valuation_rate field to 6.

1 Like