Skip to content

Commit

Permalink
Merge pull request Dolibarr#32581 from francoisPE/fix_bg_fact_fourn
Browse files Browse the repository at this point in the history
FIX pdf_cannelle (supplier_invoice) add background - Complete Dolibarr#17243
  • Loading branch information
eldy authored Jan 9, 2025
2 parents 8a5475f + 21e997a commit 249dfe1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede

// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ public function write_file($object, $outputlangs = '', $srctemplatepath = '', $h
$pdf->SetFont(pdf_getPDFFont($outputlangs));
// Set path to the background PDF File
if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
$pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) {
$logodir = $conf->mycompany->multidir_output[$object->entity];
}
$pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
$tplidx = $pdf->importPage(1);
}

Expand Down

0 comments on commit 249dfe1

Please sign in to comment.