forked from Wavyzz/dolibarr
add visibility
This commit is contained in:
@@ -50,7 +50,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
@@ -90,7 +90,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
@@ -98,7 +98,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs)
|
||||
public function write_file($object, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user;
|
||||
@@ -288,7 +288,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
* @param int $hidebottom Hide bottom bar of array
|
||||
* @return void
|
||||
*/
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
{
|
||||
global $conf,$mysoc;
|
||||
|
||||
@@ -304,7 +304,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
@@ -390,7 +390,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return integer
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
|
||||
@@ -52,7 +52,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
@@ -92,7 +92,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
@@ -105,7 +105,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param null|array $moreparams More parameters
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user, $mysoc;
|
||||
@@ -435,7 +435,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param int $hidebottom Hide bottom bar of array
|
||||
* @return void
|
||||
*/
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
{
|
||||
global $conf,$mysoc;
|
||||
|
||||
@@ -443,7 +443,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -453,7 +453,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
private function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $mysoc;
|
||||
@@ -480,7 +480,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show area for the customer to sign
|
||||
*
|
||||
@@ -490,7 +490,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
function _signature_area(&$pdf, $object, $posy, $outputlangs)
|
||||
private function _signature_area(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
@@ -531,7 +531,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
@@ -623,7 +623,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return integer
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -45,7 +45,7 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
@@ -63,7 +63,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
@@ -108,7 +108,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Description
|
||||
*/
|
||||
function info($langs)
|
||||
public function info($langs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@@ -191,9 +191,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
* @param Commande $object Object source to build document
|
||||
* @param Translate $outputlangs Lang output object
|
||||
@@ -203,7 +203,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
@@ -338,7 +338,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->commande->dir_temp,
|
||||
|
||||
@@ -64,7 +64,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
@@ -109,7 +109,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Description
|
||||
*/
|
||||
function info($langs)
|
||||
public function info($langs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@@ -191,7 +191,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -203,7 +203,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
@@ -337,7 +337,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->expedition->dir_temp,
|
||||
|
||||
@@ -867,7 +867,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
@@ -1107,15 +1107,15 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
}
|
||||
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
|
||||
@@ -57,7 +57,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -93,7 +93,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
@@ -119,7 +119,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
* @param Object $shipment Shipment object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc, $shipment)
|
||||
public function getNextValue($objsoc, $shipment)
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
@@ -140,7 +140,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
return $numFinal;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -148,7 +148,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
* @param Object $objforref Shipment object
|
||||
* @return string Next free value
|
||||
*/
|
||||
function expedition_get_num($objsoc, $objforref)
|
||||
public function expedition_get_num($objsoc, $objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $objforref);
|
||||
|
||||
@@ -59,7 +59,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
||||
@@ -71,7 +71,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
return $this->prefix."0501-0001";
|
||||
}
|
||||
@@ -82,7 +82,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
*
|
||||
* @return boolean false if conflit, true if ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
public function canBeActivated()
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
|
||||
@@ -117,7 +117,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
* @param Object $shipment Shipment object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc, $shipment)
|
||||
public function getNextValue($objsoc, $shipment)
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
@@ -150,7 +150,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
return $this->prefix.$yymm."-".$num;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -158,7 +158,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
* @param Object $objforref Shipment object
|
||||
* @return string Next free value
|
||||
*/
|
||||
function expedition_get_num($objsoc, $objforref)
|
||||
public function expedition_get_num($objsoc, $objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $objforref);
|
||||
|
||||
@@ -42,7 +42,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation models
|
||||
*
|
||||
@@ -50,7 +50,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -80,7 +80,7 @@ abstract class ModelNumRefExpedition
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ abstract class ModelNumRefExpedition
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("sendings");
|
||||
@@ -102,7 +102,7 @@ abstract class ModelNumRefExpedition
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("sendings");
|
||||
@@ -114,7 +114,7 @@ abstract class ModelNumRefExpedition
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ abstract class ModelNumRefExpedition
|
||||
* @param Object $shipment Shipment object
|
||||
* @return string Value
|
||||
*/
|
||||
function getNextValue($objsoc, $shipment)
|
||||
public function getNextValue($objsoc, $shipment)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
@@ -137,7 +137,7 @@ abstract class ModelNumRefExpedition
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
function getVersion()
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
@@ -114,13 +114,13 @@ class pdf_standard extends ModeleExpenseReport
|
||||
public $emetteur;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
// Translations
|
||||
@@ -192,7 +192,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -204,7 +204,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager;
|
||||
@@ -450,8 +450,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
}
|
||||
|
||||
// Show square
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
if ($pagenb == 1) {
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
}
|
||||
@@ -625,7 +624,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
@@ -770,8 +769,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->MultiCell(96, 4, $outputlangs->transnoentities("DateCreation")." : ".dol_print_date($object->date_create, "day", false, $outputlangs), 0, 'L');
|
||||
}
|
||||
|
||||
if ($object->fk_statut==99)
|
||||
{
|
||||
if ($object->fk_statut==99) {
|
||||
if ($object->fk_user_refuse > 0) {
|
||||
$userfee=new User($this->db);
|
||||
$userfee->fetch($object->fk_user_refuse); $posy+=6;
|
||||
@@ -840,7 +838,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
* @param string $currency Currency code
|
||||
* @return void
|
||||
*/
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
|
||||
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -1054,15 +1052,15 @@ class pdf_standard extends ModeleExpenseReport
|
||||
}
|
||||
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails = $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
|
||||
@@ -59,10 +59,10 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return string Text with description
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
||||
global $langs;
|
||||
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
return $this->prefix."0501-0001";
|
||||
}
|
||||
@@ -83,7 +83,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
public function canBeActivated()
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
|
||||
@@ -117,7 +117,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
function getNextValue($object)
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $db, $conf, $langs;
|
||||
|
||||
@@ -99,7 +99,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
global $db, $conf,$langs,$user;
|
||||
|
||||
@@ -116,15 +116,15 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
|
||||
return $numExample;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
function getNextValue($object)
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $db,$conf;
|
||||
global $db,$conf;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
||||
|
||||
@@ -154,5 +154,5 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
|
||||
$numFinal=get_next_value($db, $mask, 'expensereport', 'ref', '', null, $date, 'next', true, $fuser);
|
||||
|
||||
return $numFinal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active models generation
|
||||
*
|
||||
@@ -37,7 +37,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -52,7 +52,6 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* expensereport_pdf_create
|
||||
*
|
||||
@@ -68,8 +67,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
*/
|
||||
function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +87,7 @@ abstract class ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -99,7 +97,7 @@ abstract class ModeleNumRefExpenseReport
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("orders");
|
||||
@@ -140,20 +138,20 @@ abstract class ModeleNumRefExpenseReport
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of the numbering module
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
/**
|
||||
* Returns the version of the numbering module
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
if ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
if ($this->version) return $this->version;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
elseif ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
elseif ($this->version) return $this->version;
|
||||
else return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class ImportCsv extends ModeleImports
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $datatoimport String code describing import set (ex: 'societe_1')
|
||||
*/
|
||||
function __construct($db, $datatoimport)
|
||||
public function __construct($db, $datatoimport)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$this->db = $db;
|
||||
@@ -118,20 +118,20 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output header of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
function write_header_example($outputlangs)
|
||||
public function write_header_example($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output title line of an example file for this format
|
||||
*
|
||||
@@ -139,14 +139,14 @@ class ImportCsv extends ModeleImports
|
||||
* @param array $headerlinefields Array of fields name
|
||||
* @return string
|
||||
*/
|
||||
function write_title_example($outputlangs, $headerlinefields)
|
||||
public function write_title_example($outputlangs, $headerlinefields)
|
||||
{
|
||||
// phpcs:enable
|
||||
$s=join($this->separator, array_map('cleansep', $headerlinefields));
|
||||
return $s."\n";
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output record of an example file for this format
|
||||
*
|
||||
@@ -154,21 +154,21 @@ class ImportCsv extends ModeleImports
|
||||
* @param array $contentlinevalues Array of lines
|
||||
* @return string
|
||||
*/
|
||||
function write_record_example($outputlangs, $contentlinevalues)
|
||||
public function write_record_example($outputlangs, $contentlinevalues)
|
||||
{
|
||||
// phpcs:enable
|
||||
$s=join($this->separator, array_map('cleansep', $contentlinevalues));
|
||||
return $s."\n";
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output footer of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
function write_footer_example($outputlangs)
|
||||
public function write_footer_example($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return '';
|
||||
@@ -176,14 +176,14 @@ class ImportCsv extends ModeleImports
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Open input file
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
function import_open_file($file)
|
||||
public function import_open_file($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
@@ -209,40 +209,40 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return nb of records. File must be closed.
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
function import_get_nb_of_lines($file)
|
||||
public function import_get_nb_of_lines($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
return dol_count_nb_of_line($file);
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Input header line from file
|
||||
*
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
function import_read_header()
|
||||
public function import_read_header()
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return array of next record in input file.
|
||||
*
|
||||
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
|
||||
*/
|
||||
function import_read_record()
|
||||
public function import_read_record()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -293,13 +293,13 @@ class ImportCsv extends ModeleImports
|
||||
return $newarrayres;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Close file handle
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
function import_close_file()
|
||||
public function import_close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
fclose($this->handle);
|
||||
@@ -307,7 +307,7 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Insert a record into database
|
||||
*
|
||||
@@ -319,7 +319,7 @@ class ImportCsv extends ModeleImports
|
||||
* @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys)
|
||||
public function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs,$conf,$user;
|
||||
|
||||
@@ -95,7 +95,7 @@ class ImportXlsx extends ModeleImports
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $datatoimport String code describing import set (ex: 'societe_1')
|
||||
*/
|
||||
function __construct($db, $datatoimport)
|
||||
public function __construct($db, $datatoimport)
|
||||
{
|
||||
global $conf,$langs;
|
||||
$this->db = $db;
|
||||
@@ -125,14 +125,14 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output header of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
function write_header_example($outputlangs)
|
||||
public function write_header_example($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs;
|
||||
@@ -158,7 +158,7 @@ class ImportXlsx extends ModeleImports
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output title line of an example file for this format
|
||||
*
|
||||
@@ -166,7 +166,7 @@ class ImportXlsx extends ModeleImports
|
||||
* @param array $headerlinefields Array of fields name
|
||||
* @return string
|
||||
*/
|
||||
function write_title_example($outputlangs, $headerlinefields)
|
||||
public function write_title_example($outputlangs, $headerlinefields)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -184,7 +184,7 @@ class ImportXlsx extends ModeleImports
|
||||
return ''; // final output will be generated in footer
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output record of an example file for this format
|
||||
*
|
||||
@@ -192,7 +192,7 @@ class ImportXlsx extends ModeleImports
|
||||
* @param array $contentlinevalues Array of lines
|
||||
* @return string
|
||||
*/
|
||||
function write_record_example($outputlangs, $contentlinevalues)
|
||||
public function write_record_example($outputlangs, $contentlinevalues)
|
||||
{
|
||||
// phpcs:enable
|
||||
$col = 0;
|
||||
@@ -205,14 +205,14 @@ class ImportXlsx extends ModeleImports
|
||||
return ''; // final output will be generated in footer
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Output footer of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
function write_footer_example($outputlangs)
|
||||
public function write_footer_example($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
// return the file content as a string
|
||||
@@ -229,14 +229,14 @@ class ImportXlsx extends ModeleImports
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Open input file
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
function import_open_file($file)
|
||||
public function import_open_file($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
@@ -253,14 +253,14 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return nb of records. File must be closed.
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
function import_get_nb_of_lines($file)
|
||||
public function import_get_nb_of_lines($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
$reader = new PHPExcel_Reader_Excel2007();
|
||||
@@ -275,13 +275,13 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Input header line from file
|
||||
*
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
function import_read_header()
|
||||
public function import_read_header()
|
||||
{
|
||||
// phpcs:enable
|
||||
// This is not called by the import code !!!
|
||||
@@ -294,13 +294,13 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return array of next record in input file.
|
||||
*
|
||||
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
|
||||
*/
|
||||
function import_read_record()
|
||||
public function import_read_record()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -319,13 +319,13 @@ class ImportXlsx extends ModeleImports
|
||||
return $array;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Close file handle
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
function import_close_file()
|
||||
public function import_close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->workbook->disconnectWorksheets();
|
||||
@@ -334,7 +334,7 @@ class ImportXlsx extends ModeleImports
|
||||
|
||||
|
||||
// What is this doing here ? it is common to all imports, is should be in the parent class
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Insert a record into database
|
||||
*
|
||||
@@ -346,7 +346,7 @@ class ImportXlsx extends ModeleImports
|
||||
* @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys)
|
||||
public function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs,$conf,$user;
|
||||
|
||||
@@ -79,7 +79,7 @@ class ModeleImports
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class ModeleImports
|
||||
*
|
||||
* @return string Id
|
||||
*/
|
||||
function getDriverId()
|
||||
public function getDriverId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class ModeleImports
|
||||
*
|
||||
* @return string Label
|
||||
*/
|
||||
function getDriverLabel()
|
||||
public function getDriverLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class ModeleImports
|
||||
*
|
||||
* @return string Description
|
||||
*/
|
||||
function getDriverDesc()
|
||||
public function getDriverDesc()
|
||||
{
|
||||
return $this->desc;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ class ModeleImports
|
||||
*
|
||||
* @return string Driver suffix
|
||||
*/
|
||||
function getDriverExtension()
|
||||
public function getDriverExtension()
|
||||
{
|
||||
return $this->extension;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ class ModeleImports
|
||||
*
|
||||
* @return string Driver version
|
||||
*/
|
||||
function getDriverVersion()
|
||||
public function getDriverVersion()
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class ModeleImports
|
||||
*
|
||||
* @return string Label of external lib
|
||||
*/
|
||||
function getLibLabel()
|
||||
public function getLibLabel()
|
||||
{
|
||||
return $this->label_lib;
|
||||
}
|
||||
@@ -149,13 +149,13 @@ class ModeleImports
|
||||
*
|
||||
* @return string Version of external lib
|
||||
*/
|
||||
function getLibVersion()
|
||||
public function getLibVersion()
|
||||
{
|
||||
return $this->version_lib;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Charge en memoire et renvoie la liste des modeles actifs
|
||||
*
|
||||
@@ -163,7 +163,7 @@ class ModeleImports
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
function liste_modeles($db, $maxfilenamelength = 0)
|
||||
public function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(get_class($this)."::liste_modeles");
|
||||
@@ -213,7 +213,7 @@ class ModeleImports
|
||||
* @param string $key Key
|
||||
* @return string
|
||||
*/
|
||||
function getPictoForKey($key)
|
||||
public function getPictoForKey($key)
|
||||
{
|
||||
return $this->picto[$key];
|
||||
}
|
||||
@@ -224,7 +224,7 @@ class ModeleImports
|
||||
* @param string $key Key
|
||||
* @return string
|
||||
*/
|
||||
function getDriverLabelForKey($key)
|
||||
public function getDriverLabelForKey($key)
|
||||
{
|
||||
return $this->driverlabel[$key];
|
||||
}
|
||||
@@ -235,7 +235,7 @@ class ModeleImports
|
||||
* @param string $key Key
|
||||
* @return string
|
||||
*/
|
||||
function getDriverDescForKey($key)
|
||||
public function getDriverDescForKey($key)
|
||||
{
|
||||
return $this->driverdesc[$key];
|
||||
}
|
||||
@@ -246,7 +246,7 @@ class ModeleImports
|
||||
* @param string $key Key
|
||||
* @return string
|
||||
*/
|
||||
function getDriverVersionForKey($key)
|
||||
public function getDriverVersionForKey($key)
|
||||
{
|
||||
return $this->driverversion[$key];
|
||||
}
|
||||
@@ -257,7 +257,7 @@ class ModeleImports
|
||||
* @param string $key Key
|
||||
* @return string
|
||||
*/
|
||||
function getLibLabelForKey($key)
|
||||
public function getLibLabelForKey($key)
|
||||
{
|
||||
return $this->liblabel[$key];
|
||||
}
|
||||
@@ -268,7 +268,7 @@ class ModeleImports
|
||||
* @param string $key Key
|
||||
* @return string
|
||||
*/
|
||||
function getLibVersionForKey($key)
|
||||
public function getLibVersionForKey($key)
|
||||
{
|
||||
return $this->libversion[$key];
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
@@ -174,20 +174,20 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
* @param Object $object Object to generate
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @param int $hidedetails Do not show line details
|
||||
* @param int $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @param Object $object Object to generate
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @param int $hidedetails Do not show line details
|
||||
* @param int $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
@@ -637,7 +637,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -647,7 +647,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
private function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
@@ -678,7 +678,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
* @param int $hidebottom Hide bottom bar of array
|
||||
* @return void
|
||||
*/
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
|
||||
{
|
||||
global $conf,$mysoc;
|
||||
|
||||
@@ -740,7 +740,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
|
||||
@@ -910,18 +910,18 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
return pdf_pagefoot($pdf, $outputlangs, 'DELIVERY_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
||||
@@ -76,7 +76,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
return $this->prefix."0501-0001";
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
public function canBeActivated()
|
||||
{
|
||||
global $langs,$conf,$db;
|
||||
|
||||
@@ -125,7 +125,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc, $object)
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
@@ -138,8 +138,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
|
||||
$resql=$db->query($sql);
|
||||
dol_syslog("mod_livraison_jade::getNextValue", LOG_DEBUG);
|
||||
if ($resql)
|
||||
{
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj) $max = intval($obj->max);
|
||||
else $max=0;
|
||||
@@ -161,15 +160,15 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free ref
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object livraison
|
||||
* @return string Texte descriptif
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return next free ref
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object livraison
|
||||
* @return string Texte descriptif
|
||||
*/
|
||||
function livraison_get_num($objsoc = 0, $object = '')
|
||||
public function livraison_get_num($objsoc = 0, $object = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $object);
|
||||
|
||||
@@ -60,8 +60,8 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
public function info()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("bills");
|
||||
@@ -100,7 +100,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
@@ -124,7 +124,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
* @param Object $object Object delivery
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc, $object)
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
@@ -152,13 +152,13 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
function getNumRef($objsoc, $objforref)
|
||||
public function getNumRef($objsoc, $objforref)
|
||||
{
|
||||
return $this->getNextValue($objsoc, $objforref);
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return next free ref
|
||||
*
|
||||
@@ -166,7 +166,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
* @param Object $object Objet livraison
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function livraison_get_num($objsoc = 0, $object = '')
|
||||
public function livraison_get_num($objsoc = 0, $object = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $object);
|
||||
|
||||
@@ -36,119 +36,119 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
* @return array List of templates
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
global $conf;
|
||||
|
||||
$type='delivery';
|
||||
$liste=array();
|
||||
$type='delivery';
|
||||
$liste=array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$liste=getListOfModels($db, $type, $maxfilenamelength);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$liste=getListOfModels($db, $type, $maxfilenamelength);
|
||||
|
||||
return $liste;
|
||||
}
|
||||
return $liste;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefDeliveryOrder
|
||||
* \brief Classe mere des modeles de numerotation des references de bon de livraison
|
||||
* \class ModeleNumRefDeliveryOrder
|
||||
* \brief Classe mere des modeles de numerotation des references de bon de livraison
|
||||
*/
|
||||
abstract class ModeleNumRefDeliveryOrder
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi la description par defaut du modele de numerotation
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("deliveries");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
/**
|
||||
* Renvoi la description par defaut du modele de numerotation
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("deliveries");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("deliveries");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("deliveries");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas d
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas d
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object delivery
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object delivery
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
if ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
if ($this->version) return $this->version;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
elseif ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
elseif ($this->version) return $this->version;
|
||||
else return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,12 +32,12 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
||||
*/
|
||||
class mailing_contacts1 extends MailingTargets
|
||||
{
|
||||
var $name='ContactCompanies'; // Identifiant du module mailing
|
||||
public $name='ContactCompanies'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='Contacts of thirdparties (prospects, customers, suppliers...)';
|
||||
var $require_module=array("societe"); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
var $picto='contact';
|
||||
public $desc='Contacts of thirdparties (prospects, customers, suppliers...)';
|
||||
public $require_module=array("societe"); // Module mailing actif si modules require_module actifs
|
||||
public $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
public $picto='contact';
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
@@ -45,15 +45,15 @@ class mailing_contacts1 extends MailingTargets
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -64,8 +64,8 @@ class mailing_contacts1 extends MailingTargets
|
||||
*
|
||||
* @return string[] Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
{
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("commercial");
|
||||
@@ -80,7 +80,7 @@ class mailing_contacts1 extends MailingTargets
|
||||
$statssql[0].= " AND c.statut = 1";
|
||||
|
||||
return $statssql;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -91,8 +91,8 @@ class mailing_contacts1 extends MailingTargets
|
||||
* @param string $sql Requete sql de comptage
|
||||
* @return int
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
{
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT count(distinct(c.email)) as nb";
|
||||
@@ -105,7 +105,7 @@ class mailing_contacts1 extends MailingTargets
|
||||
|
||||
// The request must return a field called "nb" to be understandable by parent::getNbOfRecipients
|
||||
return parent::getNbOfRecipients($sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -113,8 +113,8 @@ class mailing_contacts1 extends MailingTargets
|
||||
*
|
||||
* @return string Retourne zone select
|
||||
*/
|
||||
function formFilter()
|
||||
{
|
||||
public function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
// Load translation files required by the page
|
||||
@@ -311,7 +311,7 @@ class mailing_contacts1 extends MailingTargets
|
||||
$s.='</select>';
|
||||
|
||||
return $s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -320,21 +320,21 @@ class mailing_contacts1 extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url lien
|
||||
*/
|
||||
function url($id)
|
||||
{
|
||||
return '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$id.'">'.img_object('', "contact").'</a>';
|
||||
}
|
||||
public function url($id)
|
||||
{
|
||||
return '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$id.'">'.img_object('', "contact").'</a>';
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int <0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
{
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -448,5 +448,5 @@ class mailing_contacts1 extends MailingTargets
|
||||
}
|
||||
|
||||
return parent::add_to_target($mailing_id, $cibles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,17 +26,17 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
||||
class mailing_example extends MailingTargets
|
||||
{
|
||||
// CHANGE THIS: Put here a name not already used
|
||||
var $name='example';
|
||||
public $name='example';
|
||||
// CHANGE THIS: Put here a description of your selector module.
|
||||
// This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='Put here a description';
|
||||
// CHANGE THIS: Set to 1 if selector is available for admin users only
|
||||
var $require_admin=0;
|
||||
public $desc='Put here a description';
|
||||
// CHANGE THIS: Set to 1 if selector is available for admin users only
|
||||
public $require_admin=0;
|
||||
// CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector
|
||||
var $tooltip='MyTooltipLangKey';
|
||||
public $tooltip='MyTooltipLangKey';
|
||||
|
||||
var $require_module=array();
|
||||
var $picto='';
|
||||
public $require_module=array();
|
||||
public $picto='';
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
@@ -50,20 +50,20 @@ class mailing_example extends MailingTargets
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
* @param int $mailing_id Id of mailing. No need to use it.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$target = array();
|
||||
@@ -92,7 +92,7 @@ class mailing_example extends MailingTargets
|
||||
*
|
||||
* @return array Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
@@ -103,14 +103,14 @@ class mailing_example extends MailingTargets
|
||||
|
||||
|
||||
/**
|
||||
* Return here number of distinct emails returned by your selector.
|
||||
* For example if this selector is used to extract 500 different
|
||||
* emails from a text file, this function must return 500.
|
||||
* Return here number of distinct emails returned by your selector.
|
||||
* For example if this selector is used to extract 500 different
|
||||
* emails from a text file, this function must return 500.
|
||||
*
|
||||
* @param string $sql Requete sql de comptage
|
||||
* @return int|string Number of recipient or '?'
|
||||
* @return int|string Number of recipient or '?'
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
@@ -121,11 +121,11 @@ class mailing_example extends MailingTargets
|
||||
|
||||
/**
|
||||
* This is to add a form filter to provide variant of selector
|
||||
* If used, the HTML select must be called "filter"
|
||||
* If used, the HTML select must be called "filter"
|
||||
*
|
||||
* @return string A html select zone
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
@@ -141,7 +141,7 @@ class mailing_example extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url link
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
|
||||
@@ -33,14 +33,14 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
*/
|
||||
class mailing_fraise extends MailingTargets
|
||||
{
|
||||
var $name='FundationMembers'; // Identifiant du module mailing
|
||||
public $name='FundationMembers'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='Foundation members with emails';
|
||||
public $desc='Foundation members with emails';
|
||||
// Set to 1 if selector is available for admin users only
|
||||
var $require_admin=0;
|
||||
public $require_admin=0;
|
||||
|
||||
var $require_module=array('adherent');
|
||||
var $picto='user';
|
||||
public $require_module=array('adherent');
|
||||
public $picto='user';
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
@@ -52,7 +52,7 @@ class mailing_fraise extends MailingTargets
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ class mailing_fraise extends MailingTargets
|
||||
*
|
||||
* @return string[] Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -90,7 +90,7 @@ class mailing_fraise extends MailingTargets
|
||||
* @param string $sql Requete sql de comptage
|
||||
* @return int Nb of recipients
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
$sql = "SELECT count(distinct(a.email)) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||
@@ -107,7 +107,7 @@ class mailing_fraise extends MailingTargets
|
||||
*
|
||||
* @return string Retourne zone select
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -214,20 +214,20 @@ class mailing_fraise extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url lien
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
return '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$id.'">'.img_object('', "user").'</a>';
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs,$_POST;
|
||||
|
||||
@@ -49,7 +49,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
*
|
||||
* @return string Return translation of module label. Try translation of $this->name then translation of 'MailingModuleDesc'.$this->name, or $this->desc if not found
|
||||
*/
|
||||
function getDesc()
|
||||
public function getDesc()
|
||||
{
|
||||
global $langs, $form;
|
||||
|
||||
@@ -80,7 +80,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
*
|
||||
* @return integer Example
|
||||
*/
|
||||
function getNbOfRecords()
|
||||
public function getNbOfRecords()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
* @param string $sql Sql request to count
|
||||
* @return int Nb of recipient, or <0 if error
|
||||
*/
|
||||
function getNbOfRecipients($sql)
|
||||
public function getNbOfRecipients($sql)
|
||||
{
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
@@ -112,19 +112,19 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
*
|
||||
* @return string Retourne zone select
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Met a jour nombre de destinataires
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int < 0 si erreur, nb destinataires si ok
|
||||
*/
|
||||
function update_nb($mailing_id)
|
||||
public function update_nb($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Mise a jour nombre de destinataire dans table des mailings
|
||||
@@ -151,7 +151,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
return $nb;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
@@ -159,7 +159,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
* @param array $cibles Array with targets
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id, $cibles)
|
||||
public function add_to_target($mailing_id, $cibles)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -247,14 +247,14 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
return $j;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Supprime tous les destinataires de la table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return void
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return void
|
||||
*/
|
||||
function clear_target($mailing_id)
|
||||
public function clear_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
|
||||
@@ -30,12 +30,12 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
||||
*/
|
||||
class mailing_pomme extends MailingTargets
|
||||
{
|
||||
var $name='DolibarrUsers'; // Identifiant du module mailing
|
||||
public $name='DolibarrUsers'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
var $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=1; // Module mailing actif pour user admin ou non
|
||||
var $picto='user';
|
||||
public $desc='Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
public $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
public $require_admin=1; // Module mailing actif pour user admin ou non
|
||||
public $picto='user';
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
@@ -48,7 +48,7 @@ class mailing_pomme extends MailingTargets
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class mailing_pomme extends MailingTargets
|
||||
*
|
||||
* @return string[] Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -88,7 +88,7 @@ class mailing_pomme extends MailingTargets
|
||||
* @param string $sql SQL request to use to count
|
||||
* @return int Number of recipients
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -108,7 +108,7 @@ class mailing_pomme extends MailingTargets
|
||||
*
|
||||
* @return string Retourne zone select
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -140,20 +140,20 @@ class mailing_pomme extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url lien
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
return '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$id.'">'.img_object('', "user").'</a>';
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
@@ -191,17 +191,17 @@ class mailing_pomme extends MailingTargets
|
||||
if ($old <> $obj->email)
|
||||
{
|
||||
$cibles[$j] = array(
|
||||
'email' => $obj->email,
|
||||
'fk_contact' => $obj->fk_contact,
|
||||
'lastname' => $obj->lastname,
|
||||
'firstname' => $obj->firstname,
|
||||
'other' =>
|
||||
($langs->transnoentities("Login").'='.$obj->login).';'.
|
||||
($langs->transnoentities("UserTitle").'='.$obj->civility_id).';'.
|
||||
($langs->transnoentities("PhonePro").'='.$obj->office_phone),
|
||||
'source_url' => $this->url($obj->id),
|
||||
'source_id' => $obj->id,
|
||||
'source_type' => 'user'
|
||||
'email' => $obj->email,
|
||||
'fk_contact' => $obj->fk_contact,
|
||||
'lastname' => $obj->lastname,
|
||||
'firstname' => $obj->firstname,
|
||||
'other' =>
|
||||
($langs->transnoentities("Login").'='.$obj->login).';'.
|
||||
($langs->transnoentities("UserTitle").'='.$obj->civility_id).';'.
|
||||
($langs->transnoentities("PhonePro").'='.$obj->office_phone),
|
||||
'source_url' => $this->url($obj->id),
|
||||
'source_id' => $obj->id,
|
||||
'source_type' => 'user'
|
||||
);
|
||||
$old = $obj->email;
|
||||
$j++;
|
||||
@@ -218,5 +218,5 @@ class mailing_pomme extends MailingTargets
|
||||
}
|
||||
|
||||
return parent::add_to_target($mailing_id, $cibles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
||||
*/
|
||||
class mailing_thirdparties extends MailingTargets
|
||||
{
|
||||
var $name='ThirdPartiesByCategories';
|
||||
public $name='ThirdPartiesByCategories';
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc="Third parties (by categories)";
|
||||
var $require_admin=0;
|
||||
public $desc="Third parties (by categories)";
|
||||
public $require_admin=0;
|
||||
|
||||
var $require_module=array("societe"); // This module allows to select by categories must be also enabled if category module is not activated
|
||||
var $picto='company';
|
||||
public $require_module=array("societe"); // This module allows to select by categories must be also enabled if category module is not activated
|
||||
public $picto='company';
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
@@ -43,7 +43,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$langs->load("companies");
|
||||
@@ -52,14 +52,14 @@ class mailing_thirdparties extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
* @param int $mailing_id Id of mailing. No need to use it.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
@@ -200,7 +200,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
*
|
||||
* @return array Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
@@ -218,7 +218,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
* @param string $sql Requete sql de comptage
|
||||
* @return int Nb of recipients
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -238,7 +238,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
*
|
||||
* @return string A html select zone
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -319,7 +319,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url link
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
return '<a href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$id.'">'.img_object('', "company").'</a>';
|
||||
}
|
||||
|
||||
@@ -22,20 +22,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
*/
|
||||
class mailing_thirdparties_services_expired extends MailingTargets
|
||||
{
|
||||
var $name='DolibarrContractsLinesExpired';
|
||||
public $name='DolibarrContractsLinesExpired';
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='Third parties with expired contract\'s lines';
|
||||
var $require_admin=0;
|
||||
public $desc='Third parties with expired contract\'s lines';
|
||||
public $require_admin=0;
|
||||
|
||||
var $require_module=array('contrat');
|
||||
var $picto='company';
|
||||
public $require_module=array('contrat');
|
||||
public $picto='company';
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
var $arrayofproducts=array();
|
||||
public $arrayofproducts=array();
|
||||
|
||||
|
||||
/**
|
||||
@@ -43,7 +43,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -77,14 +77,14 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
* @param int $mailing_id Id of mailing. No need to use it.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$key=GETPOST('filter', 'int');
|
||||
@@ -171,7 +171,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
*
|
||||
* @return array Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
|
||||
//var $statssql=array();
|
||||
@@ -189,7 +189,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
* @param string $sql SQL request to use to count
|
||||
* @return int Number of recipients
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
$now=dol_now();
|
||||
|
||||
@@ -215,7 +215,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
*
|
||||
* @return string A html select zone
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -238,7 +238,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url link
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
return '<a href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$id.'">'.img_object('', "company").'</a>';
|
||||
}
|
||||
|
||||
@@ -30,24 +30,24 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
*/
|
||||
class mailing_xinputfile extends MailingTargets
|
||||
{
|
||||
var $name='EmailsFromFile'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
var $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
var $picto='generic';
|
||||
var $tooltip='UseFormatFileEmailToTarget';
|
||||
public $name='EmailsFromFile'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
public $desc='EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
public $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
public $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
public $picto='generic';
|
||||
public $tooltip='UseFormatFileEmailToTarget';
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ class mailing_xinputfile extends MailingTargets
|
||||
*
|
||||
* @return array Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("users");
|
||||
@@ -76,7 +76,7 @@ class mailing_xinputfile extends MailingTargets
|
||||
* @param string $sql Sql request to count
|
||||
* @return string '' means NA
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
return '';
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class mailing_xinputfile extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url lien
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans('LineInFile', $id);
|
||||
@@ -101,7 +101,7 @@ class mailing_xinputfile extends MailingTargets
|
||||
*
|
||||
* @return string Retourne zone select
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -110,14 +110,14 @@ class mailing_xinputfile extends MailingTargets
|
||||
return $s;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$_FILES;
|
||||
|
||||
@@ -30,13 +30,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
*/
|
||||
class mailing_xinputuser extends MailingTargets
|
||||
{
|
||||
var $name='EmailsFromUser'; // Identifiant du module mailing
|
||||
public $name='EmailsFromUser'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
var $desc='EMails input by user'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
var $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
var $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
var $picto='generic';
|
||||
var $tooltip='UseFormatInputEmailToTarget';
|
||||
public $desc='EMails input by user'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
public $require_module=array(); // Module mailing actif si modules require_module actifs
|
||||
public $require_admin=0; // Module mailing actif pour user admin ou non
|
||||
public $picto='generic';
|
||||
public $tooltip='UseFormatInputEmailToTarget';
|
||||
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
*
|
||||
* @return array Array with SQL requests
|
||||
*/
|
||||
function getSqlArrayForStats()
|
||||
public function getSqlArrayForStats()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("users");
|
||||
@@ -76,7 +76,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
* @param string $sql Sql request to count
|
||||
* @return string '' means NA
|
||||
*/
|
||||
function getNbOfRecipients($sql = '')
|
||||
public function getNbOfRecipients($sql = '')
|
||||
{
|
||||
return '';
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
* @param int $id ID
|
||||
* @return string Url lien
|
||||
*/
|
||||
function url($id)
|
||||
public function url($id)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
*
|
||||
* @return string Retourne zone select
|
||||
*/
|
||||
function formFilter()
|
||||
public function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -108,14 +108,14 @@ class mailing_xinputuser extends MailingTargets
|
||||
return $s;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
function add_to_target($mailing_id)
|
||||
public function add_to_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$_FILES;
|
||||
|
||||
@@ -58,8 +58,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
@@ -94,18 +94,18 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
// Recupere emetteur
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default if not defined
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return description of a module
|
||||
*
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Description
|
||||
*/
|
||||
function info($langs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
/**
|
||||
* Return description of a module
|
||||
*
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Description
|
||||
*/
|
||||
public function info($langs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("errors");
|
||||
@@ -183,22 +183,22 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
$texte.= '</form>';
|
||||
|
||||
return $texte;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
* @param Reception $object Object source to build document
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @param Reception $object Object source to build document
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @param int $hidedetails Do not show line details
|
||||
* @param int $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -72,7 +72,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
*
|
||||
* @return string Text with description
|
||||
*/
|
||||
function info()
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
||||
@@ -84,7 +84,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
return $this->prefix."0501-0001";
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
public function canBeActivated()
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
|
||||
@@ -132,7 +132,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
* @param Object $object Object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc = 0, $object = '')
|
||||
public function getNextValue($objsoc = 0, $object = '')
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
@@ -163,7 +163,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Renvoie la reference de commande suivante non utilisee
|
||||
*
|
||||
@@ -171,7 +171,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
* @param Object $object Object
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function commande_get_num($objsoc = 0, $object = '')
|
||||
public function commande_get_num($objsoc = 0, $object = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $object);
|
||||
|
||||
@@ -102,7 +102,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
public function getExample()
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
@@ -125,7 +125,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
||||
* @param Object $object Object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc = 0, $object = '')
|
||||
public function getNextValue($objsoc = 0, $object = '')
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
@@ -146,7 +146,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Renvoie la reference de commande suivante non utilisee
|
||||
*
|
||||
@@ -154,7 +154,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
||||
* @param Object $object Object
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function commande_get_num($objsoc = 0, $object = '')
|
||||
public function commande_get_num($objsoc = 0, $object = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $object);
|
||||
|
||||
@@ -43,7 +43,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation models
|
||||
*
|
||||
@@ -51,7 +51,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
@@ -120,7 +120,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
@@ -197,7 +197,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -209,7 +209,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes;
|
||||
@@ -708,7 +708,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
@@ -718,13 +718,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
private function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -734,7 +734,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return integer
|
||||
*/
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
private function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@@ -789,7 +789,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
return $posy;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
@@ -800,7 +800,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
private function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
@@ -1017,7 +1017,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param string $currency Currency code
|
||||
* @return void
|
||||
*/
|
||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
|
||||
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -1126,7 +1126,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @return void
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $langs, $conf, $mysoc;
|
||||
|
||||
@@ -1363,15 +1363,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param PDF $pdf PDF
|
||||
* @param CommandeFournisseur $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
* @param PDF $pdf PDF
|
||||
* @param CommandeFournisseur $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
|
||||
@@ -1491,16 +1491,16 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
return $top_shift;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
/**
|
||||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
*/
|
||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
* @param PDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return int Return height of bottom margin including footer text
|
||||
*/
|
||||
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
global $conf;
|
||||
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
|
||||
@@ -59,7 +59,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
@@ -104,7 +104,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Description
|
||||
*/
|
||||
function info($langs)
|
||||
public function info($langs)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -203,9 +203,9 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
* @param User $object Object source to build document
|
||||
* @param Translate $outputlangs Lang output object
|
||||
@@ -215,7 +215,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs, $conf, $mysoc, $hookmanager;
|
||||
@@ -330,7 +330,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->user->dir_temp,
|
||||
@@ -439,7 +439,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* get substitution array for object
|
||||
*
|
||||
@@ -448,7 +448,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
* @param string $array_key key for array
|
||||
* @return array array of substitutions
|
||||
*/
|
||||
function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
|
||||
public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
|
||||
{
|
||||
// phpcs:enable
|
||||
$array_other = array();
|
||||
|
||||
@@ -44,7 +44,7 @@ abstract class ModelePDFUser extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -52,7 +52,7 @@ abstract class ModelePDFUser extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
@@ -62,7 +62,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
@@ -107,7 +107,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
* @param Translate $langs Lang object to use for output
|
||||
* @return string Description
|
||||
*/
|
||||
function info($langs)
|
||||
public function info($langs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@@ -206,7 +206,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -218,7 +218,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs, $conf, $mysoc, $hookmanager;
|
||||
@@ -353,7 +353,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->user->dir_temp,
|
||||
@@ -527,6 +527,6 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,30 +38,30 @@
|
||||
*/
|
||||
abstract class ModelePDFUserGroup extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
*/
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
global $conf;
|
||||
|
||||
$type = 'group';
|
||||
$list = array();
|
||||
$type = 'group';
|
||||
$list = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$list = getListOfModels($db, $type, $maxfilenamelength);
|
||||
return $list;
|
||||
}
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$list = getListOfModels($db, $type, $maxfilenamelength);
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user