Removed 2nd argument of muscadet and canelle model __construct function

This commit is contained in:
Marcos García de La Fuente 2014-09-22 00:08:21 +02:00
parent 8e1f9c8d70
commit 9244ef23af
2 changed files with 8 additions and 10 deletions

View File

@ -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';

View File

@ -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;