All checks were successful
Deploy bericht / deploy (push) Successful in 1s
Phase 1.3 Seitenformat A4/A3/A5/Letter + Hoch/Quer: - Neue Spalten page_format, page_orientation in llx_bericht - Bericht-Meta zeigt Format + Orientation Selects - Auto-Save via neuem ajax/save_meta.php - generate_pdf + preview_pdf nutzen die gewählten Werte - Bilder werden dynamisch via getPageWidth/getPageHeight skaliert (statt hardcoded 210x297 für A4) Phase 1.4 + 1.5 Schema-Vorbereitung: - Neue Tabelle llx_bericht_page_image für Multi-Image-Seiten - Spalten layout, image_scale, image_align in llx_bericht_page - DB-Migrationen im init() für bestehende Installationen (ALTER TABLE mit Error-Suppress) - Grid-Rendering im Editor/PDF folgt im nächsten Commit (siehe CLAUDE.md TODO) Phase 1.7 Tab "Berichte" auf Kundenkarte: - Neue Konstante BERICHT_TAB_ON_THIRDPARTY (default 1) - Tab-Definition in modBericht für 'thirdparty' Element - Neue Datei bericht_thirdparty.php - UNION-SQL über bericht JOIN commande/facture/propal mit fk_soc - Read-only flache Tabelle sortiert nach Datum - Pro Bericht: Quelle (Symbol + Ref-Link), Status, Öffnen/Zur Quelle Version-Bump 1.0.0 → 1.1.0, ChangeLog ergänzt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> [deploy]
20 lines
1.1 KiB
PHP
20 lines
1.1 KiB
PHP
<?php
|
|
/* Speichert Meta-Felder eines Berichts (Titel, Template, Format, Orientation).
|
|
* POST: berichtid, titel, template_odt, page_format, page_orientation, token
|
|
*/
|
|
require_once __DIR__.'/_inc.php';
|
|
|
|
global $db, $user;
|
|
if (!$user->hasRight('bericht', 'write')) bericht_ajax_fail('Permission denied', 403);
|
|
|
|
$berichtid = (int) ($_POST['berichtid'] ?? 0);
|
|
$bericht = new Bericht($db);
|
|
if ($bericht->fetch($berichtid) <= 0) bericht_ajax_fail('Bericht nicht gefunden', 404);
|
|
|
|
if (isset($_POST['titel'])) $bericht->titel = (string) $_POST['titel'];
|
|
if (isset($_POST['template_odt'])) $bericht->template_odt = (string) $_POST['template_odt'];
|
|
if (isset($_POST['page_format'])) $bericht->page_format = in_array($_POST['page_format'], array('A4','A3','A5','Letter'), true) ? $_POST['page_format'] : 'A4';
|
|
if (isset($_POST['page_orientation'])) $bericht->page_orientation = in_array($_POST['page_orientation'], array('P','L'), true) ? $_POST['page_orientation'] : 'P';
|
|
|
|
if ($bericht->update($user) > 0) bericht_ajax_ok();
|
|
bericht_ajax_fail($bericht->error ?: 'Update fehlgeschlagen');
|