mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
- fix: store children accounts with Redux store.
- fix: store expense payment date with transactions. - fix: Total assets, liabilities and equity on balance sheet. - tweaks: dashboard content and sidebar style. - fix: reset form with contact list on journal entry form. - feat: Add hints to filter accounts in financial statements.
This commit is contained in:
@@ -57,6 +57,19 @@ function log(text) {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
function getDeepValue(prop, obj) {
|
||||
if (!Object.keys(obj).length) { return []; }
|
||||
|
||||
return Object.entries(obj).reduce((acc, [key, val]) => {
|
||||
if (key === prop) {
|
||||
acc.push(val);
|
||||
} else {
|
||||
acc.push(Array.isArray(val) ? val.map(getIds).flat() : getIds(val));
|
||||
}
|
||||
return acc.flat();
|
||||
}, []);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
initTenantKnex,
|
||||
initSystemKnex,
|
||||
@@ -64,4 +77,5 @@ module.exports = {
|
||||
exit,
|
||||
success,
|
||||
log,
|
||||
getDeepValue,
|
||||
}
|
||||
Reference in New Issue
Block a user