fix: show stock qty in popup (#38698)

This commit is contained in:
rohitwaghchaure 2023-12-12 16:41:10 +05:30 committed by GitHub
parent 69d7a640ee
commit b562b4cf99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
secondary_action: () => this.edit_full_form(),
});
this.dialog.set_value("qty", this.item.qty).then(() => {
let qty = this.item.stock_qty || this.item.transfer_qty || this.item.qty;
this.dialog.set_value("qty", qty).then(() => {
if (this.item.serial_no) {
this.dialog.set_value("scan_serial_no", this.item.serial_no);
frappe.model.set_value(this.item.doctype, this.item.name, 'serial_no', '');