Standardize and update code
This commit is contained in:
parent
f28f3d12c2
commit
30601accc3
@ -55,7 +55,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
*/
|
*/
|
||||||
public $description;
|
public $description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string document type
|
* @var string document type
|
||||||
*/
|
*/
|
||||||
public $type;
|
public $type;
|
||||||
@ -121,9 +121,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
// Translations
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("main", "bills"));
|
$langs->loadLangs(array("main", "bills"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
@ -217,12 +217,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
// 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';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load translation files required by the page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("products");
|
|
||||||
$outputlangs->load("orders");
|
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
@ -1126,13 +1122,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
*/
|
*/
|
||||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs,$conf,$mysoc;
|
global $langs, $conf, $mysoc;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load translation files required by the page
|
||||||
$outputlangs->load("bills");
|
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings"));
|
||||||
$outputlangs->load("orders");
|
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("sendings");
|
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user