epcqr/sql/update_1.5.0.sql
2026-01-29 20:37:59 +01:00

76 lines
2.1 KiB
SQL

-- Copyright (C) 2025 Eduard Wisch <data@data-it-solution.de>
--
-- 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.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see https://www.gnu.org/licenses/.
--
-- Update-Script für EPCQR-Modul Version 1.5.0
-- Fügt Extrafeld für lokalen QR-Code-Pfad hinzu
--
-- Extrafeld für QR-Code Dateipfad (für ODT-Integration)
-- Dieses Feld enthält den lokalen Dateipfad zum generierten QR-Code-Bild
INSERT INTO llx_extrafields (
name,
label,
type,
size,
elementtype,
fieldunique,
fieldrequired,
pos,
alwayseditable,
param,
enabled,
perms,
list,
totalizable,
printable,
langs,
help,
entity
) VALUES (
'qrcodepath',
'QR-Code Bildpfad (lokal)',
'varchar',
'255',
'facture',
0,
0,
900,
0,
'',
'1',
'',
'0',
0,
0,
NULL,
'Lokaler Pfad zur QR-Code-Bilddatei für ODT-Integration',
0
)
ON DUPLICATE KEY UPDATE
label = 'QR-Code Bildpfad (lokal)',
type = 'varchar',
size = '255';
-- Spalte in facture_extrafields anlegen (falls nicht vorhanden)
-- Diese Spalte speichert den tatsächlichen Wert für jede Rechnung
ALTER TABLE llx_facture_extrafields ADD COLUMN IF NOT EXISTS qrcodepath VARCHAR(255) DEFAULT NULL;
-- Hinweis: Die bestehenden Extrafelder 'qrcode' und 'qrcodepfad' bleiben
-- aus Kompatibilitätsgründen bestehen:
-- - qrcode: HTML-Version mit <img>-Tag
-- - qrcodepfad: URL zum QR-Code (alt: externer Service, neu: viewimage.php)
-- - qrcodepath: Lokaler Dateipfad (NEU, für ODT-Verarbeitung)