diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 015c1387405..bc0d10ad00f 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -168,7 +168,7 @@ class pdf_soleil extends ModelePDFFicheinter $tab_top = 100; $tab_top_middlepage = 50; $tab_top_newpage = 50; - $tab_height = 110; + $tab_height = 120; $tab_height_newpage = 150; $tab_height_middlepage = 200; $tab_height_endpage = 170; @@ -199,7 +199,7 @@ class pdf_soleil extends ModelePDFFicheinter $iniY = $tab_top + 7; $curY = $tab_top + 7; $nexY = $tab_top + 7; -/* + $pdf->SetXY($this->marge_gauche, $tab_top); $pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0); $pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8 ); @@ -223,7 +223,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY); $pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also. -*/ + $nblines = count($object->lines); // Loop on each lines @@ -236,15 +236,17 @@ class pdf_soleil extends ModelePDFFicheinter { $curY = $nexY; + $pdf->SetFont('','B', $default_font_size - 1); $pdf->SetXY($this->marge_gauche, $curY); $txt=dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration),1,$outputlangs->charset_output); $pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY, $txt, 0, 1, 0); - $nexY = $pdf->GetY(); + $curY = $pdf->GetY(); + $pdf->SetFont('','', $default_font_size - 1); $pdf->SetXY($this->marge_gauche, $curY + 3); $desc = dol_htmlentitiesbr($objectligne->desc,1); $pdf->writeHTMLCell(0, 3, $this->marge_gauche, $curY + 3, $desc, 0, 1, 0); - //$nexY+=dol_nboflines_bis($objectligne->desc,52,$outputlangs->charset_output)*3; + $nexY+=dol_nboflines_bis($objectligne->desc,52,$outputlangs->charset_output)*3; $nexY+=2; // Passe espace entre les lignes @@ -297,26 +299,19 @@ class pdf_soleil extends ModelePDFFicheinter } } } - //$pdf->line(10, $tab_top+$tab_height+3, 200, $tab_top+$tab_height+3); + + // Show square + if ($pagenb == 1) + { + $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); + $bottomlasttab=$tab_top + $tab_height + 1; + } + else + { + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + $bottomlasttab=$tab_top_newpage + $tab_height_newpage + 1; + } - // Rectangle for title and all lines - /* - $pdf->Rect($this->marge_gauche, $tab_top, ($this->page_largeur-$this->marge_gauche-$this->marge_droite), $tab_height+3); - $pdf->SetXY($this->marge_gauche, $pdf->GetY() + 20); - $pdf->MultiCell(60, 5, '', 0, 'J', 0); - - $pdf->SetXY(20,220); - $pdf->MultiCell(66,5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"),0,'L',0); - - $pdf->SetXY(20,225); - $pdf->MultiCell(80,30, '', 1); - - $pdf->SetXY(110,220); - $pdf->MultiCell(80,5, $outputlangs->transnoentities("NameAndSignatureOfExternalContact"),0,'L',0); - - $pdf->SetXY(110,225); - $pdf->MultiCell(80,30, '', 1); -*/ $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $this->_pagefoot($pdf,$object,$outputlangs); @@ -359,7 +354,7 @@ class pdf_soleil extends ModelePDFFicheinter { global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); - +/* $pdf->SetXY($this->marge_gauche, $tab_top); $pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0); $pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8); @@ -383,21 +378,21 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY); $pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also. - +*/ $pdf->Rect($this->marge_gauche, $tab_top, ($this->page_largeur-$this->marge_gauche-$this->marge_droite), $tab_height+3); $pdf->SetXY($this->marge_gauche, $pdf->GetY() + 20); $pdf->MultiCell(60, 5, '', 0, 'J', 0); - $pdf->SetXY(20,220); + $pdf->SetXY(20,230); $pdf->MultiCell(66,5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"),0,'L',0); - $pdf->SetXY(20,225); + $pdf->SetXY(20,235); $pdf->MultiCell(80,30, '', 1); - $pdf->SetXY(110,220); + $pdf->SetXY(110,230); $pdf->MultiCell(80,5, $outputlangs->transnoentities("NameAndSignatureOfExternalContact"),0,'L',0); - $pdf->SetXY(110,225); + $pdf->SetXY(110,235); $pdf->MultiCell(80,30, '', 1); } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index b72df22e2de..6917c2b4231 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -60,11 +60,11 @@ class Fichinter extends CommonObject /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function Fichinter($DB) + function __construct($db) { - $this->db = $DB ; + $this->db = $db ; $this->products = array(); $this->fk_project = 0; $this->statut = 0; @@ -814,9 +814,9 @@ class Fichinter extends CommonObject { $sql = 'SELECT rowid, description, duree, date, rang'; $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet'; - $sql.= ' where fk_fichinter = '.$this->id; + $sql.= ' WHERE fk_fichinter = '.$this->id; - dol_syslog("Fichinter::fetch_lines sql=".$sql); + dol_syslog(get_class($this)."::fetch_lines sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -872,11 +872,11 @@ class FichinterLigne /** * Constructor * - * @param DoliDB $DB Database handler + * @param DoliDB $db Database handler */ - function FichinterLigne($DB) + function __construct($db) { - $this->db= $DB; + $this->db = $db; } /**