mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
[Task #7349] Patch + Correction mise en page adresse contact sur PDF
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -75,6 +76,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->option_escompte = 1; // Affiche si il y a eu escompte
|
||||
$this->option_credit_note = 1; // G<>re les avoirs
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||
|
||||
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
||||
$this->franchise=1;
|
||||
@@ -762,6 +764,25 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
|
||||
//Affiche le filigrane brouillon - Print Draft Watermark
|
||||
if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
|
||||
{
|
||||
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
|
||||
$watermark_x=5;
|
||||
$watermark_y=$this->page_hauteur-25; //Set to $this->page_hauteur-50 or less if problems
|
||||
$watermark_width=$this->page_hauteur;
|
||||
$pdf->SetFont('Arial','B',50);
|
||||
$pdf->SetTextColor(255,192,203);
|
||||
//rotate
|
||||
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
|
||||
//print watermark
|
||||
$pdf->SetXY($watermark_x,$watermark_y);
|
||||
$pdf->Cell($watermark_width,25,clean_html($conf->global->COMMANDE_DRAFT_WATERMARK),0,2,"C",0);
|
||||
//antirotate
|
||||
$pdf->_out('Q');
|
||||
}
|
||||
//Print content
|
||||
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFont('Arial','B',13);
|
||||
|
||||
@@ -893,15 +914,12 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
||||
$posy+=4;
|
||||
|
||||
// Nom client
|
||||
$pdf->SetXY(102,$posy+4);
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->MultiCell(106,4, $object->contact->getFullName($outputlangs,1), 0, 'L');
|
||||
$carac_client = "\n".$object->contact->getFullName($outputlangs,1);
|
||||
|
||||
// Caract<63>ristiques client
|
||||
$carac_client=$object->contact->adresse;
|
||||
$carac_client.=$object->contact->adresse;
|
||||
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
|
||||
if ($this->emetteur->pays_code != $object->contact->pays_code)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user