Skip to content

Commit

Permalink
fix: show stock qty in popup (backport #38698) (#38699)
Browse files Browse the repository at this point in the history
fix: show stock qty in popup (#38698)

(cherry picked from commit b562b4c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Dec 12, 2023
1 parent a75081b commit 6e2cde4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/public/js/utils/serial_no_batch_selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
Expand Down

0 comments on commit 6e2cde4

Please sign in to comment.