'Tió', 'NOEL' => 'Nadal', 'ROIS' => 'Reis', ]; $occasionIcons = [ 'TIO' => '/modules/christmas-list/assets/img/tio.png', 'NOEL' => '/modules/christmas-list/assets/img/santa.png', 'ROIS' => '/modules/christmas-list/assets/img/reis.png', ]; // Récup toutes les données pour l’année $stmt = $pdo->prepare(" SELECT * FROM pf_christmas_gifts WHERE year = :year ORDER BY adult_name, child_name, occasion, created_at "); $stmt->execute(['year' => $year]); $gifts = $stmt->fetchAll(PDO::FETCH_ASSOC); // Si aucune donnée, on évite les notices plus bas if (!$gifts) { $gifts = []; } // 1) Indexer par [occasion][child][adult] pour l'affichage par fête $byOccasion = []; // [occasion][child][adult][] = gifts foreach ($gifts as $gift) { $o = $gift['occasion']; $c = $gift['child_name']; $a = $gift['adult_name']; $byOccasion[$o][$c][$a][] = $gift; } ?>
No hi ha cap regal registrat per a = htmlspecialchars($year) ?>.
$occLabel): ?>|
= htmlspecialchars($adultName) ?>
= number_format($totals[$adultName], 0, ',', ' ') ?> €
|
||
|---|---|---|
| — | — | — |
|
(pagat per = htmlspecialchars($payer) ?>)
—
|
| Adult | Infant | Festa | Total |
|---|---|---|---|
| = htmlspecialchars($row['adult_name']) ?> | = htmlspecialchars($row['child_name']) ?> | = htmlspecialchars($allOccasionLabels[$row['occasion']] ?? $row['occasion']) ?> | = number_format($row['total'], 0, ',', ' ') ?> € |
| Deutor ↓ Creditor → | = htmlspecialchars($p) ?> |
|---|---|
| = htmlspecialchars($debtor) ?> | 0 ? 'cl-mtx-owe' : 'cl-mtx-empty'); ?>= $display ?> |
Cap deute pendent.
| Adult | Infant | Festa | Regal | € | Enllaç |
|---|---|---|---|---|---|
| = htmlspecialchars($g['adult_name']) ?> | = htmlspecialchars($g['child_name']) ?> | = htmlspecialchars($allOccasionLabels[$g['occasion']] ?? $g['occasion']) ?> | = htmlspecialchars($g['gift_description']) ?> | = number_format($g['amount'], 0, ',', ' ') ?> | 🔗 |