Merge pull request #9547 from grandoc/new_branch_17_09_2018
Standardize and update code
This commit is contained in:
commit
fa61ebeb9d
@ -430,8 +430,9 @@ class ChargeSociales extends CommonObject
|
|||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('customers');
|
|
||||||
$langs->load('bills');
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("customers","bills"));
|
||||||
|
|
||||||
if ($mode == 0 || $mode == 1)
|
if ($mode == 0 || $mode == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1149,8 +1149,8 @@ class FormOther
|
|||||||
|
|
||||||
if ($nbboxactivated)
|
if ($nbboxactivated)
|
||||||
{
|
{
|
||||||
$langs->load("boxes");
|
// Load translation files required by the page
|
||||||
$langs->load("projects");
|
$langs->loadLangs(array("boxes","projects"));
|
||||||
|
|
||||||
$emptybox=new ModeleBoxes($db);
|
$emptybox=new ModeleBoxes($db);
|
||||||
|
|
||||||
|
|||||||
@ -101,9 +101,8 @@ class FormSms
|
|||||||
|
|
||||||
if (! is_object($form)) $form=new Form($this->db);
|
if (! is_object($form)) $form=new Form($this->db);
|
||||||
|
|
||||||
$langs->load("other");
|
// Load translation files required by the page
|
||||||
$langs->load("mails");
|
$langs->loadLangs(array('other', 'mails', 'sms'));
|
||||||
$langs->load("sms");
|
|
||||||
|
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
if (!empty($this->withtosocid) && $this->withtosocid > 0)
|
if (!empty($this->withtosocid) && $this->withtosocid > 0)
|
||||||
|
|||||||
@ -98,8 +98,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array('companies', 'errors'));
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
|
|
||||||
|
|||||||
@ -97,8 +97,8 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array('companies', 'errors'));
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
|
|
||||||
|
|||||||
@ -95,8 +95,8 @@ class doc_generic_user_odt extends ModelePDFUser
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array('companies', 'errors'));
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
|
|
||||||
|
|||||||
@ -37,10 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
|
|||||||
*/
|
*/
|
||||||
class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||||
{
|
{
|
||||||
var $emetteur; // Objet societe qui emet
|
public $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
var $phpmin = array(5,2,0); // Minimum version of PHP required by module
|
public $phpmin = array(5,4,0); // Minimum version of PHP required by module
|
||||||
var $version = 'dolibarr';
|
public $version = 'dolibarr';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,8 +52,8 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array('companies', 'main'));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "ODT templates";
|
$this->name = "ODT templates";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user