move phpcs:ignore
This commit is contained in:
parent
4e619dd0ed
commit
85df267a5b
@ -49,6 +49,7 @@ class FormIntervention
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Show a combo list with contracts qualified for a third party
|
* Show a combo list with contracts qualified for a third party
|
||||||
*
|
*
|
||||||
@ -59,9 +60,9 @@ class FormIntervention
|
|||||||
* @param int $showempty Show empty line
|
* @param int $showempty Show empty line
|
||||||
* @return int Nbre of project if OK, <0 if KO
|
* @return int Nbre of project if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1)
|
function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $db,$user,$conf,$langs;
|
global $db,$user,$conf,$langs;
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|||||||
@ -35,14 +35,15 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function ifsql($test, $resok, $resko);
|
function ifsql($test, $resok, $resko);
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return datas as an array
|
* Return datas as an array
|
||||||
*
|
*
|
||||||
* @param resource $resultset Resultset of request
|
* @param resource $resultset Resultset of request
|
||||||
* @return array Array
|
* @return array Array
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function fetch_row($resultset);
|
||||||
function fetch_row($resultset);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
||||||
@ -67,6 +68,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function begin();
|
function begin();
|
||||||
|
|
||||||
|
// 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
|
* Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated
|
||||||
@ -78,8 +80,8 @@ interface Database
|
|||||||
* @param string $owner Username of database owner
|
* @param string $owner Username of database owner
|
||||||
* @return resource resource defined if OK, null if KO
|
* @return resource resource defined if OK, null if KO
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
|
||||||
function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return version of database server into an array
|
* Return version of database server into an array
|
||||||
@ -97,6 +99,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
static function convertSQLFromMysql($line, $type = 'ddl');
|
static function convertSQLFromMysql($line, $type = 'ddl');
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE
|
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE
|
||||||
*
|
*
|
||||||
@ -104,8 +107,8 @@ interface Database
|
|||||||
* @return int Nombre de lignes
|
* @return int Nombre de lignes
|
||||||
* @see num_rows
|
* @see num_rows
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function affected_rows($resultset);
|
||||||
function affected_rows($resultset);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return description of last error
|
* Return description of last error
|
||||||
@ -114,6 +117,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function error();
|
function error();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* List tables into a database
|
* List tables into a database
|
||||||
*
|
*
|
||||||
@ -121,8 +125,8 @@ interface Database
|
|||||||
* @param string $table Nmae of table filter ('xxx%')
|
* @param string $table Nmae of table filter ('xxx%')
|
||||||
* @return array List of tables in an array
|
* @return array List of tables in an array
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLListTables($database, $table = '');
|
||||||
function DDLListTables($database, $table = '');
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return last request executed with query()
|
* Return last request executed with query()
|
||||||
@ -148,14 +152,15 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function decrypt($value);
|
function decrypt($value);
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return datas as an array
|
* Return datas as an array
|
||||||
*
|
*
|
||||||
* @param resource $resultset Resultset of request
|
* @param resource $resultset Resultset of request
|
||||||
* @return array Array
|
* @return array Array
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function fetch_array($resultset);
|
||||||
function fetch_array($resultset);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return last error label
|
* Return last error label
|
||||||
@ -172,6 +177,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function escape($stringtoencode);
|
function escape($stringtoencode);
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Get last ID after an insert INSERT
|
* Get last ID after an insert INSERT
|
||||||
*
|
*
|
||||||
@ -179,8 +185,8 @@ interface Database
|
|||||||
* @param string $fieldid Field name
|
* @param string $fieldid Field name
|
||||||
* @return int Id of row
|
* @return int Id of row
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function last_insert_id($tab, $fieldid = 'rowid');
|
||||||
function last_insert_id($tab, $fieldid = 'rowid');
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return full path of restore program
|
* Return full path of restore program
|
||||||
@ -253,6 +259,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function getDefaultCollationDatabase();
|
function getDefaultCollationDatabase();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return number of lines for result of a SELECT
|
* Return number of lines for result of a SELECT
|
||||||
*
|
*
|
||||||
@ -260,8 +267,8 @@ interface Database
|
|||||||
* @return int Nb of lines
|
* @return int Nb of lines
|
||||||
* @see affected_rows
|
* @see affected_rows
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function num_rows($resultset);
|
||||||
function num_rows($resultset);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return full path of dump program
|
* Return full path of dump program
|
||||||
@ -284,6 +291,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function errno();
|
function errno();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Create a table into database
|
* Create a table into database
|
||||||
*
|
*
|
||||||
@ -296,17 +304,18 @@ interface Database
|
|||||||
* @param array $keys Tableau des champs cles noms => valeur
|
* @param array $keys Tableau des champs cles noms => valeur
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @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);
|
||||||
function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
|
// phpcs:enable
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Drop a table into database
|
* Drop a table into database
|
||||||
*
|
*
|
||||||
* @param string $table Name of table
|
* @param string $table Name of table
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLDropTable($table);
|
||||||
function DDLDropTable($table);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of available charset that can be used to store data in database
|
* Return list of available charset that can be used to store data in database
|
||||||
@ -315,6 +324,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function getListOfCharacterSet();
|
function getListOfCharacterSet();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Create a new field into table
|
* Create a new field into table
|
||||||
*
|
*
|
||||||
@ -324,9 +334,10 @@ interface Database
|
|||||||
* @param string $field_position Optionnel ex.: "after champtruc"
|
* @param string $field_position Optionnel ex.: "after champtruc"
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLAddField($table, $field_name, $field_desc, $field_position = "");
|
||||||
function DDLAddField($table, $field_name, $field_desc, $field_position = "");
|
// phpcs:enable
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Drop a field from table
|
* Drop a field from table
|
||||||
*
|
*
|
||||||
@ -334,9 +345,10 @@ interface Database
|
|||||||
* @param string $field_name Name of field to drop
|
* @param string $field_name Name of field to drop
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLDropField($table, $field_name);
|
||||||
function DDLDropField($table, $field_name);
|
// phpcs:enable
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Update format of a field into a table
|
* Update format of a field into a table
|
||||||
*
|
*
|
||||||
@ -345,8 +357,8 @@ interface Database
|
|||||||
* @param string $field_desc Array with description of field format
|
* @param string $field_desc Array with description of field format
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLUpdateField($table, $field_name, $field_desc);
|
||||||
function DDLUpdateField($table, $field_name, $field_desc);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of available collation that can be used for database
|
* Return list of available collation that can be used for database
|
||||||
@ -355,6 +367,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function getListOfCollation();
|
function getListOfCollation();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return a pointer of line with description of a table or field
|
* Return a pointer of line with description of a table or field
|
||||||
*
|
*
|
||||||
@ -362,8 +375,8 @@ interface Database
|
|||||||
* @param string $field Optionnel : Name of field if we want description of field
|
* @param string $field Optionnel : Name of field if we want description of field
|
||||||
* @return resource Resource
|
* @return resource Resource
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLDescTable($table, $field = "");
|
||||||
function DDLDescTable($table, $field = "");
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return version of database server
|
* Return version of database server
|
||||||
@ -379,6 +392,7 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function getDefaultCharacterSetDatabase();
|
function getDefaultCharacterSetDatabase();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Create a user and privileges to connect to database (even if database does not exists yet)
|
* Create a user and privileges to connect to database (even if database does not exists yet)
|
||||||
*
|
*
|
||||||
@ -388,13 +402,13 @@ interface Database
|
|||||||
* @param string $dolibarr_main_db_name Database name where user must be granted
|
* @param string $dolibarr_main_db_name Database name where user must be granted
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function DDLCreateUser(
|
function DDLCreateUser(
|
||||||
$dolibarr_main_db_host,
|
$dolibarr_main_db_host,
|
||||||
$dolibarr_main_db_user,
|
$dolibarr_main_db_user,
|
||||||
$dolibarr_main_db_pass,
|
$dolibarr_main_db_pass,
|
||||||
$dolibarr_main_db_name
|
$dolibarr_main_db_name
|
||||||
);
|
);
|
||||||
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true)
|
* Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true)
|
||||||
@ -425,14 +439,15 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function commit($log = '');
|
function commit($log = '');
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* List information of columns into a table.
|
* List information of columns into a table.
|
||||||
*
|
*
|
||||||
* @param string $table Name of table
|
* @param string $table Name of table
|
||||||
* @return array Array with inforation on table
|
* @return array Array with inforation on table
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLInfoTable($table);
|
||||||
function DDLInfoTable($table);
|
// phpcs:enable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free last resultset used.
|
* Free last resultset used.
|
||||||
@ -457,29 +472,32 @@ interface Database
|
|||||||
*/
|
*/
|
||||||
function lastqueryerror();
|
function lastqueryerror();
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return connexion ID
|
* Return connexion ID
|
||||||
*
|
*
|
||||||
* @return string Id connexion
|
* @return string Id connexion
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function DDLGetConnectId();
|
||||||
function DDLGetConnectId();
|
// phpcs:enable
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
|
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
|
||||||
*
|
*
|
||||||
* @param resource $resultset Curseur de la requete voulue
|
* @param resource $resultset Curseur de la requete voulue
|
||||||
* @return Object Object result line or false if KO or end of cursor
|
* @return Object Object result line or false if KO or end of cursor
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function fetch_object($resultset);
|
||||||
function fetch_object($resultset);
|
// phpcs:enable
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Select a database
|
* Select a database
|
||||||
*
|
*
|
||||||
* @param string $database Name of database
|
* @param string $database Name of database
|
||||||
* @return boolean true if OK, false if KO
|
* @return boolean true if OK, false if KO
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
function select_db($database);
|
||||||
function select_db($database);
|
// phpcs:enable
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
|
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Fonction to generate document on disk
|
* Fonction to generate document on disk
|
||||||
*
|
*
|
||||||
@ -83,9 +84,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
* @param Translate $outputlangs Lang output object
|
* @param Translate $outputlangs Lang output object
|
||||||
* @return int 1=ok, 0=ko
|
* @return int 1=ok, 0=ko
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_file($object, $_dir, $number, $outputlangs)
|
function write_file($object, $_dir, $number, $outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $user,$conf,$langs,$hookmanager;
|
global $user,$conf,$langs,$hookmanager;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
@ -198,6 +199,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Generate Header
|
* Generate Header
|
||||||
*
|
*
|
||||||
@ -207,9 +209,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
* @param Translate $outputlangs Object language for output
|
* @param Translate $outputlangs Object language for output
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function Header(&$pdf, $page, $pages, $outputlangs)
|
function Header(&$pdf, $page, $pages, $outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
@ -305,6 +307,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output array
|
* Output array
|
||||||
*
|
*
|
||||||
@ -314,9 +317,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
* @param Translate $outputlangs Object lang
|
* @param Translate $outputlangs Object lang
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function Body(&$pdf, $pagenb, $pages, $outputlangs)
|
function Body(&$pdf, $pagenb, $pages, $outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
// x=10 - Num
|
// x=10 - Num
|
||||||
// x=30 - Banque
|
// x=30 - Banque
|
||||||
// x=100 - Emetteur
|
// x=100 - Emetteur
|
||||||
|
|||||||
@ -177,6 +177,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
return $texte;
|
return $texte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to build a document on disk using the generic odt module.
|
* 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
|
* @param int $hideref Do not show ref
|
||||||
* @return int 1 if OK, <=0 if KO
|
* @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)
|
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||||
|
|
||||||
if (empty($srctemplatepath))
|
if (empty($srctemplatepath))
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class ExportExcel extends ModeleExports
|
|||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Export Excel label
|
* @var string Export Excel label
|
||||||
*/
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
@ -48,8 +48,8 @@ class ExportExcel extends ModeleExports
|
|||||||
public $label_lib;
|
public $label_lib;
|
||||||
public $version_lib;
|
public $version_lib;
|
||||||
|
|
||||||
public $workbook; // Handle fichier
|
public $workbook; // Handle file
|
||||||
public $worksheet; // Handle onglet
|
public $worksheet; // Handle sheet
|
||||||
public $row;
|
public $row;
|
||||||
public $col;
|
public $col;
|
||||||
public $file; // To save filename
|
public $file; // To save filename
|
||||||
@ -168,6 +168,7 @@ class ExportExcel extends ModeleExports
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Open output file
|
* Open output file
|
||||||
*
|
*
|
||||||
@ -175,9 +176,9 @@ class ExportExcel extends ModeleExports
|
|||||||
* @param Translate $outputlangs Output language object
|
* @param Translate $outputlangs Output language object
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @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 $user,$conf,$langs;
|
global $user,$conf,$langs;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
||||||
@ -238,21 +239,23 @@ class ExportExcel extends ModeleExports
|
|||||||
return $ret;
|
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
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_header($outputlangs)
|
function write_header($outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
//$outputlangs->charset_output='ISO-8859-1'; // Because Excel 5 format is ISO
|
//$outputlangs->charset_output='ISO-8859-1'; // Because Excel 5 format is ISO
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output title line into file
|
* Output title line into file
|
||||||
*
|
*
|
||||||
@ -262,9 +265,9 @@ class ExportExcel extends ModeleExports
|
|||||||
* @param array $array_types Array with types of fields
|
* @param array $array_types Array with types of fields
|
||||||
* @return int <0 if KO, >0 if OK
|
* @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)
|
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Create a format for the column headings
|
// Create a format for the column headings
|
||||||
@ -309,6 +312,7 @@ class ExportExcel extends ModeleExports
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output record line into file
|
* Output record line into file
|
||||||
*
|
*
|
||||||
@ -318,9 +322,9 @@ class ExportExcel extends ModeleExports
|
|||||||
* @param array $array_types Array with types of fields
|
* @param array $array_types Array with types of fields
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Create a format for the column headings
|
// Create a format for the column headings
|
||||||
@ -428,27 +432,29 @@ class ExportExcel extends ModeleExports
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Write footer
|
* Write footer
|
||||||
*
|
*
|
||||||
* @param Translate $outputlangs Output language object
|
* @param Translate $outputlangs Output language object
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_footer($outputlangs)
|
function write_footer($outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
|
/**
|
||||||
* Close Excel file
|
* 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()
|
function close_file()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
|
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
|
* Clean a cell to respect rules of Excel file cells
|
||||||
*
|
*
|
||||||
* @param string $newvalue String to clean
|
* @param string $newvalue String to clean
|
||||||
* @return string Value cleaned
|
* @return string Value cleaned
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function excel_clean($newvalue)
|
function excel_clean($newvalue)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
// Rule Dolibarr: No HTML
|
// Rule Dolibarr: No HTML
|
||||||
$newvalue=dol_string_nohtmltag($newvalue);
|
$newvalue=dol_string_nohtmltag($newvalue);
|
||||||
|
|
||||||
|
|||||||
@ -176,6 +176,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
return $texte;
|
return $texte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to build a document on disk using the generic odt module.
|
* 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
|
* @param int $hideref Do not show ref
|
||||||
* @return int 1 if OK, <=0 if KO
|
* @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)
|
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||||
|
|
||||||
if (empty($srctemplatepath))
|
if (empty($srctemplatepath))
|
||||||
|
|||||||
@ -38,9 +38,9 @@ class ImportXlsx extends ModeleImports
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
var $datatoimport;
|
public $datatoimport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error='';
|
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
|
* Output header of an example file for this format
|
||||||
*
|
*
|
||||||
* @param Translate $outputlangs Output language
|
* @param Translate $outputlangs Output language
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_header_example($outputlangs)
|
function write_header_example($outputlangs)
|
||||||
{
|
{
|
||||||
global $user,$conf,$langs;
|
// phpcs:enable
|
||||||
// create a temporary object, the final output will be generated in footer
|
global $user,$conf,$langs;
|
||||||
if (!empty($conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR)) {
|
// 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;
|
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_discISAM;
|
||||||
$cacheSettings = array (
|
$cacheSettings = array (
|
||||||
'dir' => $conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR
|
'dir' => $conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR
|
||||||
);
|
);
|
||||||
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
|
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->workbook = new PHPExcel();
|
$this->workbook = new PHPExcel();
|
||||||
$this->workbook->getProperties()->setCreator($user->getFullName($outputlangs).' - Dolibarr '.DOL_VERSION);
|
$this->workbook->getProperties()->setCreator($user->getFullName($outputlangs).' - Dolibarr '.DOL_VERSION);
|
||||||
$this->workbook->getProperties()->setTitle($outputlangs->trans("Import").' - '.$file);
|
$this->workbook->getProperties()->setTitle($outputlangs->trans("Import").' - '.$file);
|
||||||
$this->workbook->getProperties()->setSubject($outputlangs->trans("Import").' - '.$file);
|
$this->workbook->getProperties()->setSubject($outputlangs->trans("Import").' - '.$file);
|
||||||
$this->workbook->getProperties()->setDescription($outputlangs->trans("Import").' - '.$file);
|
$this->workbook->getProperties()->setDescription($outputlangs->trans("Import").' - '.$file);
|
||||||
|
|
||||||
$this->workbook->setActiveSheetIndex(0);
|
$this->workbook->setActiveSheetIndex(0);
|
||||||
$this->workbook->getActiveSheet()->setTitle($outputlangs->trans("Sheet"));
|
$this->workbook->getActiveSheet()->setTitle($outputlangs->trans("Sheet"));
|
||||||
$this->workbook->getActiveSheet()->getDefaultRowDimension()->setRowHeight(16);
|
$this->workbook->getActiveSheet()->getDefaultRowDimension()->setRowHeight(16);
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output title line of an example file for this format
|
* 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
|
* @param array $headerlinefields Array of fields name
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_title_example($outputlangs,$headerlinefields)
|
function write_title_example($outputlangs,$headerlinefields)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
$this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true);
|
$this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true);
|
||||||
$this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
|
$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
|
return ''; // final output will be generated in footer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output record of an example file for this format
|
* Output record of an example file for this format
|
||||||
*
|
*
|
||||||
@ -179,9 +182,9 @@ class ImportXlsx extends ModeleImports
|
|||||||
* @param array $contentlinevalues Array of lines
|
* @param array $contentlinevalues Array of lines
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_record_example($outputlangs,$contentlinevalues)
|
function write_record_example($outputlangs,$contentlinevalues)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
$col = 0;
|
$col = 0;
|
||||||
$row = 2;
|
$row = 2;
|
||||||
foreach($contentlinevalues as $cell) {
|
foreach($contentlinevalues as $cell) {
|
||||||
@ -192,16 +195,17 @@ class ImportXlsx extends ModeleImports
|
|||||||
return ''; // final output will be generated in footer
|
return ''; // final output will be generated in footer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output footer of an example file for this format
|
* Output footer of an example file for this format
|
||||||
*
|
*
|
||||||
* @param Translate $outputlangs Output language
|
* @param Translate $outputlangs Output language
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_footer_example($outputlangs)
|
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');
|
$tempfile = tempnam(sys_get_temp_dir(), 'dol');
|
||||||
$objWriter = new PHPExcel_Writer_Excel2007($this->workbook);
|
$objWriter = new PHPExcel_Writer_Excel2007($this->workbook);
|
||||||
$objWriter->save($tempfile);
|
$objWriter->save($tempfile);
|
||||||
@ -215,15 +219,16 @@ class ImportXlsx extends ModeleImports
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Open input file
|
* Open input file
|
||||||
*
|
*
|
||||||
* @param string $file Path of filename
|
* @param string $file Path of filename
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function import_open_file($file)
|
function import_open_file($file)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$ret=1;
|
$ret=1;
|
||||||
|
|
||||||
@ -238,15 +243,16 @@ class ImportXlsx extends ModeleImports
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return nb of records. File must be closed.
|
* Return nb of records. File must be closed.
|
||||||
*
|
*
|
||||||
* @param string $file Path of filename
|
* @param string $file Path of filename
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function import_get_nb_of_lines($file)
|
function import_get_nb_of_lines($file)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
$reader = new PHPExcel_Reader_Excel2007();
|
$reader = new PHPExcel_Reader_Excel2007();
|
||||||
$this->workbook = $reader->load($file);
|
$this->workbook = $reader->load($file);
|
||||||
|
|
||||||
@ -259,14 +265,15 @@ class ImportXlsx extends ModeleImports
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Input header line from file
|
* Input header line from file
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function import_read_header()
|
function import_read_header()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
// This is not called by the import code !!!
|
// This is not called by the import code !!!
|
||||||
$this->headers = array();
|
$this->headers = array();
|
||||||
$colcount = PHPExcel_Cell::columnIndexFromString($this->workbook->getActiveSheet()->getHighestDataColumn());
|
$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 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)
|
* @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()
|
function import_read_record()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$rowcount = $this->workbook->getActiveSheet()->getHighestDataRow();
|
$rowcount = $this->workbook->getActiveSheet()->getHighestDataRow();
|
||||||
@ -301,19 +309,22 @@ class ImportXlsx extends ModeleImports
|
|||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Close file handle
|
* Close file handle
|
||||||
*
|
*
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function import_close_file()
|
function import_close_file()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
$this->workbook->disconnectWorksheets();
|
$this->workbook->disconnectWorksheets();
|
||||||
unset($this->workbook);
|
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
|
* 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.
|
* @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
|
* @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)
|
function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs,$conf,$user;
|
global $langs,$conf,$user;
|
||||||
global $thirdparty_static; // Specific to thirdparty import
|
global $thirdparty_static; // Specific to thirdparty import
|
||||||
global $tablewithentity_cache; // Cache to avoid to call desc at each rows on tables
|
global $tablewithentity_cache; // Cache to avoid to call desc at each rows on tables
|
||||||
|
|||||||
@ -139,16 +139,17 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
* Return next free ref
|
/**
|
||||||
*
|
* Return next free ref
|
||||||
|
*
|
||||||
* @param Societe $objsoc Object thirdparty
|
* @param Societe $objsoc Object thirdparty
|
||||||
* @param Object $object Objet livraison
|
* @param Object $object Objet livraison
|
||||||
* @return string Texte descripif
|
* @return string Texte descripif
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function livraison_get_num($objsoc=0,$object='')
|
function livraison_get_num($objsoc=0,$object='')
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return $this->getNextValue($objsoc,$object);
|
return $this->getNextValue($objsoc,$object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
* 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
|
* @param array $contactid Array of contact id to add
|
||||||
* @return int <0 if error, number of emails added if ok
|
* @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)
|
function add_to_target_spec($mailing_id,$socid,$type_of_target, $contactid)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::add_to_target socid=".var_export($socid,true).' contactid='.var_export($contactid,true));
|
dol_syslog(get_class($this)."::add_to_target socid=".var_export($socid,true).' contactid='.var_export($contactid,true));
|
||||||
|
|||||||
@ -39,16 +39,17 @@ abstract class ModelePDFProduct extends CommonDocGenerator
|
|||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
|
|
||||||
/**
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
* Return list of active generation modules
|
/**
|
||||||
*
|
* 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
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
* @return array List of templates
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
static function liste_modeles($db,$maxfilenamelength=0)
|
static function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$type='product';
|
$type='product';
|
||||||
@ -140,6 +141,7 @@ abstract class ModeleProductCode
|
|||||||
return $langs->trans("NotAvailable");
|
return $langs->trans("NotAvailable");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoi la liste des modeles de numérotation
|
* Renvoi la liste des modeles de numérotation
|
||||||
*
|
*
|
||||||
@ -147,9 +149,9 @@ abstract class ModeleProductCode
|
|||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
* @return array List of numbers
|
* @return array List of numbers
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
static function liste_modeles($db,$maxfilenamelength=0)
|
static function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
$liste=array();
|
$liste=array();
|
||||||
$sql ="";
|
$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")).')';
|
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>';
|
$s.='<br>';
|
||||||
}
|
}
|
||||||
if ($type == 1)
|
elseif ($type == 1)
|
||||||
{
|
{
|
||||||
$s.=$langs->trans("RequiredIfService").': ';
|
$s.=$langs->trans("RequiredIfService").': ';
|
||||||
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='<strike>';
|
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")).')';
|
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>';
|
$s.='<br>';
|
||||||
}
|
}
|
||||||
if ($type == -1)
|
elseif ($type == -1)
|
||||||
{
|
{
|
||||||
$s.=$langs->trans("Required").': ';
|
$s.=$langs->trans("Required").': ';
|
||||||
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='<strike>';
|
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED) && ! empty($this->code_null)) $s.='<strike>';
|
||||||
@ -239,14 +241,15 @@ abstract class ModeleProductCode
|
|||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
|
/**
|
||||||
* Check if mask/numbering use prefix
|
* Check if mask/numbering use prefix
|
||||||
*
|
*
|
||||||
* @return int 0=no, 1=yes
|
* @return int 0=no, 1=yes
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function verif_prefixIsUsed()
|
function verif_prefixIsUsed()
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -207,6 +207,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
return $texte;
|
return $texte;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Function to build a document on disk using the generic odt module.
|
* 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
|
* @param int $hideref Do not show ref
|
||||||
* @return int 1 if OK, <=0 if KO
|
* @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)
|
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $user,$langs,$conf,$mysoc,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$hookmanager;
|
||||||
|
|
||||||
if (empty($srctemplatepath))
|
if (empty($srctemplatepath))
|
||||||
|
|||||||
@ -42,6 +42,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
|||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
@ -49,9 +50,9 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
|||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
* @return array List of templates
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
static function liste_modeles($db,$maxfilenamelength=0)
|
static function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$type='propal';
|
$type='propal';
|
||||||
|
|||||||
@ -83,6 +83,7 @@ class pdf_paiement
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Fonction generant la rapport sur le disque
|
* Fonction generant la rapport sur le disque
|
||||||
*
|
*
|
||||||
@ -92,9 +93,9 @@ class pdf_paiement
|
|||||||
* @param string $outputlangs Lang output object
|
* @param string $outputlangs Lang output object
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function write_file($_dir, $month, $year, $outputlangs)
|
function write_file($_dir, $month, $year, $outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
global $conf, $hookmanager, $langs, $user;
|
global $conf, $hookmanager, $langs, $user;
|
||||||
@ -406,6 +407,7 @@ class pdf_paiement
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Output body
|
* Output body
|
||||||
*
|
*
|
||||||
@ -415,9 +417,9 @@ class pdf_paiement
|
|||||||
* @param Translate $outputlangs Object langs
|
* @param Translate $outputlangs Object langs
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
|
||||||
function Body(&$pdf, $page, $lines, $outputlangs)
|
function Body(&$pdf, $page, $lines, $outputlangs)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user