Removed duplicate code. Use inheritance instead.

This commit is contained in:
Laurent Destailleur 2015-09-18 10:22:30 +02:00
parent 4195eb3366
commit f01b9c09a3
2 changed files with 17 additions and 1185 deletions

View File

@ -1165,9 +1165,10 @@ class pdf_einstein extends ModelePDFCommandes
* @param Object $object Object to show * @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes * @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param string $titlekey Translation key to show as title of document
* @return void * @return void
*/ */
function _pagehead(&$pdf, $object, $showaddress, $outputlangs) function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="Order")
{ {
global $conf,$langs,$hookmanager; global $conf,$langs,$hookmanager;
@ -1220,7 +1221,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('','B', $default_font_size + 3); $pdf->SetFont('','B', $default_font_size + 3);
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$title=$outputlangs->transnoentities("Order"); $title=$outputlangs->transnoentities($titlekey);
$pdf->MultiCell(100, 3, $title, '', 'R'); $pdf->MultiCell(100, 3, $title, '', 'R');
$pdf->SetFont('','B',$default_font_size); $pdf->SetFont('','B',$default_font_size);

File diff suppressed because it is too large Load Diff