mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: not able to reconcile expired batches (#44012)
(cherry picked from commit 8805e74784)
This commit is contained in:
@@ -462,6 +462,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
|
||||
is_inward = true;
|
||||
}
|
||||
|
||||
let include_expired_batches = me.include_expired_batches();
|
||||
|
||||
return {
|
||||
query: "erpnext.controllers.queries.get_batch_no",
|
||||
filters: {
|
||||
@@ -469,6 +471,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
|
||||
warehouse:
|
||||
this.item.s_warehouse || this.item.t_warehouse || this.item.warehouse,
|
||||
is_inward: is_inward,
|
||||
include_expired_batches: include_expired_batches,
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -497,6 +500,14 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
|
||||
return fields;
|
||||
}
|
||||
|
||||
include_expired_batches() {
|
||||
return (
|
||||
this.frm.doc.doctype === "Stock Reconciliation" ||
|
||||
(this.frm.doc.doctype === "Stock Entry" &&
|
||||
["Material Receipt", "Material Transfer", "Material Issue"].includes(this.frm.doc.purpose))
|
||||
);
|
||||
}
|
||||
|
||||
get_auto_data() {
|
||||
let { qty, based_on } = this.dialog.get_values();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user