Vouchers

Financial Transaction Container

This table acts as a container for a single, complete financial transaction. Each voucher has a specific type (Payment, Receipt, etc.) and groups together all the related debit and credit entries.

Column Definitions

Column Data Type Description Constraints
id BIGINT Primary key for the voucher. PK, Auto-Increment
branch_id BIGINT (FK) References the branch this voucher belongs to. FK → branches.id, ON DELETE CASCADE
user_id BIGINT (FK) User who created the voucher. FK → users.id, ON DELETE CASCADE
voucher_date DATE The date of the voucher transaction. Nullable
voucher_type ENUM The type of voucher (Payment, Receipt, Journal, Contra). NOT NULL
voucher_number VARCHAR(255) System-generated unique voucher number. NOT NULL, UNIQUE
voucher_invoice VARCHAR(255) Reference invoice number (if applicable). Nullable
narration TEXT Detailed narration of the voucher transaction. Nullable
status TINYINT Status flag (1 = Active, 0 = Inactive). Default = 1

Relationships

  • A Voucher has a one-to-many relationship with the transactions table. The id from this table is used as the voucher_id in transactions.