Library
Closing Balances
Zero a balance and move the net amount to another balance.
Closing a ledger balance means to calculate the net balance of a balance, and credit or debit the resulting amount to zero the balance and move it to another ledger balance.
You can find the net balance of a ledger balance by viewing the balance field in its record. If it is negative, it needs a credit to zero the balance, and if it is positive, it needs a debit to zero the balance.
Consider the following balances:
| Ledger balance | currency | balance | credit_balance | debit_balance |
|---|---|---|---|---|
| A | USD | 400 | 500 | 100 |
| B | USD | -300 | 600 | 900 |
To close the ledger balances above:
| Ledger balance | currency | Amount received | Amount deducted |
|---|---|---|---|
| A | USD | 0 | 400 |
| B | USD | 300 | 0 |
This will close out the ledger balances and you can prevent them from participating in any subsequent transactions.