fix epargne
Deploy HouseHub / deploy (push) Successful in 1s

This commit is contained in:
2026-06-17 13:04:03 +02:00
parent 96df90d372
commit e73524b2ae
2 changed files with 66 additions and 47 deletions
+5 -4
View File
@@ -230,9 +230,9 @@ while ($item = $stmt->fetch(PDO::FETCH_ASSOC)) {
$absAmount = abs((float)$item['amount']);
$amt = ($item['type'] === 'Annuel') ? $absAmount / 12 : $absAmount;
$name = trim($item['name']);
$catCode = $item['category']; // Ex: FIXED, FMCG, INCOME...
$catCode = $item['category']; // Ex: FIXED, FMCG, INCOME ou income
$isIncome = (isset($categoriesConfig[$catCode]) && $categoriesConfig[$catCode]['db_type'] === 'Income');
$isIncome = (strtoupper($catCode) === 'INCOME' || (float)$item['amount'] > 0);
if ($isIncome) {
$incomeList[] = ['id' => $item['id'], 'name' => $name, 'amount' => $absAmount];
@@ -621,10 +621,11 @@ $monthName = $monthNames[(int)$viewM] . ' ' . $viewY;
</select>
</div>
<!-- 🛠️ FIX VISUEL : On demande la personne concernée (Bénéficiaire) -->
<div class="form-group" id="blockInputIncome" style="margin-bottom:15px; display:none;">
<label class="pf-label"><?= tr('bud_expected_income') ?></label>
<label class="pf-label"><?= tr('bud_beneficiary') ?></label>
<select name="budget_item_id" id="incomeSelect" class="pf-input" disabled>
<option value=""><?= tr('bud_select_beneficiary') ?> </option>
<option value=""><?= tr('gift_filter_all_adults') ?></option>
<?php foreach ($incomeList as $inc): ?><option value="<?= $inc['id'] ?>"><?= htmlspecialchars($inc['name']) ?></option><?php endforeach; ?>
</select>
</div>