mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-15 22:11:36 +01:00
Merge pull request #9387 from frederic34/camelCaps2
start changing phpcs:ignore
This commit is contained in:
@@ -999,6 +999,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create tables and keys required by module.
|
||||
* Files module.sql and module.key.sql with create table and create keys
|
||||
@@ -1008,9 +1009,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
* @param string $reldir Relative directory where to scan files
|
||||
* @return int <=0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _load_tables($reldir)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$error=0;
|
||||
@@ -1118,6 +1119,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds boxes
|
||||
*
|
||||
@@ -1125,9 +1127,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_boxes($option='')
|
||||
{
|
||||
// phpcs:enable
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
|
||||
|
||||
global $conf;
|
||||
@@ -1218,14 +1220,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes boxes
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_boxes()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1294,14 +1297,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds cronjobs
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_cronjobs()
|
||||
{
|
||||
// phpcs:enable
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
|
||||
|
||||
global $conf;
|
||||
@@ -1408,14 +1412,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes boxes
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_cronjobs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1438,14 +1443,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes tabs
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_tabs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1464,14 +1470,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds tabs
|
||||
*
|
||||
* @return int Error count (0 if ok)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_tabs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1532,14 +1539,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds constants
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_const()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1602,14 +1610,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes constants tagged 'deleteonunactive'
|
||||
*
|
||||
* @return int <0 if KO, 0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_const()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1638,6 +1647,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds access rights
|
||||
*
|
||||
@@ -1646,9 +1656,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$user;
|
||||
|
||||
$err=0;
|
||||
@@ -1794,14 +1804,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes access rights
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_permissions()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1820,14 +1831,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds menu entries
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_menus()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user;
|
||||
|
||||
if (! is_array($this->menu) || empty($this->menu)) return 0;
|
||||
@@ -1930,14 +1942,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes menu entries
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_menus()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -1960,14 +1973,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Creates directories
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function create_dirs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -2019,6 +2033,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds directories definitions
|
||||
*
|
||||
@@ -2027,9 +2042,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_dirs($name,$dir)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -2064,14 +2079,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes directories
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_dirs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
@@ -2090,14 +2106,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $err;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Adds generic parts
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function insert_module_parts()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$error=0;
|
||||
@@ -2169,14 +2186,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
return $error;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Removes generic parts
|
||||
*
|
||||
* @return int Error count (0 if OK)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function delete_module_parts()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$err=0;
|
||||
|
||||
@@ -33,16 +33,17 @@ abstract class ModeleAction extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='action';
|
||||
@@ -54,6 +55,8 @@ abstract class ModeleAction extends CommonDocGenerator
|
||||
return $liste;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create an product document on disk using template defined into PRODUCT_ADDON_PDF
|
||||
*
|
||||
@@ -66,9 +69,9 @@ abstract class ModeleAction extends CommonDocGenerator
|
||||
* @param int $hideref Hide ref
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$user;
|
||||
$langs->load("action");
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ class CommActionRapport
|
||||
$this->subject=$langs->transnoentitiesnoconv("ActionsReport").' '.$this->year."-".$this->month;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Write the object to document file to disk
|
||||
*
|
||||
@@ -101,9 +102,9 @@ class CommActionRapport
|
||||
* @param Translate $outputlangs Lang object for output language
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($socid = 0, $catid = 0, $outputlangs='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -83,6 +83,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
@@ -90,9 +91,9 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -83,8 +83,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
* @param Project $object Object project a generer
|
||||
* @param Translate $outputlangs Lang output object
|
||||
@@ -95,9 +96,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param null|array $moreparams More parameters
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user, $mysoc;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@@ -427,6 +428,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -436,10 +438,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
global $conf, $mysoc;
|
||||
// phpcs:enable
|
||||
global $conf, $mysoc;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -463,6 +465,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show area for the customer to sign
|
||||
*
|
||||
@@ -472,9 +475,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _signature_area(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
$tab_top = $posy + 4;
|
||||
$tab_hl = 4;
|
||||
|
||||
@@ -37,6 +37,7 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -44,9 +45,9 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db, $maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type = 'bankaccount';
|
||||
|
||||
@@ -223,6 +223,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return if a code is used (by other element)
|
||||
*
|
||||
@@ -231,9 +232,9 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
* @param Product $product Objet product
|
||||
* @return int 0 if available, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_dispo($db, $code, $product)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.= " WHERE barcode = '".$code."'";
|
||||
if ($product->id > 0) $sql.= " AND rowid <> ".$product->id;
|
||||
@@ -256,6 +257,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return if a barcode value match syntax
|
||||
*
|
||||
@@ -263,9 +265,9 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
||||
* @param string $typefortest Type of barcode (ISBN, EAN, ...)
|
||||
* @return int 0 if OK, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_syntax($codefortest, $typefortest)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$result = 0;
|
||||
|
||||
@@ -74,6 +74,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction to generate document on disk
|
||||
*
|
||||
@@ -83,9 +84,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @return int 1=ok, 0=ko
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object, $_dir, $number, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@@ -198,6 +199,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Generate Header
|
||||
*
|
||||
@@ -207,9 +209,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
* @param Translate $outputlangs Object language for output
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function Header(&$pdf, $page, $pages, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -305,6 +307,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output array
|
||||
*
|
||||
@@ -314,9 +317,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
* @param Translate $outputlangs Object lang
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function Body(&$pdf, $pagenb, $pages, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
// x=10 - Num
|
||||
// x=30 - Banque
|
||||
// x=100 - Emetteur
|
||||
|
||||
@@ -138,6 +138,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -145,9 +146,9 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function chequereceipt_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -131,9 +132,9 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function chequereceipt_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -134,9 +135,9 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='chequereceipt';
|
||||
|
||||
@@ -177,6 +177,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -188,9 +189,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
@@ -202,7 +202,8 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->atleastonediscount=0;
|
||||
}
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
* @param Object $object Object to generate
|
||||
@@ -213,9 +214,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@@ -644,6 +645,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
@@ -653,12 +655,13 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -668,9 +671,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -846,6 +849,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
@@ -856,9 +860,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -131,13 +131,14 @@ class mod_commande_marbre extends ModeleNumRefCommandes
|
||||
$yymm = strftime("%y%m",$date);
|
||||
|
||||
if ($max >= (pow(10, 4) - 1)) $num=$max+1; // If counter > 9999, we do not format on 4 chars, we take number as it is
|
||||
else $num = sprintf("%04s",$max+1);
|
||||
else $num = sprintf("%04s", $max+1);
|
||||
|
||||
dol_syslog("mod_commande_marbre::getNextValue return ".$this->prefix.$yymm."-".$num);
|
||||
return $this->prefix.$yymm."-".$num;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -145,9 +146,9 @@ class mod_commande_marbre extends ModeleNumRefCommandes
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function commande_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,16 +132,17 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param string $objforref Object for number to search
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function commande_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,16 +44,17 @@ abstract class ModelePDFCommandes extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db, $maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type = 'order';
|
||||
|
||||
@@ -167,6 +167,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -178,9 +179,9 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -159,7 +159,8 @@ class pdf_strato extends ModelePDFContract
|
||||
$this->posxdesc=$this->marge_gauche+1;
|
||||
}
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
* @param CommonObject $object Id of object to generate
|
||||
@@ -170,9 +171,9 @@ class pdf_strato extends ModelePDFContract
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$hookmanager,$mysoc;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -117,16 +117,17 @@ class mod_contract_magre extends ModelNumRefContracts
|
||||
return $numFinal;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next value
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Object $objforref contract object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function contract_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,16 +135,17 @@ class mod_contract_serpis extends ModelNumRefContracts
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Object $objforref contract object
|
||||
* @param Object $objforref contract object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function contract_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ abstract class ModelePDFContract extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -50,9 +51,9 @@ abstract class ModelePDFContract extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='contract';
|
||||
|
||||
@@ -64,6 +64,7 @@ class html_cerfafr extends ModeleDon
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Write the object to document file to disk
|
||||
*
|
||||
@@ -72,9 +73,9 @@ class html_cerfafr extends ModeleDon
|
||||
* @param string $currency Currency code
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($don,$outputlangs,$currency='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$mysoc;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@@ -39,16 +39,17 @@ abstract class ModeleDon extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='donation';
|
||||
|
||||
@@ -177,6 +177,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -188,9 +189,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -142,6 +142,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -153,9 +154,9 @@ class pdf_merou extends ModelePdfExpedition
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$mysoc,$hookmanager;
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
@@ -36,17 +36,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
*/
|
||||
class pdf_rouget extends ModelePdfExpedition
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
@@ -173,6 +173,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -184,9 +185,9 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$hookmanager;
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
@@ -652,6 +653,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
@@ -662,9 +664,9 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
|
||||
$sign=1;
|
||||
|
||||
@@ -121,6 +121,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
return $numFinal;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -128,9 +129,9 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
* @param Object $objforref Shipment object
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function expedition_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
return $this->prefix.$yymm."-".$num;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -140,9 +141,9 @@ class mod_expedition_safor extends ModelNumRefExpedition
|
||||
* @param Object $objforref Shipment object
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function expedition_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -49,9 +50,9 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='shipping';
|
||||
|
||||
@@ -190,7 +190,8 @@ class pdf_standard extends ModeleExpenseReport
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
* @param Object $object Object to generate
|
||||
@@ -201,9 +202,9 @@ class pdf_standard extends ModeleExpenseReport
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -29,6 +29,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -36,9 +37,9 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='expensereport';
|
||||
@@ -51,6 +52,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* expensereport_pdf_create
|
||||
*
|
||||
@@ -64,9 +66,9 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
* @param int $hideref Hide ref
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -141,7 +143,7 @@ abstract class ModeleNumRefExpenseReport
|
||||
/**
|
||||
* Renvoie version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getVersion()
|
||||
{
|
||||
|
||||
@@ -149,6 +149,7 @@ class ExportCsv extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Open output file
|
||||
*
|
||||
@@ -156,9 +157,9 @@ class ExportCsv extends ModeleExports
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function open_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
dol_syslog("ExportCsv::open_file file=".$file);
|
||||
@@ -177,19 +178,21 @@ class ExportCsv extends ModeleExports
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output header into file
|
||||
*
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_header($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output title line into file
|
||||
*
|
||||
@@ -199,9 +202,9 @@ class ExportCsv extends ModeleExports
|
||||
* @param array $array_types Array with types of fields
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
|
||||
@@ -225,7 +228,8 @@ class ExportCsv extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output record line into file
|
||||
*
|
||||
* @param array $array_selected_sorted Array with list of field to export
|
||||
@@ -234,9 +238,9 @@ class ExportCsv extends ModeleExports
|
||||
* @param array $array_types Array with types of fields
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
if (! empty($conf->global->EXPORT_CSV_FORCE_CHARSET))
|
||||
@@ -278,26 +282,28 @@ class ExportCsv extends ModeleExports
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output footer into file
|
||||
*
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_footer($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Close file handle
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
fclose($this->handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class ExportExcel extends ModeleExports
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @var string Export Excel label
|
||||
*/
|
||||
public $label;
|
||||
@@ -48,8 +48,8 @@ class ExportExcel extends ModeleExports
|
||||
public $label_lib;
|
||||
public $version_lib;
|
||||
|
||||
public $workbook; // Handle fichier
|
||||
public $worksheet; // Handle onglet
|
||||
public $workbook; // Handle file
|
||||
public $worksheet; // Handle sheet
|
||||
public $row;
|
||||
public $col;
|
||||
public $file; // To save filename
|
||||
@@ -168,6 +168,7 @@ class ExportExcel extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Open output file
|
||||
*
|
||||
@@ -175,9 +176,9 @@ class ExportExcel extends ModeleExports
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function open_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs;
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
||||
@@ -238,21 +239,23 @@ class ExportExcel extends ModeleExports
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Write header
|
||||
* Write header
|
||||
*
|
||||
* @param Translate $outputlangs Object lang to translate values
|
||||
* @param Translate $outputlangs Object lang to translate values
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_header($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
//$outputlangs->charset_output='ISO-8859-1'; // Because Excel 5 format is ISO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output title line into file
|
||||
*
|
||||
@@ -262,9 +265,9 @@ class ExportExcel extends ModeleExports
|
||||
* @param array $array_types Array with types of fields
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
// Create a format for the column headings
|
||||
@@ -309,6 +312,7 @@ class ExportExcel extends ModeleExports
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output record line into file
|
||||
*
|
||||
@@ -318,9 +322,9 @@ class ExportExcel extends ModeleExports
|
||||
* @param array $array_types Array with types of fields
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
// Create a format for the column headings
|
||||
@@ -428,27 +432,29 @@ class ExportExcel extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Write footer
|
||||
*
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_footer($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Close Excel file
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
||||
@@ -467,15 +473,16 @@ class ExportExcel extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Clean a cell to respect rules of Excel file cells
|
||||
*
|
||||
* @param string $newvalue String to clean
|
||||
* @return string Value cleaned
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function excel_clean($newvalue)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Rule Dolibarr: No HTML
|
||||
$newvalue=dol_string_nohtmltag($newvalue);
|
||||
|
||||
|
||||
@@ -98,14 +98,15 @@ class ExportExcel2007 extends ExportExcel
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close Excel file
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Close Excel file
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
||||
|
||||
@@ -145,6 +145,7 @@ class ExportTsv extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Open output file
|
||||
*
|
||||
@@ -152,14 +153,14 @@ class ExportTsv extends ModeleExports
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function open_file($file,$outputlangs)
|
||||
function open_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
dol_syslog("ExportTsv::open_file file=".$file);
|
||||
|
||||
$ret=1;
|
||||
$ret=1;
|
||||
|
||||
$outputlangs->load("exports");
|
||||
$this->handle = fopen($file, "wt");
|
||||
@@ -173,20 +174,22 @@ class ExportTsv extends ModeleExports
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output header into file
|
||||
*
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_header($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output title line into file
|
||||
*
|
||||
* @param array $array_export_fields_label Array with list of label of fields
|
||||
@@ -195,9 +198,9 @@ class ExportTsv extends ModeleExports
|
||||
* @param array $array_types Array with types of fields
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
|
||||
{
|
||||
// phpcs:enable
|
||||
foreach($array_selected_sorted as $code => $value)
|
||||
{
|
||||
$newvalue=$outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded
|
||||
@@ -210,6 +213,7 @@ class ExportTsv extends ModeleExports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output record line into file
|
||||
*
|
||||
@@ -219,9 +223,9 @@ class ExportTsv extends ModeleExports
|
||||
* @param array $array_types Array with types of fields
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$this->col=0;
|
||||
@@ -253,40 +257,43 @@ class ExportTsv extends ModeleExports
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output footer into file
|
||||
*
|
||||
* @param Translate $outputlangs Output language object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_footer($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Close file handle
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
fclose($this->handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Clean a cell to respect rules of TSV file cells
|
||||
*
|
||||
* @param string $newvalue String to clean
|
||||
* @param string $charset Input AND Output character set
|
||||
* @param string $charset Input AND Output character set
|
||||
* @return string Value cleaned
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function tsv_clean($newvalue, $charset)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Rule Dolibarr: No HTML
|
||||
$newvalue=dol_string_nohtmltag($newvalue, 1, $charset);
|
||||
|
||||
@@ -300,6 +307,6 @@ class ExportTsv extends ModeleExports
|
||||
$newvalue=str_replace("\t"," ",$newvalue);
|
||||
}
|
||||
|
||||
return $newvalue;
|
||||
return $newvalue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
||||
var $libversion=array();
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Load into memory list of available export format
|
||||
*
|
||||
@@ -49,9 +50,9 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates (same content than array this->driverlabel)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(get_class($this)."::liste_modeles");
|
||||
|
||||
$dir=DOL_DOCUMENT_ROOT."/core/modules/export/";
|
||||
|
||||
@@ -176,6 +176,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -187,9 +188,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -217,6 +217,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -228,9 +229,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@@ -774,6 +775,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
@@ -783,9 +785,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sign=1;
|
||||
@@ -915,6 +917,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -924,9 +927,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
@@ -1073,6 +1076,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
@@ -1083,9 +1087,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
|
||||
$sign=1;
|
||||
|
||||
@@ -42,6 +42,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -49,9 +50,9 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='invoice';
|
||||
@@ -65,7 +66,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
||||
}
|
||||
|
||||
/**
|
||||
* Classe mere des modeles de numerotation des references de facture
|
||||
* Classe mere des modeles de numerotation des references de facture
|
||||
*/
|
||||
abstract class ModeleNumRefFactures
|
||||
{
|
||||
|
||||
@@ -151,6 +151,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$this->posxdesc=$this->marge_gauche+1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -162,9 +163,9 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -40,6 +40,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -47,9 +48,9 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='ficheinter';
|
||||
@@ -148,6 +149,7 @@ abstract class ModeleNumRefFicheinter
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create an intervention document on disk using template defined into FICHEINTER_ADDON_PDF
|
||||
*
|
||||
@@ -160,9 +162,9 @@ abstract class ModeleNumRefFicheinter
|
||||
* @param int $hideref Hide ref
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$user;
|
||||
$langs->load("ficheinter");
|
||||
|
||||
|
||||
@@ -118,16 +118,17 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
||||
return $numFinal;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next value
|
||||
* Return next value
|
||||
*
|
||||
* @param User $fuser User object
|
||||
* @param Object $objforref Holiday object
|
||||
* @return string Value if OK, 0 if KO
|
||||
* @param User $fuser User object
|
||||
* @param Object $objforref Holiday object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function holiday_get_num($fuser, $objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($fuser, $objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
@@ -143,9 +144,9 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
||||
* @param Object $objforref Holiday object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function holiday_get_num($fuser,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($fuser,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,16 +44,17 @@ abstract class ModelePDFHoliday extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db, $maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type = 'holiday';
|
||||
|
||||
@@ -109,18 +109,20 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output header of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_header_example($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output title line of an example file for this format
|
||||
*
|
||||
@@ -128,13 +130,14 @@ class ImportCsv extends ModeleImports
|
||||
* @param array $headerlinefields Array of fields name
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
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
|
||||
/**
|
||||
* Output record of an example file for this format
|
||||
*
|
||||
@@ -142,36 +145,38 @@ class ImportCsv extends ModeleImports
|
||||
* @param array $contentlinevalues Array of lines
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
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
|
||||
/**
|
||||
* Output footer of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_footer_example($outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Open input file
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_open_file($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$ret=1;
|
||||
|
||||
@@ -195,39 +200,42 @@ class ImportCsv extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return nb of records. File must be closed.
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_get_nb_of_lines($file)
|
||||
{
|
||||
return dol_count_nb_of_line($file);
|
||||
// phpcs:enable
|
||||
return dol_count_nb_of_line($file);
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Input header line from file
|
||||
*
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_read_header()
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_read_record()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$arrayres=fgetcsv($this->handle,100000,$this->separator,$this->enclosure,$this->escape);
|
||||
@@ -276,19 +284,21 @@ class ImportCsv extends ModeleImports
|
||||
return $newarrayres;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Close file handle
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
fclose($this->handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Insert a record into database
|
||||
*
|
||||
@@ -300,9 +310,9 @@ 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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs,$conf,$user;
|
||||
global $thirdparty_static; // Specific to thirdparty import
|
||||
global $tablewithentity_cache; // Cache to avoid to call desc at each rows on tables
|
||||
@@ -577,9 +587,13 @@ class ImportCsv extends ModeleImports
|
||||
$listfields[] = $fieldname;
|
||||
|
||||
// Note: arrayrecord (and 'type') is filled with ->import_read_record called by import.php page before calling import_insert
|
||||
if (empty($newval) && $arrayrecord[($key-1)]['type'] < 0) $listvalues[] = ($newval=='0'?$newval:"null");
|
||||
elseif (empty($newval) && $arrayrecord[($key-1)]['type'] == 0) $listvalues[] = "''";
|
||||
else $listvalues[] = "'".$this->db->escape($newval)."'";
|
||||
if (empty($newval) && $arrayrecord[($key-1)]['type'] < 0) {
|
||||
$listvalues[] = ($newval=='0'?$newval:"null");
|
||||
} elseif (empty($newval) && $arrayrecord[($key-1)]['type'] == 0) {
|
||||
$listvalues[] = "''";
|
||||
} else {
|
||||
$listvalues[] = "'".$this->db->escape($newval)."'";
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ class ImportXlsx extends ModeleImports
|
||||
*/
|
||||
public $db;
|
||||
|
||||
var $datatoimport;
|
||||
public $datatoimport;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
@@ -115,38 +115,40 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output header of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_header_example($outputlangs)
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
// create a temporary object, the final output will be generated in footer
|
||||
if (!empty($conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR)) {
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs;
|
||||
// create a temporary object, the final output will be generated in footer
|
||||
if (!empty($conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR)) {
|
||||
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_discISAM;
|
||||
$cacheSettings = array (
|
||||
'dir' => $conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR
|
||||
);
|
||||
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
|
||||
'dir' => $conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR
|
||||
);
|
||||
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
|
||||
}
|
||||
|
||||
$this->workbook = new PHPExcel();
|
||||
$this->workbook->getProperties()->setCreator($user->getFullName($outputlangs).' - Dolibarr '.DOL_VERSION);
|
||||
$this->workbook->getProperties()->setTitle($outputlangs->trans("Import").' - '.$file);
|
||||
$this->workbook->getProperties()->setSubject($outputlangs->trans("Import").' - '.$file);
|
||||
$this->workbook->getProperties()->setDescription($outputlangs->trans("Import").' - '.$file);
|
||||
$this->workbook = new PHPExcel();
|
||||
$this->workbook->getProperties()->setCreator($user->getFullName($outputlangs).' - Dolibarr '.DOL_VERSION);
|
||||
$this->workbook->getProperties()->setTitle($outputlangs->trans("Import").' - '.$file);
|
||||
$this->workbook->getProperties()->setSubject($outputlangs->trans("Import").' - '.$file);
|
||||
$this->workbook->getProperties()->setDescription($outputlangs->trans("Import").' - '.$file);
|
||||
|
||||
$this->workbook->setActiveSheetIndex(0);
|
||||
$this->workbook->getActiveSheet()->setTitle($outputlangs->trans("Sheet"));
|
||||
$this->workbook->getActiveSheet()->getDefaultRowDimension()->setRowHeight(16);
|
||||
$this->workbook->setActiveSheetIndex(0);
|
||||
$this->workbook->getActiveSheet()->setTitle($outputlangs->trans("Sheet"));
|
||||
$this->workbook->getActiveSheet()->getDefaultRowDimension()->setRowHeight(16);
|
||||
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output title line of an example file for this format
|
||||
*
|
||||
@@ -154,9 +156,9 @@ class ImportXlsx extends ModeleImports
|
||||
* @param array $headerlinefields Array of fields name
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_title_example($outputlangs,$headerlinefields)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true);
|
||||
$this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
|
||||
@@ -172,6 +174,7 @@ class ImportXlsx extends ModeleImports
|
||||
return ''; // final output will be generated in footer
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output record of an example file for this format
|
||||
*
|
||||
@@ -179,9 +182,9 @@ class ImportXlsx extends ModeleImports
|
||||
* @param array $contentlinevalues Array of lines
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_record_example($outputlangs,$contentlinevalues)
|
||||
{
|
||||
// phpcs:enable
|
||||
$col = 0;
|
||||
$row = 2;
|
||||
foreach($contentlinevalues as $cell) {
|
||||
@@ -192,16 +195,17 @@ class ImportXlsx extends ModeleImports
|
||||
return ''; // final output will be generated in footer
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output footer of an example file for this format
|
||||
*
|
||||
* @param Translate $outputlangs Output language
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_footer_example($outputlangs)
|
||||
{
|
||||
// return te file content as a string
|
||||
// phpcs:enable
|
||||
// return the file content as a string
|
||||
$tempfile = tempnam(sys_get_temp_dir(), 'dol');
|
||||
$objWriter = new PHPExcel_Writer_Excel2007($this->workbook);
|
||||
$objWriter->save($tempfile);
|
||||
@@ -215,15 +219,16 @@ class ImportXlsx extends ModeleImports
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Open input file
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_open_file($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$ret=1;
|
||||
|
||||
@@ -238,15 +243,16 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return nb of records. File must be closed.
|
||||
*
|
||||
* @param string $file Path of filename
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_get_nb_of_lines($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
$reader = new PHPExcel_Reader_Excel2007();
|
||||
$this->workbook = $reader->load($file);
|
||||
|
||||
@@ -259,14 +265,15 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Input header line from file
|
||||
*
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_read_header()
|
||||
{
|
||||
// phpcs:enable
|
||||
// This is not called by the import code !!!
|
||||
$this->headers = array();
|
||||
$colcount = PHPExcel_Cell::columnIndexFromString($this->workbook->getActiveSheet()->getHighestDataColumn());
|
||||
@@ -277,14 +284,15 @@ class ImportXlsx extends ModeleImports
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_read_record()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$rowcount = $this->workbook->getActiveSheet()->getHighestDataRow();
|
||||
@@ -301,19 +309,22 @@ class ImportXlsx extends ModeleImports
|
||||
return $array;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Close file handle
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_close_file()
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->workbook->disconnectWorksheets();
|
||||
unset($this->workbook);
|
||||
}
|
||||
|
||||
|
||||
// What is this doing here ? it is common to all imports, is should be in the parent class
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Insert a record into database
|
||||
*
|
||||
@@ -325,10 +336,9 @@ 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
|
||||
*/
|
||||
// What is this doing here ? it is common to all imports, is should be in the parent class
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs,$conf,$user;
|
||||
global $thirdparty_static; // Specific to thirdparty import
|
||||
global $tablewithentity_cache; // Cache to avoid to call desc at each rows on tables
|
||||
|
||||
@@ -143,16 +143,17 @@ class ModeleImports
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Charge en memoire et renvoie la liste des modeles actifs
|
||||
*
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Charge en memoire et renvoie la liste des modeles actifs
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(get_class($this)."::liste_modeles");
|
||||
|
||||
$dir=DOL_DOCUMENT_ROOT."/core/modules/import/";
|
||||
|
||||
@@ -174,7 +174,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
* @param Object $object Object to generate
|
||||
@@ -184,10 +185,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
* @param int $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
*/
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@@ -630,6 +631,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
return 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -639,9 +641,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
||||
@@ -142,16 +142,17 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free ref
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object livraison
|
||||
* @return string Texte descripif
|
||||
* @return string Texte descriptif
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function livraison_get_num($objsoc=0,$object='')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,16 +139,17 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return next free ref
|
||||
*
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free ref
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Objet livraison
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function livraison_get_num($objsoc=0,$object='')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -48,9 +49,9 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='delivery';
|
||||
|
||||
@@ -32,7 +32,7 @@ class mailing_advthirdparties extends MailingTargets
|
||||
|
||||
var $require_module=array("none"); // This module should not be displayed as Selector in mailling
|
||||
var $picto='company';
|
||||
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
@@ -52,6 +52,7 @@ class mailing_advthirdparties extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
@@ -61,9 +62,9 @@ class mailing_advthirdparties extends MailingTargets
|
||||
* @param array $contactid Array of contact id to add
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target_spec($mailing_id,$socid,$type_of_target, $contactid)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::add_to_target socid=".var_export($socid,true).' contactid='.var_export($contactid,true));
|
||||
|
||||
@@ -326,16 +326,17 @@ class mailing_contacts1 extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param array $filtersarray Optional filter data (deprecated)
|
||||
* @return int <0 si erreur, nb ajout si ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
$filter = GETPOST('filter','alpha');
|
||||
|
||||
@@ -37,7 +37,7 @@ class mailing_example extends MailingTargets
|
||||
|
||||
var $require_module=array();
|
||||
var $picto='';
|
||||
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
@@ -56,6 +56,7 @@ class mailing_example extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
@@ -63,9 +64,9 @@ class mailing_example extends MailingTargets
|
||||
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
$target = array();
|
||||
|
||||
// CHANGE THIS
|
||||
@@ -112,7 +113,7 @@ class mailing_example extends MailingTargets
|
||||
*/
|
||||
function getNbOfRecipients($sql='')
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
// Example: return parent::getNbOfRecipients("SELECT count(*) as nb from dolibarr_table");
|
||||
// Example: return 500;
|
||||
@@ -127,7 +128,7 @@ class mailing_example extends MailingTargets
|
||||
*/
|
||||
function formFilter()
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
$s='';
|
||||
return $s;
|
||||
@@ -143,7 +144,7 @@ class mailing_example extends MailingTargets
|
||||
*/
|
||||
function url($id)
|
||||
{
|
||||
// CHANGE THIS: Optionnal
|
||||
// CHANGE THIS: Optionnal
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class mailing_fraise extends MailingTargets
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,7 @@ class mailing_fraise extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
@@ -226,9 +227,9 @@ class mailing_fraise extends MailingTargets
|
||||
* @param array $filtersarray Param to filter sql request. Deprecated. Should use $_POST instead.
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
// Deprecation warning
|
||||
if ($filtersarray) {
|
||||
dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING);
|
||||
@@ -269,8 +270,8 @@ class mailing_fraise extends MailingTargets
|
||||
// Filter on type
|
||||
if ($_POST['filter_type']) $sql.= " AND ta.rowid='".$_POST['filter_type']."'";
|
||||
// Filter on category
|
||||
if ($_POST['filter_category']) $sql.= " AND c.rowid='".$_POST['filter_category']."'";
|
||||
$sql.= " ORDER BY a.email";
|
||||
if ($_POST['filter_category']) $sql.= " AND c.rowid='".$_POST['filter_category']."'";
|
||||
$sql.= " ORDER BY a.email";
|
||||
//print $sql;
|
||||
|
||||
// Add targets into table
|
||||
|
||||
@@ -35,12 +35,12 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
var $tooltip='';
|
||||
|
||||
|
||||
@@ -117,15 +117,16 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Met a jour nombre de destinataires
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return int < 0 si erreur, nb destinataires si ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function update_nb($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Mise a jour nombre de destinataire dans table des mailings
|
||||
$sql = "SELECT COUNT(*) nb FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql .= " WHERE fk_mailing = ".$mailing_id;
|
||||
@@ -150,6 +151,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
return $nb;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
@@ -157,9 +159,9 @@ 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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id, $cibles)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$this->db->begin();
|
||||
@@ -234,15 +236,16 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
return $j;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Supprime tous les destinataires de la table des cibles
|
||||
*
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @param int $mailing_id Id of emailing
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function clear_target($mailing_id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql .= " WHERE fk_mailing = ".$mailing_id;
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ class mailing_pomme extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
@@ -153,9 +154,9 @@ class mailing_pomme extends MailingTargets
|
||||
* @param array $filtersarray Requete sql de selection des destinataires
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id, $filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
// Deprecation warning
|
||||
if ($filtersarray) {
|
||||
dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING);
|
||||
|
||||
@@ -31,7 +31,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
|
||||
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';
|
||||
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
@@ -52,6 +52,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
@@ -59,9 +60,9 @@ class mailing_thirdparties extends MailingTargets
|
||||
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
function add_to_target($mailing_id, $filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
$cibles = array();
|
||||
@@ -96,53 +97,53 @@ class mailing_thirdparties extends MailingTargets
|
||||
$sql.= " AND c.rowid='".$this->db->escape($_POST['filter'])."'";
|
||||
}
|
||||
|
||||
$addDescription= "";
|
||||
if (isset($_POST["filter_client"]) && $_POST["filter_client"] <> '-1')
|
||||
{
|
||||
$sql.= " AND s.client=" . $_POST["filter_client"];
|
||||
$addDescription= $langs->trans('ProspectCustomer')."=";
|
||||
if ($_POST["filter_client"] == 0)
|
||||
{
|
||||
$addDescription.= $langs->trans('NorProspectNorCustomer');
|
||||
}
|
||||
else if ($_POST["filter_client"] == 1)
|
||||
{
|
||||
$addDescription.= $langs->trans('Customer');
|
||||
}
|
||||
else if ($_POST["filter_client"] == 2)
|
||||
{
|
||||
$addDescription.= $langs->trans('Prospect');
|
||||
}
|
||||
else if ($_POST["filter_client"] == 3)
|
||||
{
|
||||
$addDescription.= $langs->trans('ProspectCustomer');
|
||||
}
|
||||
else
|
||||
{
|
||||
$addDescription.= "Unknown status ".$_POST["filter_client"];
|
||||
}
|
||||
}
|
||||
if (isset($_POST["filter_status"]))
|
||||
{
|
||||
if (strlen($addDescription) > 0)
|
||||
{
|
||||
$addDescription.= ";";
|
||||
}
|
||||
$addDescription.= $langs->trans("Status")."=";
|
||||
if ($_POST["filter_status"] == '1')
|
||||
{
|
||||
$sql.= " AND s.status=1";
|
||||
$addDescription.= $langs->trans("Enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " AND s.status=0";
|
||||
$addDescription.= $langs->trans("Disabled");
|
||||
}
|
||||
}
|
||||
$sql.= " ORDER BY email";
|
||||
$addDescription= "";
|
||||
if (isset($_POST["filter_client"]) && $_POST["filter_client"] <> '-1')
|
||||
{
|
||||
$sql.= " AND s.client=" . $_POST["filter_client"];
|
||||
$addDescription= $langs->trans('ProspectCustomer')."=";
|
||||
if ($_POST["filter_client"] == 0)
|
||||
{
|
||||
$addDescription.= $langs->trans('NorProspectNorCustomer');
|
||||
}
|
||||
elseif ($_POST["filter_client"] == 1)
|
||||
{
|
||||
$addDescription.= $langs->trans('Customer');
|
||||
}
|
||||
elseif ($_POST["filter_client"] == 2)
|
||||
{
|
||||
$addDescription.= $langs->trans('Prospect');
|
||||
}
|
||||
elseif ($_POST["filter_client"] == 3)
|
||||
{
|
||||
$addDescription.= $langs->trans('ProspectCustomer');
|
||||
}
|
||||
else
|
||||
{
|
||||
$addDescription.= "Unknown status ".$_POST["filter_client"];
|
||||
}
|
||||
}
|
||||
if (isset($_POST["filter_status"]))
|
||||
{
|
||||
if (strlen($addDescription) > 0)
|
||||
{
|
||||
$addDescription.= ";";
|
||||
}
|
||||
$addDescription.= $langs->trans("Status")."=";
|
||||
if ($_POST["filter_status"] == '1')
|
||||
{
|
||||
$sql.= " AND s.status=1";
|
||||
$addDescription.= $langs->trans("Enabled");
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " AND s.status=0";
|
||||
$addDescription.= $langs->trans("Disabled");
|
||||
}
|
||||
}
|
||||
$sql.= " ORDER BY email";
|
||||
|
||||
// Stock recipients emails into targets table
|
||||
// Stock recipients emails into targets table
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@@ -313,7 +314,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Can include an URL link on each record provided by selector shown on target page.
|
||||
*
|
||||
* @param int $id ID
|
||||
|
||||
@@ -29,12 +29,12 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
|
||||
var $require_module=array('contrat');
|
||||
var $picto='company';
|
||||
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
var $arrayofproducts=array();
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* This is the main function that returns the array of emails
|
||||
*
|
||||
@@ -85,9 +86,9 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
|
||||
* @return int <0 if error, number of emails added if ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
$target = array();
|
||||
|
||||
// ----- Your code start here -----
|
||||
|
||||
@@ -110,6 +110,7 @@ class mailing_xinputfile extends MailingTargets
|
||||
return $s;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
@@ -117,9 +118,9 @@ class mailing_xinputfile extends MailingTargets
|
||||
* @param array $filtersarray Requete sql de selection des destinataires
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$_FILES;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
@@ -108,6 +108,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
return $s;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Ajoute destinataires dans table des cibles
|
||||
*
|
||||
@@ -115,9 +116,9 @@ class mailing_xinputuser extends MailingTargets
|
||||
* @param array $filtersarray Requete sql de selection des destinataires
|
||||
* @return int < 0 si erreur, nb ajout si ok
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$_FILES;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
@@ -154,8 +155,8 @@ class mailing_xinputuser extends MailingTargets
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorBadEmail",$email);
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorBadEmail",$email);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ class pdf_standard extends CommonStickerGenerator
|
||||
// use this method in future refactoring
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
|
||||
* - __LOGO__ is replace with company logo
|
||||
@@ -62,9 +63,9 @@ class pdf_standard extends CommonStickerGenerator
|
||||
* @param string $photo Photo (full path to image file used as replacement for key __PHOTOS__ into left, right, header or footer text)
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$idmember=0,$photo='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $db,$mysoc,$conf,$langs;
|
||||
global $forceimgscalewidth,$forceimgscaleheight;
|
||||
|
||||
@@ -236,6 +237,7 @@ class pdf_standard extends CommonStickerGenerator
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build PDF on disk, then output on HTTP stream.
|
||||
*
|
||||
@@ -246,9 +248,9 @@ class pdf_standard extends CommonStickerGenerator
|
||||
* @param int $nooutput 1=Generate only file on disk and do not return it on response
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object, $outputlangs, $srctemplatepath, $mode='member', $nooutput=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
|
||||
|
||||
$this->code=$srctemplatepath;
|
||||
|
||||
@@ -40,6 +40,7 @@ class ModelePDFCards
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -47,9 +48,9 @@ class ModelePDFCards
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='member';
|
||||
@@ -63,6 +64,7 @@ class ModelePDFCards
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Cree un fichier de cartes de visites en fonction du modele de ADHERENT_CARDS_ADDON_PDF
|
||||
*
|
||||
@@ -74,9 +76,9 @@ class ModelePDFCards
|
||||
* @param string $template pdf generenate document class to use default 'standard'
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='', $template='standard')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
$langs->load("members");
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ class mod_payment_ant extends ModeleNumRefPayments
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
@@ -131,9 +132,9 @@ class mod_payment_ant extends ModeleNumRefPayments
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function commande_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,16 +138,17 @@ class mod_payment_cicada extends ModeleNumRefPayments
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param string $objforref Object for number to search
|
||||
* @param string $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function payment_get_num($objsoc,$objforref)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -35,7 +35,7 @@ class PrintingDriver
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -35,24 +35,24 @@ use OAuth\OAuth2\Service\Google;
|
||||
*/
|
||||
class printing_printgcp extends PrintingDriver
|
||||
{
|
||||
var $name = 'printgcp';
|
||||
var $desc = 'PrintGCPDesc';
|
||||
var $picto = 'printer';
|
||||
var $active = 'PRINTING_PRINTGCP';
|
||||
var $conf = array();
|
||||
var $google_id = '';
|
||||
var $google_secret = '';
|
||||
|
||||
public $name = 'printgcp';
|
||||
public $desc = 'PrintGCPDesc';
|
||||
public $picto = 'printer';
|
||||
public $active = 'PRINTING_PRINTGCP';
|
||||
public $conf = array();
|
||||
public $google_id = '';
|
||||
public $google_secret = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
@@ -227,14 +227,15 @@ class printing_printgcp extends PrintingDriver
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of available printers
|
||||
*
|
||||
* @return array list of printers
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function getlist_available_printers()
|
||||
{
|
||||
// phpcs:enable
|
||||
// Token storage
|
||||
$storage = new DoliStorage($this->db, $this->conf);
|
||||
// Setup the credentials for the requests
|
||||
@@ -292,6 +293,7 @@ class printing_printgcp extends PrintingDriver
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Print selected file
|
||||
*
|
||||
@@ -300,9 +302,9 @@ class printing_printgcp extends PrintingDriver
|
||||
* @param string $subdir subdir for file
|
||||
* @return int 0 if OK, >0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function print_file($file, $module, $subdir='')
|
||||
{
|
||||
// phpcs:enable
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
global $conf, $user;
|
||||
@@ -412,14 +414,15 @@ class printing_printgcp extends PrintingDriver
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* List jobs print
|
||||
*
|
||||
* @return int 0 if OK, >0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function list_jobs()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $db, $langs, $bc;
|
||||
|
||||
$error = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/printing/printipp.modules.php
|
||||
* \ingroup mailing
|
||||
* \ingroup printing
|
||||
* \brief File to provide printing with PrintIPP
|
||||
*/
|
||||
|
||||
@@ -40,17 +40,17 @@ class printing_printipp extends PrintingDriver
|
||||
var $userid; /* user login */
|
||||
var $user;
|
||||
var $password;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
@@ -78,6 +78,7 @@ class printing_printipp extends PrintingDriver
|
||||
$this->conf[] = array('enabled'=>1, 'type'=>'submit');
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Print selected file
|
||||
*
|
||||
@@ -87,9 +88,9 @@ class printing_printipp extends PrintingDriver
|
||||
*
|
||||
* @return int 0 if OK, >0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function print_file($file, $module, $subdir='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $user;
|
||||
$error = 0;
|
||||
|
||||
@@ -118,11 +119,11 @@ class printing_printipp extends PrintingDriver
|
||||
{
|
||||
if (! empty($conf->global->PRINTIPP_URI_DEFAULT))
|
||||
{
|
||||
dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".$conf->global->PRINTIPP_URI_DEFAULT);
|
||||
dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".$conf->global->PRINTIPP_URI_DEFAULT);
|
||||
$ipp->setPrinterURI($conf->global->PRINTIPP_URI_DEFAULT);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$this->errors[] = 'NoDefaultPrinterDefined';
|
||||
$error++;
|
||||
return $error;
|
||||
@@ -195,24 +196,25 @@ class printing_printipp extends PrintingDriver
|
||||
$html.= img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html.= '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&mode=test&varname=PRINTIPP_URI_DEFAULT&driver=printipp&value='.urlencode($value).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
$html.= '</td>';
|
||||
{
|
||||
$html.= '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&mode=test&varname=PRINTIPP_URI_DEFAULT&driver=printipp&value='.urlencode($value).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
$html.= '</td>';
|
||||
$html.= '</tr>'."\n";
|
||||
}
|
||||
$this->resprint = $html;
|
||||
return $error;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of available printers
|
||||
*
|
||||
* @return array list of printers
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function getlist_available_printers()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$db;
|
||||
include_once DOL_DOCUMENT_ROOT.'/includes/printipp/CupsPrintIPP.php';
|
||||
$ipp = new CupsPrintIPP();
|
||||
@@ -225,15 +227,16 @@ class printing_printipp extends PrintingDriver
|
||||
return $ipp->available_printers;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Get printer detail
|
||||
*
|
||||
* @param string $uri URI
|
||||
* @return array List of attributes
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_printer_detail($uri)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$db;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/includes/printipp/CupsPrintIPP.php';
|
||||
@@ -248,6 +251,7 @@ class printing_printipp extends PrintingDriver
|
||||
return $ipp->printer_attributes;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* List jobs print
|
||||
*
|
||||
@@ -255,9 +259,9 @@ class printing_printipp extends PrintingDriver
|
||||
*
|
||||
* @return int 0 if OK, >0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function list_jobs($module)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $db, $bc;
|
||||
$error = 0;
|
||||
$html = '';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Steve Dillon
|
||||
* Copyright (C) 2003 Laurent Passebecq
|
||||
* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Francis Appels <francis.appels@yahoo.com>
|
||||
/* Copyright (C) 2003 Steve Dillon
|
||||
* Copyright (C) 2003 Laurent Passebecq
|
||||
* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Francis Appels <francis.appels@yahoo.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -21,15 +21,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe permettant d'editer au format PDF des etiquettes au format Avery ou personnalise
|
||||
* \file htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe permettant d'editer au format PDF des etiquettes au format Avery ou personnalise
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonstickergenerator.class.php';
|
||||
|
||||
/**
|
||||
* Class to generate stick sheet with format Avery or other personalised
|
||||
* Class to generate stick sheet with format Avery or other personalised
|
||||
*/
|
||||
class pdf_standardlabel extends CommonStickerGenerator
|
||||
{
|
||||
@@ -46,6 +46,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
||||
// use this method in future refactoring
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
|
||||
* - %LOGO% is replace with company logo
|
||||
@@ -60,9 +61,9 @@ class pdf_standardlabel extends CommonStickerGenerator
|
||||
* @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text)
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function Add_PDF_label(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $mysoc, $conf, $langs;
|
||||
global $forceimgscalewidth, $forceimgscaleheight;
|
||||
|
||||
@@ -226,6 +227,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build PDF on disk, then output on HTTP strem.
|
||||
*
|
||||
@@ -236,9 +238,9 @@ class pdf_standardlabel extends CommonStickerGenerator
|
||||
* @param string $filename Short file name of PDF output file
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
|
||||
|
||||
$this->code=$srctemplatepath;
|
||||
|
||||
@@ -266,6 +266,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build PDF on disk, then output on HTTP strem.
|
||||
*
|
||||
@@ -276,9 +277,9 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
||||
* @param string $filename Short file name of PDF output file
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
|
||||
|
||||
$this->code=$srctemplatepath;
|
||||
|
||||
@@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class of document generator for address sheet.
|
||||
* Parent class of document generator for address sheet.
|
||||
*/
|
||||
class ModelePDFLabels
|
||||
{
|
||||
@@ -40,16 +40,17 @@ class ModelePDFLabels
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='members_labels';
|
||||
@@ -63,6 +64,7 @@ class ModelePDFLabels
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
@@ -75,9 +77,9 @@ class ModelePDFLabels
|
||||
* @param string $filename Short file name of PDF output file
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='', $template='standardlabel', $filename='tmp_address_sheet.pdf')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
$langs->load("members");
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -202,9 +203,9 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $product,$langs,$conf,$mysoc,$hookmanager,$user;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -117,6 +117,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -128,9 +129,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -198,14 +198,15 @@ class mod_codeproduct_elephant extends ModeleProductCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Check if mask/numbering use prefix
|
||||
*
|
||||
* @return int 0 or 1
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_prefixIsUsed()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$mask = $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT;
|
||||
@@ -274,6 +275,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi si un code est pris ou non (par autre tiers)
|
||||
*
|
||||
@@ -282,9 +284,9 @@ class mod_codeproduct_elephant extends ModeleProductCode
|
||||
* @param Product $product Objet product
|
||||
* @return int 0 if available, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_dispo($db, $code, $product)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "SELECT ref FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.= " WHERE ref = '".$code."'";
|
||||
if ($product->id > 0) $sql.= " AND rowid <> ".$product->id;
|
||||
|
||||
@@ -39,16 +39,17 @@ abstract class ModelePDFProduct extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='product';
|
||||
@@ -140,6 +141,7 @@ abstract class ModeleProductCode
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi la liste des modeles de numérotation
|
||||
*
|
||||
@@ -147,9 +149,9 @@ abstract class ModeleProductCode
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of numbers
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$liste=array();
|
||||
$sql ="";
|
||||
|
||||
@@ -202,7 +204,7 @@ abstract class ModeleProductCode
|
||||
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='</strike> '.yn(1,1,2).' ('.$langs->trans("ForcedToByAModule",$langs->transnoentities("yes")).')';
|
||||
$s.='<br>';
|
||||
}
|
||||
if ($type == 1)
|
||||
elseif ($type == 1)
|
||||
{
|
||||
$s.=$langs->trans("RequiredIfService").': ';
|
||||
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='<strike>';
|
||||
@@ -210,7 +212,7 @@ abstract class ModeleProductCode
|
||||
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='</strike> '.yn(1,1,2).' ('.$langs->trans("ForcedToByAModule",$langs->transnoentities("yes")).')';
|
||||
$s.='<br>';
|
||||
}
|
||||
if ($type == -1)
|
||||
elseif ($type == -1)
|
||||
{
|
||||
$s.=$langs->trans("Required").': ';
|
||||
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='<strike>';
|
||||
@@ -239,14 +241,15 @@ abstract class ModeleProductCode
|
||||
return $s;
|
||||
}
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Check if mask/numbering use prefix
|
||||
*
|
||||
* @return int 0=no, 1=yes
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_prefixIsUsed()
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleProductCode
|
||||
* \brief Parent class for product code generators
|
||||
* \class ModeleProductCode
|
||||
* \brief Parent class for product code generators
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -44,16 +44,17 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db, $maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='product_batch';
|
||||
|
||||
@@ -103,6 +103,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -111,9 +112,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param string $array_key Name of the key for return array
|
||||
* @return array Array of substitution
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_object($object,$outputlangs,$array_key='object')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$resarray=array(
|
||||
@@ -141,6 +142,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -148,9 +150,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_tasks($task,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$resarray = array(
|
||||
@@ -181,6 +183,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -188,9 +191,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_project_contacts($contact,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$pc='projcontacts_'; // prefix to avoid typos
|
||||
|
||||
@@ -238,6 +241,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -245,9 +249,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_project_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -257,6 +261,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -264,9 +269,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_project_reference($refdetail,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -280,6 +285,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -287,9 +293,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_tasksressource($taskressource,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
//dol_syslog(get_class($this).'::get_substitutionarray_tasksressource taskressource='.var_export($taskressource,true),LOG_DEBUG);
|
||||
return array(
|
||||
@@ -303,6 +309,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -310,9 +317,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_taskstime($tasktime,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -331,6 +338,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -338,9 +346,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_task_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -440,6 +448,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -448,9 +457,9 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -165,16 +165,17 @@ class pdf_baleine extends ModelePDFProjects
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
* @param Project $object Object project a generer
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -110,6 +110,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
@@ -117,9 +118,9 @@ class pdf_beluga extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user;
|
||||
|
||||
$formproject=new FormProjets($this->db);
|
||||
|
||||
@@ -93,6 +93,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction generant le projet sur le disque
|
||||
*
|
||||
@@ -100,9 +101,9 @@ class pdf_timespent extends ModelePDFProjects
|
||||
* @param Translate $outputlangs Lang output object
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $langs, $user;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -143,16 +143,17 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function project_get_num($objsoc=0,$project='')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$project);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
@@ -134,9 +135,9 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function project_get_num($objsoc=0,$project='')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$project);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,16 +37,17 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
/**
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='project';
|
||||
|
||||
@@ -104,6 +104,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -112,9 +113,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param string $array_key Name of the key for return array
|
||||
* @return array Array of substitution
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_object($object,$outputlangs,$array_key='object')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$resarray=array(
|
||||
@@ -148,6 +149,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -155,9 +157,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_tasks($task,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -178,6 +180,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -185,9 +188,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_project_contacts($contact,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -202,6 +205,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -209,9 +213,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_project_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -221,6 +225,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -228,9 +233,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_project_reference($refdetail,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -244,6 +249,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -251,9 +257,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_tasksressource($taskressource,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
//dol_syslog(get_class($this).'::get_substitutionarray_tasksressource taskressource='.var_export($taskressource,true),LOG_DEBUG);
|
||||
return array(
|
||||
@@ -267,6 +273,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -274,9 +281,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_taskstime($tasktime,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -291,6 +298,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
@@ -298,9 +306,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Return a substitution array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_task_file($file,$outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
@@ -400,6 +408,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -408,9 +417,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -143,14 +143,14 @@ class mod_task_simple extends ModeleNumRefTask
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Task $object Object task
|
||||
* @return string Next not used reference
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Task $object Object task
|
||||
* @return string Next not used reference
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function task_get_num($objsoc=0,$object='')
|
||||
{
|
||||
return $this->getNextValue($objsoc,$object);
|
||||
|
||||
@@ -127,6 +127,7 @@ class mod_task_universal extends ModeleNumRefTask
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
@@ -134,9 +135,9 @@ class mod_task_universal extends ModeleNumRefTask
|
||||
* @param Task $object Object task
|
||||
* @return string Next not used reference
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function project_get_num($objsoc=0,$object='')
|
||||
{
|
||||
return $this->getNextValue($objsoc,$object);
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc, $object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ abstract class ModelePDFTask extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -45,9 +46,9 @@ abstract class ModelePDFTask extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='project_task';
|
||||
|
||||
@@ -207,6 +207,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -218,9 +219,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
@@ -201,6 +201,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$this->atleastonediscount=0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@@ -212,9 +213,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1=OK, 0=KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@@ -829,6 +830,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
@@ -838,12 +840,13 @@ class pdf_azur extends ModelePDFPropales
|
||||
* @param Translate $outputlangs Object langs for output
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show miscellaneous information (payment mode, payment term, ...)
|
||||
*
|
||||
@@ -853,9 +856,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -1024,6 +1027,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
@@ -1034,9 +1038,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@@ -1659,6 +1663,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
return pdf_pagefoot($pdf,$outputlangs,'PROPOSAL_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show area for the customer to sign
|
||||
*
|
||||
@@ -1668,9 +1673,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
* @param Translate $outputlangs Objet langs
|
||||
* @return int Position pour suite
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _signature_area(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
$tab_top = $posy + 4;
|
||||
|
||||
@@ -42,6 +42,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@@ -49,9 +50,9 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='propal';
|
||||
|
||||
@@ -83,6 +83,7 @@ class pdf_paiement
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction generant la rapport sur le disque
|
||||
*
|
||||
@@ -92,9 +93,9 @@ class pdf_paiement
|
||||
* @param string $outputlangs Lang output object
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($_dir, $month, $year, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
global $conf, $hookmanager, $langs, $user;
|
||||
@@ -406,6 +407,7 @@ class pdf_paiement
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Output body
|
||||
*
|
||||
@@ -415,9 +417,9 @@ class pdf_paiement
|
||||
* @param Translate $outputlangs Object langs
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function Body(&$pdf, $page, $lines, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
||||
@@ -164,6 +164,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -175,9 +176,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -216,14 +216,15 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Check if mask/numbering use prefix
|
||||
*
|
||||
* @return int 0 or 1
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_prefixIsUsed()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$mask = $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER;
|
||||
@@ -292,6 +293,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi si un code est pris ou non (par autre tiers)
|
||||
*
|
||||
@@ -301,9 +303,9 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
* @param int $type 0 = customer/prospect , 1 = supplier
|
||||
* @return int 0 if available, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_dispo($db, $code, $soc, $type=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe";
|
||||
if ($type == 1) $sql.= " WHERE code_fournisseur = '".$code."'";
|
||||
else $sql.= " WHERE code_client = '".$code."'";
|
||||
|
||||
@@ -210,6 +210,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi si un code est pris ou non (par autre tiers)
|
||||
*
|
||||
@@ -219,9 +220,9 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
* @param int $type 0 = customer/prospect , 1 = supplier
|
||||
* @return int 0 if available, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_dispo($db, $code, $soc, $type=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $mc;
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe";
|
||||
@@ -250,15 +251,16 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi si un code respecte la syntaxe
|
||||
*
|
||||
* @param string $code Code a verifier
|
||||
* @return int 0 si OK, <0 si KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_syntax($code)
|
||||
{
|
||||
// phpcs:enable
|
||||
$res = 0;
|
||||
|
||||
if (dol_strlen($code) < 11)
|
||||
|
||||
@@ -107,6 +107,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Set accountancy account code for a third party into this->code
|
||||
*
|
||||
@@ -115,9 +116,9 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
* @param string $type 'customer' or 'supplier'
|
||||
* @return int >=0 if OK, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_code($db, $societe, $type='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$i = 0;
|
||||
|
||||
@@ -67,6 +67,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Set accountancy account code for a third party into this->code
|
||||
*
|
||||
@@ -75,9 +76,9 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
|
||||
* @param int $type 'customer' or 'supplier'
|
||||
* @return int >=0 if OK, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_code($db, $societe, $type='')
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->code='';
|
||||
|
||||
if (is_object($societe)) {
|
||||
|
||||
@@ -38,23 +38,24 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of templates
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type='company';
|
||||
$liste=array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||
$liste = getListOfModels($db,$type,$maxfilenamelength);
|
||||
|
||||
return $liste;
|
||||
}
|
||||
@@ -67,7 +68,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
|
||||
abstract class ModeleThirdPartyCode
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
@@ -144,6 +145,7 @@ abstract class ModeleThirdPartyCode
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoie la liste des modeles de numérotation
|
||||
*
|
||||
@@ -151,9 +153,9 @@ abstract class ModeleThirdPartyCode
|
||||
* @param integer $maxfilenamelength Max length of value to show
|
||||
* @return array List of numbers
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
static function liste_modeles($db,$maxfilenamelength=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$liste=array();
|
||||
$sql ="";
|
||||
|
||||
@@ -177,12 +179,12 @@ abstract class ModeleThirdPartyCode
|
||||
}
|
||||
|
||||
/**
|
||||
* Return description of module parameters
|
||||
* Return description of module parameters
|
||||
*
|
||||
* @param Translate $langs Output language
|
||||
* @param Societe $soc Third party object
|
||||
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
|
||||
* @return string HTML translated description
|
||||
* @param Translate $langs Output language
|
||||
* @param Societe $soc Third party object
|
||||
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
|
||||
* @return string HTML translated description
|
||||
*/
|
||||
function getToolTip($langs,$soc,$type)
|
||||
{
|
||||
@@ -243,14 +245,15 @@ abstract class ModeleThirdPartyCode
|
||||
return $s;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Check if mask/numbering use prefix
|
||||
*
|
||||
* @return int 0=no, 1=yes
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function verif_prefixIsUsed()
|
||||
{
|
||||
// phpcs:enable
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -355,6 +358,7 @@ abstract class ModeleAccountancyCode
|
||||
return $s;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Set accountancy account code for a third party into this->code
|
||||
*
|
||||
@@ -363,10 +367,10 @@ abstract class ModeleAccountancyCode
|
||||
* @param int $type 'customer' or 'supplier'
|
||||
* @return int >=0 if OK, <0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_code($db, $societe, $type='')
|
||||
{
|
||||
global $langs;
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
@@ -374,6 +378,7 @@ abstract class ModeleAccountancyCode
|
||||
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
@@ -389,9 +394,9 @@ abstract class ModeleAccountancyCode
|
||||
* @deprecated Use the new function generateDocument of Facture class
|
||||
* @see Societe::generateDocument()
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
|
||||
|
||||
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
|
||||
@@ -191,6 +191,7 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
return $texte;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -202,9 +203,9 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $stock,$langs,$conf,$mysoc,$hookmanager,$user;
|
||||
|
||||
if (empty($srctemplatepath))
|
||||
|
||||
@@ -146,6 +146,7 @@ class pdf_standard extends ModelePDFStock
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -157,9 +158,9 @@ class pdf_standard extends ModelePDFStock
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
@@ -149,6 +149,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build a document on disk using the generic odt module.
|
||||
*
|
||||
@@ -160,9 +161,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
* @param int $hideref Do not show ref
|
||||
* @return int 1 if OK, <=0 if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user