Gesamtguthaben eingefügt

This commit is contained in:
p3t3rp1Lz 2026-04-01 18:48:56 +02:00
parent f3f349151b
commit f0b4ea3ea1

View File

@ -27,6 +27,12 @@
$row = $stmt->fetch(PDO::FETCH_ASSOC); $row = $stmt->fetch(PDO::FETCH_ASSOC);
$restguthaben = $row ? $row['restguthaben'] : 0; $restguthaben = $row ? $row['restguthaben'] : 0;
$monat = $row ? $row['name'] : ''; $monat = $row ? $row['name'] : '';
$stmt = $pdo->query("SELECT SUM (kontostand) AS gesamtguthaben
FROM konto
WHERE id IN (1, 2, 3, 4);");
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$gesamtGuthaben = $row ? $row['gesamtguthaben'] : 0;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@ -63,7 +69,6 @@
<?= $y['kontoinhaber'] ?> <?= $y['kontoinhaber'] ?>
</p> </p>
</div> </div>
<div class="kontoübersicht" id="containerInnenRechts"> <div class="kontoübersicht" id="containerInnenRechts">
<p class="ausgabe" id="kontostand"> <p class="ausgabe" id="kontostand">
<?= number_format($y['kontostand'], 2, ",", ".") ?> <?= number_format($y['kontostand'], 2, ",", ".") ?>
@ -71,6 +76,21 @@
</div> </div>
</a> </a>
<?php endforeach; ?> <?php endforeach; ?>
<a class="kontoübersicht" id="container" style="background-color:white">
<div class="kontoübersicht" id="containerInnenLinks">
<p class="ausgabe" id="überschrift">
Gesamtguthaben
</p>
<p id="infotext">
Giro + Visa + Tagesgeld + Trade Sparen
</p>
</div>
<div class="kontoübersicht" id="containerInnenRechts">
<p class="ausgabe" id="kontostand">
<?= number_format($gesamtGuthaben, 2, ",", ".") ?>
</p>
</div>
</a>
</div> </div>
<?= $system === 'test' ? '<div class="menue"><h2 class="seitentitel">Testsystem</h2></div>' : '' ?> <?= $system === 'test' ? '<div class="menue"><h2 class="seitentitel">Testsystem</h2></div>' : '' ?>
</body> </body>