<?php
require_once('../../config/Conexion.php');

$id_caja = isset($_GET['idcaja']) ? (int)$_GET['idcaja'] : 0;
$sql = "SELECT * FROM detalle_caja_linea WHERE id_caja_linea = $id_caja";
$result = $conexion->query($sql);

$puntos = [];
while ($row = $result->fetch_assoc()) {
    $puntos[] = $row;
}

echo json_encode($puntos);
$conexion->close();
?>