query("SELECT reference_id, content FROM pf_notes WHERE note_type = 'month_config'"); while ($row = $stmtNotes->fetch(PDO::FETCH_ASSOC)) { $parts = explode('-', $row['reference_id']); if (count($parts) == 2) { $mKey = $parts[1] . '-' . $parts[0] . '-01'; $cycleConfigs[$mKey] = json_decode($row['content'], true); } } ?>
prepare("SELECT month_date, category, amount FROM pf_savings WHERE owner = ? ORDER BY month_date DESC"); $stmt->execute([$currentOwner]); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $data = []; $months = []; $allCategories = []; foreach ($rows as $row) { $m = $row['month_date']; $cat = $row['category']; $val = $row['amount']; $data[$m][$cat] = $val; if (!in_array($m, $months)) $months[] = $m; if ($cat !== 'TOTAL_BANQUE' && !in_array($cat, $allCategories)) $allCategories[] = $cat; } $months = array_slice($months, 0, 7); sort($allCategories); // Définition de la classe couleur selon le propriétaire $ownerTextClass = ''; if ($currentOwner === 'Alex') $ownerTextClass = 'txt-alex'; elseif ($currentOwner === 'Laia') $ownerTextClass = 'txt-laia'; else $ownerTextClass = 'txt-global'; // Pour Pol et Pep (ou autre) ?>

Aucune donnée pour .

Poste / Mois
Dès le $cStart"; } ?>
Total Banque
Extra

Saisir un mois

Ventilation

Utilisez l'ajustement (+/-) pour recalculer automatiquement.
Catégorie
Actuel
Ajust (+/-)
Nouveau