diff --git a/migrations/050_beleg_vorschau_einstellungen.sql b/migrations/050_beleg_vorschau_einstellungen.sql new file mode 100644 index 0000000..6aafc58 --- /dev/null +++ b/migrations/050_beleg_vorschau_einstellungen.sql @@ -0,0 +1,3 @@ +ALTER TABLE company_settings + ADD COLUMN IF NOT EXISTS beleg_vorschau_breite INT NOT NULL DEFAULT 200, + ADD COLUMN IF NOT EXISTS beleg_vorschau_hoehe INT NOT NULL DEFAULT 300; diff --git a/src/Models/Setting.php b/src/Models/Setting.php index 289b763..d724f24 100644 --- a/src/Models/Setting.php +++ b/src/Models/Setting.php @@ -41,7 +41,8 @@ class Setting mail_from_name=?, mail_from_email=?, mail_subject_template=?, mail_body_template=?, logo_max_width=?, logo_max_height=?, - logo_position=?, logo_margin_side=?, logo_margin_top=? + logo_position=?, logo_margin_side=?, logo_margin_top=?, + beleg_vorschau_breite=?, beleg_vorschau_hoehe=? WHERE id=1', [ $data['firma'] ?? '', @@ -86,6 +87,8 @@ class Setting $logoPosition, max(0, (int)($data['logo_margin_side'] ?? 75)), max(0, (int)($data['logo_margin_top'] ?? 6)), + max(50, (int)($data['beleg_vorschau_breite'] ?? 200)), + max(50, (int)($data['beleg_vorschau_hoehe'] ?? 300)), ] ); } diff --git a/src/Views/bank/show.php b/src/Views/bank/show.php index 59f41c6..6905b52 100644 --- a/src/Views/bank/show.php +++ b/src/Views/bank/show.php @@ -1,11 +1,16 @@ View::h($v); $fmt = fn($v) => View::formatMoney($v); $wert = (float)$transaction['wert']; $isPlus = $wert >= 0; $color = $isPlus ? 'var(--color-success)' : 'var(--color-danger)'; + +$settings = Setting::get(); +$vorschauBreite = (int)($settings['beleg_vorschau_breite'] ?? 200); +$vorschauHoehe = (int)($settings['beleg_vorschau_hoehe'] ?? 300); ?> @@ -101,7 +106,9 @@ $color = $isPlus ? 'var(--color-success)' : 'var(--color-danger)';
Größe der Vorschau beim Hover über Beleg-Links in der Bank-Buchungs-Maske.
+