<?php include __DIR__ . '/../layouts/header.php'; ?>

<h1>Upload M‑Pesa Statement</h1>
<p>Upload a CSV file exported from Safaricom M‑Pesa. The file should contain columns: Receipt No., Completion Date, Details, Transaction Status, Paid In, Withdrawn, Balance, Transaction Type, Other Party.</p>

<form method="post" enctype="multipart/form-data" action="/mpesa/upload">
    <div class="mb-3">
        <label>CSV File</label>
        <input type="file" name="csv_file" class="form-control" accept=".csv" required>
    </div>
    <button type="submit" class="btn btn-primary">Upload</button>
    <a href="/mpesa" class="btn btn-secondary">Cancel</a>
</form>

<?php include __DIR__ . '/../layouts/footer.php'; ?>