Fix substitution in public notes of pdf
This commit is contained in:
parent
dfc7d47747
commit
3987033aab
@ -5620,10 +5620,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make substition into a text string, replacing keys with vals from $substitutionarray (oldval=>newval).
|
* Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newval).
|
||||||
|
* Texts like __(TranslationKey|langfile)__ and __[ConstantKey]__ are also replaced
|
||||||
*
|
*
|
||||||
* @param string $text Source string in which we must do substitution
|
* @param string $text Source string in which we must do substitution
|
||||||
* @param array $substitutionarray Array with key->val to substitute. Example: array('__MYKEY__' => 'MyVal')
|
* @param array $substitutionarray Array with key->val to substitute. Example: array('__MYKEY__' => 'MyVal', ...)
|
||||||
* @param Translate $outputlangs Output language
|
* @param Translate $outputlangs Output language
|
||||||
* @return string Output string after substitutions
|
* @return string Output string after substitutions
|
||||||
* @see complete_substitutions_array
|
* @see complete_substitutions_array
|
||||||
|
|||||||
@ -348,6 +348,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88 + $height_incoterms;
|
$tab_top = 88 + $height_incoterms;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -262,6 +262,10 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 95;
|
$tab_top = 95;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -382,6 +382,10 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88 + $height_incoterms;
|
$tab_top = 88 + $height_incoterms;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -211,6 +211,10 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88;
|
$tab_top = 88;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -287,6 +287,10 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88;
|
$tab_top = 88;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -388,6 +388,10 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88 + $height_incoterms;
|
$tab_top = 88 + $height_incoterms;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
@ -314,6 +314,10 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
}
|
}
|
||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
|
$substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
|
||||||
|
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||||
|
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||||
|
|
||||||
$tab_top = 88;
|
$tab_top = 88;
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user