Maxi debug for UTF8 support
This commit is contained in:
parent
bacdb1daeb
commit
447d3c1eae
@ -28,6 +28,7 @@
|
||||
require_once("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/action/rapport.pdf.php");
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortfield=$_GET["sortfield"];
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
require("../../../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/rapport/rapport.pdf.php");
|
||||
|
||||
|
||||
function llxHeader($head = "", $urlp = "")
|
||||
|
||||
@ -1896,7 +1896,7 @@ class Form
|
||||
}
|
||||
// Si traduction existe, on l'utilise, sinon on prend le libellé par défaut
|
||||
print $obj->code . ' - ';
|
||||
print ($langs->trans("JuridicalStatus".$obj->code)!="JuridicalStatus".$obj->code?$langs->trans("JuridicalStatus".$obj->code):($obj->nom!='-'?$langs->convToOuptutCharset($obj->nom):''));
|
||||
print ($langs->trans("JuridicalStatus".$obj->code)!="JuridicalStatus".$obj->code?$langs->trans("JuridicalStatus".$obj->code):($obj->nom!='-'?$langs->convToOutputCharset($obj->nom):''));
|
||||
print '</option>';
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/comm/action/rapport/rapport.pdf.php
|
||||
\file htdocs/includes/modules/action/rapport.pdf.php
|
||||
\ingroup commercial
|
||||
\brief Fichier de generation de PDF pour les rapports d'actions
|
||||
\version $Id$
|
||||
@ -34,7 +34,6 @@ require_once(DOL_DOCUMENT_ROOT ."/includes/fpdf/fpdf_html.php");
|
||||
\class CommActionRapport
|
||||
\brief Classe permettant la generation des rapports d'actions
|
||||
*/
|
||||
|
||||
class CommActionRapport
|
||||
{
|
||||
var $db;
|
||||
@ -203,16 +202,16 @@ class CommActionRapport
|
||||
$y0 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY(26, $y);
|
||||
$pdf->MultiCell(32, $height, dolibarr_trunc($outputlangs->convToOuptutCharset($obj->societe),32), 0, 'L', 0);
|
||||
$pdf->MultiCell(32, $height, dolibarr_trunc($outputlangs->convToOutputCharset($obj->societe),32), 0, 'L', 0);
|
||||
$y1 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY(60,$y);
|
||||
$pdf->MultiCell(32, $height, dolibarr_trunc($outputlangs->convToOuptutCharset($obj->libelle),32), 0, 'L', 0);
|
||||
$pdf->MultiCell(32, $height, dolibarr_trunc($outputlangs->convToOutputCharset($obj->libelle),32), 0, 'L', 0);
|
||||
$y2 = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY(106,$y);
|
||||
//$pdf->Cell(94, 4, eregi_replace('<br>',"\n",dolibarr_trunc($obj->note,150)), 0, 'L', 0);
|
||||
$pdf->MultiCell(94, $height, $outputlangs->convToOuptutCharset($text), 0, 'L', 0);
|
||||
$pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset($text), 0, 'L', 0);
|
||||
//$pdf->writeHTMLCell(dol_htmlentitiesbr($obj->note,1));
|
||||
$y3 = $pdf->GetY();
|
||||
|
||||
@ -68,7 +68,89 @@ class BordereauChequeBlochet extends FPDF
|
||||
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* \brief Fonction generant le rapport sur le disque
|
||||
* \param _dir Directory
|
||||
* \param number Number
|
||||
* \param outputlangs Lang output object
|
||||
*/
|
||||
function write_file($_dir, $number, $outputlangs)
|
||||
{
|
||||
global $user,$conf,$langs,$mysoc;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||
$outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
$dir = $_dir . "/".get_exdir($number);
|
||||
|
||||
if (! is_dir($dir))
|
||||
{
|
||||
$result=create_exdir($dir);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
$month = sprintf("%02d",$month);
|
||||
$year = sprintf("%04d",$year);
|
||||
$_file = $dir . "bordereau-00".$number.".pdf"; //Todo: r<>paration provisoire, ajout de 2 zero
|
||||
|
||||
// Protection et encryption du pdf
|
||||
if ($conf->global->PDF_SECURITY_ENCRYPTION)
|
||||
{
|
||||
require_once(FPDFI_PATH.'fpdi_protection.php');
|
||||
$pdf = new FPDI_Protection('P','mm','A4');
|
||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||
$pdfownerpass = NULL; // Mot de passe du propri<72>taire, cr<63><72> al<61>atoirement si pas d<>fini
|
||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(FPDFI_PATH.'fpdi.php');
|
||||
$pdf=new FPDI('P','mm',$this->format);
|
||||
}
|
||||
|
||||
$pdf->Open();
|
||||
|
||||
|
||||
$pages = intval($lignes / $this->line_per_page);
|
||||
|
||||
if (($lignes % $this->line_per_page)>0)
|
||||
{
|
||||
$pages++;
|
||||
}
|
||||
|
||||
if ($pages == 0)
|
||||
{
|
||||
// force to build at least one page if report has no lines
|
||||
$pages = 1;
|
||||
}
|
||||
|
||||
$pdf->AddPage();
|
||||
|
||||
$this->Header($pdf, 1, $pages, $outputlangs);
|
||||
|
||||
$this->Body($pdf, 1, $outputlangs);
|
||||
|
||||
$pdf->Output($_file);
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoi le dernier message d'erreur de création de propale
|
||||
*/
|
||||
function pdferror()
|
||||
@ -199,86 +281,6 @@ class BordereauChequeBlochet extends FPDF
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fonction generant le rapport sur le disque
|
||||
* \param _dir Directory
|
||||
* \param number Number
|
||||
* \param outputlangs Lang output object
|
||||
*/
|
||||
function write_file($_dir, $number, $outputlangs)
|
||||
{
|
||||
global $user,$conf,$langs,$mysoc;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||
$outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
$dir = $_dir . "/".get_exdir($number);
|
||||
|
||||
if (! is_dir($dir))
|
||||
{
|
||||
$result=create_exdir($dir);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
$month = sprintf("%02d",$month);
|
||||
$year = sprintf("%04d",$year);
|
||||
$_file = $dir . "bordereau-00".$number.".pdf"; //Todo: r<>paration provisoire, ajout de 2 zero
|
||||
|
||||
// Protection et encryption du pdf
|
||||
if ($conf->global->PDF_SECURITY_ENCRYPTION)
|
||||
{
|
||||
require_once(FPDFI_PATH.'fpdi_protection.php');
|
||||
$pdf = new FPDI_Protection('P','mm','A4');
|
||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||
$pdfownerpass = NULL; // Mot de passe du propri<72>taire, cr<63><72> al<61>atoirement si pas d<>fini
|
||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(FPDFI_PATH.'fpdi.php');
|
||||
$pdf=new FPDI('P','mm',$this->format);
|
||||
}
|
||||
|
||||
$pdf->Open();
|
||||
|
||||
|
||||
$pages = intval($lignes / $this->line_per_page);
|
||||
|
||||
if (($lignes % $this->line_per_page)>0)
|
||||
{
|
||||
$pages++;
|
||||
}
|
||||
|
||||
if ($pages == 0)
|
||||
{
|
||||
// force to build at least one page if report has no lines
|
||||
$pages = 1;
|
||||
}
|
||||
|
||||
$pdf->AddPage();
|
||||
|
||||
$this->Header($pdf, 1, $pages, $outputlangs);
|
||||
|
||||
$this->Body($pdf, 1, $outputlangs);
|
||||
|
||||
$pdf->Output($_file);
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -80,9 +80,10 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
|
||||
/**
|
||||
\brief Fonction generant la commande sur le disque
|
||||
\param com id de la propale a generer
|
||||
\return int 1=ok, 0=ko
|
||||
* \brief Fonction generant la commande sur le disque
|
||||
* \param com id de la propale a generer
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($com,$outputlangs)
|
||||
{
|
||||
@ -162,7 +163,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
$this->_pagehead($pdf, $com, 1, $outputlangs);
|
||||
$this->_pagehead($pdf, $com, $outputlangs);
|
||||
|
||||
|
||||
$tab_top = 100;
|
||||
@ -185,43 +186,43 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
$curY = $nexY;
|
||||
|
||||
$pdf->SetXY (30, $curY );
|
||||
$pdf->SetXY(30, $curY);
|
||||
|
||||
$pdf->MultiCell(100, 5, $com->lignes[$i]->desc, 0, 'J', 0);
|
||||
$pdf->MultiCell(100, 5, $outputlangs->convToOutputCharset($com->lignes[$i]->desc), 0, 'J', 0);
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY (10, $curY );
|
||||
$pdf->SetXY (10, $curY);
|
||||
|
||||
$pdf->MultiCell(20, 5, $com->lignes[$i]->ref, 0, 'C');
|
||||
$pdf->MultiCell(20, 5, $outputlangs->convToOutputCharset($com->lignes[$i]->ref), 0, 'C');
|
||||
|
||||
$pdf->SetXY (133, $curY );
|
||||
$pdf->MultiCell(10, 5, $com->lignes[$i]->tva_tx, 0, 'C');
|
||||
$pdf->SetXY (133, $curY);
|
||||
$pdf->MultiCell(10, 5, $outputlangs->convToOutputCharset($com->lignes[$i]->tva_tx), 0, 'C');
|
||||
|
||||
$pdf->SetXY (145, $curY );
|
||||
$pdf->MultiCell(10, 5, $com->lignes[$i]->qty, 0, 'C');
|
||||
$pdf->SetXY (145, $curY);
|
||||
$pdf->MultiCell(10, 5, $outputlangs->convToOutputCharset($com->lignes[$i]->qty), 0, 'C');
|
||||
|
||||
$pdf->SetXY (156, $curY );
|
||||
$pdf->SetXY (156, $curY);
|
||||
$pdf->MultiCell(18, 5, price($com->lignes[$i]->price), 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (174, $curY );
|
||||
$pdf->SetXY (174, $curY);
|
||||
$total = price($com->lignes[$i]->total_ht);
|
||||
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
|
||||
|
||||
$pdf->line(10, $curY, 200, $curY );
|
||||
$pdf->line(10, $curY, 200, $curY);
|
||||
|
||||
if ($nexY > 240 && $i < $nblignes - 1)
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs);
|
||||
$pdf->AddPage();
|
||||
$nexY = $iniY;
|
||||
$this->_pagehead($pdf, $com, 0, $outputlangs);
|
||||
$this->_pagehead($pdf, $com,$outputlangs);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('Arial','', 10);
|
||||
}
|
||||
}
|
||||
|
||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs);
|
||||
/*
|
||||
*
|
||||
*/
|
||||
@ -279,17 +280,17 @@ class pdf_edison extends ModelePDFCommandes
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$outputlangs->transnoentities("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
|
||||
$this->error=$langs->transnoentities("ErrorConstantNotDefined","COMMANDE_OUTPUTDIR");
|
||||
$langs->setPhpLang(); // On restaure langue session
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->error=$outputlangs->transnoentities("ErrorUnknown");
|
||||
$this->error=$langs->transnoentities("ErrorUnknown");
|
||||
$langs->setPhpLang(); // On restaure langue session
|
||||
return 0; // Erreur par defaut
|
||||
}
|
||||
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
|
||||
{
|
||||
global $langs,$conf;
|
||||
$langs->load("main");
|
||||
@ -297,19 +298,19 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('Arial','',11);
|
||||
|
||||
$pdf->Text(30,$tab_top + 5,$langs->transnoentities("Designation"));
|
||||
$pdf->Text(30,$tab_top + 5,$outputlangs->transnoentities("Designation"));
|
||||
|
||||
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height);
|
||||
$pdf->Text(134,$tab_top + 5,$langs->transnoentities("VAT"));
|
||||
$pdf->Text(134,$tab_top + 5,$outputlangs->transnoentities("VAT"));
|
||||
|
||||
$pdf->line(144, $tab_top, 144, $tab_top + $tab_height);
|
||||
$pdf->Text(147,$tab_top + 5,$langs->transnoentities("Qty"));
|
||||
$pdf->Text(147,$tab_top + 5,$outputlangs->transnoentities("Qty"));
|
||||
|
||||
$pdf->line(156, $tab_top, 156, $tab_top + $tab_height);
|
||||
$pdf->Text(160,$tab_top + 5,$langs->transnoentities("PriceU"));
|
||||
$pdf->Text(160,$tab_top + 5,$outputlangs->transnoentities("PriceU"));
|
||||
|
||||
$pdf->line(174, $tab_top, 174, $tab_top + $tab_height);
|
||||
$pdf->Text(187,$tab_top + 5,$langs->transnoentities("Total"));
|
||||
$pdf->Text(187,$tab_top + 5,$outputlangs->transnoentities("Total"));
|
||||
|
||||
// $pdf->Rect(10, $tab_top, 190, $nexY - $tab_top);
|
||||
$pdf->Rect(10, $tab_top, 190, $tab_height);
|
||||
@ -319,10 +320,9 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$titre = $langs->transnoentities("AmountInCurrency",$langs->transnoentities("Currency".$conf->monnaie));
|
||||
$pdf->Text(200 - $pdf->GetStringWidth($titre), 98, $titre);
|
||||
|
||||
}
|
||||
|
||||
function _pagehead(&$pdf, $com)
|
||||
function _pagehead(&$pdf, $com, $outputlangs)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
$langs->load("orders");
|
||||
@ -364,7 +364,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
if (defined("FAC_PDF_TEL"))
|
||||
{
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->MultiCell(76, 5, "T<EFBFBD>l : ".FAC_PDF_TEL);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->trans("Tel")." : ".FAC_PDF_TEL);
|
||||
}
|
||||
if (defined("MAIN_INFO_SIREN"))
|
||||
{
|
||||
@ -388,17 +388,17 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$client->fetch($com->socid);
|
||||
$com->client = $client;
|
||||
$pdf->SetXY(102,42);
|
||||
$pdf->MultiCell(96,5, $com->client->nom);
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($com->client->nom));
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->SetXY(102,$pdf->GetY());
|
||||
$pdf->MultiCell(96,5, $com->client->adresse . "\n" . $com->client->cp . " " . $com->client->ville);
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($com->client->adresse) . "\n" . $outputlangs->convToOutputCharset($com->client->cp) . " " . $outputlangs->convToOutputCharset($com->client->ville));
|
||||
$pdf->rect(100, 40, 100, 40);
|
||||
|
||||
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->Text(11, 88, "Date : " . dolibarr_print_date($com->date,'day',false,$outputlangs));
|
||||
$pdf->Text(11, 94, $langs->transnoentities("Order")." ".$com->ref);
|
||||
$pdf->Text(11, 88, $outputlangs->transnoentities("Date")." : " . dolibarr_print_date($com->date,'day',false,$outputlangs));
|
||||
$pdf->Text(11, 94, $outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($com->ref));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -103,7 +103,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
* \param outputlangs Lang object for output language
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($com,$outputlangs='')
|
||||
function write_file($com,$outputlangs)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
@ -321,9 +321,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// cherche nombre de lignes a venir pour savoir si place suffisante
|
||||
if ($i < ($nblignes - 1)) // If it's not last line
|
||||
{
|
||||
//on r<EFBFBD>cup<EFBFBD>re la description du produit suivant
|
||||
$follow_descproduitservice = $com->lignes[$i+1]->desc;
|
||||
//on compte le nombre de ligne afin de v<EFBFBD>rifier la place disponible (largeur de ligne 52 caracteres)
|
||||
//on recupere la description du produit suivant
|
||||
$follow_descproduitservice = $outputlangs->convToOutputCharset($com->lignes[$i+1]->desc);
|
||||
//on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres)
|
||||
$nblineFollowDesc = (num_lines($follow_descproduitservice,52)*4);
|
||||
}
|
||||
else // If it's last line
|
||||
@ -820,7 +820,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy+=6;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOuptutCharset($object->ref), '', 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||
|
||||
$posy+=1;
|
||||
$pdf->SetFont('Arial','',10);
|
||||
@ -852,14 +852,14 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
if (defined("FAC_PDF_SOCIETE_NOM") && FAC_PDF_SOCIETE_NOM) $pdf->MultiCell(80, 4, FAC_PDF_SOCIETE_NOM, 0, 'L');
|
||||
else $pdf->MultiCell(80, 4, $outputlangs->convToOuptutCharset($this->emetteur->nom), 0, 'L');
|
||||
else $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
||||
|
||||
// Caract<63>ristiques emetteur
|
||||
$carac_emetteur = '';
|
||||
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
|
||||
else {
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOuptutCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOuptutCharset($this->emetteur->cp).' '.$outputlangs->convToOuptutCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
}
|
||||
$carac_emetteur .= "\n";
|
||||
|
||||
@ -911,18 +911,18 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Nom societe
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOuptutCharset($object->client->nom), 0, 'L');
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||
|
||||
// Nom client
|
||||
$carac_client = "\n".$outputlangs->convToOuptutCharset($object->contact->getFullName($outputlangs,1,1));
|
||||
$carac_client = "\n".$outputlangs->convToOutputCharset($object->contact->getFullName($outputlangs,1,1));
|
||||
|
||||
// Caract<63>ristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOuptutCharset($object->contact->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOuptutCharset($object->contact->cp) . " " . $outputlangs->convToOuptutCharset($object->contact->ville)."\n";
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->cp) . " " . $outputlangs->convToOutputCharset($object->contact->ville)."\n";
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->contact->pays_code)
|
||||
{
|
||||
$carac_client.=$outputlangs->convToOuptutCharset($carac_client.=$object->contact->pays)."\n";
|
||||
$carac_client.=$outputlangs->convToOutputCharset($carac_client.=$object->contact->pays)."\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -930,7 +930,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Nom client
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOuptutCharset($object->client->nom), 0, 'L');
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||
|
||||
// Nom du contact suivi commande si c'est une soci<63>t<EFBFBD>
|
||||
$arrayidcontact = $object->getIdContact('external','CUSTOMER');
|
||||
@ -940,18 +940,18 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// On v<>rifie si c'est une soci<63>t<EFBFBD> ou un particulier
|
||||
if( !preg_match('#'.$object->contact->getFullName($outputlangs,1).'#isU',$object->client->nom) )
|
||||
{
|
||||
$carac_client .= "\n".$outputlangs->convToOuptutCharset($object->contact->getFullName($outputlangs,1,1));
|
||||
$carac_client .= "\n".$outputlangs->convToOutputCharset($object->contact->getFullName($outputlangs,1,1));
|
||||
}
|
||||
}
|
||||
|
||||
// Caract<63>ristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOuptutCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOuptutCharset($object->client->cp) . " " . $outputlangs->convToOuptutCharset($object->client->ville)."\n";
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
||||
{
|
||||
$carac_client.=$outputlangs->convToOuptutCharset($object->client->pays)."\n";
|
||||
$carac_client.=$outputlangs->convToOutputCharset($object->client->pays)."\n";
|
||||
}
|
||||
}
|
||||
// Num<75>ro TVA intracom
|
||||
|
||||
@ -37,7 +37,6 @@ class html_cerfafr extends ModeleDon
|
||||
\brief Constructeur
|
||||
\param db Handler acc<EFBFBD>s base de donn<EFBFBD>e
|
||||
*/
|
||||
|
||||
function html_cerfafr($db)
|
||||
{
|
||||
global $conf,$langs;
|
||||
@ -61,6 +60,15 @@ class html_cerfafr extends ModeleDon
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return if a module can be used or not
|
||||
* \return boolean true if module can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant le recu sur le disque
|
||||
\param id Id du recu <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||
|
||||
@ -71,10 +71,11 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
/**
|
||||
* \brief Fonction generant le document sur le disque
|
||||
* \param obj Objet expedition a generer (ou id si ancienne methode)
|
||||
* \return int 1=ok, 0=ko
|
||||
* \param obj Objet expedition a generer (ou id si ancienne methode)
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file(&$obj, $outputlangs='')
|
||||
function write_file(&$obj, $outputlangs)
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
|
||||
@ -345,7 +346,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->SetXY($Xoff,$Yoff);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(0, 8, $outputlangs->transnoentities("RefSending").': '.$exp->ref, '' , 'L');
|
||||
$pdf->MultiCell(0, 8, $outputlangs->transnoentities("RefSending").': '.$outputlangs->convToOutputCharset($exp->ref), '' , 'L');
|
||||
//$this->Code39($Xoff+43, $Yoff+1, $this->expe->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||
//Num Commande
|
||||
$Yoff = $Yoff+4;
|
||||
@ -353,7 +354,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->SetXY($Xoff,$Yoff);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(0, 8, $outputlangs->transnoentities("RefOrder").': '.$exp->commande->ref, '' , 'L');
|
||||
$pdf->MultiCell(0, 8, $outputlangs->transnoentities("RefOrder").': '.$outputlangs->convToOutputCharset($exp->commande->ref), '' , 'L');
|
||||
|
||||
$Xoff = 115;
|
||||
//$this->Code39($Xoff+43, $Yoff+1, $exp->commande->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||
@ -427,7 +428,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->SetXY($blSocX2,$blSocY+20);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Deliverer").$livreur->fullname, '' , 'L');
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Deliverer")." ".$outputlangs->convToOutputCharset($livreur->fullname), '' , 'L');
|
||||
|
||||
/**********************************/
|
||||
//Emplacement Informations Expediteur (Client)
|
||||
@ -446,24 +447,24 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
//Nom Client
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->SetFont('Arial','B',7);
|
||||
$pdf->MultiCell($blW,3, $this->expediteur->nom, 0, 'C');
|
||||
$pdf->MultiCell($blW,3, $outputlangs->convToOutputCharset($this->expediteur->nom), 0, 'C');
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$blSocY+=3;
|
||||
//Adresse Client
|
||||
//Gestion des Retours chariots
|
||||
$Out=split("\n",$this->expediteur->adresse);
|
||||
$Out=split("\n",$outputlangs->convToOutputCharset($this->expediteur->adresse));
|
||||
for ($i=0;$i<count($Out);$i++) {
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
||||
$blSocY+=3;
|
||||
}
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5, $this->expediteur->cp . " " . $this->expediteur->ville, 0, 'L');
|
||||
$pdf->MultiCell($blW,5, $outputlangs->convToOutputCharset($this->expediteur->cp) . " " . $outputlangs->convToOutputCharset($this->expediteur->ville), 0, 'L');
|
||||
$blSocY+=4;
|
||||
//Tel Client
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$pdf->MultiCell($blW,3, $outputlangs->transnoentities("Tel")." : ".$this->expediteur->tel, 0, 'L');
|
||||
$pdf->MultiCell($blW,3, $outputlangs->transnoentities("Tel")." : ".$outputlangs->convToOutputCharset($this->expediteur->tel), 0, 'L');
|
||||
|
||||
/**********************************/
|
||||
//Emplacement Informations Destinataire (Contact livraison)
|
||||
@ -480,19 +481,19 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
//Nom Client
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
$pdf->SetFont('Arial','B',7);
|
||||
$pdf->MultiCell($blW,3, $this->destinataire->fullname, 0, 'C');
|
||||
$pdf->MultiCell($blW,3, $outputlangs->convToOutputCharset($this->destinataire->fullname), 0, 'C');
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$blSocY+=3;
|
||||
//Adresse Client
|
||||
//Gestion des Retours chariots
|
||||
$Out=split("\n",$this->destinataire->address);
|
||||
$Out=split("\n",$outputlangs->convToOutputCharset($this->destinataire->address));
|
||||
for ($i=0;$i<count($Out);$i++) {
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
||||
$blSocY+=3;
|
||||
}
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5, $this->destinataire->cp . " " . $this->destinataire->ville, 0, 'L');
|
||||
$pdf->MultiCell($blW,5, $outputlangs->convToOutputCharset($this->destinataire->cp) . " " . $outputlangs->convToOutputCharset($this->destinataire->ville), 0, 'L');
|
||||
$blSocY+=4;
|
||||
//Tel Client
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
|
||||
@ -113,10 +113,11 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
|
||||
/**
|
||||
* \brief Fonction g<EFBFBD>n<EFBFBD>rant le document sur le disque
|
||||
* \param obj Objet expedition <EFBFBD> g<EFBFBD>n<EFBFBD>rer (ou id si ancienne methode)
|
||||
* \return int 1=ok, 0=ko
|
||||
* \param obj Objet expedition <EFBFBD> g<EFBFBD>n<EFBFBD>rer (ou id si ancienne methode)
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file(&$obj, $outputlangs='')
|
||||
function write_file(&$obj, $outputlangs)
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
|
||||
@ -215,7 +216,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
|
||||
// Description de la ligne produit
|
||||
$libelleproduitservice=dol_htmlentitiesbr($this->expe->lignes[$i]->description,1);
|
||||
if ($this->expe->lignes[$i]->description&&$this->expe->lignes[$i]->description!=$com->lignes[$i]->libelle)
|
||||
if ($this->expe->lignes[$i]->description && $this->expe->lignes[$i]->description!=$com->lignes[$i]->libelle)
|
||||
{
|
||||
if ($libelleproduitservice) $libelleproduitservice.="<br>";
|
||||
$libelleproduitservice.=dol_htmlentitiesbr($this->expe->lignes[$i]->description,1);
|
||||
@ -235,14 +236,14 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
else
|
||||
$prefix_prodserv = $outputlangs->transnoentities("Product")." ";
|
||||
|
||||
$libelleproduitservice=$prefix_prodserv.$prodser->ref." - ".$libelleproduitservice;
|
||||
$libelleproduitservice=$prefix_prodserv.$outputlangs->convToOutputCharset($prodser->ref)." - ".$outputlangs->convToOutputCharset($libelleproduitservice);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
$pdf->writeHTMLCell(150, 3, $this->posxdesc, $curY, $libelleproduitservice, 0, 1);
|
||||
$pdf->writeHTMLCell(150, 3, $this->posxdesc, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1);
|
||||
|
||||
$pdf->SetXY (160, $curY);
|
||||
$pdf->MultiCell(30, 3, $this->expe->lignes[$i]->qty_asked);
|
||||
@ -261,18 +262,18 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$outputlangs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||
$langs->setPhpLang(); // On restaure langue session
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$outputlangs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
|
||||
$this->error=$langs->transnoentities("ErrorConstantNotDefined","EXP_OUTPUTDIR");
|
||||
$langs->setPhpLang(); // On restaure langue session
|
||||
return 0;
|
||||
}
|
||||
$this->error=$outputlangs->transnoentities("ErrorUnknown");
|
||||
$this->error=$langs->transnoentities("ErrorUnknown");
|
||||
$langs->setPhpLang(); // On restaure langue session
|
||||
return 0; // Erreur par defaut
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ class ExportExcel extends ModeleExports
|
||||
}
|
||||
else
|
||||
{
|
||||
$newvalue=$outputlangs->convToOuptutCharset($newvalue);
|
||||
$newvalue=$outputlangs->convToOutputCharset($newvalue);
|
||||
}
|
||||
|
||||
if (eregi('^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$',$newvalue))
|
||||
|
||||
@ -299,7 +299,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour gerer multi-page
|
||||
|
||||
// Description
|
||||
$pdf->writeHTMLCell($this->posxtva-$this->posxdesc-1, 3, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
$pdf->writeHTMLCell($this->posxtva-$this->posxdesc-1, 3, $this->posxdesc-1, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1);
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // On repositionne la police par defaut
|
||||
$nexY = $pdf->GetY();
|
||||
@ -503,7 +503,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$outputlangs->trans("ErrorSQL")." sql=".$sql;
|
||||
$this->error=$this->db->lasterror();
|
||||
dolibarr_syslog($this->db,$this->error);
|
||||
return -1;
|
||||
}
|
||||
@ -563,7 +563,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$outputlangs->trans("ErrorSQL")." sql=".$sql;
|
||||
$this->error=$this->db->lasterror();
|
||||
dolibarr_syslog($this->db,$this->error);
|
||||
return -1;
|
||||
}
|
||||
@ -729,20 +729,20 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
||||
$pdf->MultiCell(18, 3, $account->code_banque, 0, 'C', 0);
|
||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
||||
$pdf->MultiCell(18, 3, $account->code_guichet, 0, 'C', 0);
|
||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
||||
$pdf->MultiCell(24, 3, $account->number, 0, 'C', 0);
|
||||
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
||||
$pdf->MultiCell(13, 3, $account->cle_rib, 0, 'C', 0);
|
||||
$pdf->MultiCell(13, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
||||
|
||||
$pdf->SetXY ($this->marges['g'], $cury+12);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+22);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+25);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||
|
||||
$posy=$pdf->GetY()+2;
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy+=6;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||
|
||||
$posy+=1;
|
||||
$pdf->SetFont('Arial','',10);
|
||||
@ -1022,7 +1022,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy+=5;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$objectreplacing->ref, '', 'R');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R');
|
||||
}
|
||||
if ($object->type == 1)
|
||||
{
|
||||
@ -1032,7 +1032,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy+=5;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$objectreplaced->ref, '', 'R');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
|
||||
}
|
||||
if ($object->type == 2)
|
||||
{
|
||||
@ -1042,13 +1042,13 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy+=5;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CorrectionInvoice").' : '.$objectreplaced->ref, '', 'R');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CorrectionInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
|
||||
}
|
||||
|
||||
$posy+=5;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateInvoice")." : " . dolibarr_print_date($object->date,"day"), '', 'R');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateInvoice")." : " . dolibarr_print_date($object->date,"day",false,$outpulangs), '', 'R');
|
||||
|
||||
if ($object->type != 2)
|
||||
{
|
||||
@ -1086,22 +1086,22 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$carac_emetteur = '';
|
||||
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE; // deprecated
|
||||
else {
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$this->emetteur->adresse;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$this->emetteur->cp.' '.$this->emetteur->ville;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
}
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
||||
elseif ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$this->emetteur->tel;
|
||||
elseif ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($this->emetteur->tel);
|
||||
// Fax
|
||||
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
||||
elseif ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$this->emetteur->fax;
|
||||
elseif ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($this->emetteur->fax);
|
||||
// EMail
|
||||
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
||||
elseif ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$this->emetteur->email;
|
||||
elseif ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($this->emetteur->email);
|
||||
// Web
|
||||
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
||||
elseif ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$this->emetteur->url;
|
||||
elseif ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($this->emetteur->url);
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||
@ -1143,14 +1143,14 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
$socname = $object->client->nom;
|
||||
}
|
||||
$pdf->MultiCell(96,4, $socname, 0, 'L');
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($socname), 0, 'L');
|
||||
|
||||
// Nom client
|
||||
$carac_client = "\n".$object->contact->getFullName($outputlangs,1,1);
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$object->contact->adresse;
|
||||
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->cp) . " " . $outputlangs->convToOutputCharset($object->contact->ville)."\n";
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->contact->pays_code)
|
||||
{
|
||||
@ -1162,7 +1162,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Nom client
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(96,4, $object->client->nom, 0, 'L');
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||
|
||||
// Nom du contact facturation si c'est une societe
|
||||
$arrayidcontact = $object->getIdContact('external','BILLING');
|
||||
@ -1177,8 +1177,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$object->client->adresse;
|
||||
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
||||
@ -1187,7 +1187,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
}
|
||||
// Numero TVA intracom
|
||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($object->client->tva_intra);
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$posy=$pdf->GetY()-9; //Auto Y coord readjust for multiline name
|
||||
$pdf->SetXY(102,$posy+6);
|
||||
|
||||
@ -89,7 +89,7 @@ class pdf_huitre extends ModelePDFFactures
|
||||
* \param outputlangs Lang object for output language
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($fac,$outputlangs='')
|
||||
function write_file($fac,$outputlangs)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
@ -184,7 +184,7 @@ class pdf_huitre extends ModelePDFFactures
|
||||
$curY = $nexY;
|
||||
|
||||
$pdf->SetXY (11, $curY );
|
||||
$pdf->MultiCell(118, 5, $fac->lignes[$i]->desc, 0, 'J');
|
||||
$pdf->MultiCell(118, 5, $outputlangs->convToOutputCharset($fac->lignes[$i]->desc), 0, 'J');
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@ -232,13 +232,13 @@ class pdf_huitre extends ModelePDFFactures
|
||||
$pdf->SetFont('Arial','U',8);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankDetails"), 0, 'L', 0);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankCode").' : ' . $account->code_banque, 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("DeskCode").' : ' . $account->code_guichet, 0, 'L', 0);
|
||||
$pdf->MultiCell(50, 4, $outputlangs->transnoentities("BankAccountNumber").' : ' . $account->number, 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankAccountNumberKey").' : ' . $account->cle_rib, 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankCode").' : ' . $outputlangs->convToOutputCharset($account->code_banque), 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("DeskCode").' : ' . $outputlangs->convToOutputCharset($account->code_guichet), 0, 'L', 0);
|
||||
$pdf->MultiCell(50, 4, $outputlangs->transnoentities("BankAccountNumber").' : ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankAccountNumberKey").' : ' . $outputlangs->convToOutputCharset($account->cle_rib), 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ class pdf_huitre extends ModelePDFFactures
|
||||
{
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$pdf->SetXY(10, 211);
|
||||
$note = $outputlangs->transnoentities("Note").' : '.$fac->note_public;
|
||||
$note = $outputlangs->transnoentities("Note").' : '.$outputlangs->convToOutputCharset($fac->note_public);
|
||||
$pdf->MultiCell(110, 3, $note, 0, 'J');
|
||||
}
|
||||
|
||||
@ -577,10 +577,10 @@ class pdf_huitre extends ModelePDFFactures
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$fac->fetch_client();
|
||||
$pdf->SetXY(102,42);
|
||||
$pdf->MultiCell(96,5, $fac->client->nom, 0, 'C');
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($fac->client->nom), 0, 'C');
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->SetXY(102,$pdf->GetY()+3);
|
||||
$pdf->MultiCell(96,5, $fac->client->adresse . "\n\n" . $fac->client->cp . " " . $fac->client->ville , 0, 'C');
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($fac->client->adresse) . "\n\n" . $outputlangs->convToOutputCharset($fac->client->cp) . " " . $outputlangs->convToOutputCharset($fac->client->ville), 0, 'C');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
* \param outputlangs Lang object for output language
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($fac,$outputlangs='')
|
||||
function write_file($fac,$outputlangs)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
@ -209,7 +209,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
// Affichage dur<75>e si il y en a une
|
||||
$codeproduitservice.=" (".$outputlangs->transnoentities("From")." ".dolibarr_print_date($fac->lignes[$i]->date_start,'',false,$outputlangs)." ".$langs->transnoentities("to")." ".dolibarr_print_date($fac->lignes[$i]->date_end,'',false,$outputlangs).")";
|
||||
}
|
||||
$pdf->MultiCell(108, 5, $fac->lignes[$i]->desc."$codeproduitservice", 0, 'J');
|
||||
$pdf->MultiCell(108, 5, $outputlangs->convToOutputCharset($fac->lignes[$i]->desc).$codeproduitservice, 0, 'J');
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@ -283,7 +283,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo').' '.$account->proprio.' '.$langs->transnoentities('SendTo').':',0,'L',0);
|
||||
$pdf->SetXY ($this->marges['g'], 230);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->MultiCell(80, 3, $account->adresse_proprio, 0, 'L', 0);
|
||||
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -326,11 +326,11 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->MultiCell(13, 3, $account->cle_rib, 0, 'C', 0);
|
||||
|
||||
$pdf->SetXY ($this->marges['g'], $cury+14);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+19);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+24);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
/**
|
||||
\brief Constructeur
|
||||
\param db Handler acc<EFBFBD>s base de donn<EFBFBD>e
|
||||
\param db Handler acces base de donnee
|
||||
*/
|
||||
function pdf_soleil($db=0)
|
||||
{
|
||||
@ -48,7 +48,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = 'soleil';
|
||||
$this->description = "Modele de fiche d'intervention standard";
|
||||
$this->description = $langs->trans("DocumentModelStandard");
|
||||
|
||||
// Dimension page pour format A4
|
||||
$this->type = 'pdf';
|
||||
@ -74,9 +74,10 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant la fiche d'intervention sur le disque
|
||||
\param fichinter Object fichinter
|
||||
\return int 1=ok, 0=ko
|
||||
* \brief Fonction g<EFBFBD>n<EFBFBD>rant la fiche d'intervention sur le disque
|
||||
* \param fichinter Object fichinter
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($fichinter,$outputlangs)
|
||||
{
|
||||
@ -199,28 +200,28 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
if (defined("FAC_PDF_SOCIETE_NOM") && FAC_PDF_SOCIETE_NOM) $pdf->MultiCell(80, 4, FAC_PDF_SOCIETE_NOM, 0, 'L');
|
||||
else $pdf->MultiCell(80, 4, $mysoc->nom, 0, 'L');
|
||||
else $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($mysoc->nom), 0, 'L');
|
||||
|
||||
// Caracteristiques emetteur
|
||||
$carac_emetteur = '';
|
||||
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
|
||||
else {
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$mysoc->adresse;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$mysoc->cp.' '.$mysoc->ville;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->cp).' '.$outputlangs->convToOutputCharset($mysoc->ville);
|
||||
}
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
||||
elseif ($mysoc->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$mysoc->tel;
|
||||
elseif ($mysoc->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($mysoc->tel);
|
||||
// Fax
|
||||
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
||||
elseif ($mysoc->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$mysoc->fax;
|
||||
elseif ($mysoc->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($mysoc->fax);
|
||||
// EMail
|
||||
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
||||
elseif ($mysoc->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$mysoc->email;
|
||||
elseif ($mysoc->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($mysoc->email);
|
||||
// Web
|
||||
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
||||
elseif ($mysoc->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$mysoc->url;
|
||||
elseif ($mysoc->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($mysoc->url);
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||
@ -234,16 +235,16 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$fichinter->fetch_client();
|
||||
$pdf->SetXY(102,42);
|
||||
$pdf->MultiCell(86,5, $fichinter->client->nom);
|
||||
$pdf->MultiCell(86,5, $outputlangs->convToOutputCharset($fichinter->client->nom));
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->SetXY(102,$pdf->GetY());
|
||||
$pdf->MultiCell(66,5, $fichinter->client->adresse . "\n" . $fichinter->client->cp . " " . $fichinter->client->ville);
|
||||
$pdf->MultiCell(66,5, $outputlangs->convToOutputCharset($fichinter->client->adresse) . "\n" . $outputlangs->convToOutputCharset($fichinter->client->cp) . " " . $outputlangs->convToOutputCharset($fichinter->client->ville));
|
||||
$pdf->rect(100, 40, 100, 40);
|
||||
|
||||
|
||||
$pdf->SetTextColor(0,0,100);
|
||||
$pdf->SetFont('Arial','B',14);
|
||||
$pdf->Text(11, 94, $outputlangs->trans("InterventionCard")." : ".$fichinter->ref);
|
||||
$pdf->Text(11, 94, $outputlangs->trans("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref));
|
||||
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
@ -80,12 +80,12 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant le bon de livraison sur le disque
|
||||
\param delivery Object livraison <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||
\param outputlangs Output language
|
||||
\return int 1 if OK, <=0 if KO
|
||||
* \brief Fonction g<EFBFBD>n<EFBFBD>rant le bon de livraison sur le disque
|
||||
* \param delivery Object livraison <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($delivery,$outputlangs='')
|
||||
function write_file($delivery,$outputlangs)
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
|
||||
@ -216,7 +216,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
|
||||
$pdf->SetXY (10, $curY );
|
||||
|
||||
$pdf->MultiCell(20, 5, $delivery->lignes[$i]->ref, 0, 'C');
|
||||
$pdf->MultiCell(20, 5, $outputlangs->convToOutputCharset($delivery->lignes[$i]->ref), 0, 'C');
|
||||
|
||||
// \TODO Field not yet saved in database
|
||||
//$pdf->SetXY (133, $curY );
|
||||
@ -316,24 +316,24 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
{
|
||||
$pdf->SetTextColor(0,0,200);
|
||||
$pdf->SetFont('Arial','B',14);
|
||||
$pdf->MultiCell(76, 8, MAIN_INFO_SOCIETE_NOM, 0, 'L');
|
||||
$pdf->MultiCell(76, 8, $outputlangs->convToOutputCharset(MAIN_INFO_SOCIETE_NOM), 0, 'L');
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(70,70,170);
|
||||
if (defined("FAC_PDF_ADRESSE"))
|
||||
{
|
||||
$pdf->SetFont('Arial','',12);
|
||||
$pdf->MultiCell(76, 5, FAC_PDF_ADRESSE);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->convToOutputCharset(FAC_PDF_ADRESSE));
|
||||
}
|
||||
if (defined("FAC_PDF_TEL"))
|
||||
{
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->MultiCell(76, 5, "Tel : ".FAC_PDF_TEL);
|
||||
$pdf->MultiCell(76, 5, "Tel : ".$outputlangs->convToOutputCharset(FAC_PDF_TEL));
|
||||
}
|
||||
if (defined("MAIN_INFO_SIREN"))
|
||||
{
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->MultiCell(76, 5, "SIREN : ".MAIN_INFO_SIREN);
|
||||
$pdf->MultiCell(76, 5, "SIREN : ".$outputlangs->convToOutputCharset(MAIN_INFO_SIREN));
|
||||
}
|
||||
|
||||
if (defined("FAC_PDF_INTITULE2"))
|
||||
@ -341,7 +341,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$pdf->SetXY(100,5);
|
||||
$pdf->SetFont('Arial','B',14);
|
||||
$pdf->SetTextColor(0,0,200);
|
||||
$pdf->MultiCell(100, 10, FAC_PDF_INTITULE2, '' , 'R');
|
||||
$pdf->MultiCell(100, 10, $outputlangs->convToOutputCharset(FAC_PDF_INTITULE2), '' , 'R');
|
||||
}
|
||||
/*
|
||||
* Adresse Client
|
||||
@ -363,23 +363,23 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$delivery->client = $client;
|
||||
|
||||
$pdf->SetXY(102,42);
|
||||
$pdf->MultiCell(96,5, $delivery->client->nom);
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($delivery->client->nom));
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->SetXY(102,47);
|
||||
$pdf->MultiCell(96,5, $delivery->client->adresse . "\n" . $delivery->client->cp . " " . $delivery->client->ville);
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($delivery->client->adresse) . "\n" . $outputlangs->convToOutputCharset($delivery->client->cp) . " " . $outputlangs->convToOutputCharset($delivery->client->ville));
|
||||
$pdf->rect(100, 40, 100, 40);
|
||||
|
||||
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->Text(11, 88, $outputlangs->transnoentities("Date")." : " . dolibarr_print_date($delivery->date_valid,"day",false,$outputlangs));
|
||||
$pdf->Text(11, 94, $outputlangs->transnoentities("DeliveryOrder")." ".$delivery->ref);
|
||||
$pdf->Text(11, 94, $outputlangs->transnoentities("DeliveryOrder")." ".$outputlangs->convToOutputCharset($delivery->ref));
|
||||
|
||||
$pdf->SetFont('Arial','B',9);
|
||||
$commande = new Commande ($this->db);
|
||||
if ($commande->fetch($delivery->commande_id) >0)
|
||||
{
|
||||
$pdf->Text(11, 98, $outputlangs->transnoentities("RefOrder")." ".$commande->ref);
|
||||
$pdf->Text(11, 98, $outputlangs->transnoentities("RefOrder")." ".$outputlangs->convToOutputCharset($commande->ref));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -103,12 +103,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant le bon de livraison sur le disque
|
||||
\param delivery Object livraison <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||
\param outputlangs Output language
|
||||
\return int 1 if OK, <=0 if KO
|
||||
* \brief Fonction g<EFBFBD>n<EFBFBD>rant le bon de livraison sur le disque
|
||||
* \param delivery Object livraison <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($delivery,$outputlangs='')
|
||||
function write_file($delivery,$outputlangs)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
@ -379,7 +379,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
|
||||
$pdf->Rect($this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25 );
|
||||
$pdf->SetXY ($this->marge_gauche + 2, $tab_top + $tab_height + 5);
|
||||
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$mysoc->nom.":",'','L');
|
||||
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->nom).":",'','L');
|
||||
|
||||
$pdf->Rect(2*$larg_sign+$this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25 );
|
||||
$pdf->SetXY (2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5);
|
||||
@ -428,7 +428,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetFont('Arial','B',13);
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DeliveryOrder")." ".$delivery->ref, '' , 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DeliveryOrder")." ".$outputlangs->convToOutputCharset($delivery->ref), '' , 'R');
|
||||
$pdf->SetFont('Arial','',12);
|
||||
|
||||
$posy+=6;
|
||||
@ -450,7 +450,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$commande = new Commande ($this->db);
|
||||
if ($commande->fetch($delivery->origin_id) >0) {
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$commande->ref, '' , 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->convToOutputCharset($commande->ref), '' , 'R');
|
||||
}
|
||||
|
||||
if ($showadress)
|
||||
@ -481,22 +481,22 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$carac_emetteur = '';
|
||||
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
|
||||
else {
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$mysoc->adresse;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$mysoc->cp.' '.$mysoc->ville;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->cp).' '.$outputlangs->convToOutputCharset($mysoc->ville);
|
||||
}
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
||||
elseif ($mysoc->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$mysoc->tel;
|
||||
elseif ($mysoc->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($mysoc->tel);
|
||||
// Fax
|
||||
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
||||
elseif ($mysoc->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$mysoc->fax;
|
||||
elseif ($mysoc->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($mysoc->fax);
|
||||
// EMail
|
||||
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
||||
elseif ($mysoc->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$mysoc->email;
|
||||
elseif ($mysoc->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($mysoc->email);
|
||||
// Web
|
||||
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
||||
elseif ($mysoc->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$mysoc->url;
|
||||
elseif ($mysoc->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($mysoc->url);
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||
@ -526,11 +526,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
// Nom client
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(106,4, $delivery->client->nom, 0, 'L');
|
||||
$pdf->MultiCell(106,4, $outputlangs->convToOutputCharset($delivery->client->nom), 0, 'L');
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client=$delivery->client->adresse."\n";
|
||||
$carac_client.=$delivery->client->cp . " " . $delivery->client->ville."\n";
|
||||
$carac_client=$outputlangs->convToOutputCharset($delivery->client->adresse)."\n";
|
||||
$carac_client.=$outputlangs->convToOutputCharset($delivery->client->cp) . " " . $outputlangs->convToOutputCharset($delivery->client->ville)."\n";
|
||||
|
||||
// Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $delivery->client->pays_code)
|
||||
|
||||
@ -212,7 +212,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour gérer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $propale->note_public, 0, 'J');
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($propale->note_public), 0, 'J');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
|
||||
@ -513,7 +513,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->MultiCell(80, 3, $account->adresse_proprio, 0, 'L', 0);
|
||||
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0);
|
||||
|
||||
$posy=$pdf->GetY()+2;
|
||||
}
|
||||
@ -521,12 +521,12 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$this->emetteur->nom.' '.$outputlangs->transnoentities('SendTo').':',0,'L',0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->nom).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0);
|
||||
$posy=$pdf->GetY()+1;
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->MultiCell(80, 6, $this->emetteur->adresse_full, 0, 'L', 0);
|
||||
$pdf->MultiCell(80, 6, $outputlangs->convToOutputCharset($this->emetteur->adresse_full), 0, 'L', 0);
|
||||
|
||||
$posy=$pdf->GetY()+2;
|
||||
}
|
||||
@ -570,20 +570,20 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
||||
$pdf->MultiCell(18, 3, $account->code_banque, 0, 'C', 0);
|
||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
||||
$pdf->MultiCell(18, 3, $account->code_guichet, 0, 'C', 0);
|
||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
||||
$pdf->MultiCell(24, 3, $account->number, 0, 'C', 0);
|
||||
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
||||
$pdf->MultiCell(13, 3, $account->cle_rib, 0, 'C', 0);
|
||||
$pdf->MultiCell(13, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
||||
|
||||
$pdf->SetXY ($this->marges['g'], $cury+12);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+22);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
||||
$pdf->SetXY ($this->marges['g'], $cury+25);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||
|
||||
$posy=$pdf->GetY()+2;
|
||||
}
|
||||
@ -843,7 +843,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$posy+=6;
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||
|
||||
$posy+=1;
|
||||
$pdf->SetFont('Arial','',10);
|
||||
@ -892,16 +892,16 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
||||
elseif ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$this->emetteur->tel;
|
||||
elseif ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($this->emetteur->tel);
|
||||
// Fax
|
||||
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
||||
elseif ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$this->emetteur->fax;
|
||||
elseif ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($this->emetteur->fax);
|
||||
// EMail
|
||||
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
||||
elseif ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$this->emetteur->email;
|
||||
elseif ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($this->emetteur->email);
|
||||
// Web
|
||||
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
||||
elseif ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$this->emetteur->url;
|
||||
elseif ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($this->emetteur->url);
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||
@ -935,14 +935,14 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
// Nom societe
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(96,4, $object->client->nom, 0, 'L');
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||
|
||||
// Nom client
|
||||
$carac_client = "\n".$object->contact->getFullName($outputlangs,1,1);
|
||||
|
||||
// Caractéristiques client
|
||||
$carac_client.="\n".$object->contact->adresse;
|
||||
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->cp) . " " . $outputlangs->convToOutputCharset($object->contact->ville)."\n";
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->contact->pays_code)
|
||||
{
|
||||
@ -954,7 +954,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
// Nom client
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(96,4, $object->client->nom, 0, 'L');
|
||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||
|
||||
// Nom du contact suivi propal si c'est une société
|
||||
$arrayidcontact = $object->getIdContact('external','CUSTOMER');
|
||||
@ -969,8 +969,8 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Caractéristiques client
|
||||
$carac_client.="\n".$object->client->adresse;
|
||||
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
||||
|
||||
@ -84,12 +84,12 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant la propale sur le disque
|
||||
\param propale Objet propal
|
||||
\param outputlangs Lang object for output language
|
||||
\return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($propale,$outputlangs='')
|
||||
* \brief Fonction g<EFBFBD>n<EFBFBD>rant la propale sur le disque
|
||||
* \param propale Objet propal
|
||||
* \param outputlangs Lang object for output language
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($propale,$outputlangs)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
@ -194,12 +194,12 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$curY = $nexY;
|
||||
|
||||
$pdf->SetXY (30, $curY );
|
||||
$pdf->MultiCell(102, 5, $propale->lignes[$i]->desc, 0, 'J', 0);
|
||||
$pdf->MultiCell(102, 5, $outputlangs->convToOutputCharset($propale->lignes[$i]->desc), 0, 'J', 0);
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY (10, $curY );
|
||||
$pdf->MultiCell(20, 5, $propale->lignes[$i]->ref, 0, 'C', 0);
|
||||
$pdf->MultiCell(20, 5, $outputlangs->convToOutputCharset($propale->lignes[$i]->ref), 0, 'C', 0);
|
||||
|
||||
$pdf->SetXY (132, $curY );
|
||||
$pdf->MultiCell(12, 5, $propale->lignes[$i]->tva_tx, 0, 'C', 0);
|
||||
@ -344,7 +344,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
{
|
||||
$pdf->SetTextColor(0,0,200);
|
||||
$pdf->SetFont('Arial','B',14);
|
||||
$pdf->MultiCell(76, 8, FAC_PDF_INTITULE, 0, 'L');
|
||||
$pdf->MultiCell(76, 8, $outputlangs->convToOutputCharset(FAC_PDF_INTITULE), 0, 'L');
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(70,70,170);
|
||||
@ -352,19 +352,19 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
{
|
||||
$pdf->SetX(12);
|
||||
$pdf->SetFont('Arial','',12);
|
||||
$pdf->MultiCell(76, 5, FAC_PDF_ADRESSE);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->convToOutputCharset(FAC_PDF_ADRESSE));
|
||||
}
|
||||
if (defined("FAC_PDF_TEL"))
|
||||
{
|
||||
$pdf->SetX(12);
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->trans("Tel")." : ".FAC_PDF_TEL);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->trans("Tel")." : ".$outputlangs->convToOutputCharset(FAC_PDF_TEL));
|
||||
}
|
||||
if (defined("MAIN_INFO_SIREN"))
|
||||
{
|
||||
$pdf->SetX(12);
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->trans("SIREN")." : ".MAIN_INFO_SIREN);
|
||||
$pdf->MultiCell(76, 5, $outputlangs->trans("SIREN")." : ".$outputlangs->convToOutputCharset(MAIN_INFO_SIREN));
|
||||
}
|
||||
$pdf->rect(10, 40, 80, 40);
|
||||
|
||||
@ -380,10 +380,10 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$propale->fetch_client();
|
||||
$pdf->SetXY(102,42);
|
||||
$pdf->MultiCell(96,5, $propale->client->nom);
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($propale->client->nom));
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->SetXY(102,$pdf->GetY());
|
||||
$pdf->MultiCell(96,5, $propale->client->adresse . "\n" . $propale->client->cp . " " . $propale->client->ville);
|
||||
$pdf->MultiCell(96,5, $outputlangs->convToOutputCharset($propale->client->adresse) . "\n" . $outputlangs->convToOutputCharset($propale->client->cp) . " " . $outputlangs->convToOutputCharset($propale->client->ville));
|
||||
$pdf->rect(100, 40, 100, 40);
|
||||
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
@ -393,7 +393,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$pdf->rect(110, 90, 90, 10);
|
||||
|
||||
$pdf->SetXY(10,90);
|
||||
$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$propale->ref);
|
||||
$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($propale->ref));
|
||||
$pdf->SetXY(110,90);
|
||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Date")." : " . dolibarr_print_date($propale->date,'day',false,$outputlangs));
|
||||
}
|
||||
|
||||
@ -43,7 +43,8 @@ class pdf_paiement extends FPDF
|
||||
$langs->load("bills");
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->description = $langs->transnoentities("ListOfCustomerPayments");
|
||||
|
||||
// Dimension page pour format A4
|
||||
$this->type = 'pdf';
|
||||
$this->page_largeur = 210;
|
||||
@ -62,108 +63,14 @@ class pdf_paiement extends FPDF
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Generate Header
|
||||
\param pdf pdf object
|
||||
\param page current page number
|
||||
\param pages number of pages
|
||||
*/
|
||||
function Header(&$pdf, $page, $pages, $outputlangs)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$title=$outputlangs->transnoentities("ListOfCustomerPayments");
|
||||
$title.=' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,$this->month,1,$this->year),"%B %Y",false,$outputlangs);
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->Text(76, 10, $title);
|
||||
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->Text(11, 16, $outputlangs->transnoentities("Date")." : ".dolibarr_print_date(time(),"day",false,$outputlangs));
|
||||
|
||||
$pdf->SetFont('Arial','',12);
|
||||
$pdf->Text(11, 22, $outputlangs->transnoentities("Page")." : ".$page);
|
||||
|
||||
$pdf->SetFont('Arial','',12);
|
||||
|
||||
$pdf->Text(11,$this->tab_top + 6,'Date');
|
||||
|
||||
$pdf->line(40, $this->tab_top, 40, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->Text(42, $this->tab_top + 6, $outputlangs->transnoentities("PaymentMode"));
|
||||
|
||||
$pdf->line(80, $this->tab_top, 80, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->Text(82, $this->tab_top + 6, $outputlangs->transnoentities("Invoice"));
|
||||
|
||||
$pdf->line(120, $this->tab_top, 120, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->Text(122, $this->tab_top + 6, $outputlangs->transnoentities("AmountInvoice"));
|
||||
|
||||
$pdf->line(160, $this->tab_top, 160, $this->tab_top + $this->tab_height + 10);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top);
|
||||
$pdf->MultiCell(40, 10, $outputlangs->transnoentities("AmountPayment"), 0, 'R');
|
||||
|
||||
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 );
|
||||
|
||||
$pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10);
|
||||
}
|
||||
|
||||
|
||||
function Body(&$pdf, $page, $lines, $outputlangs)
|
||||
{
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
$oldprowid = 0;
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
$yp = 0;
|
||||
for ($j = 0 ; $j < sizeof($lines) ; $j++)
|
||||
{
|
||||
$i = $j;
|
||||
if ($oldprowid <> $lines[$j][7])
|
||||
{
|
||||
if ($yp > 200)
|
||||
{
|
||||
$page++;
|
||||
$pdf->AddPage();
|
||||
$this->Header($pdf, $page, $pages);
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
$yp = 0;
|
||||
}
|
||||
|
||||
$pdf->SetXY (10, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(30, $this->line_height, $lines[$j][1], 0, 'J', 1);
|
||||
|
||||
$pdf->SetXY (40, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(80, $this->line_height, $lines[$j][2].' '.$lines[$j][3], 0, 'J', 1);
|
||||
|
||||
$pdf->SetXY (120, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, '', 0, 'J', 1);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][4], 0, 'R', 1);
|
||||
$yp = $yp + 5;
|
||||
}
|
||||
|
||||
$pdf->SetXY (80, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][0], 0, 'J', 0);
|
||||
|
||||
$pdf->SetXY (120, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][5], 0, 'J', 0);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][6], 0, 'R', 0);
|
||||
$yp = $yp + 5;
|
||||
|
||||
if ($oldprowid <> $lines[$j][7])
|
||||
{
|
||||
$oldprowid = $lines[$j][7];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Fonction generant le rapport sur le disque
|
||||
\param _dir repertoire
|
||||
\param month mois du rapport
|
||||
\param year annee du rapport
|
||||
*/
|
||||
* \brief Fonction generant le rapport sur le disque
|
||||
* \param _dir repertoire
|
||||
* \param month mois du rapport
|
||||
* \param year annee du rapport
|
||||
* \param outputlangs Lang output object
|
||||
*/
|
||||
function write_file($_dir, $month, $year, $outputlangs)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
@ -286,6 +193,103 @@ class pdf_paiement extends FPDF
|
||||
$langs->setPhpLang(); // On restaure langue session
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Generate Header
|
||||
\param pdf pdf object
|
||||
\param page current page number
|
||||
\param pages number of pages
|
||||
*/
|
||||
function Header(&$pdf, $page, $pages, $outputlangs)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$title=$outputlangs->transnoentities("ListOfCustomerPayments");
|
||||
$title.=' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,$this->month,1,$this->year),"%B %Y",false,$outputlangs);
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->Text(76, 10, $title);
|
||||
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->Text(11, 16, $outputlangs->transnoentities("Date")." : ".dolibarr_print_date(time(),"day",false,$outputlangs));
|
||||
|
||||
$pdf->SetFont('Arial','',12);
|
||||
$pdf->Text(11, 22, $outputlangs->transnoentities("Page")." : ".$page);
|
||||
|
||||
$pdf->SetFont('Arial','',12);
|
||||
|
||||
$pdf->Text(11,$this->tab_top + 6,'Date');
|
||||
|
||||
$pdf->line(40, $this->tab_top, 40, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->Text(42, $this->tab_top + 6, $outputlangs->transnoentities("PaymentMode"));
|
||||
|
||||
$pdf->line(80, $this->tab_top, 80, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->Text(82, $this->tab_top + 6, $outputlangs->transnoentities("Invoice"));
|
||||
|
||||
$pdf->line(120, $this->tab_top, 120, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->Text(122, $this->tab_top + 6, $outputlangs->transnoentities("AmountInvoice"));
|
||||
|
||||
$pdf->line(160, $this->tab_top, 160, $this->tab_top + $this->tab_height + 10);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top);
|
||||
$pdf->MultiCell(40, 10, $outputlangs->transnoentities("AmountPayment"), 0, 'R');
|
||||
|
||||
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 );
|
||||
|
||||
$pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10);
|
||||
}
|
||||
|
||||
|
||||
function Body(&$pdf, $page, $lines, $outputlangs)
|
||||
{
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
$oldprowid = 0;
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
$yp = 0;
|
||||
for ($j = 0 ; $j < sizeof($lines) ; $j++)
|
||||
{
|
||||
$i = $j;
|
||||
if ($oldprowid <> $lines[$j][7])
|
||||
{
|
||||
if ($yp > 200)
|
||||
{
|
||||
$page++;
|
||||
$pdf->AddPage();
|
||||
$this->Header($pdf, $page, $pages);
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
$yp = 0;
|
||||
}
|
||||
|
||||
$pdf->SetXY (10, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(30, $this->line_height, $lines[$j][1], 0, 'J', 1);
|
||||
|
||||
$pdf->SetXY (40, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(80, $this->line_height, $lines[$j][2].' '.$lines[$j][3], 0, 'J', 1);
|
||||
|
||||
$pdf->SetXY (120, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, '', 0, 'J', 1);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][4], 0, 'R', 1);
|
||||
$yp = $yp + 5;
|
||||
}
|
||||
|
||||
$pdf->SetXY (80, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][0], 0, 'J', 0);
|
||||
|
||||
$pdf->SetXY (120, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][5], 0, 'J', 0);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][6], 0, 'R', 0);
|
||||
$yp = $yp + 5;
|
||||
|
||||
if ($oldprowid <> $lines[$j][7])
|
||||
{
|
||||
$oldprowid = $lines[$j][7];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -102,9 +102,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant la commande sur le disque
|
||||
\param id Id de la commande <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||
\return int 1=ok, 0=ko
|
||||
* \brief Fonction generant la commande sur le disque
|
||||
* \param id Id de la commande a generer
|
||||
* \param outputlangs Lang output object
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
function write_file($com,$outputlangs='')
|
||||
{
|
||||
@ -247,7 +248,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
// Si ligne associ<63>e <20> un code produit
|
||||
if ($com->lignes[$i]->fk_product)
|
||||
{
|
||||
$libelleproduitservice=$outputlangs->transnoentities("Product")." ".$com->lignes[$i]->ref_fourn." - ".$libelleproduitservice;
|
||||
$libelleproduitservice=$outputlangs->transnoentities("Product")." ".$outputlangs->convToOutputCharset($com->lignes[$i]->ref_fourn)." - ".$libelleproduitservice;
|
||||
}
|
||||
if ($com->lignes[$i]->date_start && $com->lignes[$i]->date_end)
|
||||
{
|
||||
@ -505,7 +506,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, "-".$object->remise_percent."%", 0, 'R', 1);
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * 2);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, "Total HT apr<EFBFBD>s remise", 0, 'L', 1);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, "Total HT apres remise", 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * 2);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht), 0, 'R', 0);
|
||||
@ -694,7 +695,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->SetFont('Arial','B',13);
|
||||
$pdf->SetXY(100,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Order")." ".$object->ref, '' , 'R');
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->ref), '' , 'R');
|
||||
$pdf->SetFont('Arial','',12);
|
||||
|
||||
$posy+=6;
|
||||
@ -730,22 +731,22 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$carac_emetteur = '';
|
||||
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
|
||||
else {
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$mysoc->adresse;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$mysoc->cp.' '.$mysoc->ville;
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->cp).' '.$outputlangs->convToOutputCharset($mysoc->ville);
|
||||
}
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
||||
elseif ($mysoc->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$mysoc->tel;
|
||||
elseif ($mysoc->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($mysoc->tel);
|
||||
// Fax
|
||||
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
||||
elseif ($mysoc->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$mysoc->fax;
|
||||
elseif ($mysoc->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($mysoc->fax);
|
||||
// EMail
|
||||
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
||||
elseif ($mysoc->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$mysoc->email;
|
||||
elseif ($mysoc->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($mysoc->email);
|
||||
// Web
|
||||
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
||||
elseif ($mysoc->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$mysoc->url;
|
||||
elseif ($mysoc->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($mysoc->url);
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||
@ -769,12 +770,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
// Nom client
|
||||
$pdf->SetXY(102,$posy+3);
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
||||
$pdf->MultiCell(106,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||
|
||||
// Caract<63>ristiques client
|
||||
$carac_client=$object->client->adresse;
|
||||
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
||||
$carac_client=$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($object->client->tva_intra);
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetXY(102,$posy+8);
|
||||
$pdf->MultiCell(86,4, $carac_client);
|
||||
|
||||
@ -706,7 +706,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
$outputlangs->load("dict");
|
||||
|
||||
// Line of free text
|
||||
$ligne=(! empty($conf->global->$paramfreetext))?$conf->global->$paramfreetext:"";
|
||||
$ligne=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):"";
|
||||
|
||||
// First line of company infos
|
||||
|
||||
@ -726,14 +726,14 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
|
||||
if (eregi('\((.*)\)',$field,$reg)) $field=$reg[1];
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$fromcompany->profid1;
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->profid1);
|
||||
}
|
||||
// Prof Id 2
|
||||
if ($fromcompany->profid2)
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
|
||||
if (eregi('\((.*)\)',$field,$reg)) $field=$reg[1];
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$fromcompany->profid2;
|
||||
$ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->profid2);
|
||||
}
|
||||
|
||||
// Second line of company infos
|
||||
@ -743,19 +743,19 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
|
||||
if (eregi('\((.*)\)',$field,$reg)) $field=$reg[1];
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$fromcompany->profid3;
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->profid3);
|
||||
}
|
||||
// Prof Id 4
|
||||
if ($fromcompany->profid4)
|
||||
{
|
||||
$field=$outputlangs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
|
||||
if (eregi('\((.*)\)',$field,$reg)) $field=$reg[1];
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$fromcompany->profid4;
|
||||
$ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->profid4);
|
||||
}
|
||||
// IntraCommunautary VAT
|
||||
if ($fromcompany->tva_intra != '')
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
|
||||
}
|
||||
|
||||
$pdf->SetFont('Arial','',7);
|
||||
|
||||
@ -498,7 +498,7 @@ function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
return $outputlangs->convToOuptutCharset($ret,$pagecodefrom);
|
||||
return $outputlangs->convToOutputCharset($ret,$pagecodefrom);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -340,7 +340,7 @@ class Translate {
|
||||
$newstr=ereg_replace('>','__gt__',$newstr);
|
||||
$newstr=ereg_replace('"','__quot__',$newstr);
|
||||
|
||||
$newstr=$this->convToOuptutCharset($newstr); // Convert string to this->charset_output
|
||||
$newstr=$this->convToOutputCharset($newstr); // Convert string to this->charset_output
|
||||
|
||||
// Cryptage en html de la chaine
|
||||
// $newstr est une chaine stockee en memoire au format $this->charset_output
|
||||
@ -368,7 +368,7 @@ class Translate {
|
||||
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','label');
|
||||
//print "xxx".$key."-".$value."\n";
|
||||
}
|
||||
return $this->convToOuptutCharset($newstr);
|
||||
return $this->convToOutputCharset($newstr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ class Translate {
|
||||
// Si la traduction est disponible
|
||||
$newstr=sprintf($this->tab_translate[$newstr],$param1,$param2,$param3,$param4);
|
||||
}
|
||||
return $this->convToOuptutCharset($newstr);
|
||||
return $this->convToOutputCharset($newstr);
|
||||
}
|
||||
|
||||
|
||||
@ -429,7 +429,7 @@ class Translate {
|
||||
* \param pagecodefrom Page code of src string
|
||||
* \return string chaine traduite
|
||||
*/
|
||||
function convToOuptutCharset($str,$pagecodefrom='UTF-8')
|
||||
function convToOutputCharset($str,$pagecodefrom='UTF-8')
|
||||
{
|
||||
if ($pagecodefrom == 'ISO-8859-1' && $this->charset_output == 'UTF-8') $str=utf8_encode($str);
|
||||
if ($pagecodefrom == 'UTF-8' && $this->charset_output == 'ISO-8859-1') $str=utf8_decode($str);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user