# BalancesContainer

## Extends

- `BalancesContainer`

### addBalancesContainer()

```ts
addBalancesContainer(container): BalancesContainer;
```

Adds an [[Account]] container to a [[Group]] container.

**NOTE**: Only for Group balance containers.

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `container` | `BalancesContainer` |

#### Returns

`BalancesContainer`

#### Inherited from

```ts
Bkper.BalancesContainer.addBalancesContainer
```

***

### createDataTable()

```ts
createDataTable(): BalancesDataTableBuilder;
```

Creates a BalancesDataTableBuilder to generate a two-dimensional array with all [[BalancesContainers]]

#### Returns

`BalancesDataTableBuilder`

#### Inherited from

```ts
Bkper.BalancesContainer.createDataTable
```

***

### getAccount()

```ts
getAccount(): Account;
```

The [[Account]] associated with this container

#### Returns

`Account`

#### Inherited from

```ts
Bkper.BalancesContainer.getAccount
```

***

### getAccountBalancesContainers()

```ts
getAccountBalancesContainers(): BalancesContainer[];
```

Gets all [[Account]] [[BalancesContainers]].

#### Returns

`BalancesContainer`[]

#### Inherited from

```ts
Bkper.BalancesContainer.getAccountBalancesContainers
```

***

### getBalances()

```ts
getBalances(): Balance[];
```

All [[Balances]] of the container

#### Returns

`Balance`[]

#### Inherited from

```ts
Bkper.BalancesContainer.getBalances
```

***

### getBalancesContainer()

```ts
getBalancesContainer(name): BalancesContainer;
```

Gets a specific [[BalancesContainer]].

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `name` | `string` |

#### Returns

`BalancesContainer`

#### Inherited from

```ts
Bkper.BalancesContainer.getBalancesContainer
```

***

### getBalancesContainers()

```ts
getBalancesContainers(): BalancesContainer[];
```

Gets all child [[BalancesContainers]].

**NOTE**: Only for Group balance containers. Accounts returns null.

#### Returns

`BalancesContainer`[]

#### Inherited from

```ts
Bkper.BalancesContainer.getBalancesContainers
```

***

### getBalancesReport()

```ts
getBalancesReport(): BalancesReport;
```

The parent BalancesReport of the container

#### Returns

`BalancesReport`

#### Inherited from

```ts
Bkper.BalancesContainer.getBalancesReport
```

***

### getCumulativeBalance()

```ts
getCumulativeBalance(): Amount;
```

The cumulative balance to the date.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeBalance
```

***

### getCumulativeBalanceRaw()

```ts
getCumulativeBalanceRaw(): Amount;
```

The cumulative raw balance to the date.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeBalanceRaw
```

***

### getCumulativeBalanceRawText()

```ts
getCumulativeBalanceRawText(): string;
```

The cumulative raw balance formatted according to [[Book]] decimal format and fraction digits.

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeBalanceRawText
```

***

### getCumulativeBalanceText()

```ts
getCumulativeBalanceText(): string;
```

The cumulative balance formatted according to [[Book]] decimal format and fraction digits.

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeBalanceText
```

***

### getCumulativeCredit()

```ts
getCumulativeCredit(): Amount;
```

The cumulative credit to the date.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeCredit
```

***

### getCumulativeCreditText()

```ts
getCumulativeCreditText(): string;
```

The cumulative credit formatted according to [[Book]] decimal format and fraction digits.

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeCreditText
```

***

### getCumulativeDebit()

```ts
getCumulativeDebit(): Amount;
```

The cumulative debit to the date.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeDebit
```

***

### getCumulativeDebitText()

```ts
getCumulativeDebitText(): string;
```

The cumulative credit formatted according to [[Book]] decimal format and fraction digits.

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getCumulativeDebitText
```

***

### getDepth()

```ts
getDepth(): number;
```

The depth in the parent chain up to the root.

#### Returns

`number`

#### Inherited from

```ts
Bkper.BalancesContainer.getDepth
```

***

### getGroup()

```ts
getGroup(): Group;
```

The [[Group]] associated with this container

#### Returns

`Group`

#### Inherited from

```ts
Bkper.BalancesContainer.getGroup
```

***

### getName()

```ts
getName(): string;
```

The [[Account]] or [[Group]] name

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getName
```

***

### getNormalizedName()

```ts
getNormalizedName(): string;
```

The [[Account]] or [[Group]] name without spaces or special characters.

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getNormalizedName
```

***

### getParent()

