This commit is contained in:
Laurent Destailleur 2023-09-09 21:42:52 +02:00
parent bd10d3944a
commit 91c416b98b

View file

@ -86,7 +86,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
*/
public function __construct($db)
{
global $conf, $langs, $mysoc;
global $langs, $mysoc;
// Load translation files required by the page
$langs->loadLangs(array("main", "bills"));
@ -227,7 +227,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblines = count($object->lines);
$nblines = (empty($object->lines) ? 0 : count($object->lines));
$pdf = pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance