| Server IP : 173.209.174.21 / Your IP : 216.73.216.89 Web Server : Apache/2.4.58 (Ubuntu) System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : nodor ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/thelittlebigshow/self-hosted/ |
Upload File : |
<?php include 'protect.php'; ?>
<?php
include 'db.php';
include 'store_settings.php';
require_once __DIR__ . '/brand_header.php';
$tax_rate = getStoreTaxRate($conn);
$total = 0;
$sql = "SELECT quantity, price, taxable FROM transactions";
$result = $conn->query($sql);
while ($row = $result->fetch_assoc()) {
$line_total = $row['quantity'] * $row['price'];
if ($row['taxable']) {
$line_total *= (1 + $tax_rate);
}
$total += $line_total;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Total Outstanding Balance</title>
<style>
body {
font-family: sans-serif;
background-color: #f4f4f4;
padding: 40px;
text-align: center;
}
.box {
display: inline-block;
padding: 30px;
background: white;
border-radius: 10px;
box-shadow: 0 0 10px #ccc;
}
h1 { margin: 0 0 10px; }
</style>
<?php echo appBrandStyles(); ?>
</head>
<body>
<div class="box">
<?php renderAppBrandHeader(); ?>
<h1>Total Outstanding Balance</h1>
<p><strong>$<?= number_format($total, 2) ?></strong></p>
<p><a href="index.php">← Back to Dashboard</a></p>
</div>
</body>
</html>