fix calcul voyage
Deploy to Pacha Family / deploy (push) Failing after 3s

This commit is contained in:
2026-05-06 21:46:03 +02:00
parent 8792e44f69
commit 29f341b052
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -22,8 +22,7 @@ if ($selectedYear !== 'all') {
$sql = "
SELECT h.*,
(COALESCE(h.budget_food, 0) + COALESCE(h.budget_extra, 0) + COALESCE(SUM(hi.amount), 0)) as total_cost,
((SELECT COALESCE(SUM(ABS(amount)), 0) FROM pf_expenses WHERE holiday_id = h.id) +
(SELECT COALESCE(SUM(amount), 0) FROM pf_holidays_items WHERE holiday_id = h.id AND is_paid = 1)) as total_paid,
(SELECT COALESCE(SUM(amount), 0) FROM pf_holidays_items WHERE holiday_id = h.id AND is_paid = 1) as total_paid,
(SELECT COALESCE(SUM(amount), 0) FROM pf_savings WHERE holiday_id = h.id) as total_saved
FROM pf_holidays h
LEFT JOIN pf_holidays_items hi ON h.id = hi.holiday_id