Updated GL System , Updated user manual

This commit is contained in:
2026-06-08 10:55:42 -05:00
parent 63d767c6b0
commit 2a254489a3
6 changed files with 964 additions and 10 deletions

View File

@@ -416,6 +416,28 @@ function initialize() {
UNIQUE(entity_id, code)
);
CREATE TABLE IF NOT EXISTS gl_entries (
id INTEGER PRIMARY KEY AUTOINCREMENT,
entity_id INTEGER REFERENCES entities(id),
book_code TEXT NOT NULL,
entry_date TEXT NOT NULL,
fiscal_year INTEGER,
account TEXT NOT NULL,
account_type TEXT,
description TEXT,
reference TEXT,
debit REAL NOT NULL DEFAULT 0,
credit REAL NOT NULL DEFAULT 0,
asset_id INTEGER REFERENCES assets(id) ON DELETE SET NULL,
external_id TEXT,
source TEXT NOT NULL DEFAULT 'manual',
created_by INTEGER REFERENCES users(id),
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_gl_entries_scope ON gl_entries (entity_id, book_code, fiscal_year);
CREATE INDEX IF NOT EXISTS idx_gl_entries_extid ON gl_entries (entity_id, book_code, external_id);
CREATE TABLE IF NOT EXISTS alerts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
type TEXT NOT NULL,