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

(cherry picked from commit 7b4a65484a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
Frappe PR Bot
2021-09-03 22:54:49 +05:30
committed by GitHub
parent aee2e04a45
commit e9da4ed34d
2 changed files with 6 additions and 2 deletions

View File

@@ -487,6 +487,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
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;