New [*use loadLangs for translation files*] and update code
This commit is contained in:
parent
e28307ede4
commit
5b1efc2227
@ -38,23 +38,78 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
*/
|
*/
|
||||||
class pdf_aurore extends ModelePDFSupplierProposal
|
class pdf_aurore extends ModelePDFSupplierProposal
|
||||||
{
|
{
|
||||||
var $db;
|
/**
|
||||||
var $name;
|
* @var DoliDb Database handler
|
||||||
var $description;
|
*/
|
||||||
var $type;
|
public $db;
|
||||||
|
|
||||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
/**
|
||||||
var $version = 'dolibarr';
|
* @var string model name
|
||||||
|
*/
|
||||||
|
public $name;
|
||||||
|
|
||||||
var $page_largeur;
|
/**
|
||||||
var $page_hauteur;
|
* @var string model description (short text)
|
||||||
var $format;
|
*/
|
||||||
var $marge_gauche;
|
public $description;
|
||||||
var $marge_droite;
|
|
||||||
var $marge_haute;
|
|
||||||
var $marge_basse;
|
|
||||||
|
|
||||||
var $emetteur; // Objet societe qui emet
|
/**
|
||||||
|
* @var string document type
|
||||||
|
*/
|
||||||
|
public $type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array() Minimum version of PHP required by module.
|
||||||
|
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||||
|
*/
|
||||||
|
public $phpmin = array(5, 2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dolibarr version of the loaded document
|
||||||
|
* @public string
|
||||||
|
*/
|
||||||
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int page_largeur
|
||||||
|
*/
|
||||||
|
public $page_largeur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int page_hauteur
|
||||||
|
*/
|
||||||
|
public $page_hauteur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array format
|
||||||
|
*/
|
||||||
|
public $format;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_gauche
|
||||||
|
*/
|
||||||
|
public $marge_gauche;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_droite
|
||||||
|
*/
|
||||||
|
public $marge_droite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_haute
|
||||||
|
*/
|
||||||
|
public $marge_haute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int marge_basse
|
||||||
|
*/
|
||||||
|
public $marge_basse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuer
|
||||||
|
* @var Societe
|
||||||
|
*/
|
||||||
|
public $emetteur;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,9 +117,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
// Translations
|
// Translations
|
||||||
$langs->loadLangs(array("main", "bills"));
|
$langs->loadLangs(array("main", "bills"));
|
||||||
@ -147,12 +202,8 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
// 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");
|
// Translations
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
$outputlangs->load("supplier_proposal");
|
|
||||||
$outputlangs->load("products");
|
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
@ -1189,10 +1240,8 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Translations
|
||||||
$outputlangs->load("bills");
|
$outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies"));
|
||||||
$outputlangs->load("supplier_proposal");
|
|
||||||
$outputlangs->load("companies");
|
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user