<?php
// reports/_report_common.php
require_once __DIR__ . '/../app/helpers.php';
require_once __DIR__ . '/../app/db.php';
require_once __DIR__ . '/../app/layout.php';
require_login();

$pdo = db();
$cid = (int)$_SESSION['company_id'];

function get_range(): array {
  $from = $_GET['from'] ?? date('Y-m-01');
  $to   = $_GET['to'] ?? date('Y-m-t');
  return [$from,$to];
}
