fix(selling): reset stale item details on item change (backport #58051) (#58052)

This commit is contained in:
mergify[bot]
2026-08-11 15:54:04 +00:00
committed by GitHub
parent 9c9bc8e9bf
commit 01372cf295

View File

@@ -561,9 +561,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
var update_stock = 0, show_batch_dialog = 0; var update_stock = 0, show_batch_dialog = 0;
item.weight_per_unit = 0; item.weight_per_unit = 0;
item.weight_uom = ''; item.weight_uom = '';
if(!item.barcode){ item.uom = null // make UOM blank to update the existing UOM when item changes
item.uom = null // make UOM blank to update the existing UOM when item changes
}
item.conversion_factor = 0; item.conversion_factor = 0;
if(['Sales Invoice', 'Purchase Invoice'].includes(this.frm.doc.doctype)) { if(['Sales Invoice', 'Purchase Invoice'].includes(this.frm.doc.doctype)) {