mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: getChildren in CoA
This commit is contained in:
parent
32bed65ca2
commit
7baa7a7c59
@ -120,25 +120,21 @@ export default {
|
||||
|
||||
return c;
|
||||
},
|
||||
async getChildren(parent = '') {
|
||||
async getChildren(parent = null) {
|
||||
const children = await frappe.db.getAll({
|
||||
doctype: this.doctype,
|
||||
filters: {
|
||||
parentAccount: parent
|
||||
},
|
||||
fields: [
|
||||
'name',
|
||||
'parentAccount',
|
||||
'isGroup',
|
||||
'balance',
|
||||
'rootType',
|
||||
'0 as expanded'
|
||||
],
|
||||
fields: ['name', 'parentAccount', 'isGroup', 'balance', 'rootType'],
|
||||
orderBy: 'name',
|
||||
order: 'asc'
|
||||
});
|
||||
|
||||
return children;
|
||||
return children.map(d => {
|
||||
d.expanded = 0;
|
||||
return d;
|
||||
});
|
||||
},
|
||||
updateBalance(balance) {
|
||||
this.root.balance += balance;
|
||||
|
Loading…
Reference in New Issue
Block a user