Trying to fix Stock Reconciliation Item


ERPNext: v12.26.0 (version-12)
Frappe Framework: v12.23.0 (version-12)

Noticed something in Stock Reconciliation Item which doesn’t seem right…

When you enter the Item Code , all fields update including the Item-Name

If however, you use the barcode field and scan the barcode in ONLY the Qty and Amounts
are updated not the Item_Name

Looking at the code in stock_reconciliation.js …
there is an add_fetch that updates the item_name on a change in the “item_code” field.

Looking further down the code …

an event on “item_code” will cause set_valuation_rate_and_qty to updateONLY the
Qty and Amount, not the Item_name

So what seem to be happening , is that, when the barcode fields reads a value ( either
with a barcode scanner or by typing the barcode ) the item_code gets updated
which causes the Qty and Amount to be updated on the form. But it does not seem to create
an event so that…
add_fetch(‘item_code’, ‘item_name’, ‘item_name’);
can update the item_name.

I have noticed something similar while playing around with a client-side-script.
is there a way to force a “item_code” event so that…
add_fetch(‘item_code’, ‘item_name’, ‘item_name’);
can update “item_name”?

I tried inserting …, cdt, cdn);
into the “barcode” event-code.
But that did not work.

Is my thinking good ?