Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style

This commit is contained in:
2026-02-27 22:47:08 +01:00
committed by erik
parent 5a70f775f1
commit 93faae5cc8
1463 changed files with 306917 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
-- Migration: Storno-Rechnungen + Mahnungen
-- Anwendung: psql -U pirp_user -d pirp -f tools/migrate_storno_mahnung.sql
-- Storno: zwei neue Spalten in invoices
ALTER TABLE invoices
ADD COLUMN IF NOT EXISTS storno_of INTEGER REFERENCES invoices(id) ON DELETE SET NULL,
ADD COLUMN IF NOT EXISTS is_storno BOOLEAN NOT NULL DEFAULT FALSE;
-- Mahnungen: neue Tabelle
CREATE TABLE IF NOT EXISTS mahnungen (
id SERIAL PRIMARY KEY,
invoice_id INTEGER NOT NULL REFERENCES invoices(id) ON DELETE CASCADE,
mahnung_date DATE NOT NULL,
level INTEGER NOT NULL DEFAULT 1 CHECK (level IN (1,2,3)),
fee_amount NUMERIC(12,2) NOT NULL DEFAULT 0,
pdf_path TEXT,
created_at TIMESTAMPTZ DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_mahnungen_invoice_id ON mahnungen(invoice_id);