Fix: Instantiate if not already done
This commit is contained in:
parent
034b0fc4d4
commit
cb3104220e
@ -298,7 +298,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
@ -635,7 +635,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4));
|
||||
$pdf->MultiCell(86,4, $carac_client, 0, 'L');
|
||||
}
|
||||
|
||||
|
||||
$curY = 80;
|
||||
$posy=$curY;
|
||||
|
||||
@ -647,10 +647,10 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs), 0, 'L');
|
||||
$pdf->SetXY(11, $posy);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->ref), 0, 'L');
|
||||
|
||||
|
||||
|
||||
|
||||
$posy+=1;
|
||||
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager);
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
@ -926,12 +926,12 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R');
|
||||
|
||||
|
||||
$posy+=2;
|
||||
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
|
||||
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
|
||||
@ -412,7 +412,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Add pdfgeneration hook
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
|
||||
@ -300,7 +300,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
@ -1001,7 +1001,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
}
|
||||
|
||||
$posy+=1;
|
||||
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager);
|
||||
|
||||
|
||||
@ -393,7 +393,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
@ -967,9 +967,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
|
||||
}
|
||||
|
||||
|
||||
$posy+=2;
|
||||
|
||||
|
||||
// Show list of linked objects
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
|
||||
|
||||
|
||||
@ -393,7 +393,7 @@ class pdf_jaune extends ModelePDFPropales
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
|
||||
@ -398,7 +398,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->Output($file,'F');
|
||||
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
|
||||
@ -406,7 +406,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
|
||||
// Add pdfgeneration hook
|
||||
if (is_object($hookmanager))
|
||||
if (! is_object($hookmanager))
|
||||
{
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($this->db);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user