<?php
include 'db.php';

$date = $_GET['date'];

$data = $conn->query("
    SELECT * FROM daily_sales_closure
    WHERE closure_date='$date'
")->fetch_assoc();
?>

<h2>Z REPORT — <?= $date ?></h2>

Total Sales: MK <?= number_format($data['total_sales'],2) ?><br>
VAT: MK <?= number_format($data['total_vat'],2) ?><br>
Transactions: <?= $data['total_transactions'] ?><br>

<script>
window.print();
</script>
