From ff6cb054774538a5e1bc56d98dfe77dba002ae38 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 27 Feb 2010 13:34:57 +0000 Subject: [PATCH] Fix: Bad utf8 encoding --- .../modules/fichinter/pdf_soleil.modules.php | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index b5a98d97f4b..5243ad6f691 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -1,7 +1,7 @@ - * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2008 Raphael Bertrand (Resultic) +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2008 Raphael Bertrand (Resultic) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ * \brief Fichier de la classe permettant de generer les fiches d'intervention au modele Soleil * \version $Id$ */ - require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); @@ -34,7 +33,6 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); * \class pdf_soleil * \brief Class to build interventions documents with model Soleil */ - class pdf_soleil extends ModelePDFFicheinter { @@ -154,7 +152,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 4 // Pagehead - + //Affiche le filigrane brouillon - Print Draft Watermark if($fichinter->statut==0 && (! empty($conf->global->FICHINTER_DRAFT_WATERMARK)) ) { @@ -246,7 +244,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetTextColor(0,0,100); $pdf->SetFont('Arial','B',14); - $pdf->Text(11, 94, $outputlangs->trans("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref)); + $pdf->Text(11, 94, $outputlangs->transnoentities("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref)); $pdf->SetFillColor(220,220,220); $pdf->SetTextColor(0,0,0); @@ -257,7 +255,7 @@ class pdf_soleil extends ModelePDFFicheinter $tab_top_newpage = 50; $tab_height = 110; $tab_height_newpage = 150; - + // Affiche notes if (! empty($fichinter->note_public)) { @@ -280,7 +278,7 @@ class pdf_soleil extends ModelePDFFicheinter { $height_note=0; } - + $pdf->SetXY (10, $tab_top); $pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0); $pdf->line(10, $tab_top + 8, 200, $tab_top + 8 ); @@ -300,25 +298,25 @@ class pdf_soleil extends ModelePDFFicheinter //dol_syslog("desc=".dol_htmlentitiesbr($fichinter->description)); $nblignes = sizeof($fichinter->lignes); - + $curY = $pdf->GetY(); $nexY = $pdf->GetY(); - + // Loop on each lines for ($i = 0 ; $i < $nblignes ; $i++) { $fichinterligne = $fichinter->lignes[$i]; - + $valide = $fichinterligne->id ? $fichinterligne->fetch($fichinterligne->id) : 0; if ($valide>0) { $curY = $nexY+3; - + $pdf->SetXY (10, $curY); $pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY, dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($fichinterligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".ConvertSecondToTime($fichinterligne->duration),1,$outputlangs->charset_output), 0, 1, 0); $nexY = $pdf->GetY(); - + $pdf->SetXY (10, $curY + 3); $desc = dol_htmlentitiesbr($fichinterligne->desc,1); $pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY + 3, $desc, 0, 1, 0);