PWA (neue Dateien): - Vollständige Progressive Web App mit Token-basierter Auth - 4 Swipe-Panels: Alle STZ, Stundenzettel, Produktliste, Lieferauflistung - Kundensuche, Leistungen-Accordion, Mehraufwand-Sektion - Produkt-Übernahme aus Auftrag + Mehraufwand in STZ - Service Worker, Manifest, App-Icons für Installation Desktop-Änderungen: - Produktliste: Checkboxen immer sichtbar (außer bereits auf STZ) - Lieferauflistung: Vereinfachte Ansicht (nur Verbaut-Spalte) - Admin: PWA-Link in Einstellungen - Sprachdatei: PWA-Übersetzungen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
1.7 KiB
SQL
Executable file
37 lines
1.7 KiB
SQL
Executable file
-- ============================================================================
|
|
-- Stundenzettel Tracking
|
|
-- Gesamtübersicht der Mengen pro Auftrag (aggregiert über alle Stundenzettel)
|
|
-- ============================================================================
|
|
|
|
CREATE TABLE llx_stundenzettel_tracking (
|
|
rowid INTEGER AUTO_INCREMENT PRIMARY KEY,
|
|
fk_commande INTEGER NOT NULL, -- Auftrag
|
|
|
|
-- Produkt-Referenz
|
|
fk_product INTEGER DEFAULT NULL, -- Produkt-ID
|
|
fk_commandedet INTEGER DEFAULT NULL, -- Original-Zeile aus Auftrag
|
|
fk_manager_line INTEGER DEFAULT NULL, -- Zeile aus llx_facture_lines_manager
|
|
|
|
-- Produktdaten
|
|
product_ref VARCHAR(128),
|
|
product_label VARCHAR(255),
|
|
|
|
-- Mengen
|
|
qty_ordered DECIMAL(24,8) DEFAULT 0, -- Bestellte Menge (aus Auftrag)
|
|
qty_delivered DECIMAL(24,8) DEFAULT 0, -- Gelieferte Menge (Summe aller Stundenzettel)
|
|
qty_added DECIMAL(24,8) DEFAULT 0, -- Zusätzlich hinzugefügt
|
|
qty_removed DECIMAL(24,8) DEFAULT 0, -- Entfallen/Storniert
|
|
qty_remaining DECIMAL(24,8) DEFAULT 0, -- Verbleibend (berechnet)
|
|
|
|
-- Status: 'open' = offen, 'partial' = teilweise, 'done' = erledigt
|
|
status VARCHAR(20) DEFAULT 'open',
|
|
|
|
-- Technisch
|
|
tms TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
-- Indizes
|
|
UNIQUE KEY uk_tracking_line (fk_commande, fk_commandedet),
|
|
INDEX idx_tracking_commande (fk_commande),
|
|
INDEX idx_tracking_product (fk_product),
|
|
INDEX idx_tracking_status (status)
|
|
) ENGINE=InnoDB;
|