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
|
var $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur
|
* Constructeur
|
||||||
* \param db handler acces base de donnees
|
*
|
||||||
|
* @param DoliDb $db Database access handler
|
||||||
*/
|
*/
|
||||||
function pdf_edison($db=0)
|
function pdf_edison($db=0)
|
||||||
{
|
{
|
||||||
@@ -69,7 +70,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
// Recupere emmetteur
|
// Recupere emmetteur
|
||||||
$this->emetteur=$mysoc;
|
$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
|
// Defini position des colonnes
|
||||||
$this->posxdesc=$this->marge_gauche+1;
|
$this->posxdesc=$this->marge_gauche+1;
|
||||||
@@ -87,6 +88,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to build pdf onto disk
|
* Function to build pdf onto disk
|
||||||
|
|
||||||
* @param object Id of object to generate
|
* @param object Id of object to generate
|
||||||
* @param outputlangs Lang output object
|
* @param outputlangs Lang output object
|
||||||
* @param srctemplatepath Full path of source filename for generator using a template file
|
* @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)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0,$hookmanager=false)
|
||||||
{
|
{
|
||||||
global $user,$conf,$langs,$mysoc;
|
global $user,$conf,$langs,$mysoc;
|
||||||
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
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
|
// 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("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
|
||||||
|
|
||||||
if ($conf->commande->dir_output)
|
if ($conf->commande->dir_output)
|
||||||
{
|
{
|
||||||
// Definition of $dir and $file
|
// Definition of $dir and $file
|
||||||
@@ -138,7 +139,9 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$pdf=pdf_getInstance($this->format);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
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
|
$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_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
|
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
@@ -483,13 +485,21 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf->line(10, $tab_top + 8, 200, $tab_top + 8);
|
$pdf->line(10, $tab_top + 8, 200, $tab_top + 8);
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,0);
|
$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));
|
$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->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$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)
|
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
@@ -530,62 +540,80 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
$posy = 40;
|
if ($showaddress)
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche,$posy+3);
|
|
||||||
|
|
||||||
// Sender name
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
|
||||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
|
||||||
|
|
||||||
// Sender properties
|
|
||||||
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
|
||||||
$pdf->SetXY($this->marge_gauche,$posy+7);
|
|
||||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
|
||||||
|
|
||||||
// Client destinataire
|
|
||||||
$client = new Societe($this->db);
|
|
||||||
$client->fetch($object->socid);
|
|
||||||
$object->client = $client;
|
|
||||||
|
|
||||||
// If CUSTOMER contact defined on invoice, we use it
|
|
||||||
$usecontact=false;
|
|
||||||
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
|
|
||||||
if (sizeof($arrayidcontact) > 0)
|
|
||||||
{
|
{
|
||||||
$usecontact=true;
|
$posy = 40;
|
||||||
$result=$object->fetch_contact($arrayidcontact[0]);
|
$posx=$this->marge_gauche;
|
||||||
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||||
|
$hautcadre=40;
|
||||||
|
|
||||||
|
$pdf->SetXY($posx,$posy+3);
|
||||||
|
|
||||||
|
// Sender name
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->SetFont('','B', $default_font_size);
|
||||||
|
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||||
|
|
||||||
|
// Sender properties
|
||||||
|
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||||
|
|
||||||
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
$pdf->SetXY($posx,$posy+7);
|
||||||
|
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||||
|
|
||||||
|
// Client destinataire
|
||||||
|
$client = new Societe($this->db);
|
||||||
|
$client->fetch($object->socid);
|
||||||
|
$object->client = $client;
|
||||||
|
|
||||||
|
// If CUSTOMER contact defined on invoice, we use it
|
||||||
|
$usecontact=false;
|
||||||
|
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
{
|
||||||
|
$usecontact=true;
|
||||||
|
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recipient name
|
||||||
|
if (! empty($usecontact))
|
||||||
|
{
|
||||||
|
// On peut utiliser le nom de la societe du contact
|
||||||
|
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
||||||
|
else $socname = $object->client->nom;
|
||||||
|
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||||
|
}
|
||||||
|
|
||||||
|
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
||||||
|
|
||||||
|
// 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->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');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recipient name
|
// Date - order
|
||||||
if (! empty($usecontact))
|
|
||||||
{
|
|
||||||
// On peut utiliser le nom de la societe du contact
|
|
||||||
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
|
||||||
else $socname = $object->client->nom;
|
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
|
||||||
}
|
|
||||||
|
|
||||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
|
||||||
|
|
||||||
// Show customer/recipient
|
|
||||||
$pdf->SetTextColor(0,0,0);
|
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
|
||||||
$pdf->SetXY(102,42);
|
|
||||||
$pdf->MultiCell(96, 4, $carac_client_name, 0, 'L');
|
|
||||||
$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->SetTextColor(200,0,0);
|
$pdf->SetTextColor(200,0,0);
|
||||||
$pdf->SetFont('','B', $default_font_size + 2);
|
$pdf->SetFont('','B', $default_font_size + 2);
|
||||||
$pdf->SetXY(11, 88);
|
$pdf->SetXY(11, 88);
|
||||||
@@ -595,11 +623,12 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show footer of page
|
* Show footer of page
|
||||||
* \param pdf PDF factory
|
* Need this->emetteur object
|
||||||
* \param object Object invoice
|
*
|
||||||
* \param outputlangs Object lang for output
|
* @param pdf PDF factory
|
||||||
* \remarks Need this->emetteur object
|
* @param object Object invoice
|
||||||
|
* @param outputlangs Object lang for output
|
||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs)
|
function _pagefoot(&$pdf,$object,$outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,12 +39,29 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
|||||||
*/
|
*/
|
||||||
class pdf_einstein extends ModelePDFCommandes
|
class pdf_einstein extends ModelePDFCommandes
|
||||||
{
|
{
|
||||||
var $emetteur; // Objet societe qui emet
|
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
|
* Constructor
|
||||||
* @param db Database access handler
|
*
|
||||||
|
* @param DoliDb $db Database access handler
|
||||||
*/
|
*/
|
||||||
function pdf_einstein($db)
|
function pdf_einstein($db)
|
||||||
{
|
{
|
||||||
@@ -102,6 +119,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to build pdf onto disk
|
* Function to build pdf onto disk
|
||||||
|
|
||||||
* @param object Id of object to generate
|
* @param object Id of object to generate
|
||||||
* @param outputlangs Lang output object
|
* @param outputlangs Lang output object
|
||||||
* @param srctemplatepath Full path of source filename for generator using a template file
|
* @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)
|
if (create_exdir($dir) < 0)
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$nblignes = sizeof($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
$pdf=pdf_getInstance($this->format);
|
$pdf=pdf_getInstance($this->format);
|
||||||
|
|
||||||
@@ -399,12 +417,13 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche tableau des versement
|
* Affiche tableau des versement
|
||||||
* \param pdf Objet PDF
|
*
|
||||||
* \param object Objet commande
|
* @param pdf Object PDF
|
||||||
* \param posy Position y in PDF
|
* @param object Object order
|
||||||
* \param outputlangs Object langs for output
|
* @param posy Position y in PDF
|
||||||
* \return int <0 if KO, >0 if OK
|
* @param outputlangs Object langs for output
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
@@ -413,12 +432,13 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche infos divers
|
* Affiche infos divers
|
||||||
* \param pdf Objet PDF
|
*
|
||||||
* \param object Objet commande
|
* @param pdf Object PDF
|
||||||
* \param posy Position depart
|
* @param object Object order
|
||||||
* \param outputlangs Objet langs
|
* @param posy Position depart
|
||||||
* \return y Position pour suite
|
* @param outputlangs Objet langs
|
||||||
|
* @return y Position pour suite
|
||||||
*/
|
*/
|
||||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
@@ -546,13 +566,14 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche le total a payer
|
* Affiche le total a payer
|
||||||
* \param pdf Objet PDF
|
*
|
||||||
* \param object Objet commande
|
* @param pdf Objet PDF
|
||||||
* \param deja_regle Montant deja regle
|
* @param object Objet commande
|
||||||
* \param posy Position depart
|
* @param deja_regle Montant deja regle
|
||||||
* \param outputlangs Objet langs
|
* @param posy Position depart
|
||||||
* \return y Position pour suite
|
* @param outputlangs Objet langs
|
||||||
|
* @return y Position pour suite
|
||||||
*/
|
*/
|
||||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
@@ -802,10 +823,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
/**
|
/**
|
||||||
* Show header of page
|
* Show header of page
|
||||||
*
|
*
|
||||||
* @param pdf Objet PDF
|
* @param $pdf Object PDF
|
||||||
* @param object Objet commande
|
* @param $object Object order
|
||||||
* @param showaddress 0=no, 1=yes
|
* @param $showaddress 0=no, 1=yes
|
||||||
* @param outputlangs Object lang for output
|
* @param $outputlangs Object lang for output
|
||||||
*/
|
*/
|
||||||
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||||
{
|
{
|
||||||
@@ -885,8 +906,8 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
// Show sender
|
// Show sender
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$posx=$this->marge_gauche;
|
$posx=$this->marge_gauche;
|
||||||
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||||
$hautcadre=40;
|
$hautcadre=40;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
|
||||||
|
|
||||||
// Show sender frame
|
// Show sender frame
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -936,7 +957,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$posx=100;
|
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||||
|
|
||||||
// Show recipient frame
|
// Show recipient frame
|
||||||
@@ -959,11 +980,12 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show footer of page
|
* Show footer of page
|
||||||
* \param pdf PDF factory
|
* Need this->emetteur object
|
||||||
* \param object Object invoice
|
*
|
||||||
* \param outputlangs Object lang for output
|
* @param pdf PDF factory
|
||||||
* \remarks Need this->emetteur object
|
* @param object Object invoice
|
||||||
|
* @param outputlangs Object lang for output
|
||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs)
|
function _pagefoot(&$pdf,$object,$outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $this->expe, $outputlangs);
|
$this->_pagehead($pdf, $this->expe, 1, $outputlangs);
|
||||||
$pdf->SetFont('','', $default_font_size - 3);
|
$pdf->SetFont('','', $default_font_size - 3);
|
||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -230,7 +230,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $this->expe, $outputlangs);
|
$this->_pagehead($pdf, $this->expe, 0, $outputlangs);
|
||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('','', $default_font_size - 3);
|
$pdf->SetFont('','', $default_font_size - 3);
|
||||||
@@ -320,10 +320,10 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
*
|
*
|
||||||
* @param pdf Object PDF
|
* @param pdf Object PDF
|
||||||
* @param object Object invoice
|
* @param object Object invoice
|
||||||
* @param showadress 0=no, 1=yes
|
* @param showaddress 0=no, 1=yes
|
||||||
* @param outputlang Object lang for output
|
* @param outputlang Object lang for output
|
||||||
*/
|
*/
|
||||||
function _pagehead(&$pdf, $object, $outputlangs)
|
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
|
|||||||
@@ -1136,8 +1136,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
// Show sender
|
// Show sender
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$posx=$this->marge_gauche;
|
$posx=$this->marge_gauche;
|
||||||
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||||
$hautcadre=40;
|
$hautcadre=40;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
|
||||||
|
|
||||||
// Show sender frame
|
// Show sender frame
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -1187,7 +1187,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$posx=100;
|
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||||
|
|
||||||
// Show recipient frame
|
// Show recipient frame
|
||||||
|
|||||||
@@ -39,12 +39,13 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
|||||||
*/
|
*/
|
||||||
class pdf_oursin extends ModelePDFFactures
|
class pdf_oursin extends ModelePDFFactures
|
||||||
{
|
{
|
||||||
var $emetteur; // Objet societe qui emet
|
|
||||||
var $marges=array("g"=>10,"h"=>5,"d"=>10,"b"=>15);
|
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 $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||||
var $version = 'dolibarr';
|
var $version = 'dolibarr';
|
||||||
|
|
||||||
|
var $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur
|
* \brief Constructeur
|
||||||
@@ -761,11 +762,12 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Affiche en-tete facture
|
* Affiche en-tete facture
|
||||||
* \param pdf objet PDF
|
*
|
||||||
* \param fac objet 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;
|
global $langs,$conf;
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
@@ -811,80 +813,90 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($showaddress)
|
||||||
/*
|
|
||||||
* 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');
|
|
||||||
|
|
||||||
// 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');
|
|
||||||
|
|
||||||
|
|
||||||
// Client destinataire
|
|
||||||
$posy=45;
|
|
||||||
$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);
|
|
||||||
|
|
||||||
// If BILLING contact defined on invoice, we use it
|
|
||||||
$usecontact=false;
|
|
||||||
$arrayidcontact=$object->getIdContact('external','BILLING');
|
|
||||||
if (sizeof($arrayidcontact) > 0)
|
|
||||||
{
|
{
|
||||||
$usecontact=true;
|
// Sender properties
|
||||||
$result=$object->fetch_contact($arrayidcontact[0]);
|
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
// Show sender frame
|
||||||
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
$pdf->SetFont('','', $default_font_size - 2);
|
||||||
|
$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;
|
||||||
|
$arrayidcontact=$object->getIdContact('external','BILLING');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
{
|
||||||
|
$usecontact=true;
|
||||||
|
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recipient name
|
||||||
|
if (! empty($usecontact))
|
||||||
|
{
|
||||||
|
// On peut utiliser le nom de la societe du contact
|
||||||
|
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
||||||
|
else $socname = $object->client->nom;
|
||||||
|
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||||
|
}
|
||||||
|
|
||||||
|
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
||||||
|
|
||||||
|
// Show recipient
|
||||||
|
$posy=30;
|
||||||
|
$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->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');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recipient name
|
|
||||||
if (! empty($usecontact))
|
|
||||||
{
|
|
||||||
// On peut utiliser le nom de la societe du contact
|
|
||||||
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
|
||||||
else $socname = $object->client->nom;
|
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
|
||||||
}
|
|
||||||
|
|
||||||
$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');
|
|
||||||
|
|
||||||
$pdf->SetFont('','B', $default_font_size - 1);
|
|
||||||
$pdf->SetXY($this->marges['g']+100,$posy+8);
|
|
||||||
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ref facture
|
* ref facture
|
||||||
*/
|
*/
|
||||||
$posy=70;
|
$posy=78;
|
||||||
$pdf->SetFont('','B', $default_font_size + 3);
|
$pdf->SetFont('','B', $default_font_size + 3);
|
||||||
$pdf->SetXY($this->marges['g'],$posy-5);
|
$pdf->SetXY($this->marges['g'],$posy-5);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -984,7 +996,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
|
|
||||||
// Amount in (at tab_top - 1)
|
// Amount in (at tab_top - 1)
|
||||||
$pdf->SetTextColor(0,0,0);
|
$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));
|
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->monnaie));
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), 90);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), 90);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|||||||
@@ -311,12 +311,14 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche en-tete
|
* Show header of page
|
||||||
* \param pdf objet PDF
|
*
|
||||||
* \param delivery object delivery
|
* @param $pdf Object PDF
|
||||||
* \param showadress 0=non, 1=oui
|
* @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;
|
global $langs,$conf,$mysoc;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|||||||
@@ -464,12 +464,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche en-tete bon livraison
|
* Show header of page
|
||||||
* \param pdf objet PDF
|
*
|
||||||
* \param delivery object delivery
|
* @param $pdf Object PDF
|
||||||
* \param showadress 0=non, 1=oui
|
* @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;
|
global $langs,$conf,$mysoc;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
@@ -566,7 +568,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showadress)
|
if ($showaddress)
|
||||||
{
|
{
|
||||||
// Emetteur
|
// Emetteur
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
|||||||
@@ -314,12 +314,14 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche en-tete bon livraison
|
* Show header of page
|
||||||
* \param pdf objet PDF
|
*
|
||||||
* \param delivery object delivery
|
* @param $pdf Object PDF
|
||||||
* \param showadress 0=non, 1=oui
|
* @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;
|
global $langs,$conf,$mysoc;
|
||||||
|
|
||||||
|
|||||||
@@ -962,10 +962,10 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||||
|
|
||||||
// Show sender
|
// Show sender
|
||||||
$posx=$this->marge_gauche;
|
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
$posx=$this->marge_gauche;
|
||||||
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||||
$hautcadre=40;
|
$hautcadre=40;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
|
||||||
|
|
||||||
// Show sender frame
|
// Show sender frame
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -1014,26 +1014,26 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$posx=100;
|
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||||
|
|
||||||
// Show recipient frame
|
// Show recipient frame
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('','', $default_font_size - 2);
|
$pdf->SetFont('','', $default_font_size - 2);
|
||||||
$pdf->SetXY($posx,$posy-5);
|
$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->rect($posx, $posy, 100, $hautcadre);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
// Show recipient name
|
// Show recipient name
|
||||||
$pdf->SetXY($posx+2,$posy+3);
|
$pdf->SetXY($posx+2,$posy+3);
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
$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
|
// Show recipient information
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
$pdf->SetXY($posx+2,$posy+8);
|
$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);
|
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||||
|
|
||||||
// Show sender
|
// Show sender
|
||||||
$posx=$this->marge_gauche;
|
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
$posx=$this->marge_gauche;
|
||||||
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||||
$hautcadre=40;
|
$hautcadre=40;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=118;
|
|
||||||
|
|
||||||
// Show sender frame
|
// Show sender frame
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@@ -1014,26 +1014,26 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$posx=100;
|
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||||
|
|
||||||
// Show recipient frame
|
// Show recipient frame
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('','', $default_font_size - 2);
|
$pdf->SetFont('','', $default_font_size - 2);
|
||||||
$pdf->SetXY($posx,$posy-5);
|
$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->rect($posx, $posy, 100, $hautcadre);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
// Show recipient name
|
// Show recipient name
|
||||||
$pdf->SetXY($posx+2,$posy+3);
|
$pdf->SetXY($posx+2,$posy+3);
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
$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
|
// Show recipient information
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
$pdf->SetXY($posx+2,$posy+8);
|
$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
|
* Show header of page
|
||||||
* \param pdf pdf object
|
*
|
||||||
* \param page current page number
|
* @param $pdf Object PDF
|
||||||
* \param pages number of pages
|
* @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;
|
global $langs;
|
||||||
|
|
||||||
|
|||||||
@@ -695,13 +695,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show header of page
|
* Show header of page
|
||||||
* \param pdf Object PDF
|
*
|
||||||
* \param object Object invoice
|
* @param $pdf Object PDF
|
||||||
* \param showadress 0=no, 1=yes
|
* @param $object Object order
|
||||||
* \param outputlangs Object lang for output
|
* @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;
|
global $langs,$conf,$mysoc;
|
||||||
|
|
||||||
@@ -765,7 +766,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showadress)
|
if ($showaddress)
|
||||||
{
|
{
|
||||||
// Receive email
|
// Receive email
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
|||||||
@@ -619,13 +619,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show header of page
|
* Show header of page
|
||||||
* \param pdf Object PDF
|
*
|
||||||
* \param object Object invoice
|
* @param $pdf Object PDF
|
||||||
* \param showadress 0=no, 1=yes
|
* @param $object Object order
|
||||||
* \param outputlangs Object lang for output
|
* @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;
|
global $langs,$conf,$mysoc;
|
||||||
|
|
||||||
@@ -695,7 +696,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showadress)
|
if ($showaddress)
|
||||||
{
|
{
|
||||||
// Show sender address
|
// Show sender address
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
|||||||
Reference in New Issue
Block a user