forked from Wavyzz/dolibarr
Modification du chemin du logo afin de ne plus mettre le chemin complet dans la constante
FAC_PDF_LOGO, cette constante devra contenir dornavent ceci : "/logo/mylogo.png"
This commit is contained in:
@@ -578,20 +578,22 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetXY($this->marges['g'],6);
|
$pdf->SetXY($this->marges['g'],6);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO)
|
if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) $logo=DOL_DATA_ROOT.FAC_PDF_LOGO;
|
||||||
|
if ($logo)
|
||||||
{
|
{
|
||||||
if (file_exists(FAC_PDF_LOGO))
|
if (is_readable($logo))
|
||||||
{
|
{
|
||||||
$taille=getimagesize(FAC_PDF_LOGO);
|
$taille=getimagesize($logo);
|
||||||
$longueur=$taille[0]/2.835;
|
$longueur=$taille[0]/2.835;
|
||||||
$pdf->Image(FAC_PDF_LOGO, $this->marges['g'], $this->marges['h'], 0, 24);
|
$pdf->Image($logo, $this->marges['g'], $this->marges['h'], 0, 24);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
$pdf->SetTextColor(200,0,0);
|
{
|
||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetTextColor(200,0,0);
|
||||||
$pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",FAC_PDF_LOGO), 0, 'L');
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(80, 3, $langs->trans("ErrorGoToModuleSetup"), 0, 'L');
|
$pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",$logo), 0, 'L');
|
||||||
}
|
$pdf->MultiCell(80, 3, $langs->trans("ErrorGoToModuleSetup"), 0, 'L');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (defined("FAC_PDF_INTITULE"))
|
else if (defined("FAC_PDF_INTITULE"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user