<?php
include_once __dir__ . "/../vendor/autoload.php";
include_once __dir__ . '/../core/PaymentHelper.php';
class CancellationProtocol extends Core {

    use PaymentHelper;

    function printPDF() {

        $id = (int)$_GET['id'];

        $sql = "UPDATE cancellation_protocol SET printed = 1, last_printed_at = NOW() WHERE company = ?";
        $stmt =parent::$conn->prepare($sql);
        $stmt->execute([$id]);

        $this->getLastCancellationProtocol($id);

    }

}