mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: full amount bold expenses transactions.
fix: bulk delete expenses transactions. fix: issue delete account node in tree.
This commit is contained in:
@@ -329,15 +329,16 @@ export function treeToList(
|
||||
idFieldKey = 'id',
|
||||
childrenFieldKey = 'children',
|
||||
nodeMapper = (node, depth) => node,
|
||||
nodeFilter = (node, depth) => true,
|
||||
},
|
||||
) {
|
||||
let depth = 0;
|
||||
|
||||
const walker = (tree) => {
|
||||
return tree.reduce(function (acc, o) {
|
||||
return tree.reduce((acc, o) => {
|
||||
depth += 1;
|
||||
|
||||
if (o[idFieldKey]) {
|
||||
if (o[idFieldKey] && nodeFilter(o, depth)) {
|
||||
acc.push(nodeMapper(o, depth));
|
||||
}
|
||||
if (o[childrenFieldKey]) {
|
||||
|
||||
Reference in New Issue
Block a user