move phpcs:ignore
This commit is contained in:
parent
c6cef85ccd
commit
3847df1de6
@ -325,6 +325,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return if an invoice can be deleted
|
||||
* Rule is:
|
||||
@ -337,9 +338,9 @@ abstract class CommonInvoice extends CommonObject
|
||||
*
|
||||
* @return int <=0 if no, >0 if yes
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function is_erasable()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
// We check if invoice is a temporary number (PROVxxxx)
|
||||
@ -450,6 +451,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
return $this->LibStatut($this->paye, $this->statut, $mode, $alreadypaid, $this->type);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return label of a status
|
||||
*
|
||||
@ -460,9 +462,9 @@ abstract class CommonInvoice extends CommonObject
|
||||
* @param int $type Type invoice
|
||||
* @return string Label of status
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$langs->load('bills');
|
||||
|
||||
@ -485,7 +487,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
else return $langs->trans('Bill'.$prefix.'StatusPaid');
|
||||
}
|
||||
}
|
||||
if ($mode == 1)
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
$prefix='Short';
|
||||
if (! $paye)
|
||||
@ -503,7 +505,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
else return $langs->trans('Bill'.$prefix.'StatusPaid');
|
||||
}
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
$prefix='Short';
|
||||
if (! $paye)
|
||||
@ -521,7 +523,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
else return img_picto($langs->trans('BillStatusPaid'),'statut6').' '.$langs->trans('Bill'.$prefix.'StatusPaid');
|
||||
}
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
$prefix='Short';
|
||||
if (! $paye)
|
||||
@ -539,7 +541,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
else return img_picto($langs->trans('BillStatusPaid'),'statut6');
|
||||
}
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
$prefix='';
|
||||
if (! $paye)
|
||||
@ -557,7 +559,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
else return img_picto($langs->trans('BillStatusPaid'),'statut6').' '.$langs->trans('BillStatusPaid');
|
||||
}
|
||||
}
|
||||
if ($mode == 5 || $mode == 6)
|
||||
elseif ($mode == 5 || $mode == 6)
|
||||
{
|
||||
$prefix='';
|
||||
if ($mode == 5) $prefix='Short';
|
||||
@ -582,6 +584,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi une date limite de reglement de facture en fonction des
|
||||
* conditions de reglements de la facture et date de facturation
|
||||
@ -589,9 +592,9 @@ abstract class CommonInvoice extends CommonObject
|
||||
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
|
||||
* @return date Date limite de reglement si ok, <0 si ko
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function calculate_date_lim_reglement($cond_reglement=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code;
|
||||
if (! $cond_reglement) $cond_reglement=$this->cond_reglement_id;
|
||||
|
||||
|
||||
@ -167,17 +167,18 @@ class DoliDBMysqli extends DoliDB
|
||||
return $line;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Select a database
|
||||
* Select a database
|
||||
*
|
||||
* @param string $database Name of database
|
||||
* @return boolean true if OK, false if KO
|
||||
* @param string $database Name of database
|
||||
* @return boolean true if OK, false if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function select_db($database)
|
||||
{
|
||||
// phpcs:enable
|
||||
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
|
||||
return $this->db->select_db($database);
|
||||
return $this->db->select_db($database);
|
||||
}
|
||||
|
||||
|
||||
@ -286,44 +287,47 @@ class DoliDBMysqli extends DoliDB
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
|
||||
*
|
||||
* @param mysqli_result $resultset Curseur de la requete voulue
|
||||
* @return object|null Object result line or null if KO or end of cursor
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_object($resultset)
|
||||
{
|
||||
// phpcs:enable
|
||||
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
|
||||
if (! is_object($resultset)) { $resultset=$this->_results; }
|
||||
return $resultset->fetch_object();
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return datas as an array
|
||||
*
|
||||
* @param mysqli_result $resultset Resultset of request
|
||||
* @return array|null Array or null if KO or end of cursor
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_array($resultset)
|
||||
{
|
||||
// phpcs:enable
|
||||
// If resultset not provided, we take the last used by connexion
|
||||
if (! is_object($resultset)) { $resultset=$this->_results; }
|
||||
return $resultset->fetch_array();
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return datas as an array
|
||||
*
|
||||
* @param mysqli_result $resultset Resultset of request
|
||||
* @return array|null|0 Array or null if KO or end of cursor or 0 if resultset is bool
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_row($resultset)
|
||||
{
|
||||
// phpcs:enable
|
||||
// If resultset not provided, we take the last used by connexion
|
||||
if (! is_bool($resultset))
|
||||
{
|
||||
@ -337,6 +341,7 @@ class DoliDBMysqli extends DoliDB
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return number of lines for result of a SELECT
|
||||
*
|
||||
@ -344,14 +349,15 @@ class DoliDBMysqli extends DoliDB
|
||||
* @return int Nb of lines
|
||||
* @see affected_rows
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function num_rows($resultset)
|
||||
{
|
||||
// phpcs:enable
|
||||
// If resultset not provided, we take the last used by connexion
|
||||
if (! is_object($resultset)) { $resultset=$this->_results; }
|
||||
return $resultset->num_rows;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE
|
||||
*
|
||||
@ -359,9 +365,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @return int Nombre de lignes
|
||||
* @see num_rows
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function affected_rows($resultset)
|
||||
{
|
||||
// phpcs:enable
|
||||
// If resultset not provided, we take the last used by connexion
|
||||
if (! is_object($resultset)) { $resultset=$this->_results; }
|
||||
// mysql necessite un link de base pour cette fonction contrairement
|
||||
@ -462,6 +468,7 @@ class DoliDBMysqli extends DoliDB
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Get last ID after an insert INSERT
|
||||
*
|
||||
@ -469,9 +476,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $fieldid Field name
|
||||
* @return int|string Id of row
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function last_insert_id($tab,$fieldid='rowid')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->db->insert_id;
|
||||
}
|
||||
|
||||
@ -545,14 +552,15 @@ class DoliDBMysqli extends DoliDB
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return connexion ID
|
||||
*
|
||||
* @return string Id connexion
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLGetConnectId()
|
||||
{
|
||||
// phpcs:enable
|
||||
$resql=$this->query('SELECT CONNECTION_ID()');
|
||||
if ($resql)
|
||||
{
|
||||
@ -562,8 +570,9 @@ class DoliDBMysqli extends DoliDB
|
||||
else return '?';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create a new database
|
||||
* Create a new database
|
||||
* Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated
|
||||
* We force to create database with charset this->forcecharset and collate this->forcecollate
|
||||
*
|
||||
@ -573,9 +582,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $owner Username of database owner
|
||||
* @return bool|mysqli_result resource defined if OK, null if KO
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLCreateDb($database,$charset='',$collation='',$owner='')
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($charset)) $charset=$this->forcecharset;
|
||||
if (empty($collation)) $collation=$this->forcecollate;
|
||||
|
||||
@ -595,6 +604,7 @@ class DoliDBMysqli extends DoliDB
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* List tables into a database
|
||||
*
|
||||
@ -602,9 +612,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $table Nmae of table filter ('xxx%')
|
||||
* @return array List of tables in an array
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLListTables($database, $table='')
|
||||
{
|
||||
// phpcs:enable
|
||||
$listtables=array();
|
||||
|
||||
$like = '';
|
||||
@ -622,15 +632,16 @@ class DoliDBMysqli extends DoliDB
|
||||
return $listtables;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* List information of columns into a table.
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @return array Tableau des informations des champs de la table
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLInfoTable($table)
|
||||
{
|
||||
// phpcs:enable
|
||||
$infotables=array();
|
||||
|
||||
$sql="SHOW FULL COLUMNS FROM ".$table.";";
|
||||
@ -647,6 +658,7 @@ class DoliDBMysqli extends DoliDB
|
||||
return $infotables;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create a table into database
|
||||
*
|
||||
@ -659,9 +671,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param array $keys Tableau des champs cles noms => valeur
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
|
||||
{
|
||||
// phpcs:enable
|
||||
// FIXME: $fulltext_keys parameter is unused
|
||||
|
||||
// cles recherchees dans le tableau des descriptions (fields) : type,value,attribute,null,default,extra
|
||||
@ -730,16 +742,17 @@ class DoliDBMysqli extends DoliDB
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Drop a table into database
|
||||
* Drop a table into database
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLDropTable($table)
|
||||
{
|
||||
$sql = "DROP TABLE ".$table;
|
||||
// phpcs:enable
|
||||
$sql = "DROP TABLE ".$table;
|
||||
|
||||
if (! $this->query($sql))
|
||||
return -1;
|
||||
@ -747,6 +760,7 @@ class DoliDBMysqli extends DoliDB
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return a pointer of line with description of a table or field
|
||||
*
|
||||
@ -754,9 +768,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $field Optionnel : Name of field if we want description of field
|
||||
* @return bool|mysqli_result Resultset x (x->Field, x->Type, ...)
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLDescTable($table,$field="")
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql="DESC ".$table." ".$field;
|
||||
|
||||
dol_syslog(get_class($this)."::DDLDescTable ".$sql,LOG_DEBUG);
|
||||
@ -764,6 +778,7 @@ class DoliDBMysqli extends DoliDB
|
||||
return $this->_results;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create a new field into table
|
||||
*
|
||||
@ -773,9 +788,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $field_position Optionnel ex.: "after champtruc"
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLAddField($table,$field_name,$field_desc,$field_position="")
|
||||
{
|
||||
// phpcs:enable
|
||||
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
|
||||
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
|
||||
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
|
||||
@ -815,6 +830,7 @@ class DoliDBMysqli extends DoliDB
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Update format of a field into a table
|
||||
*
|
||||
@ -823,9 +839,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $field_desc Array with description of field format
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLUpdateField($table,$field_name,$field_desc)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "ALTER TABLE ".$table;
|
||||
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
||||
if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
|
||||
@ -861,6 +877,7 @@ class DoliDBMysqli extends DoliDB
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Drop a field from table
|
||||
*
|
||||
@ -868,19 +885,20 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $field_name Name of field to drop
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLDropField($table,$field_name)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
|
||||
dol_syslog(get_class($this)."::DDLDropField ".$sql,LOG_DEBUG);
|
||||
if ($this->query($sql)) {
|
||||
return 1;
|
||||
}
|
||||
$this->error=$this->lasterror();
|
||||
return -1;
|
||||
$this->error=$this->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Create a user and privileges to connect to database (even if database does not exists yet)
|
||||
*
|
||||
@ -890,9 +908,9 @@ class DoliDBMysqli extends DoliDB
|
||||
* @param string $dolibarr_main_db_name Database name where user must be granted
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'";
|
||||
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
|
||||
$resql=$this->query($sql);
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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 -----
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -143,6 +143,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoie la reference de commande suivante non utilisee
|
||||
*
|
||||
@ -150,9 +151,9 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
* @param Object $object Object
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function commande_get_num($objsoc=0,$object='')
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->getNextValue($objsoc,$object);
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,6 +196,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to build pdf onto disk
|
||||
*
|
||||
@ -207,9 +208,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @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,$nblignes;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@ -705,6 +706,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show payments table
|
||||
*
|
||||
@ -714,12 +716,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @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, ...)
|
||||
*
|
||||
@ -729,9 +732,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @param Translate $outputlangs Langs object
|
||||
* @return integer
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -784,6 +787,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
return $posy;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show total to pay
|
||||
*
|
||||
@ -794,9 +798,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
* @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);
|
||||
|
||||
@ -44,6 +44,7 @@ abstract class ModelePDFUser extends CommonDocGenerator
|
||||
public $error='';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
*
|
||||
@ -51,9 +52,9 @@ abstract class ModelePDFUser 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='user';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user