```ts
getParent(): BalancesContainer;
```

The parent BalanceContainer

#### Returns

`BalancesContainer`

#### Inherited from

```ts
Bkper.BalancesContainer.getParent
```

***

### getPeriodBalance()

```ts
getPeriodBalance(): Amount;
```

The balance on the date period.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodBalance
```

***

### getPeriodBalanceRaw()

```ts
getPeriodBalanceRaw(): Amount;
```

The raw balance on the date period.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodBalanceRaw
```

***

### getPeriodBalanceRawText()

```ts
getPeriodBalanceRawText(): string;
```

The raw balance on the date period formatted according to [[Book]] decimal format and fraction digits

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodBalanceRawText
```

***

### getPeriodBalanceText()

```ts
getPeriodBalanceText(): string;
```

The balance on the date period formatted according to [[Book]] decimal format and fraction digits

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodBalanceText
```

***

### getPeriodCredit()

```ts
getPeriodCredit(): Amount;
```

The credit on the date period.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodCredit
```

***

### getPeriodCreditText()

```ts
getPeriodCreditText(): string;
```

The credit on the date period formatted according to [[Book]] decimal format and fraction digits

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodCreditText
```

***

### getPeriodDebit()

```ts
getPeriodDebit(): Amount;
```

The debit on the date period.

#### Returns

`Amount`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodDebit
```

***

### getPeriodDebitText()

```ts
getPeriodDebitText(): string;
```

The debit on the date period formatted according to [[Book]] decimal format and fraction digits

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getPeriodDebitText
```

***

### getProperties()

```ts
getProperties(): object;
```

Gets the custom properties stored in this Account or Group.

#### Returns

`object`

#### Inherited from

```ts
Bkper.BalancesContainer.getProperties
```

***

### getProperty()

```ts
getProperty(...keys): string;
```

Gets the property value for given keys. First property found will be retrieved

#### Parameters

| Parameter | Type |
| :------ | :------ |
| ...`keys` | `string`[] |

#### Returns

`string`

#### Inherited from

```ts
Bkper.BalancesContainer.getProperty
```

***

### getPropertyKeys()

```ts
getPropertyKeys(): string[];
```

Gets the custom properties keys stored in the associated [[Account]] or [[Group]].

#### Returns

`string`[]

#### Inherited from

```ts
Bkper.BalancesContainer.getPropertyKeys
```

***

### hasGroupBalances()

```ts
hasGroupBalances(): boolean;
```

Tell if the balance container is from a parent group

#### Returns

`boolean`

#### Inherited from

```ts
Bkper.BalancesContainer.hasGroupBalances
```

***

### isCredit()

```ts
isCredit(): boolean;
```

Gets the credit nature of the BalancesContainer, based on [[Account]] or [[Group]].

For [[Account]], the credit nature will be the same as the one from the Account

For [[Group]], the credit nature will be the same, if all accounts containing on it has the same credit nature. False if mixed.

#### Returns

`boolean`

#### Inherited from

```ts
Bkper.BalancesContainer.isCredit
```

***

### isFromAccount()

```ts
isFromAccount(): boolean;
```

Tell if this balance container if from an [[Account]]

#### Returns

`boolean`

#### Inherited from

```ts
Bkper.BalancesContainer.isFromAccount
```

***

### isFromGroup()

```ts
isFromGroup(): boolean;
```

Tell if this balance container if from a [[Group]]

#### Returns

`boolean`

#### Inherited from

```ts
Bkper.BalancesContainer.isFromGroup
```

***

### isPermanent()

```ts
isPermanent(): boolean;
```

Tell if this balance container is permament, based on the [[Account]] or [[Group]].

Permanent are the ones which final balance is relevant and keep its balances over time.

They are also called [Real Accounts](http://en.wikipedia.org/wiki/Account_(accountancy)#Based_on_periodicity_of_flow)

Usually represents assets or liabilities, capable of being perceived by the senses or the mind, like bank accounts, money, debts and so on.

#### Returns

`boolean`

True if its a permanent Account

#### Inherited from

```ts
Bkper.BalancesContainer.isPermanent
```

***

### removeBalancesContainer()

```ts
removeBalancesContainer(container): BalancesContainer;
```

Removes an [[Account]] container from a [[Group]] container.

**NOTE**: Only for Group balance containers.

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `container` | `BalancesContainer` |

#### Returns

`BalancesContainer`

#### Inherited from

```ts
Bkper.BalancesContainer.removeBalancesContainer
```
