production/Controleur/Editions/piedfacture.php
2025-12-02 11:29:44 +00:00

61 lines
2.6 KiB
PHP
Executable File

<?php
$pdf->SetFont('Arial','', 11);
$pdf->SetTextColor(255,0,0); //Rouge
$pdf->SetFillColor(255,255,255); // blanc
$pdf->Cell(0,$ht,convertirc(_('Echéance').': '.$entetefacturegarant['echeance']." ". _("jours à compter de la date de facturation.")),0,1,'L',true);
$pdf->Ln(3);
$pdf->SetTextColor(0,0,0); //Rouge
$pdf->Cell(0,$ht,convertirc(_('Recevez Madame, Monsieur nos salutations distinguées.')),0,1,'L',false);
$pdf->SetTextColor(255,0,0); //Rouge
$pdf->SetFont('Arial','B', 11);
$pdf->Cell(0,$ht,convertirc(_('EXEMPLAIRE CLIENT')),1,1,'C',true);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(0,$ht,convertirc(_('RESERVE').' '.$entetefacturegarant['centreGestion']),1,1,'C',false);
$pdf->Ln(5);
if($entetefacturegarant['codeTypeGarant'] == "CIE"){
$pdf->Cell(53,$ht,convertirc(_("Période")),0,0,'C',false);
$pdf->Cell(72,$ht,convertirc(_("Garant")),0,0,'C',false);
}else{
$pdf->Cell(53,$ht,convertirc(_("Convention")),0,0,'C',false);
$pdf->Cell(72,$ht,convertirc(_("Régime")),0,0,'C',false);
}
$pdf->Cell(40,$ht,convertirc(_("Facture n°")),0,0,'C',false);
$pdf->Cell(25,$ht,convertirc(_("Montant")),0,1,'C',false);
$pdf->SetFont('Arial','B', 10);
$pdf->SetFillColor(245,245,245);
if($entetefacturegarant['codeTypeGarant'] == "CIE"){
$pdf->Cell(53,$ht,convertirc("DU ".datelang($entetefacturegarant['dateDebut'],$_SESSION['lang'])." AU ".datelang($entetefacturegarant['dateFin'],$_SESSION['lang'])),1,0,'C',true);
$pdf->Cell(72,$ht,convertirc($entetefacturegarant['garant']),1,0,'C',true);
}else{
$pdf->Cell(53,$ht,convertirc($entetefacturegarant['garant']),1,0,'C',true);
$pdf->Cell(72,$ht,convertirc($entetefacturegarant['libelletypegarant']),1,0,'C',true);
}
$pdf->Cell(40,$ht,convertirc($entetefacturegarant['numeroFactureImprime']),1,0,'C',true);
$pdf->SetTextColor(255,0,0); //Rouge
$pdf->Cell(25,$ht,convertirc(format_N($entetefacturegarant['montantTtc'])),1,1,'C',true);
$pdf->Ln(5);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(0,$ht,convertirc(_('POUR').' '.$entetefacturegarant['centreGestion']),0,1,'R',false);
$pdf->SetFont('Arial','BU', 11);
$pdf->SetTextColor(255,0,0); //Rouge
$pdf->Ln(10);
$pdf->Cell(0,$ht,convertirc(_('DIRECTION ADMINISTRATIVE ET FINANCIERE')),0,1,'R',false);
$fichier="Temp/TMP_facture_garant"."_".uniqid().".pdf";
$pdf->Output($fichier,"F");
$t_html =' <div id ="div_editer_facture" class="alert alert-info"> ';
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > '._("TELECHARGER").' </a> ';
$t_html .=' </div ';
echo $t_html;
exit();