Removed 2nd argument of muscadet and canelle model __construct function
This commit is contained in:
parent
8e1f9c8d70
commit
9244ef23af
@ -58,9 +58,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param Object $object Supplier invoice
|
|
||||||
*/
|
*/
|
||||||
function __construct($db,$object)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
@ -91,12 +90,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
|
|
||||||
$this->franchise=!$mysoc->tva_assuj;
|
$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
|
// Defini position des colonnes
|
||||||
$this->posxdesc=$this->marge_gauche+1;
|
$this->posxdesc=$this->marge_gauche+1;
|
||||||
$this->posxtva=112;
|
$this->posxtva=112;
|
||||||
@ -139,6 +132,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
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;
|
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
|
// 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';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|||||||
@ -61,9 +61,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param Object $object Supplier order
|
|
||||||
*/
|
*/
|
||||||
function __construct($db,$object)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user