Skip to content

Commit

Permalink
fix: auto fetch not working if bundle exists (#39002)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Dec 28, 2023
1 parent 10074e9 commit b5340c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions erpnext/public/js/utils/serial_no_batch_selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,18 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
}

get_auto_data() {
let { qty, based_on } = this.dialog.get_values();

if (this.item.serial_and_batch_bundle || this.item.rejected_serial_and_batch_bundle) {
return;
if (qty === this.qty) {
return;
}
}

if (this.item.serial_no || this.item.batch_no) {
return;
}

let { qty, based_on } = this.dialog.get_values();

if (!based_on) {
based_on = 'FIFO';
}
Expand Down

0 comments on commit b5340c5

Please sign in to comment.