Basic Rate becomes 0 or Incorrect after Adding Batch in Stock Entry – ERPNext v15.60.2

Hi everyone,

I’m encountering a strange issue while creating Stock Entry in ERPNext (v15.60.2) with Frappe (v15.68.0). Here’s what happens:

  • When I add an item without a batch, the basic rate is fetched correctly (based on valuation rate).
  • As soon as I select a Batch No, the basic rate changes:
    • Sometimes it becomes 0.
    • Other times, it becomes (valuation rate × qty), which seems incorrect as it should remain per unit.

There are no custom scripts, no console errors, and the valuation rate is correct in the Stock Ledger Report for that batch and warehouse.

This happens on fresh entries under types like Material Receipt and Material Transfer.


Steps to Reproduce:

  1. Go to Stock Entry and select an Item.
  2. Add a valid Warehouse and Qty.
  3. Observe correct basic rate initially.
  4. Select a Batch No (which has a valuation rate in the Stock Ledger).
  5. Basic Rate becomes 0 or a wrong value.

Please let me know if this is a known issue or if there’s a workaround.
Any help would be appreciated!

Thanks in advance.

Hello,
Please help me with this, even a small hints, assumptions can help sometimes.