fix: Account filter in Process Deferred Accounting doctype
This commit is contained in:
parent
36b7bb0282
commit
9b681770d0
@ -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() {
|
||||
return {
|
||||
filters: {
|
||||
'company': frm.doc.company,
|
||||
'root_type': 'Liability',
|
||||
'root_type': frm.doc.type === 'Income' ? 'Liability' : 'Asset',
|
||||
'is_group': 0
|
||||
}
|
||||
};
|
||||
|
@ -60,6 +60,7 @@
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval: doc.type",
|
||||
"fieldname": "account",
|
||||
"fieldtype": "Link",
|
||||
"label": "Account",
|
||||
@ -73,9 +74,10 @@
|
||||
"reqd": 1
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-02-06 18:18:09.852844",
|
||||
"modified": "2020-09-03 18:07:02.463754",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Process Deferred Accounting",
|
||||
|
Loading…
x
Reference in New Issue
Block a user