Fix: problem with this pdf
This commit is contained in:
parent
3b0beed51d
commit
e2cea80f69
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user