Fix: Remove html entities coding in id prof output on PDF.
This commit is contained in:
parent
f4e461e60a
commit
4cf4c7aa12
@ -968,22 +968,22 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
if ($this->emetteur->profid2)
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
}
|
||||
if ($this->emetteur->profid1 && (! $this->emetteur->profid2 || $this->emetteur->pays_code != 'FR'))
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
}
|
||||
|
||||
// Deuxieme ligne d'info réglementaires
|
||||
$ligne2="";
|
||||
if ($this->emetteur->profid3)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
}
|
||||
if ($this->emetteur->profid4)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
}
|
||||
if ($this->emetteur->tva_intra != '')
|
||||
{
|
||||
|
||||
@ -1193,24 +1193,25 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transnoentities("CapitalOf",$this->emetteur->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie);
|
||||
}
|
||||
// Prof Id
|
||||
if ($this->emetteur->profid2)
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
}
|
||||
if ($this->emetteur->profid1 && (! $this->emetteur->profid2 || $this->emetteur->pays_code != 'FR'))
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
}
|
||||
|
||||
// Deuxieme ligne d'info réglementaires
|
||||
$ligne2="";
|
||||
if ($this->emetteur->profid3)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
}
|
||||
if ($this->emetteur->profid4)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
}
|
||||
if ($this->emetteur->tva_intra != '')
|
||||
{
|
||||
|
||||
@ -627,13 +627,13 @@ class pdf_huitre extends ModelePDFFactures
|
||||
$ligne=$langs->transnoentities('LimitedLiabilityCompanyCapital').' '. MAIN_INFO_CAPITAL." ".$langs->transnoentities("Currency".$conf->monnaie);
|
||||
}
|
||||
if (defined('MAIN_INFO_SIREN') && MAIN_INFO_SIREN) {
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->emetteur->pays_code).": ".MAIN_INFO_SIREN;
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".MAIN_INFO_SIREN;
|
||||
}
|
||||
if (defined('MAIN_INFO_SIRET') && MAIN_INFO_SIRET) {
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->emetteur->pays_code).": ".MAIN_INFO_SIRET;
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".MAIN_INFO_SIRET;
|
||||
}
|
||||
if (defined('MAIN_INFO_RCS') && MAIN_INFO_RCS) {
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->emetteur->pays_code).": ".MAIN_INFO_RCS;
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".MAIN_INFO_RCS;
|
||||
}
|
||||
if ($ligne) {
|
||||
$pdf->SetY(-$footy);
|
||||
|
||||
@ -721,11 +721,11 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->SetFont('Arial','',7);
|
||||
if (defined("MAIN_INFO_SIREN") && MAIN_INFO_SIREN)
|
||||
{
|
||||
$pdf->MultiCell(80, 4, $langs->transcountry("ProfId1",$this->emetteur->pays_code).": ".MAIN_INFO_SIREN);
|
||||
$pdf->MultiCell(80, 4, $langs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".MAIN_INFO_SIREN);
|
||||
}
|
||||
elseif (defined("MAIN_INFO_SIRET") && MAIN_INFO_SIRET)
|
||||
{
|
||||
$pdf->MultiCell(80, 4, $langs->transcountry("ProfId2",$this->emetteur->pays_code).": ".MAIN_INFO_SIRET);
|
||||
$pdf->MultiCell(80, 4, $langs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".MAIN_INFO_SIRET);
|
||||
}
|
||||
|
||||
|
||||
@ -814,13 +814,13 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$ligne=$langs->transnoentities('LimitedLiabilityCompanyCapital').' '. MAIN_INFO_CAPITAL." ".$langs->transnoentities("Currency".$conf->monnaie);
|
||||
}
|
||||
if (defined('MAIN_INFO_SIREN') && MAIN_INFO_SIREN) {
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountry("ProfId1",$this->emetteur->pays_code).": ".MAIN_INFO_SIREN;
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".MAIN_INFO_SIREN;
|
||||
}
|
||||
if (defined('MAIN_INFO_SIRET') && MAIN_INFO_SIRET) {
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountry("ProfId2",$this->emetteur->pays_code).": ".MAIN_INFO_SIRET;
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".MAIN_INFO_SIRET;
|
||||
}
|
||||
if (defined('MAIN_INFO_RCS') && MAIN_INFO_RCS) {
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountry("ProfId4",$this->emetteur->pays_code).": ".MAIN_INFO_RCS;
|
||||
$ligne.=($ligne?" - ":"").$langs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".MAIN_INFO_RCS;
|
||||
}
|
||||
if ($ligne) {
|
||||
$pdf->SetY(-$footy);
|
||||
|
||||
@ -341,22 +341,22 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
}
|
||||
if ($this->emetteur->profid2)
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
}
|
||||
if ($this->emetteur->profid1 && (! $this->emetteur->profid2 || $this->emetteur->pays_code != 'FR'))
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
}
|
||||
|
||||
// Deuxieme ligne d'info reglementaires
|
||||
$ligne2="";
|
||||
if ($this->emetteur->profid3)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
}
|
||||
if ($this->emetteur->profid4)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
}
|
||||
if ($this->emetteur->tva_intra != '')
|
||||
{
|
||||
|
||||
@ -994,22 +994,22 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
}
|
||||
if ($this->emetteur->profid2)
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".$this->emetteur->profid2;
|
||||
}
|
||||
if ($this->emetteur->profid1 && (! $this->emetteur->profid2 || $this->emetteur->pays_code != 'FR'))
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountry("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
$ligne1.=($ligne1?" - ":"").$outputlangs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".$this->emetteur->profid1;
|
||||
}
|
||||
|
||||
// Deuxieme ligne d'info réglementaires
|
||||
$ligne2="";
|
||||
if ($this->emetteur->profid3)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId3",$this->emetteur->pays_code).": ".$this->emetteur->profid3;
|
||||
}
|
||||
if ($this->emetteur->profid4)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountry("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
$ligne2.=($ligne2?" - ":"").$outputlangs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".$this->emetteur->profid4;
|
||||
}
|
||||
if ($this->emetteur->tva_intra != '')
|
||||
{
|
||||
|
||||
@ -541,22 +541,22 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
if ($conf->global->MAIN_INFO_SIRET)
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transcountry("ProfId2",$this->emetteur->pays_code).": ".$conf->global->MAIN_INFO_SIRET;
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transcountrynoentities("ProfId2",$this->emetteur->pays_code).": ".$conf->global->MAIN_INFO_SIRET;
|
||||
}
|
||||
if ($conf->global->MAIN_INFO_SIREN && (! $conf->global->MAIN_INFO_SIRET || $this->emetteur->pays_code != 'FR'))
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transcountry("ProfId1",$this->emetteur->pays_code).": ".$conf->global->MAIN_INFO_SIREN;
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transcountrynoentities("ProfId1",$this->emetteur->pays_code).": ".$conf->global->MAIN_INFO_SIREN;
|
||||
}
|
||||
if ($conf->global->MAIN_INFO_APE)
|
||||
{
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transcountry("ProfId3",$this->emetteur->pays_code).": ".MAIN_INFO_APE;
|
||||
$ligne1.=($ligne1?" - ":"").$langs->transcountrynoentities("ProfId3",$this->emetteur->pays_code).": ".MAIN_INFO_APE;
|
||||
}
|
||||
|
||||
// Deuxieme ligne d'info r<EFBFBD>glementaires
|
||||
// Deuxieme ligne d'info reglementaires
|
||||
$ligne2="";
|
||||
if ($conf->global->MAIN_INFO_RCS)
|
||||
{
|
||||
$ligne2.=($ligne2?" - ":"").$langs->transcountry("ProfId4",$this->emetteur->pays_code).": ".$conf->global->MAIN_INFO_RCS;
|
||||
$ligne2.=($ligne2?" - ":"").$langs->transcountrynoentities("ProfId4",$this->emetteur->pays_code).": ".$conf->global->MAIN_INFO_RCS;
|
||||
}
|
||||
if ($conf->global->MAIN_INFO_TVAINTRA != '')
|
||||
{
|
||||
|
||||
@ -73,7 +73,7 @@ class Translate {
|
||||
*/
|
||||
function getTransFromTab($key)
|
||||
{
|
||||
if (isset($this->tab_translate[$key]) && $this->tab_translate[$key])
|
||||
if (! empty($this->tab_translate[$key]))
|
||||
{
|
||||
return $this->tab_translate[$key];
|
||||
}
|
||||
@ -299,13 +299,13 @@ class Translate {
|
||||
* Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif
|
||||
* et si toujours pas trouve, il est retourne tel quel
|
||||
* Les parametres de cette methode peuvent contenir de balises HTML.
|
||||
* \param key cl<EFBFBD> de chaine a traduire
|
||||
* \param key cle de chaine a traduire
|
||||
* \param param1 chaine de param1
|
||||
* \param param2 chaine de param2
|
||||
* \param param3 chaine de param3
|
||||
* \param param4 chaine de param4
|
||||
* \param maxsize taille max
|
||||
* \return string chaine traduite et cod<EFBFBD> en HTML
|
||||
* \return string Chaine traduite et code en HTML
|
||||
*/
|
||||
function trans($key, $param1='', $param2='', $param3='', $param4='', $maxsize=0)
|
||||
{
|
||||
@ -376,7 +376,7 @@ class Translate {
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne la version traduite du texte pass<EFBFBD> en param<EFBFBD>tre compl<EFBFBD>t<EFBFBD> du code pays
|
||||
* \brief Retourne la version traduite du texte passe en parametre complete du code pays
|
||||
* \param str chaine a traduire
|
||||
* \param countrycode code pays (FR, ...)
|
||||
* \return string chaine traduite
|
||||
@ -384,11 +384,24 @@ class Translate {
|
||||
function transcountry($str, $countrycode)
|
||||
{
|
||||
if ($this->tab_translate["$str$countrycode"]) return $this->trans("$str$countrycode");
|
||||
else return $this->trans("$str");
|
||||
else return $this->trans($str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne la version traduite du texte passe en parametre complete du code pays
|
||||
* \param str chaine a traduire
|
||||
* \param countrycode code pays (FR, ...)
|
||||
* \return string chaine traduite
|
||||
*/
|
||||
function transcountrynoentities($str, $countrycode)
|
||||
{
|
||||
if ($this->tab_translate["$str$countrycode"]) return $this->transnoentities("$str$countrycode");
|
||||
else return $this->transnoentities($str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Convertit une chaine dans le charset de sortie
|
||||
* \param str chaine a convertir
|
||||
* \return string chaine traduite
|
||||
|
||||
Loading…
Reference in New Issue
Block a user