<?php
require_once "modelo/funciones_caja.php";
$usu = $_SESSION['usu_codigo'];
?>

<h2>Caja</h2>

<?php if (!caja_abierta($usu)): ?>

<form method="post" action="abrir_caja.php">
    <label>Monto inicial:</label><br>
    <input type="number" step="0.01" name="monto" required>
    <br><br>
    <button type="submit">Abrir Caja</button>
</form>

<?php else: ?>

<form method="post" action="cerrar_caja.php">
    <button type="submit">Cerrar Caja</button>
</form>

<?php endif; ?>
