fix: Fetch conversion factor even if it already existed in row, on item change (#29917) (#29935)

* fix: Fetch conversion factor even if it already existed in row, on item change

* fix: Retain manually changed conversion factor

- If item code changes, reset conversion factor on client side
- Keep API behavious consistent, if conversion factor is sent, same must come back
- API should not ideally reset values in most cases

(cherry picked from commit 235fc127b3)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
mergify[bot]
2022-02-22 13:01:31 +05:30
committed by GitHub
parent 0f101b5209
commit 6539d32ca9

View File

@@ -525,6 +525,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
item.weight_per_unit = 0;
item.weight_uom = '';
item.conversion_factor = 0;
if(['Sales Invoice'].includes(this.frm.doc.doctype)) {
update_stock = cint(me.frm.doc.update_stock);