fix: apply filters in all transactions
(cherry picked from commit 08f842d12e)
This commit is contained in:
committed by
mergify-bot
parent
48e2baa903
commit
ad0aca2fc6
@@ -158,6 +158,27 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
};
|
||||
});
|
||||
}
|
||||
if (this.frm.fields_dict["items"].grid.get_field("cost_center")) {
|
||||
this.frm.set_query("cost_center", "items", function(doc) {
|
||||
return {
|
||||
filters: {
|
||||
"company": doc.company,
|
||||
"is_group": 0
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if (this.frm.fields_dict["items"].grid.get_field("expense_account")) {
|
||||
this.frm.set_query("expense_account", "items", function(doc) {
|
||||
return {
|
||||
filters: {
|
||||
"company": doc.company
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if(frappe.meta.get_docfield(this.frm.doc.doctype, "pricing_rules")) {
|
||||
this.frm.set_indicator_formatter('pricing_rule', function(doc) {
|
||||
|
||||
Reference in New Issue
Block a user