mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
[fix] [minor] get_query of tax account
This commit is contained in:
@@ -128,16 +128,14 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.set_query("account_head", "purchase_tax_details", function(doc) {
|
||||
return {
|
||||
filters: [
|
||||
["Account", "group_or_ledger", "=", "Ledger"],
|
||||
["Account", "docstatus", "!=", 2],
|
||||
["Account", "account_type", "in", "Tax, Chargeable, Expense Account"],
|
||||
["Account", "is_pl_account", "=", "Yes"],
|
||||
["Account", "debit_or_credit", "=", "Debit"],
|
||||
["Account", "company", "=", doc.company]
|
||||
]
|
||||
}
|
||||
return {
|
||||
query: "controllers.queries.tax_account_query",
|
||||
filters: {
|
||||
"account_type": ["Tax", "Chargeable", "Expense Account"],
|
||||
"debit_or_credit": "Debit",
|
||||
"company": doc.company
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
cur_frm.fields_dict['purchase_tax_details'].grid.get_field("cost_center").get_query = function(doc) {
|
||||
|
||||
@@ -139,11 +139,12 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
|
||||
|
||||
cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
filters:[
|
||||
['Account', 'group_or_ledger', '=', 'Ledger'],
|
||||
['Account', 'account_type', 'in', 'Tax, Chargeable, Income Account'],
|
||||
['Account', 'company', '=', doc.company]
|
||||
]
|
||||
query: "controllers.queries.tax_account_query",
|
||||
filters: {
|
||||
"account_type": ["Tax", "Chargeable", "Income Account"],
|
||||
"debit_or_credit": "Credit",
|
||||
"company": doc.company
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user