<?php
require_once __DIR__ . '/inc/helpers.php';
require_login();
require_once __DIR__ . '/inc/docs.php';

try {
  ensure_part2_tables();
  flash_set('success', '✅ Parte 2A instalada (presupuestos/facturas).');
  redirect('dashboard.php');
} catch (Throwable $e) {
  http_response_code(500);
  echo "<h3>Error instalando Parte 2A</h3><pre>" . h($e->getMessage()) . "</pre>";
}
