Skip to content

Commit

Permalink
fix: set up filters for dimensions
Browse files Browse the repository at this point in the history
(cherry picked from commit 2fd8de2)
  • Loading branch information
khushi8112 authored and mergify[bot] committed Aug 14, 2024
1 parent 3dafa98 commit abb8866
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s

onload() {
this.setup_queries();
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
}

refresh() {
Expand Down Expand Up @@ -75,6 +76,14 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s
};
});

me.frm.set_query("cost_canter", function () {
return {
filters: {
company: me.frm.doc.company,
}
};
});

me.frm.set_query("item_code", "stock_items", function () {
return erpnext.queries.item({ is_stock_item: 1 });
});
Expand Down

0 comments on commit abb8866

Please sign in to comment.