Standardize and update code
This commit is contained in:
parent
d021a3d5af
commit
73d161833a
@ -50,7 +50,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("main","companies"));
|
$langs->loadLangs(array("main","companies"));
|
||||||
@ -222,7 +222,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
global $user, $langs, $conf, $mysoc, $hookmanager;
|
||||||
|
|
||||||
if (empty($srctemplatepath))
|
if (empty($srctemplatepath))
|
||||||
{
|
{
|
||||||
@ -243,10 +243,8 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
$sav_charset_output=$outputlangs->charset_output;
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
$outputlangs->charset_output='UTF-8';
|
$outputlangs->charset_output='UTF-8';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
// Load translation files required by the page
|
||||||
$outputlangs->load("dict");
|
$outputlangs->loadLangs(array("main", "companies", "bills", "dict"));
|
||||||
$outputlangs->load("companies");
|
|
||||||
$outputlangs->load("bills");
|
|
||||||
|
|
||||||
if ($conf->supplier_proposal->dir_output)
|
if ($conf->supplier_proposal->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user