mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: general ledger closing balance with accounts row
This commit is contained in:
@@ -272,10 +272,14 @@ export class GeneralLedgerTable extends R.compose(
|
||||
const closingBalanceWithSubaccounts =
|
||||
this.closingBalanceWithSubaccountsMapper(account);
|
||||
|
||||
// Appends the closing balance with sub-accounts row if the account
|
||||
// has children accounts and the node is define.
|
||||
const isAppendClosingSubaccounts = () =>
|
||||
account.children?.length > 0 && !!account.closingBalanceSubaccounts;
|
||||
|
||||
const children = R.compose(
|
||||
// Appends the closing balance with sub-accounts row if the account has children accounts.
|
||||
R.when(
|
||||
() => account.children?.length > 0,
|
||||
isAppendClosingSubaccounts,
|
||||
R.append(closingBalanceWithSubaccounts)
|
||||
),
|
||||
R.concat(R.defaultTo([], transactions)),
|
||||
|
||||
Reference in New Issue
Block a user