This commit is contained in:
Laurent Destailleur 2012-01-23 18:43:30 +01:00
parent 1f46bbdae6
commit d596920898
17 changed files with 451 additions and 345 deletions

View File

@ -232,12 +232,12 @@ class CommActionRapport
}
/**
* Show page head
* Show top header of page.
*
* @param PDF &$pdf Object PDF
* @param Translate $outputlangs Object langs
* @param PDF &$pdf Object PDF
* @param Translate $outputlangs Object lang for output
* @param int $pagenb Page nb
* @return int Pos y
* @return void
*/
function _pagehead(&$pdf, $outputlangs, $pagenb)
{

View File

@ -333,11 +333,12 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
/**
* \brief Show footer of page
* \param pdf Object PDF
* \param object Object cheque receipt
* \param outputlangs Object lang for output
* \remarks Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -88,7 +88,7 @@ class pdf_edison extends ModelePDFCommandes
/**
* Function to build pdf onto disk
*
*
* @param int $object Id of object to generate
* @param object $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
@ -182,7 +182,7 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY(10, $tab_top + 10 );
$pdf->SetXY(10, $tab_top + 10);
$iniY = $pdf->GetY();
$curY = $pdf->GetY();
@ -307,12 +307,13 @@ class pdf_edison 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
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -441,13 +442,14 @@ class pdf_edison extends ModelePDFCommandes
}
/**
* Enter description here...
* Show table for lines
*
* @param $pdf
* @param $tab_top
* @param $tab_height
* @param $nexY
* @param $outputlangs
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -494,14 +496,15 @@ class pdf_edison extends ModelePDFCommandes
/**
* Show header of page
* Show top 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 &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs,$mysoc;
$langs->load("orders");
@ -624,12 +627,12 @@ class pdf_edison extends ModelePDFCommandes
}
/**
* Show footer of page
* 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
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -119,7 +119,7 @@ class pdf_einstein extends ModelePDFCommandes
/**
* Function to build pdf onto disk
*
*
* @param int $object Id of object to generate
* @param object $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
@ -433,13 +433,13 @@ class pdf_einstein extends ModelePDFCommandes
/**
* Affiche infos divers
*
* @param pdf Object PDF
* @param object Object order
* @param posy Position depart
* @param outputlangs Objet langs
* @return y Position pour suite
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -567,14 +567,14 @@ class pdf_einstein extends ModelePDFCommandes
/**
* 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
* Show total to pay
*
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -763,8 +763,14 @@ class pdf_einstein extends ModelePDFCommandes
}
/**
* \brief Affiche la grille des lignes de commandes
* \param pdf objet PDF
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -822,14 +828,15 @@ class pdf_einstein extends ModelePDFCommandes
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object order
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
@ -981,12 +988,12 @@ class pdf_einstein extends ModelePDFCommandes
}
/**
* Show footer of page
* 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
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -270,9 +270,16 @@ Class pdf_expedition_merou extends ModelePdfExpedition
}
//********************************
// Generation du tableau
//********************************
/**
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
global $langs;
@ -300,11 +307,12 @@ Class pdf_expedition_merou extends ModelePdfExpedition
}
/**
* Show footer of page
*
* @param pdf PDF factory
* @param object Object invoice
* @param outputlangs Object lang for output
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf, $object, $outputlangs)
{
@ -327,14 +335,15 @@ Class pdf_expedition_merou extends ModelePdfExpedition
/**
* Show header of page
* Show top header of page.
*
* @param pdf Object PDF
* @param object Object invoice
* @param showaddress 0=no, 1=yes
* @param outputlang Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf, $langs;

View File

@ -39,8 +39,9 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
/**
* \brief Constructeur
* \param db Database handler
* Constructor
*
* @param db Database handler
*/
function pdf_expedition_rouget($db=0)
{
@ -260,8 +261,14 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
}
/**
* Build table
* @param pdf objet PDF
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -292,14 +299,15 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
}
/**
* Show header of document
* Show top header of page.
*
* @param pdf Object PDF
* @param object Object commercial proposal
* @param showaddress 0=no, 1=yes
* @param outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -526,11 +534,12 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
}
/**
* \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 PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -559,13 +559,13 @@ class pdf_crabe extends ModelePDFFactures
/**
* Show other information
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $posy Position start
* @param Translate $outputlangs Object langs
* @return int Position pour suite
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -689,7 +689,7 @@ class pdf_crabe extends ModelePDFFactures
}
}
}
return $posy;
}
@ -918,9 +918,14 @@ class pdf_crabe extends ModelePDFFactures
}
/**
* Show the lines of invoice
* Show table for lines
*
* @param PDF $pdf object PDF
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -979,14 +984,15 @@ class pdf_crabe extends ModelePDFFactures
}
/**
* Show header of page
* Show top header of page.
*
* @param pdf Object PDF
* @param object Object invoice
* @param showaddress 0=no, 1=yes
* @param outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
@ -1231,12 +1237,12 @@ class pdf_crabe extends ModelePDFFactures
}
/**
* Show footer of page
* Show footer of page. Need this->emetteur object
*
* \param pdf PDF factory
* \param object Object invoice
* \param outputlangs Object lang for output
* \remarks Need this->emetteur object
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -442,12 +442,13 @@ class pdf_oursin extends ModelePDFFactures
}
/**
* \brief Affiche infos divers
* \param pdf Objet PDF
* \param object Objet facture
* \param posy Position depart
* \param outputlangs Objet langs
* \return y Position pour suite
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -578,14 +579,14 @@ class pdf_oursin extends ModelePDFFactures
/**
* Affiche le total a payer
* Show total to pay
*
* @param pdf Objet PDF
* @param object Objet facture
* @param deja_regle Montant deja regle
* @param posy Position depart
* @param outputlangs Objet langs
* @return y Position pour suite
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -726,9 +727,15 @@ class pdf_oursin extends ModelePDFFactures
return ($tab2_top + ($tab2_hl * $index));
}
/*
* Affiche la grille des lignes de factures
* @param pdf objet PDF
/**
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $object, $outputlangs)
{
@ -777,13 +784,16 @@ class pdf_oursin extends ModelePDFFactures
return $pdf->GetY();
}
/*
* Affiche en-tete facture
/**
* Show top header of page.
*
* @param pdf objet PDF
* @param fac objet facture
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=0, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf;
$langs->load("main");
@ -1028,11 +1038,12 @@ class pdf_oursin extends ModelePDFFactures
}
/**
* \brief Show footer of page
* \param pdf PDF factory
* \param object Object invoice
* \param outputlang Object lang for output
* \remarks Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf, $object, $outputlangs)
{

View File

@ -41,7 +41,7 @@ class pdf_soleil extends ModelePDFFicheinter
/**
* Constructor
*
* @param DoliDB $DB Database handler
* @param DoliDB $db Database handler
*/
function pdf_soleil($db)
{
@ -131,7 +131,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->Open();
$pagenb=0;
$pdf->SetDrawColor(128,128,128);
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
$pdf->SetSubject($outputlangs->transnoentities("InterventionCard"));
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
@ -180,7 +180,7 @@ class pdf_soleil extends ModelePDFFicheinter
{
$height_note=0;
}
$iniY = $tab_top + 7;
$curY = $tab_top + 7;
$nexY = $tab_top + 7;
@ -230,9 +230,9 @@ class pdf_soleil extends ModelePDFFicheinter
$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+=2; // Passe espace entre les lignes
// Cherche nombre de lignes a venir pour savoir si place suffisante
if ($i < ($nblines - 1) && empty($hidedesc)) // If it's not last line
{
@ -245,7 +245,7 @@ class pdf_soleil extends ModelePDFFicheinter
{
$nblineFollowDesc = 0;
}
// Test if a new page is required
if ($pagenb == 1)
{
@ -267,9 +267,9 @@ class pdf_soleil extends ModelePDFFicheinter
{
$this->_tableau($pdf, $tab_top_newpage, $tab_height_middlepage, $nexY, $outputlangs);
}
$this->_pagefoot($pdf,$object,$outputlangs);
// New page
$pdf->AddPage();
$pagenb++;
@ -277,7 +277,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetFont('','', $default_font_size - 1);
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0,0,0);
$nexY = $tab_top_newpage + 7;
}
}
@ -329,25 +329,30 @@ class pdf_soleil extends ModelePDFFicheinter
$this->error=$langs->trans("ErrorUnknown");
return 0; // Erreur par defaut
}
/**
* Affiche la grille des lignes d'intervention
* Show table for lines
*
* @param object $pdf Object PDF
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
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 );
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetXY($this->marge_gauche, $tab_top + 8 );
$pdf->SetXY($this->marge_gauche, $tab_top + 8);
$text=$object->description;
if ($object->duree > 0)
{
@ -356,66 +361,67 @@ class pdf_soleil extends ModelePDFFicheinter
}
$desc=dol_htmlentitiesbr($text,1);
//print $outputlangs->convToOutputCharset($desc); exit;
$pdf->writeHTMLCell(180, 3, 10, $tab_top + 8, $outputlangs->convToOutputCharset($desc), 0, 1);
$nexY = $pdf->GetY();
$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->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);
}
/**
* Show header of document
* Show top header of page.
*
* @param object $pdf Object PDF
* @param object $object Object fichinter
* @param int $showaddress 0=no, 1=yes
* @param object $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
$outputlangs->load("main");
$outputlangs->load("dict");
$outputlangs->load("companies");
$outputlangs->load("interventions");
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
//Affiche le filigrane brouillon - Print Draft Watermark
if($object->statut==0 && (! empty($conf->global->FICHINTER_DRAFT_WATERMARK)) )
{
pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->FICHINTER_DRAFT_WATERMARK);
}
//Prepare la suite
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('','B', $default_font_size + 3);
$posx=$this->page_largeur-$this->marge_droite-100;
$posy=$this->marge_haute;
$pdf->SetXY($this->marge_gauche,$posy);
// Logo
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo)
@ -437,28 +443,28 @@ class pdf_soleil extends ModelePDFFicheinter
$text=$this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
$pdf->SetFont('','B',$default_font_size + 3);
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$title=$outputlangs->transnoentities("InterventionCard");
$pdf->MultiCell(100, 4, $title, '', 'R');
$pdf->SetFont('','B',$default_font_size + 2);
$posy+=5;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
$posy+=1;
$pdf->SetFont('','', $default_font_size);
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->datec,"day",false,$outputlangs,true), '', 'R');
if ($object->client->code_client)
{
$posy+=4;
@ -466,7 +472,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
}
if ($showaddress)
{
// Sender properties
@ -478,15 +484,15 @@ class pdf_soleil extends ModelePDFFicheinter
$object->fetch_user($arrayidcontact[0]);
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
// 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;
// Show sender frame
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size - 2);
@ -494,19 +500,19 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetXY($posx,$posy);
$pdf->SetFillColor(230,230,230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
// Show sender name
$pdf->SetXY($posx+2,$posy+3);
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('','B',$default_font_size);
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
// Show sender information
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY($posx+2,$posy+8);
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
// If CUSTOMER contact defined, we use it
$usecontact=false;
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
@ -515,7 +521,7 @@ class pdf_soleil extends ModelePDFFicheinter
$usecontact=true;
$result=$object->fetch_contact($arrayidcontact[0]);
}
// Recipient name
if (! empty($usecontact))
{
@ -528,26 +534,26 @@ class pdf_soleil extends ModelePDFFicheinter
{
$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,$posy-5);
$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(100,4, $carac_client_name, 0, 'L');
// Show recipient information
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY($posx+2,$posy+8);
@ -556,12 +562,12 @@ class pdf_soleil extends ModelePDFFicheinter
}
/**
* Show footer of page
*
* @param object $pdf Object PDF
* @param object $object Object fichinter
* @param object $outputlangs Object lang for output
* \remarks Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -294,8 +294,14 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
}
/**
* \brief Affiche la grille des lignes
* \param pdf objet PDF
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -313,14 +319,15 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object delivery
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -444,11 +451,12 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
}
/**
* \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 PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -345,7 +345,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// TODO doit etre modifie
//$waitingDelivery = $object->getRemainingDelivered();
$waitingDelivery='';
if (is_array($waitingDelivery) & !empty($waitingDelivery))
{
$pdf->AddPage('P', 'A4');
@ -385,7 +385,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf-> SetY(40);
$num = count($header);
for($i = 0; $i < $num; $i++)
{
@ -422,9 +422,15 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
/*
* \brief Affiche la grille des lignes
* \param pdf objet PDF
/**
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -468,14 +474,15 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object order
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -649,12 +656,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
/**
* Show footer of page
* Need this->emetteur object
*
* @param pdf PDF factory
* @param object Object invoice
* @param outputlangs Object lang for output
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -289,9 +289,15 @@ class pdf_baleine extends ModelePDFProjects
}
/*
* \brief Affiche la grille des lignes
* \param pdf objet PDF
/**
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -315,14 +321,15 @@ class pdf_baleine extends ModelePDFProjects
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object project
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
@ -399,12 +406,12 @@ class pdf_baleine extends ModelePDFProjects
}
/**
* Show footer of page
* Need this->emetteur object
*
* @param pdf PDF factory
* @param object Object invoice
* @param outputlangs Object lang for output
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -427,13 +427,13 @@ class pdf_azur extends ModelePDFPropales
/**
* Affiche infos divers
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param pdf Objet PDF
* @param object Objet facture
* @param posy Position depart
* @param outputlangs Objet langs
* @return y Position pour suite
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -581,12 +581,12 @@ class pdf_azur extends ModelePDFPropales
/**
* Show total to pay
*
* @param pdf Objet PDF
* @param object Objet propale
* @param deja_regle Montant deja regle
* @param posy Position depart
* @param outputlangs Objet langs
* @return y Position pour suite
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -792,9 +792,14 @@ class pdf_azur extends ModelePDFPropales
}
/**
* Affiche la grille des lignes de propales
* Show table for lines
*
* @param pdf objet PDF
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -852,14 +857,15 @@ class pdf_azur extends ModelePDFPropales
}
/**
* Show header of document
* Show top header of page.
*
* @param pdf Object PDF
* @param object Object commercial proposal
* @param showaddress 0=no, 1=yes
* @param outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -1041,11 +1047,12 @@ class pdf_azur extends ModelePDFPropales
}
/**
* \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 PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -427,13 +427,13 @@ class pdf_jaune extends ModelePDFPropales
/**
* Affiche infos divers
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param pdf Objet PDF
* @param object Objet facture
* @param posy Position depart
* @param outputlangs Objet langs
* @return y Position pour suite
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -581,12 +581,12 @@ class pdf_jaune extends ModelePDFPropales
/**
* Show total to pay
*
* @param pdf Objet PDF
* @param object Objet propale
* @param deja_regle Montant deja regle
* @param posy Position depart
* @param outputlangs Objet langs
* @return y Position pour suite
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -792,9 +792,14 @@ class pdf_jaune extends ModelePDFPropales
}
/**
* Affiche la grille des lignes de propales
* Show table for lines
*
* @param pdf objet PDF
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -852,14 +857,15 @@ class pdf_jaune extends ModelePDFPropales
}
/**
* Show header of document
* Show top header of page.
*
* @param pdf Object PDF
* @param object Object commercial proposal
* @param showaddress 0=no, 1=yes
* @param outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -1041,11 +1047,12 @@ class pdf_jaune extends ModelePDFPropales
}
/**
* \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 PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf,$object,$outputlangs)
{

View File

@ -205,14 +205,15 @@ class pdf_paiement
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $page, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $page, $showaddress, $outputlangs)
{
global $langs;

View File

@ -357,7 +357,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$amount_credit_notes_included=0;
$amount_deposits_included=0;
if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included)
{
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs);
@ -391,11 +391,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
/**
* \brief Show total to pay
* \param pdf Object PDF
* \param object Object invoice
* \param deja_regle Amount payed
* \return y Next position
* Show total to pay
*
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -579,8 +582,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
/**
* Show the lines of invoice
* @param pdf object PDF
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -718,14 +727,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object order
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
@ -871,11 +881,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
/**
* \brief Show footer of page
* \param pdf PDF factory
* \param object Object invoice
* \param outputlang Object lang for output
* \remarks Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf, $object, $outputlangs)
{

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
@ -427,13 +427,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
/**
* Show other information
* Show miscellaneous information (payment mode, payment term, ...)
*
* @param PDF &$pdf Object PDF
* @param Facture $object Object invoice
* @param int $posy Position start
* @param Translate $outputlangs Object langs
* @return int Position pour suite
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $posy Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
@ -571,7 +571,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -761,9 +761,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
/**
* Show the lines of order
* @param PDF $pdf object PDF
* Show table for lines
*
* @param PDF &$pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
@ -822,14 +827,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
/**
* Show header of page
* Show top header of page.
*
* @param $pdf Object PDF
* @param $object Object order
* @param $showaddress 0=no, 1=yes
* @param $outputlangs Object lang for output
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
@ -984,12 +990,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
/**
* Show footer of page
* Show footer of page. Need this->emetteur object
*
* \param pdf PDF factory
* \param object Object invoice
* \param outputlang Object lang for output
* \remarks Need this->emetteur object
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagefoot(&$pdf, $object, $outputlangs)
{