fix: Fiter passing fix in get batch query (#18131)
This commit is contained in:
@@ -271,14 +271,6 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
get_batch_fields: function() {
|
||||
var me = this;
|
||||
|
||||
let filters = {
|
||||
item_code: me.item_code
|
||||
}
|
||||
|
||||
if (me.warehouse || me.warehouse_details.name) {
|
||||
filters['warehouse'] = me.warehouse || me.warehouse_details.name;
|
||||
}
|
||||
|
||||
return [
|
||||
{fieldtype:'Section Break', label: __('Batches')},
|
||||
{fieldname: 'batches', fieldtype: 'Table', label: __('Batch Entries'),
|
||||
@@ -292,7 +284,10 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
||||
'in_list_view': 1,
|
||||
get_query: function () {
|
||||
return {
|
||||
filters: filters,
|
||||
filters: {
|
||||
item_code: me.item_code,
|
||||
warehouse: me.warehouse || me.warehouse_details.name
|
||||
},
|
||||
query: 'erpnext.controllers.queries.get_batch_no'
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user