DebtOpening
Updated
A debt opening balance is one line of customer or supplier debt carried over from a predecessor system. It does not recognise revenue, stock, or tax. Ledger opening balances are loaded separately as a trial balance; this document writes no GL.
| Kind | Document |
| Module | Settlement |
| Menu | Settlements → Documents → Debt opening balances |
| State change | Command |
| Movements | Posting script on Opened |
Fields#
| Field | Caption | Points at |
|---|---|---|
ID |
Number | number sequence |
LegalEntity |
Legal entity | LegalEntity, required |
Side |
Side | string: Receivable or Payable, required |
Customer |
Customer | Customer; required when Side is Receivable |
SalesContract |
Sales contract | SalesContract; required when Side is Receivable |
Supplier |
Supplier | Supplier; required when Side is Payable |
Basis |
Basis | the order (or a legacy order key) the balance belongs to; empty means the advance slice |
Amount |
Amount | money; positive is an open debt, negative is an advance; zero is refused |
OpeningDate |
Opening date | date, required |
Reason |
Reason | string, 200 |
Notes |
Notes | string, 1000 |
SupplierContract |
Supplier contract | SupplierContract |
Side is stored as Receivable or Payable. Empty Supplier contract writes no contract slice. Unlike an offset, the command does not check the amount against an open balance: it creates the balance. One functional currency only.
Commands and states#
| State | Command | What happens |
|---|---|---|
| Draft | Open balance | Opened. Receivable or payable rises by Amount. |
Open balance (OpenBalance) is bound to Draft. Opened is read-only. The stored captions match the names: Draft, Opened.
The command refuses Amount zero, a Side other than Receivable or Payable, an opening date before 1902, a foreign sales contract, or a supplier billed in another currency than the legal entity.
Registers#
On Opened, only the scripts for that Side write. There is no GL script.
Receivable (DebtOpeningReceivableTx):
- Receivable plus Amount, by customer and sales contract.
ReceivableByBasisplus Amount, by customer, sales contract, and basis. An empty basis is the advance slice.
Payable (DebtOpeningPayableTx):
- Payable plus Amount, by supplier. Legal entity is an analytic when the header has one. Supplier contract is an analytic when the header has one.
PayableByBasisplus Amount, by supplier and basis. An empty basis is the advance slice. Supplier contract is an analytic when the header has one.