3835 lines
146 KiB
PHP
Executable File
3835 lines
146 KiB
PHP
Executable File
<?php
|
||
require_once 'Framework/Controleurrequete.php'; // OK
|
||
require_once 'Modele/Statistiquesociete.php';
|
||
require_once 'Modele/Collegepolice.php';
|
||
require_once $_SESSION['dossierSociete'] . '/Tarifs/Modele/Police_sodciete.php';
|
||
|
||
|
||
class ControleurAjaxstatsmaladiefichetechniquecollegepdf extends Controleur
|
||
{
|
||
private $detailsp;
|
||
|
||
public function __construct()
|
||
{
|
||
$this->detailsp = new Statistiquesociete();
|
||
$this->college = new Collegepolice();
|
||
$this->police_societe = new Police_sodciete();
|
||
}
|
||
|
||
public function index()
|
||
{
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
|
||
if ($idPolice == "") {
|
||
$idPolice = null;
|
||
}
|
||
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
if ($codeGcAssureur == "") {
|
||
$codeGcAssureur = null;
|
||
}
|
||
|
||
$Chargement = $this->requete->getParametreFormulaire("Chargement");
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$chargeravantapres = $this->requete->getParametreFormulaire("chargeravantapres");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
$infosDuGarant = $this->police_societe->getInfosGarant($codeGcAssureur);
|
||
$infocollege = $this->college->getCollegepoliceId($idCollege);
|
||
|
||
$_SESSION['collegeStat'] = $infocollege['libelleCollege'];
|
||
|
||
$pdf = new FPDF_Protection();
|
||
$pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES');
|
||
$userPassword = '';
|
||
$ownerPassword = null;
|
||
$pdf->SetProtection(['print'], $userPassword, $ownerPassword);
|
||
|
||
$pdf->AliasNbPages();
|
||
$pdf->AddPage();
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['dossierSociete'] . '/Tarifs/Img/losange.jpg', 140, 5, 70);
|
||
$pdf->Image($_SESSION['lienLogo'], 155, 15, 45);
|
||
$pdf->Image($_SESSION['dossierSociete'] . '/Tarifs/Img/libellestatistique.jpg', 55, 90, 110);
|
||
$pdf->Image($_SESSION['dossierSociete'] . '/Tarifs/Img/cadredetailsstats.jpg', 5, 135, 200);
|
||
$pdf->Image($_SESSION['dossierSociete'] . '/Tarifs/Img/losange2.jpg', 5, 235, 70);
|
||
$pdf->Image($_SESSION['dossierSociete'] . '/Tarifs/Img/1.jpg', 155, 267, 110);
|
||
|
||
if ($idPolice != null) {
|
||
|
||
|
||
$pdf->SetY(145);
|
||
|
||
$pdf->SetFont('Times', 'BUI', 18);
|
||
$pdf->Cell(70, 5, convertirc(_('Garant :')), 0, 0, 'R', false);
|
||
$pdf->SetFont('Times', 'BI', 14);
|
||
|
||
$pdf->MultiCell(115, 5, convertirc(_($entete['garant'])), 0, 'L');
|
||
$pdf->Ln(4);
|
||
$pdf->SetFont('Times', 'BUI', 18);
|
||
|
||
$pdf->Cell(70, 5, convertirc(_('Souscripteur').": "), 0, 0, 'R', false);
|
||
$pdf->SetFont('Times', 'BI', 14);
|
||
|
||
$pdf->MultiCell(115, 5, convertirc(_($entete['souscripteur'])), 0, 'L');
|
||
$pdf->Ln(5);
|
||
$pdf->SetFont('Times', 'BUI', 18);
|
||
|
||
$pdf->Cell(70, 5, convertirc(_('Police').": "), 0, 0, 'R', false);
|
||
$pdf->SetFont('Times', 'BI', 14);
|
||
|
||
$pdf->MultiCell(115, 5, convertirc(_($entete['libellePolice'])), 0, 'L');
|
||
|
||
$pdf->Cell(0, 5, '', 0, 1, 'L', false);
|
||
|
||
if ($p_id_college != null) {
|
||
$pdf->SetFont('Times', 'BUI', 14);
|
||
|
||
$pdf->Cell(70, 5, convertirc(_('Collège').": "), 0, 0, 'R', false);
|
||
$pdf->SetFont('Times', 'BI', 14);
|
||
|
||
$pdf->MultiCell(115, 5, convertirc(_($_SESSION['collegeStat'])), 0, 'L');
|
||
$pdf->Ln(30);
|
||
}
|
||
} else {
|
||
$pdf->SetY(158);
|
||
|
||
$pdf->SetFont('Times', 'BUI', 18);
|
||
$pdf->Cell(50, 5, convertirc(_('Garant').": "), 0, 0, 'R', false);
|
||
$pdf->SetFont('Times', 'BI', 14);
|
||
|
||
$pdf->MultiCell(115, 5, convertirc(_($infosDuGarant['libelle'])), 0, 'L');
|
||
$pdf->Ln(40);
|
||
}
|
||
$pdf->SetFont('Times', 'BI', 12);
|
||
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE CONSIDEREE').' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, (''), 0, 1, 'R', false);
|
||
|
||
$pdf->AddPage();
|
||
|
||
|
||
///////////////////////////////////////////////////////////////////////////////////
|
||
|
||
////////////////////////////////////////////
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
$Chargement = $this->requete->getParametreFormulaire("Chargement");
|
||
$chargeravantapres = $this->requete->getParametreFormulaire("chargeravantapres");
|
||
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$infocollege = $this->college->getCollegepoliceId($idCollege);
|
||
|
||
$infosDuGarant = $this->police_societe->getInfosGarant($codeGcAssureur);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, '', 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, (''), 0, 1, 'R', false);
|
||
|
||
|
||
$pdf->Ln(10);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->SetFont('Arial', 'BI', 30);
|
||
$pdf->Cell(0, 12, convertirc(_("SOMMAIRE")), 1, 0, 'C', true);
|
||
$pdf->Ln(20);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 1").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Données élémentaires")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 2").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des dépenses par contrat")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 3").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Récapitulatif des dépenses par statut de bénéficiaires")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 4").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Récapitulatif des dépenses par tranches d’âges")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 5").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Evolution mensuelle des dépenses")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 6").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des dépenses par famille d’assurés")), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 7").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Evolution mensuelle des dépenses par famille d’assurés")), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 8").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat récapitulatif des dépenses par famille d’actes médicaux")), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(50, 0, convertirc(_("FICHE TECHNIQUE 9").": "), 1, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(100, 0, convertirc(_("Etat détaillé des dépenses par famille d’actes")), 1, 0, 'L', false);
|
||
$pdf->SetFont('Times', 'BI', 13);
|
||
$pdf->Cell(30, 0, convertirc(_("(Annexe 1)")), 1, 1, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 10").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Evolution mensuelle des dépenses par famille d’actes")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 11").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat comparatif des dépenses des années n-1 et n")), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 12").": "), 1, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(110, 0, convertirc(_("Etat des dépenses par prestataires médicaux")), 1, 0, 'L', false);
|
||
$pdf->SetFont('Times', 'BI', 13);
|
||
$pdf->Cell(30, 0, convertirc(_("(Annexe 2)")), 1, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 13").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des dépenses par familles d’actes et par prestataires ")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 14").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des hospitalisations par affections ")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 15").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des dépenses par actes liés à une famille d’affection")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 16").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_(" Etat des dépenses par affection")), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 17").": "), 0, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des dépenses par pharmacie")), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(12);
|
||
$pdf->SetFont('Times', 'B', 13);
|
||
$pdf->Cell(52, 0, convertirc(_("FICHE TECHNIQUE 18").": "), 1, 0, 'L', false);
|
||
$pdf->SetFont('Times', '', 13);
|
||
$pdf->Cell(140, 0, convertirc(_("Etat des dépenses des bénéficiaires déplafonnés")), 1, 0, 'L', false);
|
||
|
||
$pdf->AddPage();
|
||
|
||
///////////////////////////////////////////////////////////////////////////////////
|
||
|
||
//////////////////////////////////////////// ft1
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
$Chargement = $this->requete->getParametreFormulaire("Chargement");
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$infocollege = $this->college->getCollegepoliceId($idCollege);
|
||
|
||
//$detailsps = $this->detailsp->detailrapportspperiodepdf($idPolice);
|
||
$infosDuGarant = $this->police_societe->getInfosGarant($codeGcAssureur);
|
||
|
||
//$statuts = $this->detailsp->listestatutbeneficiaire($idPolice, $debutStat, $finStat);
|
||
|
||
$statutsfts = $this->detailsp->donneelementaire_rp($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
$chargeravantapres = $this->requete->getParametreFormulaire("chargeravantapres");
|
||
|
||
$primeSinistrefts = $this->detailsp->donneelementaire_rp2_1($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $Chargement, $chargeravantapres);
|
||
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 1'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': '. heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
// $pdf->AliasNbPages();
|
||
|
||
//$pdf->SetTextColor(81,163,226);
|
||
$pdf->SetFillColor(143, 206, 143); // bleu
|
||
$pdf->Cell(0, 8, convertirc(_("DONNEES ELEMENTAIRES")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POPULATION').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(_('cf Tableau ci-dessous').": "), 0, 1, 'L', false);
|
||
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$hl = 6;
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(37, $hl, convertirc(_('Statut bénéficiaire')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_("Nombre d'assurés sur la période")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_("Bénéficiaires traités sur la période")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_("% Bénéficiaires traités sur la période")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
$total_assure = 0;
|
||
$total_traite = 0;
|
||
$total_taux = 0;
|
||
|
||
foreach ($statutsfts as $statutsf) {
|
||
$pdf->Cell(37, $hl, convertirc($statutsf['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(51, $hl, convertirc(format_N($statutsf['Nombre'])), 1, 0, 'C', false);
|
||
$pdf->Cell(51, $hl, convertirc(format_N($statutsf['Nombretraite'])), 1, 0, 'C', false);
|
||
$pdf->Cell(51, $hl, convertirc($statutsf['Taux_EffTraite']), 1, 1, 'C', false);
|
||
|
||
$total_assure = $total_assure + $statutsf['Nombre'];
|
||
$total_traite = $total_traite + $statutsf['Nombretraite'];
|
||
$total_taux = $total_taux + $statutsf['Taux_EffTraite'];
|
||
}
|
||
$hl = 8;
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(37, $hl, convertirc(_('TOTAL')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_(format_N($total_assure))), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_(format_N($total_traite))), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_(convertirc('100 %'))), 1, 1, 'C', true);
|
||
|
||
|
||
|
||
$pdf->Ln(15);
|
||
|
||
$tp = 13;
|
||
|
||
$ht = 7;
|
||
|
||
$pdf->SetFont('Arial', 'BU', $tp);
|
||
|
||
|
||
$pdf->Cell(0, $ht, convertirc("PRIMES ET SINISTRALITE POLICE"), 0, 1, 'C', false);
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
foreach ($primeSinistrefts as $primeSinistreft) {
|
||
}
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(100, $ht, convertirc(_("RAPPEL PRIME NETTE TOTALE").': '), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, format_N($primeSinistreft['PRIMETOTALE']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', '', 10);
|
||
$pdf->Cell(100, $ht, convertirc(_("PRIME NETTE DE LA PERIODE").': '), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, format_N($primeSinistreft['PRIMENETTE']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', '', 10);
|
||
$pdf->Cell(100, $ht, convertirc(_("CHARGEMENT DE LA PERIODE").': '), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, format_N($primeSinistreft['CHARGEMENT']), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(5);
|
||
|
||
$pdf->Cell(100, $ht, convertirc(_("PROVISION POUR SINISTRE DE LA PERIODE").': '), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, format_N($primeSinistreft['PROVISION']), 0, 1, 'L', false);
|
||
|
||
$pdf->Cell(100, $ht, convertirc(_("SINISTRE DE LA PERIODE").': '), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, format_N($primeSinistreft['SINISTRES']), 0, 1, 'L', false);
|
||
|
||
$pdf->Ln(10);
|
||
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->Cell(100, $ht, convertirc(_("RESULTATS TECHNIQUES DE LA PERIODE (Rapport Sinistres/Primes)").': '), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', '', 10);
|
||
$pdf->Cell(105, $ht, convertirc(_("RAPPORT (SINISTRES/PRIME PERIODE) NET").': '), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, number_format($primeSinistreft['RAPPRSP'], 2, '.', ','), 0, 1, 'L', false);
|
||
|
||
$pdf->Cell(105, $ht, convertirc(_("EXCEDENT (ou DEFICIT (-)) :")), 0, 0, 'L', false);
|
||
$pdf->Cell(40, $ht, format_N($primeSinistreft['ECART']), 0, 1, 'L', false);
|
||
|
||
$pdf->AddPage();
|
||
|
||
///////////////////////////////////////////////////////////////////////////////////
|
||
|
||
////////////////////////////////////////////////// ft2
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
|
||
$p_factures = $this->detailsp->getdepenseparcontratrp($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$primeSinistre = $this->detailsp->getdepenseparcontratrp($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id_police = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$p_factures = $this->detailsp->getdepenseparcontratrpcollege($p_garant, $p_id_clients, $p_id_police, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$infocollege = $this->college->getCollegepoliceId($idCollege);
|
||
|
||
|
||
$total_montantFacture = 0;
|
||
$total_apresDecompte = 0;
|
||
$total_taux = 0;
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 2'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR CONTRAT")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 5, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc( $entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(_($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$pdf->Ln(5);
|
||
|
||
|
||
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(16, $hl, convertirc(_('NO POLICE')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(54, $hl, convertirc(_("Police")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(70, $hl, convertirc(_("College")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(18, $hl, convertirc(_("# Mt Recl.")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(18, $hl, convertirc(_("# Mt Remb.")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(16, $hl, convertirc(_("Taux (%)")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 8);
|
||
foreach ($p_factures as $p_facturee) {
|
||
|
||
$p_facture['Garant'] = $p_facturee['Garant'];
|
||
$p_facture['NumeroPolice'] = $p_facturee['NumeroPolice'];
|
||
$p_facture['libellePolice'] = $p_facturee['libellePolice'];
|
||
$p_facture['montantFacture'] = $p_facturee['montantFacture'];
|
||
$p_facture['apresDecompte'] = $p_facturee['apresDecompte'];
|
||
$p_facture['libelleCollege'] = $p_facturee['libelleCollege'];
|
||
|
||
$p_facture['Taux'] = $p_facturee['Taux'];
|
||
|
||
|
||
$taillelibellePolice = strlen($p_facture['libellePolice']);
|
||
$taillelibelleCollege = strlen($p_facture['libelleCollege']);
|
||
if ($taillelibellePolice > 35 || $taillelibelleCollege > 35) {
|
||
$text = wordwrap($p_facture['libellePolice'], 30, "***", false); // insertion de marqueurs ***
|
||
|
||
$tcut = explode("***", $text); // on créé un tableau à partir des marqueurs ***
|
||
$part1 = $tcut[0]; // la partie à mettre en exergue
|
||
$part2 = '';
|
||
for ($i = 1; $i < count($tcut); $i++) {
|
||
$part2 .= $tcut[$i] . ' ';
|
||
}
|
||
$part2 = trim($part2);
|
||
|
||
|
||
$textC = wordwrap($p_facture['libelleCollege'], 40, "***", false);
|
||
|
||
$tcutC = explode("***", $textC);
|
||
$partC1 = $tcutC[0];
|
||
$partC2 = '';
|
||
for ($i = 1; $i < count($tcutC); $i++) {
|
||
$partC2 .= $tcutC[$i] . ' ';
|
||
}
|
||
$partC2 = trim($partC2);
|
||
|
||
$pdf->Cell(16, 3, convertirc($p_facture['NumeroPolice']), "LTR", 0, 'L', FALSE);
|
||
$pdf->Cell(54, 3, convertirc($part1), "LTR", 0, 'L', FALSE);
|
||
$pdf->Cell(70, 3, convertirc($partC1), "LTR", 0, 'L', FALSE);
|
||
$pdf->Cell(18, 3, convertirc(format_N($p_facture['montantFacture'])), "LTR", 0, 'C', FALSE);
|
||
$pdf->Cell(18, 3, convertirc(format_N($p_facture['apresDecompte'])), "LTR", 0, 'C', FALSE);
|
||
$pdf->Cell(16, 3, convertirc($p_facture['Taux']), "LTR", 1, 'C', FALSE);
|
||
|
||
$pdf->Cell(16, 3, convertirc(""), "LBR", 0, 'L', FALSE);
|
||
$pdf->Cell(54, 3, convertirc($part2), "LBR", 0, 'L', FALSE);
|
||
$pdf->Cell(70, 3, convertirc($partC2), "LBR", 0, 'L', FALSE);
|
||
$pdf->Cell(18, 3, convertirc(""), "LBR", 0, 'C', FALSE);
|
||
$pdf->Cell(18, 3, convertirc(""), "LBR", 0, 'C', FALSE);
|
||
$pdf->Cell(16, 3, convertirc(""), "LBR", 1, 'C', FALSE);
|
||
} else {
|
||
$pdf->Cell(16, $hl, convertirc($p_facture['NumeroPolice']), 1, 0, 'L', false);
|
||
$pdf->Cell(54, $hl, convertirc($p_facture['libellePolice']), 1, 0, 'L', false);
|
||
$pdf->Cell(70, $hl, convertirc($p_facture['libelleCollege']), 1, 0, 'L', false);
|
||
$pdf->Cell(18, $hl, convertirc(format_N($p_facture['montantFacture'])), 1, 0, 'C', false);
|
||
$pdf->Cell(18, $hl, convertirc(format_N($p_facture['apresDecompte'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc($p_facture['Taux']), 1, 1, 'C', false);
|
||
}
|
||
|
||
|
||
$total_montantFacture = $total_montantFacture + $p_facture['montantFacture'];
|
||
$total_apresDecompte = $total_apresDecompte + $p_facture['apresDecompte'];
|
||
$total_taux = $total_taux + $p_facture['Taux'];
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(140, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(18, $hl, format_N($total_montantFacture), 1, 0, 'C', true);
|
||
$pdf->Cell(18, $hl, format_N($total_apresDecompte), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc('100 %'), 1, 0, 'C', true);
|
||
$pdf->Ln(5);
|
||
|
||
$pdf->Ln(8);
|
||
|
||
$pdf->Cell(45, $hl, convertirc(_("# Mt Recl. = Montant reclamé ")), 0, 0, 'L', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Mt Remb. = Montant rembousé")), 0, 0, 'L', false);
|
||
|
||
//////////////////////////////////////////////////////////////////////////////////
|
||
|
||
//////////////////////////////////////////////////////////// ft3
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
foreach ($colleges as $college) {
|
||
|
||
$p_id_college = $college['idCollege'];
|
||
$p_factures = $this->detailsp->recapdepensesstatutbenef($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
$statutsfts = $this->detailsp->recapdepensesstatutbenefdeux($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$statuts = $this->detailsp->listestatutbeneficiaire($idPolice, $debutStat, $finStat);
|
||
$pdf->AddPage();
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 3'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("RECAPITULATIF DES DEPENSES PAR STATUT DE BENEFICIAIRES")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 5, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(5);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
$pdf->Ln(5);
|
||
$hl = 6;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->Cell(190, 6, convertirc(_('Dépenses par statut de bénéficiaires')), 1, 1, 'C', false);
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(37, $hl, convertirc(_('Statut bénéficiaire')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Nombre")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Taux effectif")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Age moyen")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(27, $hl, convertirc(_("Montant")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Taux")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(26, $hl, convertirc(_("Coût moyen")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
|
||
$total_Nombre = 0;
|
||
$total_Taux_Eff = 0;
|
||
$total_Age_Moyen = 0;
|
||
$total_Montant = 0;
|
||
$total_tauxMontantTraite = 0;
|
||
$total_coutMoyenTraite = 0;
|
||
|
||
foreach ($p_factures as $p_facture) {
|
||
$pdf->Cell(37, $hl, convertirc($p_facture['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(25, $hl, convertirc(format_N($p_facture['Nombre'])), 1, 0, 'C', false);
|
||
$pdf->Cell(25, $hl, convertirc($p_facture['Taux_Eff'] . "%"), 1, 0, 'C', false);
|
||
$pdf->Cell(25, $hl, convertirc($p_facture['Age_Moyen']), 1, 0, 'C', false);
|
||
$pdf->Cell(27, $hl, convertirc(format_N($p_facture['Montant'])), 1, 0, 'C', false);
|
||
$pdf->Cell(25, $hl, convertirc($p_facture['Taux_Depense'] . "%"), 1, 0, 'C', false);
|
||
$pdf->Cell(26, $hl, convertirc(format_N($p_facture['CoutMoyen'])), 1, 1, 'C', false);
|
||
|
||
$total_Nombre = $total_Nombre + $p_facture['Nombre'];
|
||
$total_Taux_Eff = $total_Taux_Eff + $p_facture['Taux_Eff'];
|
||
$total_Age_Moyen = $total_Age_Moyen + $p_facture['Age_Moyen'];
|
||
$total_Montant = $total_Montant + $p_facture['Montant'];
|
||
$total_tauxMontantTraite = $total_tauxMontantTraite + $p_facture['Taux_Depense'];
|
||
}
|
||
$total_coutMoyenTraite = $total_Montant / $total_Nombre;
|
||
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$total_Age_Moyen = $total_Age_Moyen / 6;
|
||
$pdf->Cell(37, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(25, $hl, format_N($total_Nombre), 1, 0, 'C', true);
|
||
if ($total_Taux_Eff == 0) {
|
||
$pdf->Cell(25, $hl, format_N("0") . "%", 1, 0, 'C', true);
|
||
} else {
|
||
$pdf->Cell(25, $hl, format_N("100") . "%", 1, 0, 'C', true);
|
||
}
|
||
$pdf->Cell(25, $hl, format_N($total_Age_Moyen), 1, 0, 'C', true);
|
||
$pdf->Cell(27, $hl, format_N($total_Montant), 1, 0, 'C', true);
|
||
if ($total_tauxMontantTraite == 0) {
|
||
$pdf->Cell(25, $hl, format_N("0") . "%", 1, 0, 'C', true);
|
||
} else {
|
||
$pdf->Cell(25, $hl, format_N("100") . "%", 1, 0, 'C', true);
|
||
}
|
||
$pdf->Cell(26, $hl, format_N($total_coutMoyenTraite), 1, 0, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetX(20);
|
||
$pdf->SetY(145);
|
||
$pdf->Cell(90, 8, convertirc(_('Récapitulatif dépenses par statut bénéficiaire (%)')), 1, 0, 'C', false);
|
||
$pdf->Cell(10, 8, (''), 0, 0);
|
||
$pdf->Cell(90, 8, convertirc(_('Récapitulatif des bénéficiaires traités par statut (%)')), 1, 1, 'C', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Rect(10, 153, 90, 60, 'D');
|
||
$pdf->Rect(110, 153, 90, 60, 'D');
|
||
if ($total_Montant > 0) {
|
||
|
||
|
||
|
||
//////////////////////////
|
||
|
||
|
||
$valeur0 = 0;
|
||
$valeur1 = 0;
|
||
$valeur2 = 0;
|
||
$valeur3 = 0;
|
||
$valeur4 = 0;
|
||
$valeur5 = 0;
|
||
$value = 0;
|
||
$v = 0;
|
||
$valeurs = array();
|
||
|
||
foreach ($p_factures as $key => $value) {
|
||
array_push($valeurs, $value['Taux_Depense']);
|
||
}
|
||
|
||
foreach ($valeurs as $key => $valeur) {
|
||
if ($key == 0) {
|
||
$valeur0 = $valeur;
|
||
}
|
||
if ($key == 1) {
|
||
$valeur1 = $valeur;
|
||
}
|
||
if ($key == 2) {
|
||
$valeur2 = $valeur;
|
||
}
|
||
if ($key == 3) {
|
||
$valeur3 = $valeur;
|
||
}
|
||
if ($key == 4) {
|
||
$valeur4 = $valeur;
|
||
}
|
||
if ($key == 5) {
|
||
$valeur5 = $valeur;
|
||
}
|
||
|
||
$data = array(
|
||
'A' => [
|
||
'color' => [255, 0, 0],
|
||
'value' => $valeur0
|
||
],
|
||
'C' => [
|
||
'color' => [255, 255, 0],
|
||
'value' => $valeur1
|
||
],
|
||
'E' => [
|
||
'color' => [50, 0, 255],
|
||
'value' => $valeur2
|
||
],
|
||
'O' => [
|
||
'color' => [255, 0, 255],
|
||
'value' => $valeur3
|
||
],
|
||
'F' => [
|
||
'color' => [0, 255, 0],
|
||
'value' => $valeur4
|
||
],
|
||
'D' => [
|
||
'color' => [0, 0, 0],
|
||
'value' => $valeur5
|
||
]
|
||
);
|
||
}
|
||
//pie and legend properties
|
||
$pieX = 30;
|
||
$pieY = 185;
|
||
$r = 15; //radius
|
||
$legendX = 55;
|
||
$legendY = 170;
|
||
|
||
//get total data summary
|
||
$dataSum = 0;
|
||
foreach ($data as $item) {
|
||
$dataSum += $item['value'];
|
||
}
|
||
|
||
//get scale unit for each degree
|
||
$degUnit = 360 / $dataSum;
|
||
|
||
//variable to store current angle
|
||
$currentAngle = 0;
|
||
//store current legend Y position
|
||
$currentLegendY = $legendY;
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
//simplify the code by drawing both pie and legend in one loop
|
||
foreach ($data as $index => $item) {
|
||
//draw the pie
|
||
//slice size
|
||
$deg = $degUnit * $item['value'];
|
||
//set color
|
||
$pdf->SetFillColor($item['color'][0], $item['color'][1], $item['color'][2]);
|
||
//remove border
|
||
$pdf->SetDrawColor($item['color'][0], $item['color'][1], $item['color'][2]);
|
||
//draw the slice
|
||
$pdf->Sector($pieX, $pieY, $r, $currentAngle, $currentAngle + $deg);
|
||
//add slice angle to currentAngle var
|
||
$currentAngle += $deg;
|
||
|
||
//draw the legend
|
||
$pdf->SetFont('Arial', '', 9);
|
||
// $pdf->SetXY($chartX,$chartY);
|
||
$pdf->Rect($legendX, $currentLegendY, 5, 5, 'DF');
|
||
$pdf->SetXY($legendX + 6, $currentLegendY);
|
||
foreach ($valeurs as $key => $valeur) {
|
||
if ($key == 0) {
|
||
$v0 = $valeur;
|
||
}
|
||
if ($key == 1) {
|
||
$v1 = $valeur;
|
||
}
|
||
if ($key == 2) {
|
||
$v2 = $valeur;
|
||
}
|
||
if ($key == 3) {
|
||
$v3 = $valeur;
|
||
}
|
||
if ($key == 4) {
|
||
$v4 = $valeur;
|
||
}
|
||
if ($key == 5) {
|
||
$v5 = $valeur;
|
||
}
|
||
}
|
||
$pdf->Cell(26, 5, convertirc(_($index)), 0, 0);
|
||
if ($index == 'A') {
|
||
$pdf->Cell(10, 5, convertirc(_($v0)), 0, 0);
|
||
}
|
||
if ($index == 'C') {
|
||
$pdf->Cell(10, 5, convertirc(_($v1)), 0, 0);
|
||
}
|
||
if ($index == 'E') {
|
||
$pdf->Cell(10, 5, convertirc(_($v2)), 0, 0);
|
||
}
|
||
if ($index == 'O') {
|
||
$pdf->Cell(10, 5, convertirc(_('0')), 0, 0);
|
||
}
|
||
if ($index == 'F') {
|
||
$pdf->Cell(10, 5, convertirc(_($v4)), 0, 0);
|
||
}
|
||
if ($index == 'D') {
|
||
$pdf->Cell(10, 5, convertirc(_($v5)), 0, 0);
|
||
}
|
||
$currentLegendY += 5;
|
||
}
|
||
|
||
//////////////////////////
|
||
|
||
|
||
$valeur0 = 0;
|
||
$valeur1 = 0;
|
||
$valeur2 = 0;
|
||
$valeur3 = 0;
|
||
$valeur4 = 0;
|
||
$valeur5 = 0;
|
||
$value = 0;
|
||
$v = 0;
|
||
$valeurs = array();
|
||
foreach ($statutsfts as $key => $value) {
|
||
array_push($valeurs, $value['Taux_Eff']);
|
||
}
|
||
|
||
foreach ($valeurs as $key => $valeur) {
|
||
if ($key == 0) {
|
||
$valeur0 = $valeur;
|
||
}
|
||
if ($key == 1) {
|
||
$valeur1 = $valeur;
|
||
}
|
||
if ($key == 2) {
|
||
$valeur2 = $valeur;
|
||
}
|
||
if ($key == 3) {
|
||
$valeur3 = $valeur;
|
||
}
|
||
if ($key == 4) {
|
||
$valeur4 = $valeur;
|
||
}
|
||
if ($key == 5) {
|
||
$valeur5 = $valeur;
|
||
}
|
||
|
||
$data = array(
|
||
'A' => [
|
||
'color' => [255, 0, 0],
|
||
'value' => $valeur0
|
||
],
|
||
'C' => [
|
||
'color' => [255, 255, 0],
|
||
'value' => $valeur1
|
||
],
|
||
'E' => [
|
||
'color' => [50, 0, 255],
|
||
'value' => $valeur2
|
||
],
|
||
'O' => [
|
||
'color' => [255, 0, 255],
|
||
'value' => $valeur3
|
||
],
|
||
'F' => [
|
||
'color' => [0, 255, 0],
|
||
'value' => $valeur4
|
||
],
|
||
'D' => [
|
||
'color' => [0, 0, 0],
|
||
'value' => $valeur5
|
||
]
|
||
);
|
||
}
|
||
//pie and legend properties
|
||
$pieX = 130;
|
||
$pieY = 185;
|
||
$r = 15; //radius
|
||
$legendX = 155;
|
||
$legendY = 170;
|
||
|
||
//get total data summary
|
||
$dataSum = 0;
|
||
foreach ($data as $item) {
|
||
$dataSum += $item['value'];
|
||
}
|
||
|
||
//get scale unit for each degree
|
||
$degUnit = 360 / $dataSum;
|
||
|
||
//variable to store current angle
|
||
$currentAngle = 0;
|
||
//store current legend Y position
|
||
$currentLegendY = $legendY;
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
//simplify the code by drawing both pie and legend in one loop
|
||
foreach ($data as $index => $item) {
|
||
//draw the pie
|
||
//slice size
|
||
$deg = $degUnit * $item['value'];
|
||
//set color
|
||
$pdf->SetFillColor($item['color'][0], $item['color'][1], $item['color'][2]);
|
||
//remove border
|
||
$pdf->SetDrawColor($item['color'][0], $item['color'][1], $item['color'][2]);
|
||
//draw the slice
|
||
$pdf->Sector($pieX, $pieY, $r, $currentAngle, $currentAngle + $deg);
|
||
//add slice angle to currentAngle var
|
||
$currentAngle += $deg;
|
||
|
||
//draw the legend
|
||
$pdf->SetFont('Arial', '', 9);
|
||
// $pdf->SetXY($chartX,$chartY);
|
||
$pdf->Rect($legendX, $currentLegendY, 5, 5, 'DF');
|
||
$pdf->SetXY($legendX + 6, $currentLegendY);
|
||
foreach ($valeurs as $key => $valeur) {
|
||
if ($key == 0) {
|
||
$v0 = $valeur;
|
||
}
|
||
if ($key == 1) {
|
||
$v1 = $valeur;
|
||
}
|
||
if ($key == 2) {
|
||
$v2 = $valeur;
|
||
}
|
||
if ($key == 3) {
|
||
$v3 = $valeur;
|
||
}
|
||
if ($key == 4) {
|
||
$v4 = $valeur;
|
||
}
|
||
if ($key == 5) {
|
||
$v5 = $valeur;
|
||
}
|
||
}
|
||
$pdf->Cell(26, 5, convertirc(_($index)), 0, 0);
|
||
if ($index == 'A') {
|
||
$pdf->Cell(10, 5, convertirc(_($v0)), 0, 0);
|
||
}
|
||
if ($index == 'C') {
|
||
$pdf->Cell(10, 5, convertirc(_($v1)), 0, 0);
|
||
}
|
||
if ($index == 'E') {
|
||
$pdf->Cell(10, 5, convertirc(_($v2)), 0, 0);
|
||
}
|
||
if ($index == 'O') {
|
||
$pdf->Cell(10, 5, convertirc(_($v3)), 0, 0);
|
||
}
|
||
if ($index == 'F') {
|
||
$pdf->Cell(10, 5, convertirc(_($v4)), 0, 0);
|
||
}
|
||
if ($index == 'D') {
|
||
$pdf->Cell(10, 5, convertirc(_($v5)), 0, 0);
|
||
}
|
||
$currentLegendY += 5;
|
||
}
|
||
$pdf->Ln(25);
|
||
|
||
$hl = 6;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->Cell(190, 6, convertirc(_('Dépenses des bénéficiaires traités par statut')), 1, 1, 'C', false);
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(37, $hl, convertirc(_('Statut bénéficiaire')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(51, $hl, convertirc(_("Nombre de fois traités sur la période")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Taux traités")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(27, $hl, convertirc(_("Dépenses")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Taux")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Coût moyen")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
|
||
$total_BenefTraite = 0;
|
||
$total_Taux_EffTraite = 0;
|
||
$total_Depensestraite = 0;
|
||
$total_Taux_Depense = 0;
|
||
$total_coutMoyenTraite = 0;
|
||
|
||
foreach ($statutsfts as $statutsft) {
|
||
$pdf->Cell(37, $hl, convertirc($statutsft['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(51, $hl, convertirc(format_N($statutsft['BenefTraite'])), 1, 0, 'C', false);
|
||
$pdf->Cell(25, $hl, convertirc($statutsft['Taux_Eff'] . "%"), 1, 0, 'C', false);
|
||
$pdf->Cell(27, $hl, convertirc(format_N($statutsft['Depenses'])), 1, 0, 'C', false);
|
||
$pdf->Cell(25, $hl, convertirc($statutsft['Taux_Depense'] . "%"), 1, 0, 'C', false);
|
||
$pdf->Cell(25, $hl, convertirc(format_N($statutsft['CoutMoyen'])), 1, 1, 'C', false);
|
||
|
||
|
||
$total_BenefTraite = $total_BenefTraite + $statutsft['BenefTraite'];
|
||
$total_Taux_EffTraite = $total_Taux_EffTraite + $statutsft['Taux_Eff'];
|
||
$total_Depensestraite = $total_Depensestraite + $statutsft['Depenses'];
|
||
$total_Taux_Depense = $total_Taux_Depense + $statutsft['Taux_Depense'];
|
||
}
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$total_coutMoyenTraite = $total_Depensestraite / $total_BenefTraite;
|
||
|
||
$pdf->Cell(37, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(51, $hl, format_N($total_BenefTraite), 1, 0, 'C', true);
|
||
$pdf->Cell(25, $hl, "100 %", 1, 0, 'C', true);
|
||
$pdf->Cell(27, $hl, format_N($total_Depensestraite), 1, 0, 'C', true);
|
||
$pdf->Cell(25, $hl, format_N("100") . "%", 1, 0, 'C', true);
|
||
$pdf->Cell(25, $hl, format_N($total_coutMoyenTraite), 1, 0, 'C', true);
|
||
|
||
$tp = 13;
|
||
|
||
$ht = 7;
|
||
}
|
||
}
|
||
//
|
||
$pdf->SetFont('Arial', 'BU', $tp);
|
||
//$pdf->AddPage();
|
||
/////////////////////////
|
||
|
||
/////////////////////////////////////// ft 4
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
if ($idPolice == '') {
|
||
$idPolice = null;
|
||
}
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
|
||
$p_id = $idPolice;
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
|
||
$pdf->AddPage();
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 4'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("RECAPITULATIF DES DEPENSES PAR TRANCHES D'AGES")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(9);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(9);
|
||
$pdf->Cell(0, 5, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
|
||
if ($p_id != null) {
|
||
|
||
$pdf->Ln(5);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(_($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
$total_NombreG = 0;
|
||
$total_Taux_EffG = 0;
|
||
$total_Depense_TrancheG = 0;
|
||
$total_Taux_DepenseG = 0;
|
||
$total_coutMoyenTrancheTraiteG = 0;
|
||
|
||
foreach ($colleges as $college) {
|
||
$total_Nombre = 0;
|
||
$total_Taux_Eff = 0;
|
||
$total_Depense_Tranche = 0;
|
||
$total_Taux_Depense = 0;
|
||
$total_coutMoyenTrancheTraite = 0;
|
||
|
||
|
||
$p_id_college = $college['idCollege'];
|
||
$statuts = $this->detailsp->listestatutbeneficiaire($idPolice, $debutStat, $finStat);
|
||
|
||
$tranches = $this->detailsp->listetrancheagebeneficiaire($idPolice, $debutStat, $finStat);
|
||
|
||
$tranchesfts = $this->detailsp->recapdepensestranchesage($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
$pdf->Ln(4);
|
||
|
||
$hl = 6;
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(37, $hl, convertirc(_("Tranche d'âge")), 'LTR', 0, 'C', true);
|
||
$pdf->Cell(62, $hl, convertirc(_("Effectif sur la période")), 'LTR', 0, 'C', true);
|
||
$pdf->Cell(65, $hl, convertirc(_("Dépenses sur la période")), 'LTR', 0, 'C', true);
|
||
$pdf->Cell(26, $hl, convertirc(_("Coût moyen")), 'LTR', 1, 'C', true);
|
||
$pdf->Cell(37, $hl, convertirc(_("")), 'LBR', 0, 'C', true);
|
||
$pdf->Cell(31, $hl, convertirc(_("Nombre")), 1, 0, 'C', true);
|
||
$pdf->Cell(31, $hl, convertirc(_("Taux")), 1, 0, 'C', true);
|
||
$pdf->Cell(34, $hl, convertirc(_("Montant")), 1, 0, 'C', true);
|
||
$pdf->Cell(31, $hl, convertirc(_("Taux")), 1, 0, 'C', true);
|
||
$pdf->Cell(26, $hl, convertirc(""), 'LBR', 1, 'C', true);
|
||
|
||
|
||
foreach ($tranchesfts as $tranchesft) {
|
||
$pdf->SetFont('Arial', '', 8);
|
||
$pdf->Cell(37, $hl, convertirc($tranchesft['libelleTrancheAge']), 1, 0, 'L', false);
|
||
$pdf->Cell(31, $hl, convertirc(format_N($tranchesft['Nombre'])), 1, 0, 'C', false);
|
||
$pdf->Cell(31, $hl, convertirc($tranchesft['Taux_Eff'] . "%"), 1, 0, 'C', false);
|
||
$pdf->Cell(34, $hl, convertirc(format_N($tranchesft['Depense_Tranche'])), 1, 0, 'C', false);
|
||
$pdf->Cell(31, $hl, convertirc($tranchesft['Taux_Depense'] . "%"), 1, 0, 'C', false);
|
||
$pdf->Cell(26, $hl, convertirc(format_N($tranchesft['CoutMoyen'])), 1, 1, 'C', false);
|
||
|
||
|
||
$total_Nombre = $total_Nombre + $tranchesft['Nombre'];
|
||
$total_Taux_Eff = $total_Taux_Eff + $tranchesft['Taux_Eff'];
|
||
$total_Depense_Tranche = $total_Depense_Tranche + $tranchesft['Depense_Tranche'];
|
||
$total_Taux_Depense = $total_Taux_Depense + $tranchesft['Taux_Depense'];
|
||
}
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$total_coutMoyenTrancheTraite = round($total_Depense_Tranche / $total_Nombre);
|
||
|
||
$pdf->Cell(37, $hl, convertirc("TOTAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(31, $hl, format_N($total_Nombre), 1, 0, 'C', true);
|
||
$pdf->Cell(31, $hl, format_N($total_Taux_Eff) . "%", 1, 0, 'C', true);
|
||
$pdf->Cell(34, $hl, format_N($total_Depense_Tranche), 1, 0, 'C', true);
|
||
$pdf->Cell(31, $hl, format_N('100') . "%", 1, 0, 'C', true);
|
||
$pdf->Cell(26, $hl, format_N($total_coutMoyenTrancheTraite), 1, 1, 'C', true);
|
||
|
||
$total_NombreG = $total_NombreG + $total_Nombre;
|
||
$total_Taux_EffG = $total_Taux_EffG + $total_Taux_Eff;
|
||
$total_Depense_TrancheG = $total_Depense_TrancheG + $total_Depense_Tranche;
|
||
$total_Taux_DepenseG = $total_Taux_DepenseG + $total_Taux_Depense;
|
||
}
|
||
$total_coutMoyenTrancheTraiteG = round($total_Depense_TrancheG / $total_NombreG);
|
||
|
||
$pdf->Cell(37, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(31, $hl, format_N($total_NombreG), 1, 0, 'C', true);
|
||
$pdf->Cell(31, $hl, format_N('100') . "%", 1, 0, 'C', true);
|
||
$pdf->Cell(34, $hl, format_N($total_Depense_TrancheG), 1, 0, 'C', true);
|
||
$pdf->Cell(31, $hl, format_N('100') . "%", 1, 0, 'C', true);
|
||
$pdf->Cell(26, $hl, format_N($total_coutMoyenTrancheTraiteG), 1, 1, 'C', true);
|
||
|
||
$pdf->AddPage('L');
|
||
////////////////////
|
||
|
||
|
||
///////////////// ft5
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$Chargement = $this->requete->getParametreFormulaire("Chargement");
|
||
|
||
$chargeravantapres = $this->requete->getParametreFormulaire("chargeravantapres");
|
||
|
||
$depenses = $this->requete->getParametreFormulaire("depenses", "numerique");
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $entete['codeGcAssureur'];
|
||
$p_limite = $_SESSION['depenses'];
|
||
$p_id_client = null;
|
||
$p_id_college = $idCollege;
|
||
$p_id = $entete['idPolice'];
|
||
$p_factures = $this->detailsp->evolutiondesdepenses($p_garant, $p_id_client, $p_id, $p_id_college, $p_datedebut, $p_datefin, $Chargement, $chargeravantapres);
|
||
|
||
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 140, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 5'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': '. heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("EVOLUTION MENSUELLE DES DEPENSES")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
$pdf->Ln(5);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->SetTextColor(255, 0, 0);
|
||
$pdf->Cell(120, 8, convertirc(_($entete['garant'])), 0, 0, 'C', false);
|
||
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->SetTextColor(155, 38, 182);
|
||
$pdf->Cell(100, 8, convertirc(_($entete['souscripteur'])), 0, 1, 'C', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->SetTextColor(0, 0, 255);
|
||
$pdf->Cell(0, 8, convertirc(_('POLICE').': ' . $entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'C', false);
|
||
$pdf->SetTextColor(0, 0, 0);
|
||
|
||
$pdf->Ln(5);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(35, $hl, convertirc(_('Libellés')), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Janvier")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Février")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Mars")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Avril")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Mai")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Juin")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Juillet")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Août")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Septembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Octobre")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Novembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Décembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(19, $hl, convertirc(_("Totaux")), 1, 1, 'C', true);
|
||
$total_JANVIER = 0;
|
||
$total_FEVRIER = 0;
|
||
$total_MARS = 0;
|
||
$total_AVRIL = 0;
|
||
$total_MAI = 0;
|
||
$total_JUIN = 0;
|
||
$total_JUILLET = 0;
|
||
$total_AOUT = 0;
|
||
$total_SEPTEMBRE = 0;
|
||
$total_OCTOBRE = 0;
|
||
$total_NOVEMBRE = 0;
|
||
$total_DECEMBRE = 0;
|
||
$total_TOTAUX = 0;
|
||
$hl = 6;
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
$pdf->Cell(35, $hl, convertirc(_($dep['libelle'])), 1, 0, 'L', false);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
if ($dep['libelle'] == 'RAPP.S/P' || $dep['libelle'] == 'RAPP.S/P' || $dep['libelle'] == 'RAPP.S/P') {
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['JANVIER'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['FEVRIER'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['MARS'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['AVRIL'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['MAI'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['JUIN'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['JUILLET'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['AOUT'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['SEPTEMBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['OCTOBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['NOVEMBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['DECEMBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(_($dep['TOTAUX'])), 1, 1, 'R', false);
|
||
} else {
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['JANVIER'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['FEVRIER'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['MARS'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['AVRIL'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['MAI'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['JUIN'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['JUILLET'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['AOUT'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['SEPTEMBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['OCTOBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['NOVEMBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['DECEMBRE'])), 1, 0, 'R', false);
|
||
$pdf->Cell(19, $hl, convertirc(format_N($dep['TOTAUX'])), 1, 1, 'R', false);
|
||
}
|
||
}
|
||
$pdf->AddPage('');
|
||
|
||
|
||
////////////////////
|
||
|
||
//////////////////////////////////// ft6
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
$depenses = $this->requete->getParametreFormulaire("depenses", "numerique");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_limite = $depenses;
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
|
||
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 6'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR FAMILLE D'ASSURES")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(6);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetX(20);
|
||
$pdf->Cell(170, 6, convertirc(_('DEPENSES SUPERIEURES A') . ' : ' . format_N($depenses) . ' ' . $_SESSION['devise_C']), 1, 1, 'C', false);
|
||
|
||
$pdf->Ln(2);
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
$total_popActiveG = 0;
|
||
$total_popTraiteG = 0;
|
||
$total_montantReclameG = 0;
|
||
$total_montantNonRembourseG = 0;
|
||
$total_montantRembourseG = 0;
|
||
$total_coutMoyenG = 0;
|
||
|
||
foreach ($colleges as $college) {
|
||
$total_popActive = 0;
|
||
$total_popTraite = 0;
|
||
$total_montantReclame = 0;
|
||
$total_montantNonRembourse = 0;
|
||
$total_montantRembourse = 0;
|
||
$total_coutMoyen = 0;
|
||
|
||
$p_id_college = $college['idCollege'];
|
||
|
||
$primeSinistre = $this->detailsp->getprimesinistre($idPolice, $debutStat, $finStat);
|
||
|
||
$depensesFamille = $this->detailsp->detaildepensefamilleass($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
$pdf->Ln(4);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(15, $hl, convertirc(_('Matricule')), 1, 0, 'C', true);
|
||
$pdf->Cell(63, $hl, convertirc(_("Famille")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Pop. active")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Pop. traitée")), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, convertirc(_("Réclamé")), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, convertirc(_("# Non Remb.")), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, convertirc(_("Remboursé")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Coût moyen")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 7);
|
||
|
||
|
||
|
||
foreach ($depensesFamille as $dep) {
|
||
$pdf->Cell(15, $hl, convertirc($dep['numeroAdherent']), 1, 0, 'C', false);
|
||
$pdf->Cell(63, $hl, convertirc($dep['adherent']), 1, 0, 'L', false);
|
||
$pdf->Cell(15, $hl, convertirc($dep['popActive']), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc($dep['popTraite']), 1, 0, 'C', false);
|
||
$pdf->Cell(22, $hl, convertirc(format_N($dep['montantReclame'])), 1, 0, 'C', false);
|
||
$pdf->Cell(22, $hl, convertirc(format_N($dep['montantNonRembourse'])), 1, 0, 'C', false);
|
||
$pdf->Cell(22, $hl, convertirc(format_N($dep['montantRembourse'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['Coutmoyen'])), 1, 1, 'C', false);
|
||
|
||
$total_popActive = $total_popActive + $dep['popActive'];
|
||
$total_popTraite = $total_popTraite + $dep['popTraite'];
|
||
$total_montantReclame = $total_montantReclame + $dep['montantReclame'];
|
||
$total_montantNonRembourse = $total_montantNonRembourse + $dep['montantNonRembourse'];
|
||
$total_montantRembourse = $total_montantRembourse + $dep['montantRembourse'];
|
||
}
|
||
$total_coutMoyen = $total_montantRembourse / $total_popTraite;
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(78, $hl, convertirc("TOTAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_popActive), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_popTraite), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, format_N($total_montantReclame), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, format_N($total_montantNonRembourse), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, format_N($total_montantRembourse), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_coutMoyen), 1, 1, 'C', true);
|
||
|
||
$total_popActiveG = $total_popActiveG + $total_popActive;
|
||
$total_popTraiteG = $total_popTraiteG + $total_popTraite;
|
||
$total_montantReclameG = $total_montantReclameG + $total_montantReclame;
|
||
$total_montantNonRembourseG = $total_montantNonRembourseG + $total_montantNonRembourse;
|
||
$total_montantRembourseG = $total_montantRembourseG + $total_montantRembourse;
|
||
}
|
||
$total_coutMoyenG = $total_montantRembourseG / $total_popTraiteG;
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(78, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_popActiveG), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_popTraiteG), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, format_N($total_montantReclameG), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, format_N($total_montantNonRembourseG), 1, 0, 'C', true);
|
||
$pdf->Cell(22, $hl, format_N($total_montantRembourseG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_coutMoyenG), 1, 1, 'C', true);
|
||
$pdf->Ln(5);
|
||
|
||
$pdf->Cell(45, $hl, convertirc(_("Nombre de lignes: ") . count($depensesFamille)), 0, 0, 'L', false);
|
||
|
||
$pdf->Ln(8);
|
||
|
||
$pdf->Cell(45, $hl, convertirc(_("# Non remb.= Ticket modérateur + exclusion + dépassement de plafond")), 0, 0, 'L', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Pop.active= Population active sur la période")), 0, 0, 'L', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Pop.traitée= Population traitée sur la période")), 0, 0, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'I', 7);
|
||
$pdf->AddPage('L');
|
||
|
||
////////////////////////////////////////////////////////////////// ft7
|
||
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$depenses = $this->requete->getParametreFormulaire("depenses", "numerique");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
|
||
$primeSinistre = $this->detailsp->getprimesinistre($idPolice, $debutStat, $finStat);
|
||
|
||
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_limite = $_SESSION['depenses'];
|
||
$p_id_client = null;
|
||
$p_id_college = $idCollege;
|
||
$p_id = $entete['idPolice'];
|
||
$depensesFamille = $this->detailsp->detaildepensefamilleass($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
$p_factures = $this->detailsp->evolutiondepfamilleAssrp($p_garant, $p_id_client, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 140, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 7'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("EVOLUTION MENSUELLE DES DEPENSES PAR FAMILLE D'ASSURE")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(6);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(6);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(5);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(_($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
$pdf->Ln(4);
|
||
$pdf->SetX(65);
|
||
$pdf->Cell(170, 6, convertirc(_('DEPENSES SUPERIEURES A') . ' : ' . format_N($depenses) . ' ' . $_SESSION['devise_C']), 1, 1, 'C', false);
|
||
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
$total_JANVIERG = 0;
|
||
$total_FEVRIERG = 0;
|
||
$total_MARSG = 0;
|
||
$total_AVRILG = 0;
|
||
$total_MAIG = 0;
|
||
$total_JUING = 0;
|
||
$total_JUILLETG = 0;
|
||
$total_AOUTG = 0;
|
||
$total_SEPTEMBREG = 0;
|
||
$total_OCTOBREG = 0;
|
||
$total_NOVEMBREG = 0;
|
||
$total_DECEMBREG = 0;
|
||
$total_TOTAUXG = 0;
|
||
|
||
foreach ($colleges as $college) {
|
||
$total_JANVIER = 0;
|
||
$total_FEVRIER = 0;
|
||
$total_MARS = 0;
|
||
$total_AVRIL = 0;
|
||
$total_MAI = 0;
|
||
$total_JUIN = 0;
|
||
$total_JUILLET = 0;
|
||
$total_AOUT = 0;
|
||
$total_SEPTEMBRE = 0;
|
||
$total_OCTOBRE = 0;
|
||
$total_NOVEMBRE = 0;
|
||
$total_DECEMBRE = 0;
|
||
$total_TOTAUX = 0;
|
||
|
||
$p_id_college = $college['idCollege'];
|
||
|
||
$depensesFamille = $this->detailsp->detaildepensefamilleass($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
$p_factures = $this->detailsp->evolutiondepfamilleAssrp($p_garant, $p_id_client, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
$pdf->Ln(4);
|
||
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(15, $hl, convertirc(_('Matricule')), 1, 0, 'C', true);
|
||
$pdf->Cell(60, $hl, convertirc(_("Famille")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Janvier")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Février")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Mars")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Avril")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Mai")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Juin")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Juillet")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Août")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Septembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Octobre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Novembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Décembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Totaux")), 1, 1, 'C', true);
|
||
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(15, $hl, convertirc($dep['numeroAdherent']), 1, 0, 'C', false);
|
||
$pdf->Cell(60, $hl, convertirc($dep['adherent']), 1, 0, 'L', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['JANVIER'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['FEVRIER'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['MARS'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['AVRIL'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['MAI'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['JUIN'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['JUILLET'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['AOUT'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['SEPTEMBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['OCTOBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['NOVEMBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['DECEMBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['TOTAUX'])), 1, 1, 'C', false);
|
||
|
||
$total_JANVIER = $total_JANVIER + $dep['JANVIER'];
|
||
$total_FEVRIER = $total_FEVRIER + $dep['FEVRIER'];
|
||
$total_MARS = $total_MARS + $dep['MARS'];
|
||
$total_AVRIL = $total_AVRIL + $dep['AVRIL'];
|
||
$total_MAI = $total_MAI + $dep['MAI'];
|
||
$total_JUIN = $total_JUIN + $dep['JUIN'];
|
||
$total_JUILLET = $total_JUILLET + $dep['JUILLET'];
|
||
$total_AOUT = $total_AOUT + $dep['AOUT'];
|
||
$total_SEPTEMBRE = $total_SEPTEMBRE + $dep['SEPTEMBRE'];
|
||
$total_OCTOBRE = $total_OCTOBRE + $dep['OCTOBRE'];
|
||
$total_NOVEMBRE = $total_NOVEMBRE + $dep['NOVEMBRE'];
|
||
$total_DECEMBRE = $total_DECEMBRE + $dep['DECEMBRE'];
|
||
$total_TOTAUX = $total_TOTAUX + $dep['TOTAUX'];
|
||
}
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(75, $hl, convertirc("TOTAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_JANVIER), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_FEVRIER), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_MARS), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AVRIL), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_MAI), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_JUIN), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_JUILLET), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AOUT), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_SEPTEMBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_OCTOBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_NOVEMBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_DECEMBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_TOTAUX), 1, 1, 'C', true);
|
||
|
||
$total_JANVIERG = $total_JANVIERG + $total_JANVIER;
|
||
$total_FEVRIERG = $total_FEVRIERG + $total_FEVRIER;
|
||
$total_MARSG = $total_MARSG + $total_MARS;
|
||
$total_AVRILG = $total_AVRILG + $total_AVRIL;
|
||
$total_MAIG = $total_MAIG + $total_MAI;
|
||
$total_JUING = $total_JUING + $total_JUIN;
|
||
$total_JUILLETG = $total_JUILLETG + $total_JUILLET;
|
||
$total_AOUTG = $total_AOUTG + $total_AOUT;
|
||
$total_SEPTEMBREG = $total_SEPTEMBREG + $total_SEPTEMBRE;
|
||
$total_OCTOBREG = $total_OCTOBREG + $total_OCTOBRE;
|
||
$total_NOVEMBREG = $total_NOVEMBREG + $total_NOVEMBRE;
|
||
$total_DECEMBREG = $total_DECEMBREG + $total_DECEMBRE;
|
||
$total_TOTAUXG = $total_TOTAUXG + $total_TOTAUX;
|
||
}
|
||
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(75, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_JANVIERG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_FEVRIERG), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_MARSG), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AVRILG), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_MAIG), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_JUING), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_JUILLETG), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AOUTG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_SEPTEMBREG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_OCTOBREG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_NOVEMBREG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_DECEMBREG), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_TOTAUXG), 1, 1, 'C', true);
|
||
|
||
$pdf->Ln(5);
|
||
|
||
$pdf->Cell(45, $hl, convertirc(_("Nombre de lignes: ") . count($p_factures)), 0, 0, 'L', false);
|
||
|
||
|
||
////////////////////////////////////////////////////////////////// ft8
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
foreach ($colleges as $college) {
|
||
$pdf->AddPage();
|
||
$p_id_college = $college['idCollege'];
|
||
|
||
$p_factures = $this->detailsp->etatrecapdepensesparfamilledactesmedicaux($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 8'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_(" ETAT RECAPITULATIF DES DEPENSES PAR FAMILLE D'ACTES MEDICAUX")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 5, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(_($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$hl = 6;
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(15, $hl, convertirc(_('Code')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(80, $hl, convertirc(_("Libellé")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(20, $hl, convertirc(_("Quantité")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_("Montant Remboursé")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Coût Moyen")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(20, $hl, convertirc(_("Taux")), 1, 1, 'C', true);
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
$total_coutmoyen =0;
|
||
$total_quantite = 0;
|
||
$total_montantrembourse = 0;
|
||
$total_taux = 0;
|
||
|
||
foreach ($p_factures as $p_facture) {
|
||
$pdf->Cell(15, $hl, convertirc($p_facture['codeGarantie']), 1, 0, 'L', false);
|
||
$pdf->Cell(80, $hl, convertirc($p_facture['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(20, $hl, convertirc(format_N($p_facture['Quantite'])), 1, 0, 'C', false);
|
||
$pdf->Cell(30, $hl, convertirc(format_N($p_facture['MontantRembourse'])), 1, 0, 'R', false);
|
||
$pdf->Cell(25, $hl, convertirc(format_N($p_facture['Coutmoyen'])), 1, 0, 'R', false);
|
||
$pdf->Cell(20, $hl, convertirc($p_facture['Taux']), 1, 1, 'C', false);
|
||
|
||
$total_coutmoyen = $total_coutmoyen + $p_facture['Coutmoyen'];
|
||
$total_quantite = $total_quantite + $p_facture['Quantite'];
|
||
$total_montantrembourse = $total_montantrembourse + $p_facture['MontantRembourse'];
|
||
$total_taux = $total_taux + $p_facture['Taux'];
|
||
}
|
||
$hl = 8;
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(95, $hl, convertirc(_('TOTAL')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(20, $hl, convertirc(_(format_N($total_quantite))), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_(format_N($total_montantrembourse))), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_(format_N($total_coutmoyen))), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(20, $hl, convertirc(_(convertirc('100 %'))), 1, 1, 'C', true);
|
||
|
||
$chartX = 15;
|
||
$chartY = 175;
|
||
|
||
//dimension
|
||
$chartWidth = 180;
|
||
$chartHeight = 100;
|
||
|
||
//padding
|
||
$chartTopPadding = 12;
|
||
$chartLeftPadding = 20;
|
||
$chartBottomPadding = 10;
|
||
$chartRightPadding = 5;
|
||
|
||
//chart box
|
||
$chartBoxX = $chartX + $chartLeftPadding;
|
||
$chartBoxY = $chartY + $chartTopPadding;
|
||
$chartBoxWidth = $chartWidth - $chartLeftPadding - $chartRightPadding;
|
||
$chartBoxHeight = $chartHeight - $chartBottomPadding - $chartTopPadding;
|
||
|
||
//bar width
|
||
$barWidth = 8;
|
||
$valeur0 = 0;
|
||
$valeur1 = 0;
|
||
$valeur2 = 0;
|
||
$valeur3 = 0;
|
||
$valeur4 = 0;
|
||
$valeur5 = 0;
|
||
$valeur6 = 0;
|
||
$valeur7 = 0;
|
||
$valeur8 = 0;
|
||
$valeur9 = 0;
|
||
$valeur10 = 0;
|
||
|
||
$value = 0;
|
||
$v = 0;
|
||
$valeurs = array();
|
||
foreach ($p_factures as $p_factures['codeGarantie'] => $value) {
|
||
|
||
array_push($valeurs, $value['Taux']);
|
||
foreach ($valeurs as $key => $valeur) {
|
||
if ($value['codeGarantie'] == 'AUX') {
|
||
$valeur1 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'BIO') {
|
||
$valeur2 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'CON') {
|
||
$valeur3 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'DEN') {
|
||
$valeur4 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'EXA') {
|
||
$valeur5 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'HOS') {
|
||
$valeur6 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'IMA') {
|
||
$valeur7 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'MAT') {
|
||
$valeur8 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'OPT') {
|
||
$valeur9 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'PHA') {
|
||
$valeur10 = $value['Taux'];
|
||
}
|
||
$data = array(
|
||
'AUX' => [
|
||
'color' => [255, 0, 0],
|
||
'value' => $valeur1
|
||
],
|
||
'BIO' => [
|
||
'color' => [255, 255, 0],
|
||
'value' => $valeur2
|
||
],
|
||
'CON' => [
|
||
'color' => [50, 0, 255],
|
||
'value' => $valeur3
|
||
],
|
||
'DEN' => [
|
||
'color' => [255, 0, 255],
|
||
'value' => $valeur4
|
||
],
|
||
'EXA' => [
|
||
'color' => [0, 255, 0],
|
||
'value' => $valeur5
|
||
],
|
||
'HOS' => [
|
||
'color' => [200, 255, 100],
|
||
'value' => $valeur6
|
||
],
|
||
'IMA' => [
|
||
'color' => [121, 248, 248],
|
||
'value' => $valeur7
|
||
],
|
||
'MAT' => [
|
||
'color' => [121, 210, 180],
|
||
'value' => $valeur8
|
||
],
|
||
'OPT' => [
|
||
'color' => [221, 248, 248],
|
||
'value' => $valeur9
|
||
],
|
||
'PHA' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur10
|
||
]
|
||
);
|
||
}
|
||
}
|
||
$dataMax = 0;
|
||
foreach ($data as $item) {
|
||
if ($item['value'] > $dataMax)
|
||
$dataMax = $item['value'];
|
||
}
|
||
//data step
|
||
if ($dataMax > 200 and $dataMax < 600) {
|
||
|
||
$dataStep = 20;
|
||
}
|
||
if ($dataMax < 200) {
|
||
$dataStep = 10;
|
||
}
|
||
if ($dataMax > 1000) {
|
||
|
||
$dataStep = 100;
|
||
}
|
||
//set font, line width and color
|
||
$pdf->SetFont('Arial', '', 8);
|
||
$pdf->SetLineWidth(0.1);
|
||
$pdf->SetDrawColor(0);
|
||
//chart boundary
|
||
$pdf->Rect($chartX, $chartY, $chartWidth, $chartHeight);
|
||
//vertical axis line
|
||
$pdf->Line(
|
||
$chartBoxX,
|
||
$chartBoxY,
|
||
$chartBoxX,
|
||
($chartBoxY + $chartBoxHeight)
|
||
);
|
||
//horizontal axis line
|
||
$pdf->Line(
|
||
$chartBoxX - 2,
|
||
($chartBoxY + $chartBoxHeight),
|
||
$chartBoxX + ($chartBoxWidth),
|
||
($chartBoxY + $chartBoxHeight)
|
||
);
|
||
///vertical axis
|
||
//calculate chart's y axis scale unit
|
||
$yAxisUnits = $chartBoxHeight / $dataMax;
|
||
//draw the vertical (y) axis labels
|
||
for ($i = 0; $i <= $dataMax; $i += $dataStep) {
|
||
//y position
|
||
$yAxisPos = $chartBoxY + ($yAxisUnits * $i);
|
||
//draw y axis line
|
||
$pdf->Line(
|
||
$chartBoxX - 2,
|
||
$yAxisPos,
|
||
$chartBoxX,
|
||
$yAxisPos
|
||
);
|
||
//set cell position for y axis labels
|
||
$pdf->SetXY($chartBoxX - $chartLeftPadding, $yAxisPos - 2);
|
||
//$pdf->Cell($chartLeftPadding-4 , 5 , $dataMax-$i , 1);---------------
|
||
$pdf->Cell($chartLeftPadding - 4, 5, $dataMax - $i, 0, 0, 'R');
|
||
}
|
||
///horizontal axis
|
||
//set cells position
|
||
$pdf->SetXY($chartBoxX, $chartBoxY + $chartBoxHeight);
|
||
//cell's width
|
||
$xLabelWidth = $chartBoxWidth / count($data);
|
||
//$pdf->Cell($xLabelWidth , 5 , $itemName , 1 , 0 , 'C');-------------
|
||
//loop horizontal axis and draw the bar
|
||
$barXPos = 0;
|
||
foreach ($data as $itemName => $item) {
|
||
//print the label
|
||
//$pdf->Cell($xLabelWidth , 5 , $itemName , 1 , 0 , 'C');--------------
|
||
$pdf->Cell($xLabelWidth, 5, $itemName, 0, 0, 'C');
|
||
|
||
///drawing the bar
|
||
//bar color
|
||
$pdf->SetFillColor($item['color'][0], $item['color'][1], $item['color'][2]);
|
||
//bar height
|
||
$barHeight = $yAxisUnits * $item['value'];
|
||
//bar x position
|
||
$barX = ($xLabelWidth / 2) + ($xLabelWidth * $barXPos);
|
||
$barX = $barX - ($barWidth / 2);
|
||
$barX = $barX + $chartBoxX;
|
||
//bar y position
|
||
$barY = $chartBoxHeight - $barHeight;
|
||
$barY = $barY + $chartBoxY;
|
||
//draw the bar
|
||
$pdf->Rect($barX, $barY, $barWidth, $barHeight, 'DF');
|
||
//increase x position (next series)
|
||
$barXPos++;
|
||
}
|
||
//axis labels
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$pdf->SetXY($chartX, $chartY);
|
||
$pdf->Cell(30, 10, "Taux", 0);
|
||
$pdf->SetXY(($chartWidth / 2) - 50 + $chartX, $chartY + $chartHeight - ($chartBottomPadding / 2));
|
||
$pdf->Cell(100, 5, convertirc(_("Récapitulatif des dépenses par famille d'acte")), 0, 0, 'C');
|
||
}
|
||
|
||
//////////////////////////////////////////////////////////////////
|
||
//////////////////////////////////////////////////////////////////ft10
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
|
||
$depenses = $this->requete->getParametreFormulaire("depenses", "numerique");
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_limite = $_SESSION['depenses'];
|
||
$p_id_client = null;
|
||
$p_id_college = $idCollege;
|
||
$p_id = $entete['idPolice'];
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
foreach ($colleges as $college) {
|
||
$pdf->AddPage('L');
|
||
$p_id_college = $college['idCollege'];
|
||
|
||
$p_factures = $this->detailsp->evolutiondepfamilleAct($p_garant, $p_id_client, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 140, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 10'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
$pdf->Ln(2);
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("EVOLUTION MENSUELLE DES DEPENSES PAR FAMILLE D'ACTES")), 1, 0, 'C', true);
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
$pdf->Ln(4);
|
||
|
||
|
||
$pdf->Ln(8);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(15, $hl, convertirc(_('Code')), 1, 0, 'C', true);
|
||
$pdf->Cell(60, $hl, convertirc(_("Garantie")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Janvier")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Février")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Mars")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Avril")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Mai")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Juin")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Juillet")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Août")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Septembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Octobre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Novembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Décembre")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Totaux")), 1, 1, 'C', true);
|
||
$total_JANVIER = 0;
|
||
$total_FEVRIER = 0;
|
||
$total_MARS = 0;
|
||
$total_AVRIL = 0;
|
||
$total_MAI = 0;
|
||
$total_JUIN = 0;
|
||
$total_JUILLET = 0;
|
||
$total_AOUT = 0;
|
||
$total_SEPTEMBRE = 0;
|
||
$total_OCTOBRE = 0;
|
||
$total_NOVEMBRE = 0;
|
||
$total_DECEMBRE = 0;
|
||
$total_TOTAUX = 0;
|
||
$pdf->SetFont('Arial', '', 7);
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(15, $hl, convertirc($dep['codeGarantie']), 1, 0, 'C', false);
|
||
$pdf->Cell(60, $hl, convertirc($dep['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['JANVIER'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['FEVRIER'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['MARS'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['AVRIL'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['MAI'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['JUIN'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['JUILLET'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['AOUT'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['SEPTEMBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['OCTOBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['NOVEMBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['DECEMBRE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['TOTAUX'])), 1, 1, 'C', false);
|
||
|
||
$total_JANVIER = $total_JANVIER + $dep['JANVIER'];
|
||
$total_FEVRIER = $total_FEVRIER + $dep['FEVRIER'];
|
||
$total_MARS = $total_MARS + $dep['MARS'];
|
||
$total_AVRIL = $total_AVRIL + $dep['AVRIL'];
|
||
$total_MAI = $total_MAI + $dep['MAI'];
|
||
$total_JUIN = $total_JUIN + $dep['JUIN'];
|
||
$total_JUILLET = $total_JUILLET + $dep['JUILLET'];
|
||
$total_AOUT = $total_AOUT + $dep['AOUT'];
|
||
$total_SEPTEMBRE = $total_SEPTEMBRE + $dep['SEPTEMBRE'];
|
||
$total_OCTOBRE = $total_OCTOBRE + $dep['OCTOBRE'];
|
||
$total_NOVEMBRE = $total_NOVEMBRE + $dep['NOVEMBRE'];
|
||
$total_DECEMBRE = $total_DECEMBRE + $dep['DECEMBRE'];
|
||
$total_TOTAUX = $total_TOTAUX + $dep['TOTAUX'];
|
||
}
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(75, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_JANVIER), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_FEVRIER), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_MARS), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AVRIL), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_MAI), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_JUIN), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_JUILLET), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AOUT), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_SEPTEMBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_OCTOBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_NOVEMBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_DECEMBRE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_TOTAUX), 1, 1, 'C', true);
|
||
}
|
||
$pdf->AddPage();
|
||
////////////////////////////////////////////////////////////////// ft11
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_limite = $depenses;
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$primeSinistre = $this->detailsp->getprimesinistre($idPolice, $debutStat, $finStat);
|
||
|
||
$depensesFamille = $this->detailsp->detaildepensefamilleass($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
$depensesFamillesA = $this->detailsp->etatcomparatifdesdepensesA($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
$depensesFamillesB = $this->detailsp->etatcomparatifdesdepensesB($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 11'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR FAMILLE D'ASSURES")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(6);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(6);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(6);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(_($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
} else {
|
||
$pdf->Ln(6);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$pdf->Ln(2);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'BU', 10);
|
||
$annee = date("Y", strtotime($finStat));
|
||
$precannee = $annee - 1;
|
||
$pdf->Cell(95, $hl, convertirc(_('Etat des dépenses de l\'année ' . $precannee)), 1, 0, 'C', FALSE);
|
||
$pdf->Cell(95, $hl, convertirc(_('Etat des dépenses de l\'année ' . $annee)), 1, 1, 'C', FALSE);
|
||
$pdf->SetFillColor(255, 250, 205);
|
||
$pdf->SetFont('Arial', 'B', 6);
|
||
$pdf->Cell(44, $hl, convertirc(_('Famille d\'actes')), 1, 0, 'C', true);
|
||
$pdf->Cell(13, $hl, convertirc(_("Nombre")), 1, 0, 'C', true);
|
||
$pdf->Cell(14, $hl, convertirc(_("Montant net ")), 1, 0, 'C', true);
|
||
$pdf->Cell(13, $hl, convertirc(_("Coût moyen")), 1, 0, 'C', true);
|
||
$pdf->Cell(10, $hl, convertirc(_("Taux %")), 1, 0, 'C', true);
|
||
|
||
$pdf->SetX(106);
|
||
$pdf->SetFillColor(0, 100, 108);
|
||
$pdf->SetTextColor(255, 255, 255);
|
||
|
||
$pdf->Cell(44, $hl, convertirc(_('Famille d\'actes')), 1, 0, 'C', true);
|
||
$pdf->Cell(13, $hl, convertirc(_("Nombre")), 1, 0, 'C', true);
|
||
$pdf->Cell(14, $hl, convertirc(_("Montant net ")), 1, 0, 'C', true);
|
||
$pdf->Cell(13, $hl, convertirc(_("Coût moyen")), 1, 0, 'C', true);
|
||
$pdf->Cell(10, $hl, convertirc(_("Taux %")), 1, 1, 'C', true);
|
||
$pdf->SetTextColor(0, 0, 0);
|
||
|
||
$pdf->SetFont('Arial', '', 6);
|
||
|
||
$total_popActive = 0;
|
||
$total_popTraite = 0;
|
||
$total_montantReclame = 0;
|
||
$total_montantNonRembourse = 0;
|
||
$total_montantRembourse = 0;
|
||
$total_coutMoyen = 0;
|
||
$total_popActiveA = 0;
|
||
$total_popTraiteA = 0;
|
||
$total_montantReclameA = 0;
|
||
$total_montantNonRembourseA = 0;
|
||
$total_montantRembourseA = 0;
|
||
$total_coutMoyenA = 0;
|
||
|
||
foreach ($depensesFamillesA as $depA) {
|
||
|
||
|
||
$pdf->Cell(44, $hl, convertirc($depA['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(13, $hl, convertirc($depA['Quantite']), 1, 0, 'C', false);
|
||
$pdf->Cell(14, $hl, convertirc(format_N($depA['MontantRembourse'])), 1, 0, 'C', false);
|
||
$pdf->Cell(13, $hl, convertirc(format_N($depA['Coutmoyen'])), 1, 0, 'C', false);
|
||
$pdf->Cell(10, $hl, convertirc(($depA['Taux'])), 1, 1, 'C', false);
|
||
|
||
|
||
$total_quantiteA = $total_quantiteA + $depA['Quantite'];
|
||
$total_montantRembourseA = $total_montantRembourseA + $depA['MontantRembourse'];
|
||
$total_coutMoyenA = $total_montantRembourseA / $total_quantiteA;
|
||
$total_tauxA = $total_tauxA + $depA['Taux'];
|
||
}
|
||
$pdf->SetFont('Arial', 'B', 6);
|
||
$pdf->SetFillColor(255, 250, 205);
|
||
|
||
$pdf->Cell(44, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(13, $hl, format_N($total_quantiteA), 1, 0, 'C', true);
|
||
$pdf->Cell(14, $hl, format_N($total_montantRembourseA), 1, 0, 'C', true);
|
||
$pdf->Cell(13, $hl, format_N($total_coutMoyenA), 1, 0, 'C', true);
|
||
$pdf->Cell(10, $hl, format_N(100), 1, 0, 'C', true);
|
||
$pdf->SetY(89);
|
||
if ($p_id != null) {
|
||
$pdf->SetY(89);
|
||
} else {
|
||
$pdf->SetY(65);
|
||
}
|
||
foreach ($depensesFamillesB as $dep) {
|
||
|
||
$pdf->SetX(106);
|
||
|
||
$pdf->Cell(44, $hl, convertirc($dep['libelle']), 1, 0, 'L', false);
|
||
$pdf->Cell(13, $hl, convertirc($dep['Quantite']), 1, 0, 'C', false);
|
||
$pdf->Cell(14, $hl, convertirc(format_N($dep['MontantRembourse'])), 1, 0, 'C', false);
|
||
$pdf->Cell(13, $hl, convertirc(format_N($dep['Coutmoyen'])), 1, 0, 'C', false);
|
||
$pdf->Cell(10, $hl, convertirc($dep['Taux']), 1, 1, 'C', false);
|
||
|
||
|
||
$total_quantite = $total_quantite + $dep['Quantite'];
|
||
$total_montantRembourse = $total_montantRembourse + $dep['MontantRembourse'];
|
||
$total_coutMoyen = $total_montantRembourse / $total_quantite;
|
||
$total_taux = $total_taux + $dep['Taux'];
|
||
}
|
||
|
||
$pdf->SetX(106);
|
||
$pdf->SetFont('Arial', 'B', 6);
|
||
$pdf->SetFillColor(0, 100, 108);
|
||
$pdf->SetTextColor(255, 255, 255);
|
||
$pdf->Cell(44, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(13, $hl, format_N($total_quantite), 1, 0, 'C', true);
|
||
$pdf->Cell(14, $hl, format_N($total_montantRembourse), 1, 0, 'C', true);
|
||
$pdf->Cell(13, $hl, format_N($total_coutMoyen), 1, 0, 'C', true);
|
||
$pdf->Cell(10, $hl, format_N(100), 1, 1, 'C', true);
|
||
$pdf->SetTextColor(0, 0, 0);
|
||
|
||
$pdf->SetFont('Arial', 'BU', 10);
|
||
|
||
$pdf->SetY(175);
|
||
$pdf->SetX(50);
|
||
$pdf->Cell(120, 8, convertirc(_('Comparaison des dépenses de l\'année').' '. $precannee .' '._('et l\'année').' '. $annee), 1, 1, 'C', false);
|
||
|
||
|
||
$chartX = 15;
|
||
$chartY = 175;
|
||
|
||
//dimension
|
||
$chartWidth = 180;
|
||
$chartHeight = 100;
|
||
|
||
//padding
|
||
$chartTopPadding = 12;
|
||
$chartLeftPadding = 20;
|
||
$chartBottomPadding = 10;
|
||
$chartRightPadding = 5;
|
||
|
||
//chart box
|
||
$chartBoxX = $chartX + $chartLeftPadding;
|
||
$chartBoxY = $chartY + $chartTopPadding;
|
||
$chartBoxWidth = $chartWidth - $chartLeftPadding - $chartRightPadding;
|
||
$chartBoxHeight = $chartHeight - $chartBottomPadding - $chartTopPadding;
|
||
|
||
//bar width
|
||
$barWidth = 5;
|
||
$barWidth1 = 5;
|
||
$valeur0 = 0;
|
||
$valeur1 = 0;
|
||
$valeur2 = 0;
|
||
$valeur3 = 0;
|
||
$valeur4 = 0;
|
||
$valeur5 = 0;
|
||
$value = 0;
|
||
$v = 0;
|
||
$valeur0A = 0;
|
||
$valeur1A = 0;
|
||
$valeur2A = 0;
|
||
$valeur3A = 0;
|
||
$valeur4A = 0;
|
||
$valeur5A = 0;
|
||
$value1 = 0;
|
||
$v = 0;
|
||
$valeurs = array();
|
||
$valeurs1 = array();
|
||
foreach ($depensesFamillesA as $depensesFamillesA['codeGarantie'] => $value1) {
|
||
array_push($valeurs1, $value1['Taux']);
|
||
|
||
foreach ($valeurs1 as $key => $valeurA) {
|
||
|
||
|
||
if ($value1['codeGarantie'] == 'AUX') {
|
||
$valeur1A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'BIO') {
|
||
$valeur2A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'CON') {
|
||
$valeur3A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'DEN') {
|
||
$valeur4A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'EXA') {
|
||
$valeur5A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'HOS') {
|
||
$valeur6A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'IMA') {
|
||
$valeur7A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'MAT') {
|
||
$valeur8A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'OPT') {
|
||
$valeur9A = $value1['Taux'];
|
||
}
|
||
if ($value1['codeGarantie'] == 'PHA') {
|
||
$valeur10A = $value1['Taux'];
|
||
}
|
||
$data1 = array(
|
||
'AUX' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur1A
|
||
],
|
||
'BIO' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur2A
|
||
],
|
||
'CON' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur3A
|
||
],
|
||
'DEN' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur4A
|
||
],
|
||
'EXA' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur5A
|
||
],
|
||
'HOS' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur6A
|
||
],
|
||
'IMA' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur7A
|
||
],
|
||
'MAT' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur8A
|
||
],
|
||
'OPT' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur9A
|
||
],
|
||
'PHA' => [
|
||
'color' => [255, 250, 205],
|
||
'value' => $valeur10A
|
||
]
|
||
);
|
||
}
|
||
}
|
||
foreach ($depensesFamillesB as $depensesFamillesB['codeGarantie'] => $value) {
|
||
array_push($valeurs, $value['Taux']);
|
||
|
||
foreach ($valeurs as $key => $valeur) {
|
||
|
||
|
||
if ($value['codeGarantie'] == 'AUX') {
|
||
$valeur1 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'BIO') {
|
||
$valeur2 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'CON') {
|
||
$valeur3 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'DEN') {
|
||
$valeur4 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'EXA') {
|
||
$valeur5 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'HOS') {
|
||
$valeur6 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'IMA') {
|
||
$valeur7 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'MAT') {
|
||
$valeur8 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'OPT') {
|
||
$valeur9 = $value['Taux'];
|
||
}
|
||
if ($value['codeGarantie'] == 'PHA') {
|
||
$valeur10 = $value['Taux'];
|
||
}
|
||
$data = array(
|
||
'AUX' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur1
|
||
],
|
||
'BIO' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur2
|
||
],
|
||
'CON' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur3
|
||
],
|
||
'DEN' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur4
|
||
],
|
||
'EXA' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur5
|
||
],
|
||
'HOS' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur6
|
||
],
|
||
'IMA' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur7
|
||
],
|
||
'MAT' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur8
|
||
],
|
||
'OPT' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur9
|
||
],
|
||
'PHA' => [
|
||
'color' => [0, 100, 108],
|
||
'value' => $valeur10
|
||
]
|
||
);
|
||
}
|
||
}
|
||
|
||
//$dataMax
|
||
$dataMax1 = 0;
|
||
foreach ($data1 as $item1) {
|
||
if ($item1['value'] > $dataMax1)
|
||
$dataMax1 = $item1['value'];
|
||
}
|
||
//data step
|
||
if ($dataMax1 > 200 and $dataMax1 < 600) {
|
||
|
||
$dataStep1 = 20;
|
||
}
|
||
if ($dataMax1 < 200) {
|
||
$dataStep1 = 10;
|
||
}
|
||
if ($dataMax1 > 1000) {
|
||
|
||
$dataStep1 = 100;
|
||
}
|
||
$dataMax = 0;
|
||
foreach ($data as $item) {
|
||
if ($item['value'] > $dataMax)
|
||
$dataMax = $item['value'];
|
||
}
|
||
//data step
|
||
if ($dataMax > 200 and $dataMax < 600) {
|
||
|
||
$dataStep = 20;
|
||
}
|
||
if ($dataMax < 200) {
|
||
$dataStep = 10;
|
||
}
|
||
if ($dataMax > 1000) {
|
||
|
||
$dataStep = 100;
|
||
}
|
||
//set font, line width and color
|
||
$pdf->SetFont('Arial', '', 8);
|
||
$pdf->SetLineWidth(0.1);
|
||
$pdf->SetDrawColor(0);
|
||
|
||
//chart boundary
|
||
$pdf->Rect($chartX, $chartY, $chartWidth, $chartHeight);
|
||
|
||
//vertical axis line
|
||
$pdf->Line(
|
||
$chartBoxX,
|
||
$chartBoxY,
|
||
$chartBoxX,
|
||
($chartBoxY + $chartBoxHeight)
|
||
);
|
||
//horizontal axis line
|
||
$pdf->Line(
|
||
$chartBoxX - 2,
|
||
($chartBoxY + $chartBoxHeight),
|
||
$chartBoxX + ($chartBoxWidth),
|
||
($chartBoxY + $chartBoxHeight)
|
||
);
|
||
|
||
///vertical axis
|
||
//calculate chart's y axis scale unit
|
||
$yAxisUnits = $chartBoxHeight / $dataMax;
|
||
$yAxisUnits1 = $chartBoxHeight / $dataMax1;
|
||
//draw the vertical (y) axis labels
|
||
for ($i = 0; $i <= $dataMax1; $i += $dataStep1) {
|
||
//y position
|
||
$yAxisPos1 = $chartBoxY + ($yAxisUnits1 * $i);
|
||
//draw y axis line
|
||
$pdf->Line(
|
||
$chartBoxX - 2,
|
||
$yAxisPos1,
|
||
$chartBoxX,
|
||
$yAxisPos1
|
||
);
|
||
//set cell position for y axis labels
|
||
$pdf->SetTextColor(255, 250, 205);
|
||
$pdf->SetXY($chartBoxX - $chartLeftPadding, $yAxisPos1 - 2);
|
||
//$pdf->Cell($chartLeftPadding-4 , 5 , $dataMax-$i , 1);---------------
|
||
$pdf->Cell($chartLeftPadding - 4, 5, $dataMax1 - $i, 0, 0, 'L');
|
||
}
|
||
for ($i = 0; $i <= $dataMax; $i += $dataStep) {
|
||
//y position
|
||
$yAxisPos = $chartBoxY + ($yAxisUnits * $i);
|
||
//draw y axis line
|
||
$pdf->Line(
|
||
$chartBoxX - 2,
|
||
$yAxisPos,
|
||
$chartBoxX,
|
||
$yAxisPos
|
||
);
|
||
//set cell position for y axis labels
|
||
$pdf->SetXY($chartBoxX - $chartLeftPadding, $yAxisPos - 2);
|
||
//$pdf->Cell($chartLeftPadding-4 , 5 , $dataMax-$i , 1);---------------
|
||
$pdf->SetTextColor(0, 100, 108);
|
||
$pdf->Cell($chartLeftPadding - 2, 5, $dataMax - $i, 0, 0, 'R');
|
||
$pdf->SetTextColor(0);
|
||
}
|
||
|
||
///horizontal axis
|
||
//set cells position
|
||
$pdf->SetXY($chartBoxX, $chartBoxY + $chartBoxHeight);
|
||
|
||
//cell's width
|
||
$xLabelWidth = $chartBoxWidth / count($data);
|
||
|
||
//$pdf->Cell($xLabelWidth , 5 , $itemName , 1 , 0 , 'C');-------------
|
||
//loop horizontal axis and draw the bar
|
||
$barXPos1 = 0;
|
||
foreach ($data1 as $itemName1 => $item1) {
|
||
//print the label
|
||
//$pdf->Cell($xLabelWidth , 5 , $itemName , 1 , 0 , 'C');--------------
|
||
//$pdf->Cell($xLabelWidth , 5 , $itemName , 0 , 0 , 'C');
|
||
|
||
///drawing the bar
|
||
//bar color
|
||
$pdf->SetFillColor($item1['color'][0], $item1['color'][1], $item1['color'][2]);
|
||
//bar height
|
||
$barHeight = $yAxisUnits1 * $item1['value'];
|
||
//bar x position
|
||
$barX1 = ($xLabelWidth / 2) + ($xLabelWidth * $barXPos1);
|
||
$barX1 = $barX1 - ($barWidth / 2);
|
||
$barX1 = $barX1 + $chartBoxX;
|
||
//bar y position
|
||
$barY1 = $chartBoxHeight - $barHeight;
|
||
$barY1 = $barY1 + $chartBoxY;
|
||
//draw the bar
|
||
$pdf->Rect($barX1, $barY1, $barWidth, $barHeight, 'DF');
|
||
//increase x position (next series)
|
||
$barXPos1++;
|
||
}
|
||
$barXPos = 0;
|
||
//highlight_string("<?php\n\$datas =\n" . var_export($data1 , true) . ";\n>");
|
||
foreach ($data as $itemName => $item) {
|
||
//print the label
|
||
//$pdf->Cell($xLabelWidth , 5 , $itemName , 1 , 0 , 'C');--------------
|
||
$pdf->Cell($xLabelWidth, 5, $itemName, 0, 0, 'C');
|
||
|
||
///drawing the bar
|
||
//bar color
|
||
$pdf->SetFillColor($item['color'][0], $item['color'][1], $item['color'][2]);
|
||
//bar height
|
||
$barHeight = $yAxisUnits * $item['value'];
|
||
//bar x position
|
||
$barX = ($xLabelWidth / 2) + ($xLabelWidth * $barXPos);
|
||
$barX = $barX - ($barWidth / 2);
|
||
$barX = $barX + $chartBoxX + 5;
|
||
//bar y position
|
||
$barY = $chartBoxHeight - $barHeight;
|
||
$barY = $barY + $chartBoxY;
|
||
//draw the bar
|
||
$pdf->Rect($barX, $barY, $barWidth, $barHeight, 'DF');
|
||
//increase x position (next series)
|
||
$barXPos++;
|
||
}
|
||
//axis labels
|
||
$pdf->SetFont('Arial', 'B', 9);
|
||
$pdf->SetXY($chartX, $chartY);
|
||
$pdf->Cell(30, 10, "Taux", 0);
|
||
$pdf->SetXY(($chartWidth / 2) - 50 + $chartX, $chartY + $chartHeight - ($chartBottomPadding / 2));
|
||
$pdf->SetXY(($chartWidth / 2) - 50 + $chartX, $chartY + $chartHeight - ($chartBottomPadding / 2));
|
||
$pdf->Cell(100, 5, convertirc(_("Récapitulatif des dépenses par famille d'acte")), 0, 0, 'C');
|
||
|
||
////////////////////////// ft13
|
||
//////////////////////////////////////////////////////////////////
|
||
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
|
||
|
||
$p_id_client = null;
|
||
$p_id_college = $idCollege;
|
||
$p_id = $entete['idPolice'];
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
|
||
foreach ($colleges as $college) {
|
||
$pdf->AddPage('L');
|
||
$p_id_college = $college['idCollege'];
|
||
|
||
$p_factures = $this->detailsp->depensesparfamilledactesetparprestataires($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 140, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 13'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR FAMILLE D'ACTES ET PAR PRESTATATAIRES")), 1, 0, 'C', true);
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$pdf->Ln(4);
|
||
$pdf->SetX(65);
|
||
$pdf->Cell(170, 6, convertirc(_('DEPENSES SUPERIEURES A') . ' : ' . format_N($p_limite) . ' ' . $_SESSION['devise_C']), 1, 1, 'C', false);
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
$pdf->Ln(4);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 6);
|
||
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(62, $hl, convertirc(_("Prestataire")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_('Consultation')), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Imagerie")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Biologie")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Dentisterie")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Optique")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Hospitalisation")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Pharmacie")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Maternité")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("# Autres.")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("# Aux Med.")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("Assistance")), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, convertirc(_("# Trans Med.")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("# Bilan.")), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc(_("Totaux")), 1, 1, 'C', true);
|
||
|
||
$total_CONSULTATION =
|
||
$total_IMAGERIE =
|
||
$total_BIOLOGIE =
|
||
$total_DENTISTERIE =
|
||
$total_OPTIQUE =
|
||
$total_HOSPITALISATION =
|
||
$total_PHARMACIE =
|
||
$total_MATERNITE =
|
||
$total_AUTRES_EXAMENS =
|
||
$total_AUXILIAIRES_MEDICAUX =
|
||
$total_ASSISTANCE =
|
||
$total_TRANSPORT_MEDICALISE =
|
||
$total_BILAN_DE_SANTE =
|
||
$total_TOTAUX = 0;
|
||
$pdf->SetFont('Arial', '', 6);
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(62, $hl, convertirc(substr($dep['Prestataire'], 1, 47)), 1, 0, 'L', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['CONSULTATION'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['IMAGERIE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['BIOLOGIE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['DENTISTERIE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['OPTIQUE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['HOSPITALISATION'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['PHARMACIE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['MATERNITE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['AUTRES_EXAMENS'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['AUXILIAIRES_MEDICAUX'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['ASSISTANCE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(16, $hl, convertirc(format_N($dep['TRANSPORT_MEDICALISE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['BILAN_DE_SANTE'])), 1, 0, 'C', false);
|
||
$pdf->Cell(15, $hl, convertirc(format_N($dep['TOTAUX'])), 1, 1, 'C', false);
|
||
|
||
$total_CONSULTATION = $total_CONSULTATION + $dep['CONSULTATION'];
|
||
$total_IMAGERIE = $total_IMAGERIE + $dep['IMAGERIE'];
|
||
$total_BIOLOGIE = $total_BIOLOGIE + $dep['BIOLOGIE'];
|
||
$total_DENTISTERIE = $total_DENTISTERIE + $dep['DENTISTERIE'];
|
||
$total_OPTIQUE = $total_OPTIQUE + $dep['OPTIQUE'];
|
||
$total_HOSPITALISATION = $total_HOSPITALISATION + $dep['HOSPITALISATION'];
|
||
$total_PHARMACIE = $total_PHARMACIE + $dep['PHARMACIE'];
|
||
$total_MATERNITE = $total_MATERNITE + $dep['MATERNITE'];
|
||
$total_AUTRES_EXAMENS = $total_AUTRES_EXAMENS + $dep['AUTRES_EXAMENS'];
|
||
$total_AUXILIAIRES_MEDICAUX = $total_AUXILIAIRES_MEDICAUX + $dep['AUXILIAIRES_MEDICAUX'];
|
||
$total_ASSISTANCE = $total_ASSISTANCE + $dep['ASSISTANCE'];
|
||
$total_TRANSPORT_MEDICALISE = $total_TRANSPORT_MEDICALISE + $dep['TRANSPORT_MEDICALISE'];
|
||
$total_BILAN_DE_SANTE = $total_BILAN_DE_SANTE + $dep['BILAN_DE_SANTE'];
|
||
$total_TOTAUX = $total_TOTAUX + $dep['TOTAUX'];
|
||
}
|
||
$pdf->SetFont('Arial', 'B', 8);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(62, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_CONSULTATION), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_IMAGERIE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_BIOLOGIE), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_DENTISTERIE), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_OPTIQUE), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_HOSPITALISATION), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_PHARMACIE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_MATERNITE), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_AUTRES_EXAMENS), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_AUXILIAIRES_MEDICAUX), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_ASSISTANCE), 1, 0, 'C', true);
|
||
$pdf->Cell(16, $hl, format_N($total_TRANSPORT_MEDICALISE), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_BILAN_DE_SANTE), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, format_N($total_TOTAUX), 1, 1, 'C', true);
|
||
}
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Autres. = Autres Examens")), 0, 0, 'L', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Aux Med. = Auxiliaire Médicaux")), 0, 0, 'L', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Trans Med. = Transport Medicalisé")), 0, 0, 'L', false);
|
||
$pdf->Ln(5);
|
||
$pdf->Cell(45, $hl, convertirc(_("# Bilan. = Bilan de santé")), 0, 0, 'L', false);
|
||
|
||
|
||
////////////////////////////////////////////////////////////////// ft14
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$depenses = $this->requete->getParametreFormulaire("depenses", "numerique");
|
||
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$p_factures = $this->detailsp->etathopitalisationsparaffections($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$pdf->AddPage();
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 14'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': '. heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143); // bleu
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES HOSPITALISATIONS PAR AFFECTIONS")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
|
||
$pdf->Ln(8);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(54, $hl, convertirc(_('Code Affection')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(26, $hl, convertirc(_("Quantité")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_("Montant Facture")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_("Apres Décompte")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_("Coût Moyen")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(20, $hl, convertirc(_("Taux (%)")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 10);
|
||
|
||
$total_Quantite =
|
||
$total_montantFacture =
|
||
$total_apresDecompte =
|
||
$total_Coutmoyen =
|
||
$total_Taux = 0;
|
||
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(54, $hl, convertirc($dep['CodeAffection']), 1, 0, 'C', false);
|
||
$pdf->Cell(26, $hl, convertirc(format_N($dep['Quantite'])), 1, 0, 'C', false);
|
||
$pdf->Cell(30, $hl, convertirc(format_N($dep['montantFacture'])), 1, 0, 'R', false);
|
||
$pdf->Cell(30, $hl, convertirc(format_N($dep['apresDecompte'])), 1, 0, 'R', false);
|
||
$pdf->Cell(30, $hl, convertirc(format_N($dep['Coutmoyen'])), 1, 0, 'R', false);
|
||
$pdf->Cell(20, $hl, convertirc($dep['Taux']), 1, 1, 'C', false);
|
||
|
||
$total_Quantite = $total_Quantite + $dep['Quantite'];
|
||
$total_montantFacture = $total_montantFacture + $dep['montantFacture'];
|
||
$total_apresDecompte = $total_apresDecompte + $dep['apresDecompte'];
|
||
$total_Taux = $total_Taux + $dep['Taux'];
|
||
}
|
||
$total_Coutmoyen = $total_apresDecompte / $total_Quantite;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(54, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(26, $hl, format_N($total_Quantite), 1, 0, 'C', true);
|
||
$pdf->Cell(30, $hl, format_N($total_montantFacture), 1, 0, 'C', true);
|
||
$pdf->Cell(30, $hl, format_N($total_apresDecompte), 1, 0, 'C', true);
|
||
$pdf->Cell(30, $hl, format_N($total_Coutmoyen), 1, 0, 'C', true);
|
||
$pdf->Cell(20, $hl, convertirc('100 %'), 1, 1, 'C', true);
|
||
$pdf->AddPage();
|
||
|
||
////////////////////////////////////////////////////////////////// ft15
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
$depenses = $this->requete->getParametreFormulaire("depenses", "numerique");
|
||
|
||
//highlight_string("<?php\n\$datas =\n" . var_export($depenses, true) . ";\n>");
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 15'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143); // bleu
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR FAMILLE D'AFFECTION")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$colleges = $this->college->getCollegesPolice($idPolice);
|
||
foreach ($colleges as $college) {
|
||
|
||
$p_id_college = $college['idCollege'];
|
||
|
||
|
||
$p_factures = $this->detailsp->etatdepensepartypeaffection($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$pdf->Ln(8);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($college['libelleCollege']), 0, 1, 'L', false);
|
||
$pdf->Ln(4);
|
||
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(67, $hl, convertirc(_('Type d\'Affection')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(34, $hl, convertirc(_("Montant Facture")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(34, $hl, convertirc(_("Apres Décompte")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_("Coût Moyen")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Taux (%)")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 10);
|
||
|
||
$total_montantFacture =
|
||
$total_apresDecompte =
|
||
$total_Coutmoyen =
|
||
$total_Taux = 0;
|
||
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(67, $hl, convertirc($dep['TypeAffection']), 1, 0, 'L', false);
|
||
$pdf->Cell(34, $hl, convertirc(format_N($dep['montantFacture'])), 1, 0, 'R', false);
|
||
$pdf->Cell(34, $hl, convertirc(format_N($dep['apresDecompte'])), 1, 0, 'R', false);
|
||
$pdf->Cell(30, $hl, convertirc(format_N($dep['Coutmoyen'])), 1, 0, 'R', false);
|
||
$pdf->Cell(25, $hl, convertirc($dep['Taux']), 1, 1, 'C', false);
|
||
|
||
$total_montantFacture = $total_montantFacture + $dep['montantFacture'];
|
||
$total_apresDecompte = $total_apresDecompte + $dep['apresDecompte'];
|
||
$total_Coutmoyen = $total_Coutmoyen + $dep['Coutmoyen'];
|
||
$total_Taux = $total_Taux + $dep['Taux'];
|
||
}
|
||
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(67, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(34, $hl, format_N($total_montantFacture), 1, 0, 'C', true);
|
||
$pdf->Cell(34, $hl, format_N($total_apresDecompte), 1, 0, 'C', true);
|
||
$pdf->Cell(30, $hl, format_N($total_Coutmoyen), 1, 0, 'C', true);
|
||
$pdf->Cell(25, $hl, convertirc('100 %'), 1, 1, 'C', true);
|
||
}
|
||
$pdf->AddPage();
|
||
|
||
////////////////////////////////////////////////////////////////// ft16
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
$p_factures = $this->detailsp->etatdepenseparaffection($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 16'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
$pdf->SetFillColor(143, 206, 143); // bleu
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR AFFECTION")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc(entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
|
||
$pdf->Ln(8);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(67, $hl, convertirc(_('Affection')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(34, $hl, convertirc(_("Montant Facture")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(34, $hl, convertirc(_("Apres Décompte")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(30, $hl, convertirc(_("Coût Moyen")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(25, $hl, convertirc(_("Taux (%)")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 10);
|
||
|
||
$total_montantFacture =
|
||
$total_apresDecompte =
|
||
$total_Coutmoyen =
|
||
$total_Taux = 0;
|
||
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(67, $hl, convertirc($dep['Affection']), 1, 0, 'L', false);
|
||
$pdf->Cell(34, $hl, convertirc(format_N($dep['montantFacture'])), 1, 0, 'R', false);
|
||
$pdf->Cell(34, $hl, convertirc(format_N($dep['apresDecompte'])), 1, 0, 'R', false);
|
||
$pdf->Cell(30, $hl, convertirc(format_N($dep['Coutmoyen'])), 1, 0, 'R', false);
|
||
$pdf->Cell(25, $hl, convertirc($dep['Taux']), 1, 1, 'C', false);
|
||
|
||
$total_montantFacture = $total_montantFacture + $dep['montantFacture'];
|
||
$total_apresDecompte = $total_apresDecompte + $dep['apresDecompte'];
|
||
$total_Coutmoyen = $total_Coutmoyen + $dep['Coutmoyen'];
|
||
$total_Taux = $total_Taux + $dep['Taux'];
|
||
}
|
||
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(67, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(34, $hl, format_N($total_montantFacture), 1, 0, 'C', true);
|
||
$pdf->Cell(34, $hl, format_N($total_apresDecompte), 1, 0, 'C', true);
|
||
$pdf->Cell(30, $hl, format_N($total_Coutmoyen), 1, 0, 'C', true);
|
||
$pdf->Cell(25, $hl, convertirc('100 %'), 1, 1, 'C', true);
|
||
|
||
//////////////////////////////////////////////////////////////////ft17
|
||
//////////////////////////////////////////////////////////////////
|
||
$pdf->AddPage();
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
$p_limite = 0;
|
||
$p_limite = $_SESSION['depenses'];
|
||
$p_factures = $this->detailsp->etatdepenseparpharmacie($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('FICHE TECHNIQUE No 17'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
// $pdf->AliasNbPages();
|
||
|
||
//$pdf->SetTextColor(81,163,226);
|
||
$pdf->SetFillColor(143, 206, 143); // bleu
|
||
$pdf->Cell(0, 8, convertirc(_("ETAT DES DEPENSES PAR PHARMACIE")), 1, 0, 'C', true);
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'B', 11);
|
||
$pdf->SetTextColor(0);
|
||
$pdf->Ln(8);
|
||
$pdf->Cell(0, 6, convertirc(_('PERIODE COMPTABLE CONSIDEREE') . ' : ' . dateLang($debutStat, $_SESSION['lang']) . ' ' . _('AU') . ' ' . dateLang($finStat, $_SESSION['lang'])), 0, 1, 'C', false);
|
||
if ($p_id != null) {
|
||
|
||
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['garant']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('SOUSCRIPTEUR').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['souscripteur']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('POLICE No').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['numeroPolice'] . ' / ' . $entete['libellePolice']), 0, 1, 'L', false);
|
||
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COURTIER').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($entete['courtier']), 0, 1, 'L', false);
|
||
|
||
if ($idCollege != null) {
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('COLLEGE').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($_SESSION['collegeStat']), 0, 1, 'L', false);
|
||
}
|
||
|
||
} else {
|
||
$pdf->Ln(10);
|
||
$pdf->SetFont('Arial', 'BUI', 11);
|
||
$pdf->Cell(35, 8, convertirc(_('GARANT').': '), 0, 0, 'L', false);
|
||
$pdf->SetFont('Arial', 'BI', 11);
|
||
$pdf->Cell(0, 8, convertirc($p_garant), 0, 1, 'L', false);
|
||
}
|
||
$pdf->SetX(20);
|
||
$pdf->Cell(170, 6, convertirc(_('DEPENSES SUPERIEURES A') . ' : ' . format_N($depenses) . ' ' . $_SESSION['devise_C']), 1, 1, 'C', false);
|
||
|
||
$pdf->Ln(4);
|
||
$hl = 7;
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(15, $hl, convertirc(_('Code')), 1, 0, 'C', true);
|
||
$pdf->Cell(76, $hl, convertirc(_('Prestataire')), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(28, $hl, convertirc(_("Montant Facture")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(28, $hl, convertirc(_("Apres Décompte")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(28, $hl, convertirc(_("Coût Moyen")), 1, 0, 'C', true);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(15, $hl, convertirc(_("Taux (%)")), 1, 1, 'C', true);
|
||
|
||
$pdf->SetFont('Arial', '', 9);
|
||
|
||
$total_montantFacture =
|
||
$total_apresDecompte =
|
||
$total_Coutmoyen =
|
||
$total_Taux = 0;
|
||
|
||
foreach ($p_factures as $dep) {
|
||
$pdf->Cell(15, $hl, convertirc($dep['codeP']), 1, 0, 'C', false);
|
||
$pdf->Cell(76, $hl, convertirc(substr($dep['Prestataire'], 0, 38)), 1, 0, 'L', false);
|
||
$pdf->Cell(28, $hl, convertirc(format_N($dep['montantFacture'])), 1, 0, 'R', false);
|
||
$pdf->Cell(28, $hl, convertirc(format_N($dep['apresDecompte'])), 1, 0, 'R', false);
|
||
$pdf->Cell(28, $hl, convertirc(format_N($dep['Coutmoyen'])), 1, 0, 'R', false);
|
||
$pdf->Cell(15, $hl, convertirc($dep['Taux']), 1, 1, 'C', false);
|
||
|
||
$total_montantFacture = $total_montantFacture + $dep['montantFacture'];
|
||
$total_apresDecompte = $total_apresDecompte + $dep['apresDecompte'];
|
||
$total_Coutmoyen = $total_Coutmoyen + $dep['Coutmoyen'];
|
||
$total_Taux = $total_Taux + $dep['Taux'];
|
||
}
|
||
|
||
$pdf->SetFont('Arial', 'B', 10);
|
||
$pdf->SetFillColor(143, 206, 143);
|
||
$pdf->Cell(91, $hl, convertirc("TOTAL GENERAL"), "1", 0, 'C', true);
|
||
$pdf->Cell(28, $hl, format_N($total_montantFacture), 1, 0, 'C', true);
|
||
$pdf->Cell(28, $hl, format_N($total_apresDecompte), 1, 0, 'C', true);
|
||
$pdf->Cell(28, $hl, format_N($total_Coutmoyen), 1, 0, 'C', true);
|
||
$pdf->Cell(15, $hl, convertirc("100 %"), 1, 1, 'C', true);
|
||
$pdf->AddPage();
|
||
|
||
|
||
////////////////////////////////////////////////////////////////// annexes
|
||
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
||
if ($idCollege == "") {
|
||
$idCollege = null;
|
||
}
|
||
$debutStat = $this->requete->getParametreDate("debutStat");
|
||
$finStat = $this->requete->getParametreDate("finStat");
|
||
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
||
|
||
|
||
$_SESSION['debutStat'] = $debutStat;
|
||
$_SESSION['finStat'] = $finStat;
|
||
$_SESSION['depenses'] = $depenses;
|
||
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
||
$p_datedebut = $_SESSION['debutStat'];
|
||
$p_datefin = $_SESSION['finStat'];
|
||
$p_garant = $codeGcAssureur;
|
||
$p_id = $entete['idPolice'];
|
||
$p_id_college = $idCollege;
|
||
$p_id_clients = null;
|
||
|
||
$p_limite = 0;
|
||
$p_limite = $_SESSION['depenses'];
|
||
$p_factures = $this->detailsp->etatdepenseparpharmacie($p_garant, $p_id_clients, $p_id, $p_id_college, $p_datedebut, $p_datefin, $p_limite);
|
||
|
||
$pdf->SetMargins(10, 10, 10);
|
||
$pdf->Image($_SESSION['lienLogo'], 94, 3, 15);
|
||
$pdf->SetFont('Arial', 'B', 7);
|
||
|
||
$pdf->Cell(0, 5, _('Annexes'), 0, 1, 'L', false);
|
||
$pdf->SetY(10);
|
||
$pdf->SetFont('Arial', '', 7);
|
||
$pdf->Cell(0, 5, _('Edition du').': ' . heureCouranteLang($_SESSION['lang']), 0, 1, 'R', false);
|
||
|
||
$pdf->Ln(2);
|
||
|
||
$pdf->SetFont('Arial', 'B', 13);
|
||
|
||
// $pdf->AliasNbPages();
|
||
|
||
//$pdf->SetTextColor(81,163,226);
|
||
$pdf->SetFillColor(143, 206, 143); // bleu
|
||
$pdf->Ln(30);
|
||
$pdf->SetFont('Times', 'B', 32);
|
||
|
||
$pdf->Cell(0, 8, convertirc(_("ANNEXES")), 0, 1, 'C', FALSE);
|
||
$pdf->Ln(10);
|
||
|
||
$pdf->SetFont('Times', 'B', 14);
|
||
$pdf->Cell(10, 8, convertirc(_("")), 0, 0, 'C', FALSE);
|
||
|
||
$pdf->Cell(180, 8, convertirc(_("FICHE TECHNIQUE 9: Etat détaillé des dépenses par famille d’actes")), 0, 1, 'L', FALSE);
|
||
$pdf->Ln(10);
|
||
|
||
$pdf->Cell(10, 8, convertirc(_("")), 0, 0, 'C', FALSE);
|
||
|
||
$pdf->Cell(180, 8, convertirc(_("FICHE TECHNIQUE 12: Etat des dépenses par prestataires médicaux")), 0, 1, 'L', FALSE);
|
||
|
||
|
||
///////////////////////
|
||
$fichier = "Temp/TMP_KIT_STATISTIQUES" . "_" . uniqid() . ".pdf";
|
||
$pdf->Output($fichier, "F");
|
||
|
||
$t_html = ' <div id ="div_export_b" class="alert alert-info"> ';
|
||
$t_html .= ' <a style="font-size:15pt;" href="' . $fichier . '" target="_blank" > ' . _("TELECHARGER") . ' </a> ';
|
||
$t_html .= ' </div ';
|
||
echo $t_html;
|
||
}
|
||
}
|