BalancesDataTableBuilder
A BalancesDataTableBuilder is used to setup and build two-dimensional arrays containing balance information.
Implements
BalancesDataTableBuilder
Constructors
Constructor
new BalancesDataTableBuilder( book, balancesContainers, periodicity): BalancesDataTableBuilder;Parameters
| Parameter | Type |
|---|---|
book | Book |
balancesContainers | BalancesContainer[] |
periodicity | Periodicity |
Returns
BalancesDataTableBuilder
Methods
build()
build(): any[][];Builds an two-dimensional array with the balances.
Returns
any[][]
Implementation of
BalancesDataTableBuilder.buildexpanded()
expanded(expanded): BalancesDataTableBuilder;Defines whether Groups should expand its child accounts.
true to expand itself -1 to expand all subgroups -2 to expand all accounts 0 to expand nothing 1 to expand itself and its first level of children 2 to expand itself and its first two levels of children etc.
Parameters
| Parameter | Type |
|---|---|
expanded | number | boolean |
Returns
BalancesDataTableBuilder
This builder with respective expanded option, for chaining.
Implementation of
BalancesDataTableBuilder.expandedformatDates()
formatDates(format): BalancesDataTableBuilder;Defines whether the dates should be ISO formatted YYYY-MM-DD. E.g. 2025-01-01
Parameters
| Parameter | Type |
|---|---|
format | boolean |
Returns
BalancesDataTableBuilder
This builder with respective formatting option, for chaining.
Implementation of
BalancesDataTableBuilder.formatDatesformatValues()
formatValues(format): BalancesDataTableBuilder;Defines whether the value should be formatted based on decimal separator of the [[Book]].
Parameters
| Parameter | Type |
|---|---|
format | boolean |
Returns
BalancesDataTableBuilder
This builder with respective formatting option, for chaining.
Implementation of
BalancesDataTableBuilder.formatValueshiddenProperties()
hiddenProperties(include): BalancesDataTableBuilder;Defines whether to include hidden properties (keys ending with underscore ”_”). Only relevant when properties is enabled. Default is false — hidden properties are excluded.
Parameters
| Parameter | Type | Description |
|---|---|---|
include | boolean | Whether to include hidden properties |
Returns
BalancesDataTableBuilder
This builder with respective option, for chaining.
Implementation of
BalancesDataTableBuilder.hiddenPropertieshideDates()
hideDates(hide): BalancesDataTableBuilder;Defines whether the dates should be hidden for PERIOD or CUMULATIVE [[BalanceType]].
Parameters
| Parameter | Type |
|---|---|
hide | boolean |
Returns
BalancesDataTableBuilder
This builder with respective hide dates option, for chaining.
Implementation of
BalancesDataTableBuilder.hideDateshideNames()
hideNames(hide): BalancesDataTableBuilder;Defines whether the [[Accounts]] and [[Groups]] names should be hidden.
Parameters
| Parameter | Type |
|---|---|
hide | boolean |
Returns
BalancesDataTableBuilder
This builder with respective hide names option, for chaining.
Implementation of
BalancesDataTableBuilder.hideNamesperiod()
period(period): BalancesDataTableBuilder;Defines whether should force use of period balances for TOTAL [[BalanceType]].
Parameters
| Parameter | Type |
|---|---|
period | boolean |
Returns
BalancesDataTableBuilder
This builder with respective trial option, for chaining.
Implementation of
BalancesDataTableBuilder.periodproperties()
properties(include): BalancesDataTableBuilder;Defines whether include custom [[Accounts]] and [[Groups]] properties.
Parameters
| Parameter | Type |
|---|---|
include | boolean |
Returns
BalancesDataTableBuilder
This builder with respective include properties option, for chaining.
Implementation of
BalancesDataTableBuilder.propertiesraw()
raw(raw): BalancesDataTableBuilder;Defines whether should show raw balances, no matter the credit nature of the Account or Group.
Parameters
| Parameter | Type |
|---|---|
raw | boolean |
Returns
BalancesDataTableBuilder
This builder with respective trial option, for chaining.
Implementation of
BalancesDataTableBuilder.rawtransposed()
transposed(transposed): BalancesDataTableBuilder;Defines whether should rows and columns should be transposed.
For TOTAL [[BalanceType]], the transposed table looks like:
_____________________________ | Expenses | Income | ... | | -4568.23 | 5678.93 | ... | |___________|_________|_______|Two rows, and each [[Account]] or [[Group]] per column.
For PERIOD or CUMULATIVE [[BalanceType]], the transposed table will be a time table, and the format looks like:
_______________________________________________________________ | | Expenses | Income | ... | ... | | 15/01/2014 | -2345.23 | 3452.93 | ... | ... | | 15/02/2014 | -2345.93 | 3456.46 | ... | ... | | 15/03/2014 | -2456.45 | 3567.87 | ... | ... | | ... | ... | ... | ... | ... | |____________|____________|____________|____________|___________|First column will be each Date, and one column for each [[Account]] or [[Group]].
Parameters
| Parameter | Type |
|---|---|
transposed | boolean |
Returns
BalancesDataTableBuilder
This builder with respective transposed option, for chaining.
Implementation of
BalancesDataTableBuilder.transposedtrial()
trial(trial): BalancesDataTableBuilder;Defines whether should split TOTAL [[BalanceType]] into debit and credit.
Parameters
| Parameter | Type |
|---|---|
trial | boolean |
Returns
BalancesDataTableBuilder
This builder with respective trial option, for chaining.
Implementation of
BalancesDataTableBuilder.trialtype()
type(type): BalancesDataTableBuilder;Fluent method to set the [[BalanceType]] for the builder.
Parameters
| Parameter | Type | Description |
|---|---|---|
type | BalanceType | The type of balance for this data table For TOTAL [[BalanceType]], the table format looks like: `_____________________ |
Returns
BalancesDataTableBuilder
This builder with respective balance type, for chaining.
Implementation of
BalancesDataTableBuilder.type