mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge pull request #23248 from deepeshgarg007/pda_account_filter
fix: Account filter in Process Deferred Accounting doctype
This commit is contained in:
@@ -10,13 +10,15 @@ frappe.ui.form.on('Process Deferred Accounting', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
if (frm.doc.company) {
|
type: function(frm) {
|
||||||
|
if (frm.doc.company && frm.doc.type) {
|
||||||
frm.set_query("account", function() {
|
frm.set_query("account", function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
'company': frm.doc.company,
|
'company': frm.doc.company,
|
||||||
'root_type': 'Liability',
|
'root_type': frm.doc.type === 'Income' ? 'Liability' : 'Asset',
|
||||||
'is_group': 0
|
'is_group': 0
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval: doc.type",
|
||||||
"fieldname": "account",
|
"fieldname": "account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Account",
|
"label": "Account",
|
||||||
@@ -73,9 +74,10 @@
|
|||||||
"reqd": 1
|
"reqd": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-02-06 18:18:09.852844",
|
"modified": "2020-09-03 18:07:02.463754",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Process Deferred Accounting",
|
"name": "Process Deferred Accounting",
|
||||||
|
|||||||
Reference in New Issue
Block a user