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
|
* \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.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
@ -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
Loading…
Reference in New Issue
Block a user