This commit is contained in:
KANE LAZENI 2026-03-01 08:12:24 +00:00
parent 16fcc97ea2
commit fb9bf9a67e
2 changed files with 30 additions and 6 deletions

View File

@ -4,23 +4,27 @@ require_once 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
require_once 'Framework/Controleurrequete.php'; // OK
require_once 'Modele/Police.php';
// require_once 'Modele/Police.php';
require_once 'Modele/Avenant.php';
class ControleurAjaxavenantretrait extends Controleurrequete
{
private $police;
// private $police;
private $avenant;
public function __construct()
{
$this->police = new Police();
// $this->police = new Police();
$this->avenant = new Avenant();
}
public function index()
{
$idPolice = $_SESSION['idPolice_C'];
// $idPolice = $_SESSION['idPolice_C'];
$idAvenant = $this->requete->getParametreFormulaire("idAvenant");
$entetecp = $this->police->getEnteteCP($idPolice);
// $entetecp = $this->police->getEnteteCP($idPolice);
$entetecp = $this->avenant->getUnAvenant($idAvenant);
/*
$collegecps = $this->police->getCollegesCP($idPolice);
@ -45,7 +49,7 @@ class ControleurAjaxavenantretrait extends Controleurrequete
$pdf->SetFont('');
// $pdf->Ln(15);
$pdf->Ln(10);
$pdf->SetFont('Arial','', 9);
@ -53,6 +57,16 @@ class ControleurAjaxavenantretrait extends Controleurrequete
We are pleased to confirm that they have been removed from the current policy in accordance with the agreed contractual terms and conditions. Below is the related premium to be refunded calculated on prorated basis in consideration of the unearned period and agreed percentage: ");
$pdf->MultiCell(0, $ht, $text);
$pdf->Ln(10);
$pdf->SetFont('Arial','B', 10);
$pdf->SetFont('Arial','BU', 10);
$pdf->Cell(0,$ht,convertirc("Effective Date :".$entetecp['dateEffetAvenant']),0,0,'L',false);
$pdf->Cell(0,$ht,convertirc("End Date:".$entetecp['dateEcheance']),0,1,'R',false);
/*
$pdf->Ln(5);

View File

@ -81,4 +81,14 @@ class Avenant extends Modele {
$liste = $this->executerRequete($sql, array($idPolice));
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
public function getUnAvenant($idAvenant)
{
$sql = 'call sp_get_un_avenant(?);';
$entete = $this->executerRequete($sql, array($idAvenant));
return $entete->fetch(PDO::FETCH_ASSOC);
}
}