-- Copyright (C) 2026 Eduard Wisch -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- Mahnstufen-Konfiguration (3-stufig nach BGB ยง288) CREATE TABLE llx_mahnung_stufe ( rowid INTEGER AUTO_INCREMENT PRIMARY KEY, entity INTEGER DEFAULT 1 NOT NULL, stufe TINYINT NOT NULL, label VARCHAR(60) NOT NULL, frist_tage INTEGER DEFAULT 0 NOT NULL, neue_frist_tage INTEGER DEFAULT 7 NOT NULL, mahngebuehr_b2c DOUBLE(10,2) DEFAULT 0, mahngebuehr_b2b DOUBLE(10,2) DEFAULT 0, pauschale_b2b_einmalig TINYINT DEFAULT 0, zinssatz_b2c_uebersteuern DECIMAL(5,4), zinssatz_b2b_uebersteuern DECIMAL(5,4), versandart_default VARCHAR(20) DEFAULT 'pdf', email_subject VARCHAR(255), email_body TEXT, pdf_intro TEXT, active TINYINT DEFAULT 1 NOT NULL, datec DATETIME, tms TIMESTAMP ) ENGINE=InnoDB; -- Default-Stufen (idempotent: INSERT IGNORE wegen UNIQUE entity+stufe) INSERT IGNORE INTO llx_mahnung_stufe (entity, stufe, label, frist_tage, neue_frist_tage, mahngebuehr_b2c, mahngebuehr_b2b, pauschale_b2b_einmalig, versandart_default, datec) VALUES (1, 1, 'Zahlungserinnerung', 7, 14, 0.00, 0.00, 1, 'pdf', NOW()), (1, 2, '1. Mahnung', 14, 10, 5.00, 5.00, 0, 'pdf', NOW()), (1, 3, 'Letzte Mahnung', 10, 7, 10.00, 10.00, 0, 'pdf', NOW());