55 |
$this->page_largeur = 210; |
$this->page_largeur = 210; |
56 |
$this->page_hauteur = 297; |
$this->page_hauteur = 297; |
57 |
$this->format = array($this->page_largeur,$this->page_hauteur); |
$this->format = array($this->page_largeur,$this->page_hauteur); |
58 |
|
$this->marge_haute=10; |
59 |
|
$this->marge_basse=10; |
60 |
|
|
61 |
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO |
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO |
62 |
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION |
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION |
90 |
$this->posxqty=151; |
$this->posxqty=151; |
91 |
$this->posxdiscount=162; |
$this->posxdiscount=162; |
92 |
$this->postotalht=177; |
$this->postotalht=177; |
93 |
|
|
94 |
} |
} |
95 |
|
|
96 |
/** |
/** |
132 |
if ($conf->propal->dir_output) |
if ($conf->propal->dir_output) |
133 |
{ |
{ |
134 |
$prop = new Propal($this->db,"",$id); |
$prop = new Propal($this->db,"",$id); |
135 |
$prop->fetch($id); |
$ret=$prop->fetch($id); |
136 |
|
|
137 |
$propref = sanitize_string($prop->ref); |
$propref = sanitize_string($prop->ref); |
138 |
$dir = $conf->propal->dir_output . "/" . $propref; |
$dir = $conf->propal->dir_output . "/" . $propref; |
149 |
|
|
150 |
if (file_exists($dir)) |
if (file_exists($dir)) |
151 |
{ |
{ |
152 |
// Initialisation propale vierge |
// Initialisation document vierge |
153 |
$pdf=new FPDF('P','mm',$this->format); |
$pdf=new FPDF('P','mm',$this->format); |
154 |
$pdf->Open(); |
$pdf->Open(); |
155 |
$pdf->AddPage(); |
$pdf->AddPage(); |
161 |
$pdf->SetCreator("Dolibarr ".DOL_VERSION); |
$pdf->SetCreator("Dolibarr ".DOL_VERSION); |
162 |
$pdf->SetAuthor($user->fullname); |
$pdf->SetAuthor($user->fullname); |
163 |
|
|
164 |
$pdf->SetMargins(10, 8, 10); |
$pdf->SetMargins($this->marge_haute, $this->marge_basse, 10); // Top, Bottom, Left |
165 |
$pdf->SetAutoPageBreak(1,0); |
$pdf->SetAutoPageBreak(1,0); |
166 |
|
|
167 |
$this->_pagehead($pdf, $prop); |
$this->_pagehead($pdf, $prop); |
569 |
$pdf->SetTextColor(0,0,60); |
$pdf->SetTextColor(0,0,60); |
570 |
$pdf->SetFont('Arial','B',13); |
$pdf->SetFont('Arial','B',13); |
571 |
|
|
572 |
$posy=10; // La marge est de 10, on commence donc a 10 |
$posy=$this->marge_haute; // La marge Top est de 10, on commence donc a 10 |
573 |
|
|
574 |
$pdf->SetXY(10,$posy); |
$pdf->SetXY(10,$posy); |
575 |
|
|
576 |
// Logo |
// Logo |
577 |
if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) |
if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) |
578 |
{ |
{ |
579 |
if (file_exists(FAC_PDF_LOGO)) |
if (is_readable(FAC_PDF_LOGO)) |
580 |
{ |
{ |
581 |
$pdf->Image(FAC_PDF_LOGO, 10, $posy, 0, 24); |
$pdf->Image(FAC_PDF_LOGO, 10, $posy, 0, 24); |
582 |
} |
} |
740 |
$pdf->SetDrawColor(224,224,224); |
$pdf->SetDrawColor(224,224,224); |
741 |
|
|
742 |
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page |
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page |
743 |
$posy=11 + ($ligne1?3:0) + ($ligne2?3:0); |
$posy=$this->marge_basse + 1 + ($ligne1?3:0) + ($ligne2?3:0); |
744 |
|
|
745 |
$pdf->SetY(-$posy); |
$pdf->SetY(-$posy); |
746 |
$pdf->line(10, $this->page_hauteur-$posy, 200, $this->page_hauteur-$posy); |
$pdf->line(10, $this->page_hauteur-$posy, 200, $this->page_hauteur-$posy); |