forked from Wavyzz/dolibarr
PDF works with us letter format
This commit is contained in:
@@ -39,8 +39,9 @@ class pdf_edison extends ModelePDFCommandes
|
||||
var $emetteur; // Objet societe qui emet
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* \param db handler acces base de donnees
|
||||
* Constructeur
|
||||
*
|
||||
* @param DoliDb $db Database access handler
|
||||
*/
|
||||
function pdf_edison($db=0)
|
||||
{
|
||||
@@ -69,7 +70,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
// Recupere emmetteur
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<27>tait pas d<>fini
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // By default, if was not defined
|
||||
|
||||
// Defini position des colonnes
|
||||
$this->posxdesc=$this->marge_gauche+1;
|
||||
@@ -87,6 +88,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
|
||||
* @param object Id of object to generate
|
||||
* @param outputlangs Lang output object
|
||||
* @param srctemplatepath Full path of source filename for generator using a template file
|
||||
@@ -98,6 +100,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false)
|
||||
{
|
||||
global $user,$conf,$langs,$mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
@@ -110,8 +113,6 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("orders");
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($conf->commande->dir_output)
|
||||
{
|
||||
// Definition of $dir and $file
|
||||
@@ -138,6 +139,8 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
if (file_exists($dir))
|
||||
{
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
@@ -191,9 +194,8 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
|
||||
// Description de la ligne produit
|
||||
// Description of product line
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,100,3,30,$curY,1,$hidedesc,0,$hookmanager);
|
||||
//$pdf->writeHTMLCell(100, 3, 30, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||
$nexY = $pdf->GetY();
|
||||
@@ -483,13 +485,21 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->line(10, $tab_top + 8, 200, $tab_top + 8);
|
||||
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size);
|
||||
$pdf->SetFont('','', $default_font_size-1);
|
||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->monnaie));
|
||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show header of page
|
||||
*
|
||||
* @param pdf Objet PDF
|
||||
* @param object Objet commande
|
||||
* @param showaddress 0=no, 1=yes
|
||||
* @param outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
@@ -530,9 +540,14 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
}
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
$posy = 40;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
|
||||
$pdf->SetXY($this->marge_gauche,$posy+3);
|
||||
$pdf->SetXY($posx,$posy+3);
|
||||
|
||||
// Sender name
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
@@ -543,7 +558,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($this->marge_gauche,$posy+7);
|
||||
$pdf->SetXY($posx,$posy+7);
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||
|
||||
// Client destinataire
|
||||
@@ -575,17 +590,30 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
||||
|
||||
// Show customer/recipient
|
||||
// Show recipient
|
||||
$posy=42;
|
||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
// Show recipient frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posx+2,$posy-5);
|
||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":",0,'L');
|
||||
$pdf->rect($posx, $posy, 100, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx+2,$posy+3);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->SetXY(102,42);
|
||||
$pdf->MultiCell(96, 4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell(96,4, $carac_client_name, 0, 'L');
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY(102,$pdf->GetY());
|
||||
$pdf->MultiCell(96, 4, $carac_client, 0, 'L');
|
||||
|
||||
$pdf->rect(100, 40, 100, 40);
|
||||
$pdf->SetXY($posx+2,$posy+8);
|
||||
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||
}
|
||||
|
||||
// Date - order
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('','B', $default_font_size + 2);
|
||||
$pdf->SetXY(11, 88);
|
||||
@@ -595,11 +623,12 @@ class pdf_edison extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Show footer of page
|
||||
* \param pdf PDF factory
|
||||
* \param object Object invoice
|
||||
* \param outputlangs Object lang for output
|
||||
* \remarks Need this->emetteur object
|
||||
* Show footer of page
|
||||
* Need this->emetteur object
|
||||
*
|
||||
* @param pdf PDF factory
|
||||
* @param object Object invoice
|
||||
* @param outputlangs Object lang for output
|
||||
*/
|
||||
function _pagefoot(&$pdf,$object,$outputlangs)
|
||||
{
|
||||
|
||||
@@ -39,12 +39,29 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
*/
|
||||
class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
var $db;
|
||||
var $name;
|
||||
var $description;
|
||||
var $type;
|
||||
|
||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||
var $version = 'dolibarr';
|
||||
|
||||
var $page_largeur;
|
||||
var $page_hauteur;
|
||||
var $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
var $marge_haute;
|
||||
var $marge_basse;
|
||||
|
||||
var $emetteur; // Objet societe qui emet
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param db Database access handler
|
||||
*
|
||||
* @param DoliDb $db Database access handler
|
||||
*/
|
||||
function pdf_einstein($db)
|
||||
{
|
||||
@@ -102,6 +119,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
|
||||
* @param object Id of object to generate
|
||||
* @param outputlangs Lang output object
|
||||
* @param srctemplatepath Full path of source filename for generator using a template file
|
||||
@@ -149,14 +167,14 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
if (create_exdir($dir) < 0)
|
||||
{
|
||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists($dir))
|
||||
{
|
||||
$nblignes = sizeof($object->lines);
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
|
||||
@@ -399,12 +417,13 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche tableau des versement
|
||||
* \param pdf Objet PDF
|
||||
* \param object Objet commande
|
||||
* \param posy Position y in PDF
|
||||
* \param outputlangs Object langs for output
|
||||
* \return int <0 if KO, >0 if OK
|
||||
* Affiche tableau des versement
|
||||
*
|
||||
* @param pdf Object PDF
|
||||
* @param object Object order
|
||||
* @param posy Position y in PDF
|
||||
* @param outputlangs Object langs for output
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
@@ -413,12 +432,13 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
|
||||
/**
|
||||
* \brief Affiche infos divers
|
||||
* \param pdf Objet PDF
|
||||
* \param object Objet commande
|
||||
* \param posy Position depart
|
||||
* \param outputlangs Objet langs
|
||||
* \return y Position pour suite
|
||||
* Affiche infos divers
|
||||
*
|
||||
* @param pdf Object PDF
|
||||
* @param object Object order
|
||||
* @param posy Position depart
|
||||
* @param outputlangs Objet langs
|
||||
* @return y Position pour suite
|
||||
*/
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
@@ -546,13 +566,14 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
|
||||
/**
|
||||
* \brief Affiche le total a payer
|
||||
* \param pdf Objet PDF
|
||||
* \param object Objet commande
|
||||
* \param deja_regle Montant deja regle
|
||||
* \param posy Position depart
|
||||
* \param outputlangs Objet langs
|
||||
* \return y Position pour suite
|
||||
* Affiche le total a payer
|
||||
*
|
||||
* @param pdf Objet PDF
|
||||
* @param object Objet commande
|
||||
* @param deja_regle Montant deja regle
|
||||
* @param posy Position depart
|
||||
* @param outputlangs Objet langs
|
||||
* @return y Position pour suite
|
||||
*/
|
||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
@@ -802,10 +823,10 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show header of page
|
||||
*
|
||||
* @param pdf Objet PDF
|
||||
* @param object Objet commande
|
||||
* @param showaddress 0=no, 1=yes
|
||||
* @param outputlangs Object lang for output
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object order
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
@@ -885,8 +906,8 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Show sender
|
||||
$posy=42;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
||||
|
||||
// Show sender frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -936,7 +957,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Show recipient
|
||||
$posy=42;
|
||||
$posx=100;
|
||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
// Show recipient frame
|
||||
@@ -959,11 +980,12 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Show footer of page
|
||||
* \param pdf PDF factory
|
||||
* \param object Object invoice
|
||||
* \param outputlangs Object lang for output
|
||||
* \remarks Need this->emetteur object
|
||||
* Show footer of page
|
||||
* Need this->emetteur object
|
||||
*
|
||||
* @param pdf PDF factory
|
||||
* @param object Object invoice
|
||||
* @param outputlangs Object lang for output
|
||||
*/
|
||||
function _pagefoot(&$pdf,$object,$outputlangs)
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
$pagenb++;
|
||||
$this->_pagehead($pdf, $this->expe, $outputlangs);
|
||||
$this->_pagehead($pdf, $this->expe, 1, $outputlangs);
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -230,7 +230,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
// New page
|
||||
$pdf->AddPage();
|
||||
$pagenb++;
|
||||
$this->_pagehead($pdf, $this->expe, $outputlangs);
|
||||
$this->_pagehead($pdf, $this->expe, 0, $outputlangs);
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
@@ -320,10 +320,10 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
*
|
||||
* @param pdf Object PDF
|
||||
* @param object Object invoice
|
||||
* @param showadress 0=no, 1=yes
|
||||
* @param showaddress 0=no, 1=yes
|
||||
* @param outputlang Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
@@ -1136,8 +1136,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Show sender
|
||||
$posy=42;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
||||
|
||||
// Show sender frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -1187,7 +1187,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// Show recipient
|
||||
$posy=42;
|
||||
$posx=100;
|
||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
// Show recipient frame
|
||||
|
||||
@@ -39,12 +39,13 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
*/
|
||||
class pdf_oursin extends ModelePDFFactures
|
||||
{
|
||||
var $emetteur; // Objet societe qui emet
|
||||
var $marges=array("g"=>10,"h"=>5,"d"=>10,"b"=>15);
|
||||
|
||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||
var $version = 'dolibarr';
|
||||
|
||||
var $emetteur; // Objet societe qui emet
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
@@ -761,11 +762,12 @@ class pdf_oursin extends ModelePDFFactures
|
||||
}
|
||||
|
||||
/*
|
||||
* \brief Affiche en-tete facture
|
||||
* \param pdf objet PDF
|
||||
* \param fac objet facture
|
||||
* Affiche en-tete facture
|
||||
*
|
||||
* @param pdf objet PDF
|
||||
* @param fac objet facture
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showadress=0, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=0, $outputlangs)
|
||||
{
|
||||
global $langs,$conf;
|
||||
$langs->load("main");
|
||||
@@ -811,42 +813,37 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Emetteur
|
||||
*/
|
||||
$posy=$this->marges['h']+24;
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marges['g'],$posy-5);
|
||||
|
||||
|
||||
$pdf->SetXY($this->marges['g'],$posy);
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->MultiCell(82, 34, "", 0, 'R', 1);
|
||||
|
||||
|
||||
$pdf->SetXY($this->marges['g'],$posy+4);
|
||||
|
||||
// Sender name
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($this->marge_gauche,$posy+9);
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||
// Show sender
|
||||
$posy=30;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
|
||||
|
||||
// Client destinataire
|
||||
$posy=45;
|
||||
// Show sender frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marges['g']+100,$posy-5);
|
||||
$pdf->SetFont('','B',$default_font_size);
|
||||
$pdf->SetXY($posx,$posy-5);
|
||||
//$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L');
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
|
||||
// Show sender name
|
||||
$pdf->SetXY($posx+2,$posy+3);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||
|
||||
// Show sender information
|
||||
$pdf->SetXY($posx+2,$posy+8);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||
|
||||
|
||||
// If BILLING contact defined on invoice, we use it
|
||||
$usecontact=false;
|
||||
@@ -872,19 +869,34 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
||||
|
||||
// Show customer/recipient
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->SetXY($this->marges['g']+100,$posy+4);
|
||||
$pdf->MultiCell(86,4, $carac_client_name, 0, 'L');
|
||||
// Show recipient
|
||||
$posy=30;
|
||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
$pdf->SetFont('','B', $default_font_size - 1);
|
||||
$pdf->SetXY($this->marges['g']+100,$posy+8);
|
||||
// Show recipient frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posx+2,$posy-5);
|
||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":",0,'L');
|
||||
$pdf->rect($posx, $posy, 100, $hautcadre);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx+2,$posy+3);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->MultiCell(96,4, $carac_client_name, 0, 'L');
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($posx+2,$posy+8);
|
||||
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ref facture
|
||||
*/
|
||||
$posy=70;
|
||||
$posy=78;
|
||||
$pdf->SetFont('','B', $default_font_size + 3);
|
||||
$pdf->SetXY($this->marges['g'],$posy-5);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -984,7 +996,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
// Amount in (at tab_top - 1)
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size);
|
||||
$pdf->SetFont('','', $default_font_size-1);
|
||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->monnaie));
|
||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), 90);
|
||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||
|
||||
@@ -311,12 +311,14 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche en-tete
|
||||
* \param pdf objet PDF
|
||||
* \param delivery object delivery
|
||||
* \param showadress 0=non, 1=oui
|
||||
* Show header of page
|
||||
*
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object delivery
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -464,12 +464,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche en-tete bon livraison
|
||||
* \param pdf objet PDF
|
||||
* \param delivery object delivery
|
||||
* \param showadress 0=non, 1=oui
|
||||
* Show header of page
|
||||
*
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object order
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
@@ -566,7 +568,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
}
|
||||
|
||||
if ($showadress)
|
||||
if ($showaddress)
|
||||
{
|
||||
// Emetteur
|
||||
$posy=42;
|
||||
|
||||
@@ -314,12 +314,14 @@ class pdf_baleine extends ModelePDFProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Affiche en-tete bon livraison
|
||||
* \param pdf objet PDF
|
||||
* \param delivery object delivery
|
||||
* \param showadress 0=non, 1=oui
|
||||
* Show header of page
|
||||
*
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object project
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
|
||||
@@ -962,10 +962,10 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
||||
// Show sender
|
||||
$posx=$this->marge_gauche;
|
||||
$posy=42;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
||||
|
||||
// Show sender frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -1014,26 +1014,26 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
// Show recipient
|
||||
$posy=42;
|
||||
$posx=100;
|
||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
// Show recipient frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posx,$posy-5);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->rect($posx, $posy, 100, $hautcadre);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx+2,$posy+3);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->MultiCell(96,4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell(100,4, $carac_client_name, 0, 'L');
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($posx+2,$posy+8);
|
||||
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell(100,4, $carac_client, 0, 'L');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -962,10 +962,10 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
||||
// Show sender
|
||||
$posx=$this->marge_gauche;
|
||||
$posy=42;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
||||
|
||||
// Show sender frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@@ -1014,26 +1014,26 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
// Show recipient
|
||||
$posy=42;
|
||||
$posx=100;
|
||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
// Show recipient frame
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posx,$posy-5);
|
||||
$pdf->MultiCell(80, 4, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("BillTo").":", 0, 'L');
|
||||
$pdf->rect($posx, $posy, 100, $hautcadre);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx+2,$posy+3);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->MultiCell(96,4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell(100,4, $carac_client_name, 0, 'L');
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($posx+2,$posy+8);
|
||||
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||
$pdf->MultiCell(100,4, $carac_client, 0, 'L');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,12 +205,14 @@ class pdf_paiement
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Generate Header
|
||||
* \param pdf pdf object
|
||||
* \param page current page number
|
||||
* \param pages number of pages
|
||||
* Show header of page
|
||||
*
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $page, $showadress=1, $outputlangs)
|
||||
function _pagehead(&$pdf, $page, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
||||
@@ -695,13 +695,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Show header of page
|
||||
* \param pdf Object PDF
|
||||
* \param object Object invoice
|
||||
* \param showadress 0=no, 1=yes
|
||||
* \param outputlangs Object lang for output
|
||||
* Show header of page
|
||||
*
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object order
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
@@ -765,7 +766,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
||||
}
|
||||
|
||||
if ($showadress)
|
||||
if ($showaddress)
|
||||
{
|
||||
// Receive email
|
||||
$posy=42;
|
||||
|
||||
@@ -619,13 +619,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Show header of page
|
||||
* \param pdf Object PDF
|
||||
* \param object Object invoice
|
||||
* \param showadress 0=no, 1=yes
|
||||
* \param outputlangs Object lang for output
|
||||
* Show header of page
|
||||
*
|
||||
* @param $pdf Object PDF
|
||||
* @param $object Object order
|
||||
* @param $showaddress 0=no, 1=yes
|
||||
* @param $outputlangs Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
@@ -695,7 +696,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
||||
}
|
||||
|
||||
if ($showadress)
|
||||
if ($showaddress)
|
||||
{
|
||||
// Show sender address
|
||||
$posy=42;
|
||||
|
||||
Reference in New Issue
Block a user