<?php
// ajax/stock_booked.ajax.php
// Returns JSON array of stock_trans rows where status = 'BOOKED'.
// ⚠️ Adjust the status value to match your actual data ('BOOKED', 'OUT', etc.)
include $_SERVER['DOCUMENT_ROOT'] . "/root.class.php";
include $_SERVER['DOCUMENT_ROOT'] . "/app/test/classes/dashboard.class.php";

header('Content-Type: application/json');

$db   = new db_safeguard();
$dash = new DashboardData($db);

echo json_encode($dash->bookedStock());