<?php
require_once __DIR__ . '/../../app/includes/auth.php'; require_auth();
require_once __DIR__ . '/../../app/services/PdfService.php';
require __DIR__ . '/render.php';
$id = (int)($_GET['id'] ?? 0);
$html = render_quotation($id, true, 'customer');
log_activity('quotation.pdf_downloaded', 'Downloaded PDF for quotation #' . $id);
PdfService::stream($html, 'quotation-' . $id . '.pdf');
