From 4c2412d5be3f78a1cc4fbc1151fd3e5a6727fd08 Mon Sep 17 00:00:00 2001 From: narindraezway Date: Fri, 18 Jul 2025 16:06:19 +0300 Subject: [PATCH] add tampon on attestation pdf :soin and pacemaker --- gestion/lib/Controller/PageController.php | 242 +++++++++--------- .../Certificate/CertificateService.php | 21 +- .../PdfHandler/CareCertificatePdfHandler.php | 32 ++- .../PacemakerCertificatePdfHandler.php | 38 +-- 4 files changed, 181 insertions(+), 152 deletions(-) diff --git a/gestion/lib/Controller/PageController.php b/gestion/lib/Controller/PageController.php index bfcf96c..b997df2 100644 --- a/gestion/lib/Controller/PageController.php +++ b/gestion/lib/Controller/PageController.php @@ -837,8 +837,8 @@ class PageController extends Controller { foreach ($annee as $key_mois => $mois) { foreach ($mois as $key_client => $client) { $pdf = new FPDF(); - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('Arial','','Comic Sans MS.php'); + // $pdf->AddFont('Arial','B','comic-sans-bold.php'); $current_client = ''; $adresse = ''; $date_facture = ''; @@ -867,37 +867,37 @@ class PageController extends Controller { // logo : 80 de largeur et 55 de hauteur $pdf->Image($this->src_path."logo.png", 4, 2, 50, 35); // adresse du facture - $pdf->SetFont('ComicSans','B',11); $_x = 122 ; $_y = 40; + $pdf->SetFont('Arial','B',11); $_x = 122 ; $_y = 40; $pdf->SetXY( $_x, $_y ); $pdf->Cell( 100, 8, utf8_decode($current_client), 0, 0, ''); $_y += 8; $pdf->SetXY( $_x, $_y ); $pdf->MultiCell( 80, 4, utf8_decode(html_entity_decode($adresse)), 0, 0, ''); // date facture - $pdf->SetFont('ComicSans','',11); $pdf->SetXY( 122, 60 ); + $pdf->SetFont('Arial','',11); $pdf->SetXY( 122, 60 ); $pdf->Cell( 60, 8, "Bourges France le, ".utf8_decode($date_formated), 0, 0, ''); // observations - $pdf->SetFont( "ComicSans", "BU", 10 ); $pdf->SetXY( 10, 85 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L"); + $pdf->SetFont( "Arial", "BU", 10 ); $pdf->SetXY( 10, 85 ) ; $pdf->Cell($pdf->GetStringWidth("Objet:"), 0, "Objet:", 0, "L"); $objet = utf8_decode("Récapitulatif Facturation du mois de ").strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])); - $pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 85 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L"); + $pdf->SetFont( "Arial", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 85 ) ; $pdf->Cell($pdf->GetStringWidth($objet), 0, $objet, 0, "L"); - $pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 95 ); $pdf->Cell($pdf->GetStringWidth("Madame, Monsieur"), 0, "Madame, Monsieur", 0, "L"); + $pdf->SetFont( "Arial", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 95 ); $pdf->Cell($pdf->GetStringWidth("Madame, Monsieur"), 0, "Madame, Monsieur", 0, "L"); $text1 = utf8_decode("Veuillez trouver ci-dessous le récapitulatif de la facturation du mois de ").strtoupper($this->convert_special_char(explode(' ', $date_formated)[1]))."."; $text2 = utf8_decode("Vous en souhaitant bonne réception."); $text3 = utf8_decode("Veuillez agréer, Madame, Monsieur, mes salutations les meilleures."); - $pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 105 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L"); - $pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 110 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L"); - $pdf->SetFont( "ComicSans", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L"); + $pdf->SetFont( "Arial", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 105 ) ; $pdf->Cell($pdf->GetStringWidth($text1), 0, $text1, 0, "L"); + $pdf->SetFont( "Arial", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 110 ) ; $pdf->Cell($pdf->GetStringWidth($text2), 0, $text2, 0, "L"); + $pdf->SetFont( "Arial", "", 10 ); $pdf->SetXY( $pdf->GetStringWidth("Objet")+15, 120 ) ; $pdf->Cell($pdf->GetStringWidth($text3), 0, $text3, 0, "L"); // signature - $pdf->SetFont('ComicSans','',11); $pdf->SetXY( 122, 145 ); + $pdf->SetFont('Arial','',11); $pdf->SetXY( 122, 145 ); $pdf->Cell( $pdf->GetStringWidth($current_config[0]->nom.' '.$current_config[0]->prenom), 0, utf8_decode(html_entity_decode($current_config[0]->nom.' '.$current_config[0]->prenom)), 0, 0, 'L'); $pdf->Image($this->src_path."sign.png", 122, 150, 55, 30); $y0 = 260; $pageWidth = $pdf->GetPageWidth(); //Positionnement en bas et tout centrer - $pdf->SetFont('ComicSans','',6); + $pdf->SetFont('Arial','',6); $pdf->SetXY( 1, $y0 + 4 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_one)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 8 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_two)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 12 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->telephone)), 0, 0, 'C'); @@ -924,19 +924,19 @@ class PageController extends Controller { // n° page en haute à droite if($nb_page>1){ - $pdf->SetXY( 120, 5 ); $pdf->SetFont( "ComicSans", "B", 9 ); $pdf->Cell( 160, 8, $num_page . '/' . $nb_page, 0, 0, 'C'); + $pdf->SetXY( 120, 5 ); $pdf->SetFont( "Arial", "B", 9 ); $pdf->Cell( 160, 8, $num_page . '/' . $nb_page, 0, 0, 'C'); } // date facture - $pdf->SetFont('ComicSans','',11); $pdf->SetXY( 122, 15 ); + $pdf->SetFont('Arial','',11); $pdf->SetXY( 122, 15 ); $pdf->Cell( 60, 8, "Bourges France le, ".utf8_decode($date_formated), 0, 0, ''); // n° facture, date echeance et reglement et obs $pdf->SetLineWidth(0.1); $pdf->SetFillColor(255); $pdf->Rect(100, 30, 85, 8, "DF"); - $pdf->SetXY( 100, 30 ); $pdf->SetFont( "ComicSans", "B", 12 ); $pdf->Cell( 85, 8, 'FACTURE N'.utf8_decode('°').' ETS/'.$key_annee.'/'.strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])), 0, 0, 'C'); + $pdf->SetXY( 100, 30 ); $pdf->SetFont( "Arial", "B", 12 ); $pdf->Cell( 85, 8, 'FACTURE N'.utf8_decode('°').' ETS/'.$key_annee.'/'.strtoupper($this->convert_special_char(explode(' ', $date_formated)[1])), 0, 0, 'C'); // adresse du facture - $pdf->SetFont('ComicSans','B',11); $x = 122 ; $y = 45; + $pdf->SetFont('Arial','B',11); $x = 122 ; $y = 45; $pdf->SetXY( $x, $y ); $pdf->Cell( 100, 8, utf8_decode($current_client), 0, 0, ''); $y += 8; $pdf->SetXY( $x, $y ); $pdf->Cell( 100, 8, utf8_decode(html_entity_decode($facture['mail_client'])), 0, 0, ''); $y += 8; $pdf->SetXY( $x, $y ); $pdf->MultiCell( 80, 4, utf8_decode(html_entity_decode($adresse)), 0, 0, ''); @@ -954,10 +954,10 @@ class PageController extends Controller { if($num_page == $nb_page) $pdf->Line(183, 80, 183, 240); else $pdf->Line(183, 80, 183, 233); // titre colonne - $pdf->SetXY( 1, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 140, 8, "OBJET", 0, 0, 'C'); - $pdf->SetXY( 147, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 13, 8, "H.T.", 0, 0, 'C'); - $pdf->SetXY( 168, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 10, 8, "TVA 20%", 0, 0, 'C'); - $pdf->SetXY( 183, 81 ); $pdf->SetFont('ComicSans','B',8); $pdf->Cell( 22, 8, "T.T.C", 0, 0, 'C'); + $pdf->SetXY( 1, 81 ); $pdf->SetFont('Arial','B',8); $pdf->Cell( 140, 8, "OBJET", 0, 0, 'C'); + $pdf->SetXY( 147, 81 ); $pdf->SetFont('Arial','B',8); $pdf->Cell( 13, 8, "H.T.", 0, 0, 'C'); + $pdf->SetXY( 168, 81 ); $pdf->SetFont('Arial','B',8); $pdf->Cell( 10, 8, "TVA 20%", 0, 0, 'C'); + $pdf->SetXY( 183, 81 ); $pdf->SetFont('Arial','B',8); $pdf->Cell( 22, 8, "T.T.C", 0, 0, 'C'); // (new DateTime($facture['date_soin']))->format('d-M') $formatter_ds = new IntlDateFormatter('fr_FR', IntlDateFormatter::SHORT, IntlDateFormatter::NONE); @@ -973,14 +973,14 @@ class PageController extends Controller { for ($index_facture_position; $index_facture_position < ($init_index + $max_nb_toget) ; $index_facture_position++) { $date_soin_temp = new DateTime($client[$index_facture_position]['date_soin']); - $pdf->SetXY( 6, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, $client[$index_facture_position]['num'], 0, 0, ''); - $pdf->SetXY( 32, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, $client[$index_facture_position]['numero_commande'], 0, 0, ''); - $pdf->SetXY( 53, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 18, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, ''); - $pdf->SetXY( 65, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 38, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['adresse_devis'])), 0, 0, ''); - $pdf->SetXY( 100, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 28, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['defunt'])), 0, 0, ''); - $pdf->SetXY( 147, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 13, 8, $client[$index_facture_position]['montant_htc'].chr(128), 0, 0, 'C'); - $pdf->SetXY( 168, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 10, 8, $client[$index_facture_position]['montant_tva'].chr(128), 0, 0, 'C'); - $pdf->SetXY( 183, $y_facture ); $pdf->SetFont('ComicSans','',8); $pdf->Cell( 22, 8, $client[$index_facture_position]['montant_ttc'].chr(128), 0, 0, 'C'); + $pdf->SetXY( 6, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 28, 8, $client[$index_facture_position]['num'], 0, 0, ''); + $pdf->SetXY( 32, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 28, 8, $client[$index_facture_position]['numero_commande'], 0, 0, ''); + $pdf->SetXY( 53, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 18, 8, utf8_decode($formatter_ds->format($date_soin_temp)), 0, 0, ''); + $pdf->SetXY( 65, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 38, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['adresse_devis'])), 0, 0, ''); + $pdf->SetXY( 100, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 28, 8, utf8_decode(html_entity_decode($client[$index_facture_position]['defunt'])), 0, 0, ''); + $pdf->SetXY( 147, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 13, 8, $client[$index_facture_position]['montant_htc'].chr(128), 0, 0, 'C'); + $pdf->SetXY( 168, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 10, 8, $client[$index_facture_position]['montant_tva'].chr(128), 0, 0, 'C'); + $pdf->SetXY( 183, $y_facture ); $pdf->SetFont('Arial','',8); $pdf->Cell( 22, 8, $client[$index_facture_position]['montant_ttc'].chr(128), 0, 0, 'C'); $montant_ht_total = $montant_ht_total+$client[$index_facture_position]['montant_htc']; $montant_tva_total = $montant_tva_total+$client[$index_facture_position]['montant_tva']; @@ -997,14 +997,14 @@ class PageController extends Controller { if ($num_page == $nb_page) { $pdf->Line(5, 225, 205, 225); - $pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 5, 225 ); $pdf->Cell( 140, 8, 'TOTAL', 0, 0, 'C'); - $pdf->SetFont('ComicSans','',8); $pdf->SetXY( 147, 225 ); $pdf->Cell( 13, 8, $montant_ht_total.chr(128), 0, 0, 'C'); - $pdf->SetFont('ComicSans','',8); $pdf->SetXY( 168, 225 ); $pdf->Cell( 10, 8, $montant_tva_total.chr(128), 0, 0, 'C'); - $pdf->SetFont('ComicSans','',8); $pdf->SetXY( 183, 225 ); $pdf->Cell( 22, 8, $montant_ttc_total.chr(128), 0, 0, 'C'); + $pdf->SetFont('Arial','B',8); $pdf->SetXY( 5, 225 ); $pdf->Cell( 140, 8, 'TOTAL', 0, 0, 'C'); + $pdf->SetFont('Arial','',8); $pdf->SetXY( 147, 225 ); $pdf->Cell( 13, 8, $montant_ht_total.chr(128), 0, 0, 'C'); + $pdf->SetFont('Arial','',8); $pdf->SetXY( 168, 225 ); $pdf->Cell( 10, 8, $montant_tva_total.chr(128), 0, 0, 'C'); + $pdf->SetFont('Arial','',8); $pdf->SetXY( 183, 225 ); $pdf->Cell( 22, 8, $montant_ttc_total.chr(128), 0, 0, 'C'); $pdf->Rect(145, 233, 60, 7, "D"); - $pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 147, 233 ); $pdf->Cell( 30, 6.5, 'TOTAL TTC', 0, 0, 'C'); - $pdf->SetFont('ComicSans','B',8); $pdf->SetXY( 183, 233 ); $pdf->SetFillColor(255, 255, 0); $pdf->SetTextColor(255, 0, 0); $pdf->Cell( 22, 6.5, $montant_ttc_total.chr(128), 0, 0, 'C', true); + $pdf->SetFont('Arial','B',8); $pdf->SetXY( 147, 233 ); $pdf->Cell( 30, 6.5, 'TOTAL TTC', 0, 0, 'C'); + $pdf->SetFont('Arial','B',8); $pdf->SetXY( 183, 233 ); $pdf->SetFillColor(255, 255, 0); $pdf->SetTextColor(255, 0, 0); $pdf->Cell( 22, 6.5, $montant_ttc_total.chr(128), 0, 0, 'C', true); } $y1 = 245; @@ -1012,7 +1012,7 @@ class PageController extends Controller { $pdf->SetFillColor(255); $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('ComicSans','',9); + $pdf->SetFont('Arial','',9); $pdf->SetXY( 10, $y1 ); $pdf->Cell( $pdf->GetPageWidth(), 4, utf8_decode("Loi N° 92-442 du 31 décembre 1992: La présente facture est payable en comptant a réception."), 0, 0, 'L'); $pdf->SetXY( 10, $y1 + 4 ); $pdf->Cell( $pdf->GetPageWidth(), 4, utf8_decode("Indemnité forfaitaire pour frais de recouvrement due en cas de retard de paiement: 40").chr(128), 0, 0, 'L'); @@ -1022,7 +1022,7 @@ class PageController extends Controller { // pied de page // ************************** - $pdf->SetFont('ComicSans','',6); + $pdf->SetFont('Arial','',6); $pdf->SetXY( 1, $y0 + 4 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_one)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 8 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->legal_two)), 0, 0, 'C'); $pdf->SetXY( 1, $y0 + 12 );$pdf->Cell( $pageWidth, 5, utf8_decode(html_entity_decode($current_config[0]->telephone)), 0, 0, 'C'); @@ -2171,8 +2171,8 @@ class PageController extends Controller { // TODO: init pdf $pdf = new FPDF(); - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('Arial','','Comic Sans MS.php'); + // $pdf->AddFont('Arial','B','comic-sans-bold.php'); $pdf->AddPage(); $pdf->SetAutoPagebreak(False); @@ -2181,21 +2181,21 @@ class PageController extends Controller { // logo : 80 de largeur et 55 de hauteur $logo = $this->getLogo(); if($logo != 'nothing'){ - $pdf->Image($this->defaultImagePath."logo.png", 4, 2, 50, 35); + $pdf->Image($this->defaultImagePath."logo.png", 4, 2, 40, 45); } - $pdf->setXY(15, 15); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("N : ".$numFacture)), '', 'R'); + $pdf->setXY(15, 15); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("N : ".$numFacture)), '', 'R'); - $pdf->setXY(15, 55); $pdf->SetFont('ComicSans', 'B', 15); $pdf->Cell(80, 10, 'RAPPORT DE SOIN', 1, 1, 'C'); + $pdf->setXY(15, 55); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(80, 10, 'RAPPORT DE SOIN', 1, 1, 'C'); $pdf->SetY(68); - $pdf->SetFont('ComicSans', '', 10); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse.", le ".$today), '', 'R'); $rapportInfoHeaderY = $pdf->GetY() + 15; $rapportDefuntInfoY = $rapportInfoHeaderY; $rapportDevisInfoY = $rapportInfoHeaderY; $pdf->SetY(y: $rapportDefuntInfoY); - $pdf->SetFont('ComicSans', '', 10); + $pdf->SetFont('Arial', '', 10); $pdf->Cell(0,5,FileExportHelpers::FormatTextForExport($nomDefunt)); $rapportDefuntInfoY += 5; $pdf->SetY($rapportDefuntInfoY); @@ -2224,140 +2224,140 @@ class PageController extends Controller { $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("ÉTAT DU CORPS")), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Corpulence : ".$defunt->corpulence)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Rigidité : ".$defunt->rigidite)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Observations du corps : ".$defunt->observations_corps)), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("ÉTAT DU CORPS")), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Corpulence : ".$defunt->corpulence)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Rigidité : ".$defunt->rigidite)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Observations du corps : ".$defunt->observations_corps)), '', 'L'); $pdf->SetY($pdf->GetY()+5); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("ACCÈS")), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Arteriel : ".$defunt->acces)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Recherche : ".$defunt->acces_recherche)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("État : ".$defunt->acces_etat)), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("ACCÈS")), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Arteriel : ".$defunt->acces)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Recherche : ".$defunt->acces_recherche)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("État : ".$defunt->acces_etat)), '', 'L'); $pdf->SetY($pdf->GetY()+5); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("INJECTION")), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("INJECTION")), '', 'L'); $pdf->SetY($pdf->GetY()+3); $col_width = round(($pdf->GetPageWidth()-30)/3); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); - $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Diffusion")), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); + $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Diffusion")), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); // --- - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Pré-injection")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->preinjection_qte)), 'LR', 'C'); - $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->preinjection_diffusion)), 'LR', 'C'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Pré-injection")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->preinjection_qte)), 'LR', 'C'); + $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->preinjection_diffusion)), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); // --- - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Injection")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->injection_qte)), 'LR', 'C'); - $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->injection_diffusion)), 'LR', 'C'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Injection")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->injection_qte)), 'LR', 'C'); + $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->injection_diffusion)), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); // --- - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Co-injection")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->coinjection_qte)), 'LR', 'C'); - $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->coinjection_diffusion)), 'LR', 'C'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Co-injection")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->coinjection_qte)), 'LR', 'C'); + $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->coinjection_diffusion)), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("DRAINAGE")), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("DRAINAGE")), '', 'L'); $pdf->SetY($pdf->GetY()+3); $col_width = round(($pdf->GetPageWidth()-30)/3); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); - $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("État")), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); + $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("État")), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); // --- - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage)), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage_qte)), 'LR', 'C'); - $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage_etat)), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage)), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage_qte)), 'LR', 'C'); + $pdf->SetXY(($col_width*2)+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->drainage_etat)), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), $pdf->GetPageWidth()-15, $pdf->GetY()); - $pdf->SetY(-20); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); - $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); + $pdf->SetY(-20); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); + $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); $pdf->AddPage(); $pdf->SetAutoPagebreak(True); $pdf->SetMargins(15,15,15); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("PONCTION")), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("PONCTION")), '', 'L'); $pdf->SetY($pdf->GetY()+3); $col_width = round(($pdf->GetPageWidth()-30)/3); $pdf->Line(15, $pdf->GetY(), ($col_width+7)*2, $pdf->GetY()); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), ($col_width+7)*2, $pdf->GetY()); // --- - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->ponction)), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->ponction_qte)), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->ponction)), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->ponction_qte)), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), ($col_width+7)*2, $pdf->GetY()); $pdf->SetY($pdf->GetY()+15); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("CAVITÉ")), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("CAVITÉ")), '', 'L'); $pdf->SetY($pdf->GetY()+3); $col_width = round(($pdf->GetPageWidth()-30)/3); $pdf->Line(15, $pdf->GetY(), ($col_width+7)*2, $pdf->GetY()); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("")), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Quantité (l)")), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), ($col_width+7)*2, $pdf->GetY()); // --- - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->cavite)), 'LR', 'C'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->cavite_qte)), 'LR', 'C'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->cavite)), 'LR', 'C'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($defunt->cavite_qte)), 'LR', 'C'); $pdf->Line(15, $pdf->GetY(), ($col_width+7)*2, $pdf->GetY()); $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("AUTRES TRAITEMENTS")), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Hypodermiques : ")), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("AUTRES TRAITEMENTS")), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Hypodermiques : ")), '', 'L'); foreach ($hypodermiques as $key => $hypo) { $pdf->setX($pdf->GetX()+5); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, "- ".utf8_decode(html_entity_decode($hypo->qte." ".$hypo->designation." sur ".$hypo->endroit)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, "- ".utf8_decode(html_entity_decode($hypo->qte." ".$hypo->designation." sur ".$hypo->endroit)), '', 'L'); } $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("HYGIÈNE")), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Désinfection : ".$defunt->desinfection)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Lavage : ".$defunt->lavage)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Rasage : ".(($defunt->rasage==0)?'Non':'Oui'))), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("HYGIÈNE")), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Désinfection : ".$defunt->desinfection)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Lavage : ".$defunt->lavage)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Rasage : ".(($defunt->rasage==0)?'Non':'Oui'))), '', 'L'); $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("PRÉSENTATION")), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Cosmétiques : ".$defunt->presentation_cosmetique)), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Sur : ".$defunt->presentation_sur)), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("PRÉSENTATION")), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Cosmétiques : ".$defunt->presentation_cosmetique)), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Sur : ".$defunt->presentation_sur)), '', 'L'); $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("TEMPS")), '', 'L'); - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Total : ".$this->calculHeureTotal($defunt->heure_debut, $defunt->heure_fin))), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("TEMPS")), '', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Total : ".$this->calculHeureTotal($defunt->heure_debut, $defunt->heure_fin))), '', 'L'); $pdf->SetY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("OBSERVATIONS")), '', 'L'); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("OBSERVATIONS")), '', 'L'); $pdf->SetY($pdf->GetY()+3); $col_width = round(($pdf->GetPageWidth()-30)/2); foreach ($observations as $key => $obs) { if($pdf->getY()>=($pdf->GetPageHeight()-45)) { - $pdf->SetY(-20); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); - $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); + $pdf->SetY(-20); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); + $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); $pdf->AddPage(); } - $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($obs->designation)), 'LTRB', 'L'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($obs->commentaire)), 'LTRB', 'L'); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($obs->designation)), 'LTRB', 'L'); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($obs->commentaire)), 'LTRB', 'L'); } $pdf->setY($pdf->GetY()+10); if($pdf->getY()>=($pdf->GetPageHeight()-45)) { - $pdf->SetY(-20); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); - $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); + $pdf->SetY(-20); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); + $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); $pdf->AddPage(); } // signature - $pdf->SetFont('ComicSans','',11); + $pdf->SetFont('Arial','',11); $pdf->setY($pdf->GetY()+10); $pdf->Cell( $pdf->GetPageWidth()-30, 0, utf8_decode(html_entity_decode($defaultConfig[0]->nom).' '.html_entity_decode($defaultConfig[0]->prenom)), 0, 0, 'L'); $pdf->setY($pdf->GetY()+5); @@ -2368,10 +2368,10 @@ class PageController extends Controller { } $pdf->setY($pdf->GetY()-5); - $pdf->SetFont('ComicSans','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R'); + $pdf->SetFont('Arial','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R'); - $pdf->SetY(-20); $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); - $pdf->SetFont('ComicSans', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); + $pdf->SetY(-20); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->legal_one), '', 'C'); + $pdf->SetFont('Arial', '', 8); $pdf->MultiCell($pdf->GetPageWidth()-30, 5, FileExportHelpers::FormatTextForExport($defaultConfig[0]->adresse), '', 'C'); $pdf->AddPage(); $pdf->Image($this->src_path.(($defunt->sexe=='m'?'facehomme.jpg':'facefemme.jpg')), 0, 0, $pdf->GetPageWidth(), $pdf->GetPageHeight()); @@ -2459,8 +2459,8 @@ class PageController extends Controller { // TODO: init pdf $pdf = new FPDF(); - $pdf->AddFont('ComicSans','','Comic Sans MS.php'); - $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); + // $pdf->AddFont('Arial','','Comic Sans MS.php'); + // $pdf->AddFont('Arial','B','comic-sans-bold.php'); $pdf->AddPage(); // on sup les 2 cm en bas @@ -2469,13 +2469,13 @@ class PageController extends Controller { // logo : 80 de largeur et 55 de hauteur $logo = $this->getLogo(); if($logo != 'nothing'){ - $pdf->Image($this->defaultImagePath."logo.png", 4, 2, 50, 35); + $pdf->Image($this->defaultImagePath."logo.png", 4, 2, 40, 45); } - $pdf->SetY(45); $pdf->SetFont('ComicSans', 'B', 15); $pdf->Cell(0, 10, utf8_decode(html_entity_decode("ATTESTATION BIJOU(X)")), 0, 0, 'C'); + $pdf->SetY(45); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(0, 10, utf8_decode(html_entity_decode("ATTESTATION BIJOU(X)")), 0, 0, 'C'); $pdf->SetMargins(15,15,15); - $pdf->SetY(65); $pdf->SetFont('ComicSans', '', 10); + $pdf->SetY(65); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("Je soussignée ".$defunt->prenom_thanato." ".strtoupper($defunt->nom_thanato).", Thanatopracteur, agissant pour le compte de la société ".strtoupper($defaultConfig[0]->entreprise)." titulaire de l'habilitation n° ".$defunt->reference_habilitation." atteste par la présente que : ".(strcmp($defunt->sexe, 'm')==0 ? 'Monsieur' : 'Madame').". ".$defunt->nom_defunt." a été pris(e) en charge par nos services pour des soins mortuaires.")), '','J',0); @@ -2494,23 +2494,23 @@ class PageController extends Controller { $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode("À la suite de notre prise en charge, une liste des bijoux appartenant au défunt a été établie comme suit :")), '','J',0); $pdf->setY($pdf->GetY()+5); $col_width = round(($pdf->GetPageWidth()-30)/$columnNumber); - $pdf->SetFont('ComicSans', 'B', 10); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Désignation")), 'LTRB', 'C'); $pdf->SetXY($col_width+15, $pdf->GetY()-8); - $pdf->SetFont('ComicSans', 'B', 10); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Commentaire")), 'LTRB', 'C'); if($hasTaker){ $pdf->SetXY($col_width+75, $pdf->GetY()-8); - $pdf->SetFont('ComicSans', 'B', 10); + $pdf->SetFont('Arial', 'B', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode("Prise en charge des bijoux par")), 'LTRB', 'C'); } foreach ($bijoux as $key => $bijou) { - $pdf->SetFont('ComicSans', '', 10); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($bijou->designation)), 'LTRB', 'L'); - $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); + $pdf->SetXY($col_width+15, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($bijou->commentaire)), 'LTRB', 'L'); if($hasTaker){ - $pdf->SetXY($col_width+75, $pdf->GetY()-8); $pdf->SetFont('ComicSans', '', 10); + $pdf->SetXY($col_width+75, $pdf->GetY()-8); $pdf->SetFont('Arial', '', 10); $pdf->MultiCell($col_width, 8, utf8_decode(html_entity_decode($bijou->taker_name)), 'LTRB', 'L'); } } @@ -2549,14 +2549,14 @@ class PageController extends Controller { $pdf->setY($pdf->GetY()+10); - $pdf->SetFont('ComicSans', '', 10); + $pdf->SetFont('Arial', '', 10); $pdf->MultiCell(0, 5, FileExportHelpers::FormatTextForExport("Cette attestation est remise pour faire valoir ce que de droit. Fait à ".$defaultConfig[0]->adresse.", le ".$today), '','J',0); $pdf->setY($pdf->GetY()+10); // signature - $pdf->SetFont('ComicSans','',11); + $pdf->SetFont('Arial','',11); $pdf->Cell( $pdf->GetPageWidth()-30, 0, utf8_decode(html_entity_decode($defaultConfig[0]->nom).' '.html_entity_decode($defaultConfig[0]->prenom)), 0, 0, 'L'); $pdf->setY($pdf->GetY()+5); @@ -2566,9 +2566,9 @@ class PageController extends Controller { } $pdf->setY($pdf->GetY()-5); - $pdf->SetFont('ComicSans','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R'); + $pdf->SetFont('Arial','',11); $pdf->Cell( $pdf->GetPageWidth()-80, 0, "Pour :", 0, 0, 'R'); - $pdf->SetY(-15); $pdf->SetFont('ComicSans', '', 8); + $pdf->SetY(-15); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode($defaultConfig[0]->legal_one)), 0, 'C'); $pdf->MultiCell(0, 5, utf8_decode(html_entity_decode($defaultConfig[0]->adresse)), 0,'C'); diff --git a/gestion/lib/Service/Certificate/CertificateService.php b/gestion/lib/Service/Certificate/CertificateService.php index ab176e4..bd2d541 100644 --- a/gestion/lib/Service/Certificate/CertificateService.php +++ b/gestion/lib/Service/Certificate/CertificateService.php @@ -64,6 +64,21 @@ class CertificateService { } return $signatureExist; } + private function tamponImageExist(){ + $storage = $this->rootFolder->getUserFolder(self::DEFAULT_NEXTCLOUD_ADMIN); + try{ + if(isset($storage)){ + $storage->get("/.gestion/sign.jpg"); // tampon image + $signatureExist = true; + }else{ + $signatureExist = false; + } + } + catch(\OCP\Files\NotFoundException $e) { + $signatureExist = false; + } + return $signatureExist; + } private function getLogo(){ $storage = $this->rootFolder->getUserFolder(self::DEFAULT_NEXTCLOUD_ADMIN); @@ -138,7 +153,8 @@ class CertificateService { $pdf->AddFont('ComicSans','','Comic Sans MS.php'); $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); $signatureImageExist = $this->signatureImageExists(); - $pdf->SetCareCertificateData($devisOfDefunt,$logo,$signatureImageExist); + $tamponImageExist = $this->tamponImageExist(); + $pdf->SetCareCertificateData($devisOfDefunt,$logo,$signatureImageExist ,$tamponImageExist); $pdf->SetCareCertificate(); try { $storage->newFolder($folderDestination); @@ -202,7 +218,8 @@ class CertificateService { $pdf->AddFont('ComicSans','','Comic Sans MS.php'); $pdf->AddFont('ComicSans','B','comic-sans-bold.php'); $signatureImageExist = $this->signatureImageExists(); - $pdf->SetPacemakerCertificateData($devisOfDefunt,$logo,$signatureImageExist); + $tamponImageExist = $this->tamponImageExist(); + $pdf->SetPacemakerCertificateData($devisOfDefunt,$logo,$signatureImageExist ,$tamponImageExist); $pdf->SetPacemakerCertificate(); try { $storage->newFolder($folderDestination); diff --git a/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php b/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php index 09c690f..16034dc 100644 --- a/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php +++ b/gestion/lib/Service/Certificate/PdfHandler/CareCertificatePdfHandler.php @@ -37,12 +37,13 @@ class CareCertificatePdfHandler extends FPDF { private $devisOfDefunt = []; private $logo = null; private $signatureImageExist = false; + private $tamponImageExist = false; private $imagePath = "/var/www/html/data/admin/files/.gestion/"; function Header() { if($this->logo != "nothing"){ - $this->Image($this->imagePath."logo.png", 4, 2, 50, 35); + $this->Image($this->imagePath."logo.png", 4, 2, 40, 45); } else{ $this->Cell(55,30,''); @@ -51,15 +52,16 @@ class CareCertificatePdfHandler extends FPDF { function Footer() { $this->SetY(-18); - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->legal_one)), 0, 'C'); $this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->adresse)), 0,'C'); } - public function SetCareCertificateData(array $devisOfDefunt,$logo = null,$signatureImageExist = false){ + public function SetCareCertificateData(array $devisOfDefunt,$logo = null,$signatureImageExist = false , $tamponImageExist = false){ $this->devisOfDefunt = $devisOfDefunt; $this->logo = $logo; $this->signatureImageExist = $signatureImageExist; + $this->tamponImageExist = $tamponImageExist; } public function SetCareCertificate(){ @@ -74,25 +76,29 @@ class CareCertificatePdfHandler extends FPDF { $this->SetXY(140,$this->GetY() + 15); $this->Cell(0,10,'Cachet et signature'); + if($this->tamponImageExist){ + $this->Image($this->imagePath."sign.jpg", 120, $this->GetY() + 8, 80, 35); + } + if($this->signatureImageExist){ - $this->Image($this->imagePath."sign.png", 135, $this->GetY() + 12, 60, 40); + $this->Image($this->imagePath."sign.png", 140, $this->GetY() + 40, 40, 16); } } private function SetCareCertificateContent(){ - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', '', 14); $this->MultiCell(0,7,FileExportHelpers::FormatTextForExport('La Société '. $this->devisOfDefunt['configuration']->entreprise. ' habilitée sous le numéro ' . $this->devisOfDefunt['thanato_reference'] . ', certifie par la présente que : ')); - $this->SetFont('ComicSans', 'B', 14); - $this->Cell(0,12, 'Mr/Mme ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1); - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', 'B', 14); + $this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']),0,1); + $this->SetFont('Arial', '', 14); $this->MultiCell(0,7, FileExportHelpers::FormatTextForExport('Employé(e) au sein de notre société et titulaire du diplôme national de Thanatopracteur, a effectué des soins de conservation sur le corps du défunt :')); - $this->SetFont('ComicSans', 'B', 14); + $this->SetFont('Arial', 'B', 14); $this->Cell(0,12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_nom']),0,1); - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', '', 14); $this->Cell(0,12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ' : ',0,1); - $this->SetFont('ComicSans', 'B', 14); + $this->SetFont('Arial', 'B', 14); $this->MultiCell(0,6, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['location_of_devis'])); - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', '', 14); $this->Cell(0,12, FileExportHelpers::FormatTextForExport("La présente attestation est établie pour faire valoir ce que de droit."),0,5); $this->Ln(5); $this->MultiAlignCell(120,7,FileExportHelpers::FormatTextForExport('Fait à '). FileExportHelpers::FormatTextForExport($this->devisOfDefunt['configuration']->adresse),0); @@ -102,7 +108,7 @@ class CareCertificatePdfHandler extends FPDF { private function SetCareCertificateTitle(){ $this->SetY(60); - $this->SetFont('ComicSans', 'B', 20); + $this->SetFont('Arial', 'B', 20); $this->Cell(0, 10, 'ATTESTATION DE SOINS DE CONSERVATION', 0, 1,'C'); $this->Ln(20); } diff --git a/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php b/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php index e68db84..c7bb94b 100644 --- a/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php +++ b/gestion/lib/Service/Certificate/PdfHandler/PacemakerCertificatePdfHandler.php @@ -39,11 +39,11 @@ class PacemakerCertificatePdfHandler extends FPDF private $logo = null; private $signatureImageExist = false; private $imagePath = "/var/www/html/data/admin/files/.gestion/"; - + private $tamponImageExist = false; function Header() { if ($this->logo != "nothing") { - $this->Image($this->imagePath . "logo.png", 4, 2, 50, 35); + $this->Image($this->imagePath."logo.png", 4, 2, 40, 45); } else { $this->Cell(55, 30, ''); } @@ -51,16 +51,17 @@ class PacemakerCertificatePdfHandler extends FPDF function Footer() { $this->SetY(-18); - $this->SetFont('ComicSans', '', 10); + $this->SetFont('Arial', '', 10); $this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->legal_one)), 0, 'C'); $this->MultiCell(0, 5, utf8_decode(html_entity_decode($this->devisOfDefunt['configuration']->adresse)), 0, 'C'); } - public function SetPacemakerCertificateData(array $devisOfDefunt, $logo = null, $signatureImageExist = false) + public function SetPacemakerCertificateData(array $devisOfDefunt, $logo = null, $signatureImageExist = false , $tamponImageExist = false) { $this->devisOfDefunt = $devisOfDefunt; $this->logo = $logo; $this->signatureImageExist = $signatureImageExist; + $this->tamponImageExist = $tamponImageExist; } public function SetPacemakerCertificate() @@ -74,30 +75,35 @@ class PacemakerCertificatePdfHandler extends FPDF private function SetSigning() { - $this->SetXY(140, $this->GetY() + 15); - $this->Cell(0, 10, 'Cachet et signature'); + $this->SetXY(140, $this->GetY() + 10); + $this->Cell(0, 10, 'Cachet et signaturess'); + + if($this->tamponImageExist){ + $this->Image($this->imagePath."sign.jpg", 120, $this->GetY() + 8, 80, 30); + } if ($this->signatureImageExist) { - $this->Image($this->imagePath . "sign.png", 135, $this->GetY() + 12, 60, 40); + $this->Image($this->imagePath."sign.png", 140, $this->GetY() + 38, 40, 16); } + } private function SetPacemakerCertificateContent() { - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', '', 14); $this->MultiCell(0, 7, FileExportHelpers::FormatTextForExport('La Société ' . $this->devisOfDefunt['configuration']->entreprise . ' habilitée sous le numéro ' . $this->devisOfDefunt['thanato_reference'] . ', certifie par la présente que : ')); - $this->SetFont('ComicSans', 'B', 14); - $this->Cell(0, 12, 'Mr/Mme ' . FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']), 0, 1); - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', 'B', 14); + $this->Cell(0, 12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['thanato_nom'] . ' ' . $this->devisOfDefunt['thanato_prenom']), 0, 1); + $this->SetFont('Arial', '', 14); $this->MultiCell(0, 7, FileExportHelpers::FormatTextForExport('Employé(e) au sein de notre société et titulaire du diplôme national de Thanatopracteur, a retiré ce jour, la prothèse fonctionnant à pile implantée sur le corps du défunt :')); - $this->SetFont('ComicSans', 'B', 14); + $this->SetFont('Arial', 'B', 14); $this->Cell(0, 12, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_nom']), 0, 1); - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', '', 14); $this->Cell(0, 12, FileExportHelpers::FormatTextForExport("Qui reposait à l'adresse suivante") . ' : ', 0, 1); - $this->SetFont('ComicSans', 'B', 14); + $this->SetFont('Arial', 'B', 14); $this->MultiCell(0, 6, FileExportHelpers::FormatTextForExport($this->devisOfDefunt['location_of_devis'])); $this->Ln(6); - $this->SetFont('ComicSans', '', 14); + $this->SetFont('Arial', '', 14); $this->Cell( 0, 6, @@ -125,7 +131,7 @@ class PacemakerCertificatePdfHandler extends FPDF private function SetPacemakerCertificateTitle() { $this->SetY(y: 50); - $this->SetFont('ComicSans', 'B', 20); + $this->SetFont('Arial', 'B', 20); $this->Cell(0, 10, 'ATTESTATION DE RETRAIT DE LA', 0, 1, 'C'); $this->Cell(0, 10, 'PROTHESE FONCTIONNANT A PILE', 0, 1, 'C'); $this->Ln(20);