-- Copyright (C) 2026 Eduard Wisch
-- Table for USt-Voranmeldung Perioden

CREATE TABLE llx_steuer_ustva (
    rowid INTEGER AUTO_INCREMENT PRIMARY KEY,
    jahr INTEGER NOT NULL,
    periode VARCHAR(10) NOT NULL,
    periode_typ VARCHAR(10) NOT NULL,
    kz81 DECIMAL(24,8) DEFAULT 0,
    kz86 DECIMAL(24,8) DEFAULT 0,
    kz35 DECIMAL(24,8) DEFAULT 0,
    kz36 DECIMAL(24,8) DEFAULT 0,
    kz41 DECIMAL(24,8) DEFAULT 0,
    kz44 DECIMAL(24,8) DEFAULT 0,
    kz66 DECIMAL(24,8) DEFAULT 0,
    kz61 DECIMAL(24,8) DEFAULT 0,
    kz67 DECIMAL(24,8) DEFAULT 0,
    ust_summe DECIMAL(24,8) DEFAULT 0,
    vst_summe DECIMAL(24,8) DEFAULT 0,
    zahllast DECIMAL(24,8) DEFAULT 0,
    status TINYINT(4) DEFAULT 0,
    uebermittelt_am DATE DEFAULT NULL,
    note_private TEXT,
    date_creation DATETIME,
    tms TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    fk_user_creat INTEGER,
    entity INTEGER DEFAULT 1,
    UNIQUE KEY uk_periode (jahr, periode, entity)
) ENGINE=InnoDB;
