Transactions

Double-Entry Transaction Lines

This table holds the individual debit and credit lines for every transaction in the system. Each row represents one leg of a double-entry transaction and is linked to a parent voucher.

Column Definitions

Column Data Type Description Constraints
idINTEGERPrimary key for the transaction line.PK, Auto-Increment
voucher_idINTEGERForeign key linking to the parent voucher.FK (vouchers.id)
account_idINTEGERForeign key linking to a specific ledger account.FK (ledger_account.id)
debitDECIMALThe debit amount for this line.NOT NULL, Default: 0
creditDECIMALThe credit amount for this line.NOT NULL, Default: 0

Relationships

  • Each transaction belongs to one Voucher via the voucher_id.
  • Each transaction affects one Ledger Account via the account_id.