DebtWriteOff
Updated
A debt write-off removes a customer receivable or a supplier payable without cash. A reason is mandatory. It does not move stock or tax.
| Kind | Document |
| Module | Settlement |
| Menu | Settlements → Documents → Debt write-offs |
| State change | Command |
| Movements | Posting script on Written off |
Fields#
| Field | Caption | Points at |
|---|---|---|
ID |
Number | number sequence |
LegalEntity |
Legal entity | LegalEntity, required |
Side |
Side | string: Receivable or Payable |
Customer |
Customer | Customer; required when Side is Receivable |
SalesContract |
Sales contract | SalesContract; required when Side is Receivable |
ReceivableBasis |
Receivable basis | the order whose receivable is written off; empty means the advance slice |
Supplier |
Supplier | Supplier; required when Side is Payable |
PayableBasis |
Payable basis | the purchase order whose payable is written off; empty means the advance slice |
Amount |
Amount | money, must be greater than zero |
Reason |
Reason | string, 200; the command refuses empty |
Notes |
Notes | string, 1000 |
SupplierContract |
Supplier contract | SupplierContract |
Side is stored as Receivable or Payable. Empty Supplier contract writes no contract slice. Amount is in the contract currency, which in this version must be the legal entity's currency.
Commands and states#
| State | Command | What happens |
|---|---|---|
| Draft | Write off debt | Written off. The chosen side's debt falls by Amount. |
Write off debt (WriteOff) is bound to Draft. Written off is read-only. The stored value is WrittenOff; the caption is Written off.
The command refuses an empty Reason, a Side other than Receivable or Payable, a foreign sales contract, or a supplier billed in another currency than the legal entity. The amount may not exceed the open balance on that side (by basis when a basis is set, else the whole customer × contract or supplier balance).
Registers#
On Written off, only the scripts for that Side write:
Receivable:
- Receivable minus Amount, by customer and sales contract (
DebtWriteOffReceivableTx). ReceivableByBasisminus Amount, by customer, sales contract, and receivable basis. An empty basis is the advance slice.
Payable:
- Payable minus Amount, by supplier. Legal entity is an analytic when the header has one. Supplier contract is an analytic when the header has one (
DebtWriteOffPayableTx). PayableByBasisminus Amount, by supplier and payable basis. An empty basis is the advance slice. Supplier contract is an analytic when the header has one.
GL when Legal entity is set and accounting settings exist (DebtWriteOffGLTx): receivable credits AR and debits the FX-loss account; payable debits payables and credits the FX-gain account. Those two settings are the nearest non-operating P&L leaves; there is no separate bad-debt account. A missing account or period writes no ledger legs; the debt still falls.