Skip to content

Commit

Permalink
fix: show stock qty in popup (#38698)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Dec 12, 2023
1 parent 69d7a64 commit b562b4c
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 b562b4c

Please sign in to comment.