fix: manually added weight per unit reset to zero after save (#27330)

This commit is contained in:
rohitwaghchaure
2021-09-03 22:00:14 +05:30
committed by GitHub
parent 73b3a2f685
commit 7b4a65484a
2 changed files with 6 additions and 2 deletions

View File

@@ -487,6 +487,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
var me = this;
var item = frappe.get_doc(cdt, cdn);
var update_stock = 0, show_batch_dialog = 0;
item.weight_per_unit = 0;
item.weight_uom = '';
if(['Sales Invoice'].includes(this.frm.doc.doctype)) {
update_stock = cint(me.frm.doc.update_stock);
show_batch_dialog = update_stock;