<?php
require_once "../../includes/db.php";
header('Content-Type: application/json');
session_start(['read_and_close' => true]);

$coid = $_SESSION['co_id'];

$stmt = $pdo->prepare("
    SELECT min_date, max_date 
    FROM trans_period 
    WHERE co_id = ?
");

$stmt->execute([$coid]);

$row = $stmt->fetch(PDO::FETCH_ASSOC);

$min_date = $row['min_date'] ?? null;
$max_date = $row['max_date'] ?? null;
?>