From 997d6cca0a31764036f7a74bb7a2d69a6b67a1a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Apr 2019 19:49:47 +0200 Subject: [PATCH] Fix $db not defined --- .../core/modules/facture/doc/pdf_crabe.modules.php | 2 +- .../modules/facture/doc/pdf_sponge.modules.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index b97b29ad47f..10314734d9b 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -856,7 +856,7 @@ class pdf_crabe extends ModelePDFFactures $invoice->fetch($obj->fk_facture_source); $pdf->SetXY($tab3_posx, $tab3_top+$y); - $pdf->MultiCell(20, 3, dol_print_date($db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); + $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); $pdf->MultiCell(20, 3, price(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx+40, $tab3_top+$y); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 6cf6e39dc3f..79fa6b58f2f 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -84,32 +84,32 @@ class pdf_sponge extends ModelePDFFactures * @var int page_largeur */ public $page_largeur; - + /** * @var int page_hauteur */ public $page_hauteur; - + /** * @var array format */ public $format; - + /** * @var int marge_gauche */ public $marge_gauche; - + /** * @var int marge_droite */ public $marge_droite; - + /** * @var int marge_haute */ public $marge_haute; - + /** * @var int marge_basse */ @@ -959,7 +959,7 @@ class pdf_sponge extends ModelePDFFactures $invoice->fetch($obj->fk_facture_source); $pdf->SetXY($tab3_posx, $tab3_top+$y); - $pdf->MultiCell(20, 3, dol_print_date($db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); + $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($obj->datef), 'day', false, $outputlangs, true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); $pdf->MultiCell(20, 3, price(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $obj->multicurrency_amount_ttc : $obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx+40, $tab3_top+$y);