Removed duplicate code. Use inheritance instead.
This commit is contained in:
parent
4195eb3366
commit
f01b9c09a3
@ -28,7 +28,7 @@
|
||||
* \brief Fichier de la classe permettant de generer les commandes au modele Einstein
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/commande/modules_commande.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
@ -593,7 +593,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param Object $object Object order
|
||||
* @param int $posy Position y in PDF
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
@ -608,7 +608,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param Object $object Object to show
|
||||
* @param int $posy Y
|
||||
* @param Translate $outputlangs Langs object
|
||||
@ -793,7 +793,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param Facture $object Object invoice
|
||||
* @param int $deja_regle Montant deja regle
|
||||
* @param int $posy Position depart
|
||||
@ -1050,7 +1050,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show table for lines
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param string $tab_top Top position of table
|
||||
* @param string $tab_height Height of table (rectangle)
|
||||
* @param int $nexY Y (not used)
|
||||
@ -1161,13 +1161,14 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show top header of page.
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param Object $object Object to show
|
||||
* @param int $showaddress 0=no, 1=yes
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param string $titlekey Translation key to show as title of document
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="Order")
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
|
||||
@ -1220,7 +1221,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetFont('','B', $default_font_size + 3);
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$title=$outputlangs->transnoentities("Order");
|
||||
$title=$outputlangs->transnoentities($titlekey);
|
||||
$pdf->MultiCell(100, 3, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('','B',$default_font_size);
|
||||
@ -1339,7 +1340,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param TCPDF $pdf PDF
|
||||
* @param TCPDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user