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

<h1>Record Daily Float</h1>
<form method="post" action="/daily-float">
    <div class="mb-3">
        <label>Date</label>
        <input type="date" name="record_date" class="form-control" value="<?= date('Y-m-d') ?>" required>
    </div>
    <h4>Cash Holdings</h4>
    <div class="row">
        <div class="col-md-3">
            <label>KES</label>
            <input type="number" step="0.01" name="cash_kes" class="form-control" value="0">
        </div>
        <div class="col-md-3">
            <label>USD</label>
            <input type="number" step="0.01" name="cash_usd" class="form-control" value="0">
        </div>
        <div class="col-md-3">
            <label>EUR</label>
            <input type="number" step="0.01" name="cash_eur" class="form-control" value="0">
        </div>
        <div class="col-md-3">
            <label>GBP</label>
            <input type="number" step="0.01" name="cash_gbp" class="form-control" value="0">
        </div>
    </div>
    <h4 class="mt-3">Exchange Rates (KES per 1 unit)</h4>
    <div class="row">
        <div class="col-md-4">
            <label>USD Rate</label>
            <input type="number" step="0.000001" name="rate_usd" class="form-control" value="130">
        </div>
        <div class="col-md-4">
            <label>EUR Rate</label>
            <input type="number" step="0.000001" name="rate_eur" class="form-control" value="140">
        </div>
        <div class="col-md-4">
            <label>GBP Rate</label>
            <input type="number" step="0.000001" name="rate_gbp" class="form-control" value="165">
        </div>
    </div>
    <h4 class="mt-3">Other Floats</h4>
    <div class="row">
        <div class="col-md-6">
            <label>M-Pesa Float (KES)</label>
            <input type="number" step="0.01" name="mpesa_float" class="form-control" value="0">
        </div>
        <div class="col-md-6">
            <label>Bank KES</label>
            <input type="number" step="0.01" name="bank_kes" class="form-control" value="0">
        </div>
        <div class="col-md-6 mt-2">
            <label>Bank USD</label>
            <input type="number" step="0.01" name="bank_usd" class="form-control" value="0">
        </div>
    </div>
    <div class="mb-3 mt-3">
        <label>Notes</label>
        <textarea name="notes" class="form-control"></textarea>
    </div>
    <button type="submit" class="btn btn-primary">Save Daily Float</button>
    <a href="/daily-float" class="btn btn-secondary">Cancel</a>
</form>

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