Skip to content
Snippets Groups Projects
Commit 9244ef23 authored by Marcos García de La Fuente's avatar Marcos García de La Fuente
Browse files

Removed 2nd argument of muscadet and canelle model __construct function

parent 8e1f9c8d
No related branches found
No related tags found
No related merge requests found
......@@ -58,9 +58,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* Constructor
*
* @param DoliDB $db Database handler
* @param Object $object Supplier invoice
*/
function __construct($db,$object)
function __construct($db)
{
global $conf,$langs,$mysoc;
......@@ -91,12 +90,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->franchise=!$mysoc->tva_assuj;
// Get source company
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
if (! is_object($object->thirdparty)) $object->thirdparty=$mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
$this->emetteur=$object->thirdparty;
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined
// Defini position des colonnes
$this->posxdesc=$this->marge_gauche+1;
$this->posxtva=112;
......@@ -139,6 +132,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
{
global $user,$langs,$conf,$mysoc,$hookmanager;
// Get source company
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
if (! is_object($object->thirdparty)) $object->thirdparty=$mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
$this->emetteur=$object->thirdparty;
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default, if was not defined
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
......
......@@ -61,9 +61,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* Constructor
*
* @param DoliDB $db Database handler
* @param Object $object Supplier order
*/
function __construct($db,$object)
function __construct($db)
{
global $conf,$langs,$mysoc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment