move phpcs:ignore

This commit is contained in:
Frédéric FRANCE 2018-09-02 09:27:59 +02:00
parent 3e723af018
commit e98b8e5e25
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
8 changed files with 159 additions and 89 deletions

View File

@ -64,7 +64,7 @@ class autoTranslator
// Translate // Translate
//ini_set('default_charset','UTF-8'); //ini_set('default_charset','UTF-8');
ini_set('default_charset',$this->_outputpagecode); ini_set('default_charset',$this->_outputpagecode);
$this->parse_refLangTranslationFiles(); $this->parseRefLangTranslationFiles();
} }
/** /**
@ -72,8 +72,7 @@ class autoTranslator
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function parseRefLangTranslationFiles()
private function parse_refLangTranslationFiles()
{ {
$files = $this->getTranslationFilesArray($this->_refLang); $files = $this->getTranslationFilesArray($this->_refLang);

View File

@ -38,21 +38,21 @@ class ActionComm extends CommonObject
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element='action'; public $element='action';
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element = 'actioncomm'; public $table_element = 'actioncomm';
public $table_rowid = 'id'; public $table_rowid = 'id';
public $picto='action'; public $picto='action';
/** /**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
* @var int * @var int
*/ */
public $ismultientitymanaged = 1; public $ismultientitymanaged = 1;
/** /**
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user, 2=Same than 1 but accept record if fksoc is empty * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user, 2=Same than 1 but accept record if fksoc is empty
* @var integer * @var integer
@ -694,14 +694,15 @@ class ActionComm extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Initialize this->userassigned array with list of id of user assigned to event * Initialize this->userassigned array with list of id of user assigned to event
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_userassigned() function fetch_userassigned()
{ {
// phpcs:enable
$sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; $sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency";
$sql.=" FROM ".MAIN_DB_PREFIX."actioncomm_resources"; $sql.=" FROM ".MAIN_DB_PREFIX."actioncomm_resources";
$sql.=" WHERE element_type = 'user' AND fk_actioncomm = ".$this->id; $sql.=" WHERE element_type = 'user' AND fk_actioncomm = ".$this->id;
@ -1017,6 +1018,7 @@ class ActionComm extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load indicators for dashboard (this->nbtodo and this->nbtodolate) * Load indicators for dashboard (this->nbtodo and this->nbtodolate)
* *
@ -1024,10 +1026,10 @@ class ActionComm extends CommonObject
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord * @param int $load_state_board Charge indicateurs this->nb de tableau de bord
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user, $load_state_board=0) function load_board($user, $load_state_board=0)
{ {
global $conf, $langs; // phpcs:enable
global $conf, $langs;
if(empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp"; if(empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp";
else { else {
@ -1142,6 +1144,7 @@ class ActionComm extends CommonObject
return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep); return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return label of action status * Return label of action status
* *
@ -1151,9 +1154,9 @@ class ActionComm extends CommonObject
* @param int $datestart Date start of event * @param int $datestart Date start of event
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
{ {
// phpcs:enable
global $langs; global $langs;
if ($mode == 0) if ($mode == 0)
@ -1351,6 +1354,7 @@ class ActionComm extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Export events from database into a cal file. * Export events from database into a cal file.
* *
@ -1361,9 +1365,9 @@ class ActionComm extends CommonObject
* @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) * @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...)
* @return int <0 if error, nb of events in new file if ok * @return int <0 if error, nb of events in new file if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_exportfile($format,$type,$cachedelay,$filename,$filters) function build_exportfile($format,$type,$cachedelay,$filename,$filters)
{ {
// phpcs:enable
global $conf,$langs,$dolibarr_main_url_root,$mysoc; global $conf,$langs,$dolibarr_main_url_root,$mysoc;
require_once DOL_DOCUMENT_ROOT ."/core/lib/xcal.lib.php"; require_once DOL_DOCUMENT_ROOT ."/core/lib/xcal.lib.php";

View File

@ -34,17 +34,17 @@ class ActionCommReminder extends CommonObject
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element = 'actioncomm_reminder'; public $element = 'actioncomm_reminder';
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element = 'actioncomm_reminder'; public $table_element = 'actioncomm_reminder';
/** /**
* @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
*/ */
public $ismultientitymanaged = 0; public $ismultientitymanaged = 0;
/** /**
* @var string String with name of icon for actioncommreminder. Must be the part after the 'object_' into object_actioncommreminder.png * @var string String with name of icon for actioncommreminder. Must be the part after the 'object_' into object_actioncommreminder.png
*/ */
@ -168,6 +168,7 @@ class ActionCommReminder extends CommonObject
return $this->LibStatut($this->status,$mode); return $this->LibStatut($this->status,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return the status * Return the status
* *
@ -175,9 +176,9 @@ class ActionCommReminder extends CommonObject
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0) static function LibStatut($status,$mode=0)
{ {
// phpcs:enable
global $langs; global $langs;
if ($mode == 0) if ($mode == 0)

View File

@ -429,6 +429,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Set draft status * Set draft status
* *
@ -436,9 +437,9 @@ class Commande extends CommonOrder
* @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user, $idwarehouse=-1) function set_draft($user, $idwarehouse=-1)
{ {
//phpcs:enable
global $conf,$langs; global $conf,$langs;
$error=0; $error=0;
@ -511,6 +512,7 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Tag the order as validated (opened) * Tag the order as validated (opened)
* Function used when order is reopend after being closed. * Function used when order is reopend after being closed.
@ -518,9 +520,9 @@ class Commande extends CommonOrder
* @param User $user Object user that change status * @param User $user Object user that change status
* @return int <0 if KO, 0 if nothing is done, >0 if OK * @return int <0 if KO, 0 if nothing is done, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_reopen($user) function set_reopen($user)
{ {
// phpcs:enable
$error=0; $error=0;
if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED)
@ -1476,6 +1478,7 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Add line into array * Add line into array
* $this->client must be loaded * $this->client must be loaded
@ -1490,9 +1493,9 @@ class Commande extends CommonOrder
* TODO Remplacer les appels a cette fonction par generation objet Ligne * TODO Remplacer les appels a cette fonction par generation objet Ligne
* insere dans tableau $this->products * insere dans tableau $this->products
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='') function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='')
{ {
// phpcs:enable
global $conf, $mysoc; global $conf, $mysoc;
if (! $qty) $qty = 1; if (! $qty) $qty = 1;
@ -1715,15 +1718,16 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Adding line of fixed discount in the order in DB * Adding line of fixed discount in the order in DB
* *
* @param int $idremise Id de la remise fixe * @param int $idremise Id de la remise fixe
* @return int >0 si ok, <0 si ko * @return int >0 si ok, <0 si ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise) function insert_discount($idremise)
{ {
// phpcs:enable
global $langs; global $langs;
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
@ -1793,15 +1797,16 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load array lines * Load array lines
* *
* @param int $only_product Return only physical products * @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($only_product=0) function fetch_lines($only_product=0)
{ {
// phpcs:enable
$this->lines=array(); $this->lines=array();
$sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.product_type, l.fk_commande, l.label as custom_label, l.description, l.price, l.qty, l.vat_src_code, l.tva_tx,'; $sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.product_type, l.fk_commande, l.label as custom_label, l.description, l.price, l.qty, l.vat_src_code, l.tva_tx,';
@ -2019,6 +2024,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Returns a array with expeditions lines number * Returns a array with expeditions lines number
* *
@ -2026,9 +2032,9 @@ class Commande extends CommonOrder
* *
* TODO deprecate, move to Shipping class * TODO deprecate, move to Shipping class
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function nb_expedition() function nb_expedition()
{ {
// phpcs:enable
$sql = 'SELECT count(*)'; $sql = 'SELECT count(*)';
$sql.= ' FROM '.MAIN_DB_PREFIX.'expedition as e'; $sql.= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql.= ', '.MAIN_DB_PREFIX.'element_element as el'; $sql.= ', '.MAIN_DB_PREFIX.'element_element as el';
@ -2045,6 +2051,7 @@ class Commande extends CommonOrder
else dol_print_error($this->db); else dol_print_error($this->db);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return a array with the pending stock by product * Return a array with the pending stock by product
* *
@ -2053,9 +2060,9 @@ class Commande extends CommonOrder
* *
* TODO FONCTION NON FINIE A FINIR * TODO FONCTION NON FINIE A FINIR
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function stock_array($filtre_statut=self::STATUS_CANCELED) function stock_array($filtre_statut=self::STATUS_CANCELED)
{ {
// phpcs:enable
$this->stocks = array(); $this->stocks = array();
// Tableau des id de produit de la commande // Tableau des id de produit de la commande
@ -2162,6 +2169,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Applique une remise relative * Applique une remise relative
* *
@ -2170,9 +2178,9 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise($user, $remise, $notrigger=0) function set_remise($user, $remise, $notrigger=0)
{ {
// phpcs:enable
$remise=trim($remise)?trim($remise):0; $remise=trim($remise)?trim($remise):0;
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2229,6 +2237,7 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Applique une remise absolue * Applique une remise absolue
* *
@ -2237,9 +2246,9 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0) function set_remise_absolue($user, $remise, $notrigger=0)
{ {
// phpcs:enable
$remise=trim($remise)?trim($remise):0; $remise=trim($remise)?trim($remise):0;
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2296,6 +2305,7 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Set the order date * Set the order date
* *
@ -2304,9 +2314,9 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date, $notrigger=0) function set_date($user, $date, $notrigger=0)
{ {
// phpcs:enable
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
{ {
$error=0; $error=0;
@ -2361,6 +2371,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Set the planned delivery date * Set the planned delivery date
* *
@ -2369,9 +2380,9 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison, $notrigger=0) function set_date_livraison($user, $date_livraison, $notrigger=0)
{ {
// phpcs:enable
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
{ {
$error=0; $error=0;
@ -2426,6 +2437,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of orders (eventuelly filtered on a user) into an array * Return list of orders (eventuelly filtered on a user) into an array
* *
@ -2439,9 +2451,9 @@ class Commande extends CommonOrder
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @return int -1 if KO, array with result if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC') function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC')
{ {
// phpcs:enable
global $user; global $user;
$ga = array(); $ga = array();
@ -2570,6 +2582,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Update order demand_reason * Update order demand_reason
* *
@ -2577,9 +2590,9 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if ok, <0 if ko * @return int >0 if ok, <0 if ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demand_reason($demand_reason_id, $notrigger=0) function demand_reason($demand_reason_id, $notrigger=0)
{ {
// phpcs:enable
global $user; global $user;
dol_syslog('Commande::demand_reason('.$demand_reason_id.')'); dol_syslog('Commande::demand_reason('.$demand_reason_id.')');
@ -2641,6 +2654,7 @@ class Commande extends CommonOrder
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Set customer ref * Set customer ref
* *
@ -2649,9 +2663,9 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($user, $ref_client, $notrigger=0) function set_ref_client($user, $ref_client, $notrigger=0)
{ {
// phpcs:enable
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
{ {
$error=0; $error=0;
@ -3254,15 +3268,16 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load indicators for dashboard (this->nbtodo and this->nbtodolate) * Load indicators for dashboard (this->nbtodo and this->nbtodolate)
* *
* @param User $user Object user * @param User $user Object user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user) function load_board($user)
{ {
// phpcs:enable
global $conf, $langs; global $conf, $langs;
$clause = " WHERE"; $clause = " WHERE";
@ -3340,6 +3355,7 @@ class Commande extends CommonOrder
return $this->LibStatut($this->statut, $this->billed, $mode); return $this->LibStatut($this->statut, $this->billed, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return label of status * Return label of status
* *
@ -3349,9 +3365,9 @@ class Commande extends CommonOrder
* @param int $donotshowbilled Do not show billed status after order status * @param int $donotshowbilled Do not show billed status after order status
* @return string Label of status * @return string Label of status
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$billed,$mode,$donotshowbilled=0) function LibStatut($statut,$billed,$mode,$donotshowbilled=0)
{ {
// phpcs:enable
global $langs, $conf; global $langs, $conf;
$billedtext = ''; $billedtext = '';
@ -3660,14 +3676,15 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Charge indicateurs this->nb de tableau de bord * Charge indicateurs this->nb de tableau de bord
* *
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
// phpcs:enable
global $user; global $user;
$this->nb=array(); $this->nb=array();
@ -4296,14 +4313,15 @@ class OrderLine extends CommonOrderLine
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Update totals of order into database * Update totals of order into database
* *
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total() function update_total()
{ {
// phpcs:enable
$this->db->begin(); $this->db->begin();
// Clean parameters // Clean parameters

View File

@ -51,12 +51,12 @@ class Form
* @var DoliDB Database handler. * @var DoliDB Database handler.
*/ */
public $db; public $db;
/** /**
* @var string Error code (or message) * @var string Error code (or message)
*/ */
public $error=''; public $error='';
var $num; var $num;
// Cache arrays // Cache arrays
@ -653,6 +653,7 @@ class Form
return $ret; return $ret;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return combo list of activated countries, into language of user * Return combo list of activated countries, into language of user
* *
@ -666,9 +667,9 @@ class Form
* @param int $disablefavorites Disable favorites * @param int $disablefavorites Disable favorites
* @return string HTML string with select * @return string HTML string with select
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0) function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0)
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
$langs->load("dict"); $langs->load("dict");
@ -750,6 +751,7 @@ class Form
return $out; return $out;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return select list of incoterms * Return select list of incoterms
* *
@ -762,9 +764,9 @@ class Form
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return string HTML string with select and input * @return string HTML string with select and input
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array()) function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array())
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
$langs->load("dict"); $langs->load("dict");
@ -843,6 +845,7 @@ class Form
return $out; return $out;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of types of lines (product or service) * Return list of types of lines (product or service)
* Example: 0=product, 1=service, 9=other (for external module) * Example: 0=product, 1=service, 9=other (for external module)
@ -854,9 +857,9 @@ class Form
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, -1=Force none (and set hidden field to 'service') * @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, -1=Force none (and set hidden field to 'service')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0) function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0)
{ {
// phpcs:enable
global $db,$langs,$user,$conf; global $db,$langs,$user,$conf;
// If product & services are enabled or both disabled. // If product & services are enabled or both disabled.
@ -899,14 +902,15 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load into cache cache_types_fees, array of types of fees * Load into cache cache_types_fees, array of types of fees
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_types_fees() function load_cache_types_fees()
{ {
// phpcs:enable
global $langs; global $langs;
$num = count($this->cache_types_fees); $num = count($this->cache_types_fees);
@ -947,6 +951,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of types of notes * Return list of types of notes
* *
@ -955,9 +960,9 @@ class Form
* @param int $showempty Add an empty field * @param int $showempty Add an empty field
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_fees($selected='',$htmlname='type',$showempty=0) function select_type_fees($selected='',$htmlname='type',$showempty=0)
{ {
// phpcs:enable
global $user, $langs; global $user, $langs;
dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG); dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG);
@ -986,6 +991,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return HTML code to select a company. * Return HTML code to select a company.
* *
@ -998,12 +1004,13 @@ class Form
* @return string Return select box for thirdparty. * @return string Return select box for thirdparty.
* @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0) * @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0) function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0)
{ {
// phpcs:enable
return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit); return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Output html form to select a third party * Output html form to select a third party
* *
@ -1023,9 +1030,9 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) * @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
* @return string HTML string with select box for thirdparty. * @return string HTML string with select box for thirdparty.
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false) function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false)
{ {
// phpcs:enable
global $conf,$user,$langs; global $conf,$user,$langs;
$out=''; $out='';
@ -1067,6 +1074,7 @@ class Form
return $out; return $out;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Output html form to select a third party. * Output html form to select a third party.
* Note, you must use the select_company to get the component to select a third party. This function must only be called by select_company. * Note, you must use the select_company to get the component to select a third party. This function must only be called by select_company.
@ -1086,9 +1094,9 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut * @param bool $multiple add [] in the name of element and add 'multiple' attribut
* @return string HTML string with * @return string HTML string with
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false) function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false)
{ {
// phpcs:enable
global $conf,$user,$langs; global $conf,$user,$langs;
$out=''; $out='';
@ -1248,6 +1256,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return HTML combo list of absolute discounts * Return HTML combo list of absolute discounts
* *
@ -1258,9 +1267,9 @@ class Form
* @param int $maxvalue Max value for lines that can be selected * @param int $maxvalue Max value for lines that can be selected
* @return int Return number of qualifed lines in list * @return int Return number of qualifed lines in list
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0)
{ {
// phpcs:enable
global $langs,$conf; global $langs,$conf;
// On recherche les remises // On recherche les remises
@ -1324,6 +1333,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of all contacts (for a third party or all) * Return list of all contacts (for a third party or all)
* *
@ -1344,9 +1354,9 @@ class Form
* @return int <0 if KO, Nb of contact in list if OK * @return int <0 if KO, Nb of contact in list if OK
* @deprected You can use selectcontacts directly (warning order of param was changed) * @deprected You can use selectcontacts directly (warning order of param was changed)
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='') function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='')
{ {
// phpcs:enable
print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid); print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
return $this->num; return $this->num;
} }
@ -1484,6 +1494,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return select list of users * Return select list of users
* *
@ -1499,12 +1510,13 @@ class Form
* @deprecated Use select_dolusers instead * @deprecated Use select_dolusers instead
* @see select_dolusers() * @see select_dolusers()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0') function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0')
{ {
// phpcs:enable
print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity); print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return select list of users * Return select list of users
* *
@ -1528,9 +1540,9 @@ class Form
* @return string HTML select string * @return string HTML select string
* @see select_dolgroups * @see select_dolgroups
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false) function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false)
{ {
// phpcs:enable
global $conf,$user,$langs; global $conf,$user,$langs;
// If no preselected user defined, we take current user // If no preselected user defined, we take current user
@ -1713,6 +1725,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return select list of users. Selected users are stored into session. * Return select list of users. Selected users are stored into session.
* List of users are provided into $_SESSION['assignedtouser']. * List of users are provided into $_SESSION['assignedtouser'].
@ -1735,9 +1748,9 @@ class Form
* @return string HTML select string * @return string HTML select string
* @see select_dolgroups * @see select_dolgroups
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array()) function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array())
{ {
// phpcs:enable
global $conf, $user, $langs; global $conf, $user, $langs;
$userstatic=new User($this->db); $userstatic=new User($this->db);
@ -1802,6 +1815,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list * Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
* *
@ -1827,9 +1841,9 @@ class Form
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array()) function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array())
{ {
// phpcs:enable
global $langs,$conf; global $langs,$conf;
$price_level = (! empty($price_level) ? $price_level : 0); $price_level = (! empty($price_level) ? $price_level : 0);
@ -1945,6 +1959,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of products for a customer * Return list of products for a customer
* *
@ -1968,9 +1983,9 @@ class Form
* 'warehouseinternal' = select products from warehouses for internal correct/transfer only * 'warehouseinternal' = select products from warehouses for internal correct/transfer only
* @return array Array of keys for json * @return array Array of keys for json
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='') function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='')
{ {
// phpcs:enable
global $langs,$conf,$user,$db; global $langs,$conf,$user,$db;
$out=''; $out='';
@ -2432,6 +2447,7 @@ class Form
$optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>$outprice_ht, 'price_ttc'=>$outprice_ttc, 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit); $optJson = array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'label2'=>$outlabel, 'desc'=>$outdesc, 'type'=>$outtype, 'price_ht'=>$outprice_ht, 'price_ttc'=>$outprice_ttc, 'pricebasetype'=>$outpricebasetype, 'tva_tx'=>$outtva_tx, 'qty'=>$outqty, 'discount'=>$outdiscount, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list) * Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
* *
@ -2445,9 +2461,9 @@ class Form
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices * @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0) function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0)
{ {
// phpcs:enable
global $langs,$conf; global $langs,$conf;
global $price_level, $status, $finished; global $price_level, $status, $finished;
@ -2474,6 +2490,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of suppliers products * Return list of suppliers products
* *
@ -2489,9 +2506,9 @@ class Form
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices * @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @return array Array of keys for json * @return array Array of keys for json
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0) function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0)
{ {
// phpcs:enable
global $langs,$conf,$db; global $langs,$conf,$db;
$out=''; $out='';
@ -2704,6 +2721,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of suppliers prices for a product * Return list of suppliers prices for a product
* *
@ -2712,9 +2730,9 @@ class Form
* @param int $selected_supplier Pre-selected supplier if more than 1 result * @param int $selected_supplier Pre-selected supplier if more than 1 result
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='') function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='')
{ {
// phpcs:enable
global $langs,$conf; global $langs,$conf;
$langs->load('stocks'); $langs->load('stocks');
@ -2816,6 +2834,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of delivery address * Return list of delivery address
* *
@ -2825,10 +2844,10 @@ class Form
* @param int $showempty Add an empty field * @param int $showempty Add an empty field
* @return integer|null * @return integer|null
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_address($selected, $socid, $htmlname='address_id',$showempty=0) function select_address($selected, $socid, $htmlname='address_id',$showempty=0)
{ {
// On recherche les utilisateurs // phpcs:enable
// looking for users
$sql = "SELECT a.rowid, a.label"; $sql = "SELECT a.rowid, a.label";
$sql .= " FROM ".MAIN_DB_PREFIX ."societe_address as a"; $sql .= " FROM ".MAIN_DB_PREFIX ."societe_address as a";
$sql .= " WHERE a.fk_soc = ".$socid; $sql .= " WHERE a.fk_soc = ".$socid;
@ -2869,14 +2888,15 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load into cache list of payment terms * Load into cache list of payment terms
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_conditions_paiements() function load_cache_conditions_paiements()
{ {
// phpcs:enable
global $langs; global $langs;
$num = count($this->cache_conditions_paiements); $num = count($this->cache_conditions_paiements);
@ -2917,14 +2937,15 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Charge dans cache la liste des délais de livraison possibles * Charge dans cache la liste des délais de livraison possibles
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_availability() function load_cache_availability()
{ {
// phpcs:enable
global $langs; global $langs;
$num = count($this->cache_availability); $num = count($this->cache_availability);
@ -3084,14 +3105,15 @@ class Form
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Charge dans cache la liste des types de paiements possibles * Charge dans cache la liste des types de paiements possibles
* *
* @return int Nb of lines loaded, <0 if KO * @return int Nb of lines loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_types_paiements() function load_cache_types_paiements()
{ {
// phpcs:enable
global $langs; global $langs;
$num=count($this->cache_types_paiements); $num=count($this->cache_types_paiements);
@ -3137,6 +3159,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of payment modes. * Return list of payment modes.
* Constant MAIN_DEFAULT_PAYMENT_TERM_ID can used to set default value but scope is all application, probably not what you want. * Constant MAIN_DEFAULT_PAYMENT_TERM_ID can used to set default value but scope is all application, probably not what you want.
@ -3150,9 +3173,9 @@ class Form
* @param string $morecss Add more CSS on select tag * @param string $morecss Add more CSS on select tag
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='') function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='')
{ {
// phpcs:enable
global $langs, $user, $conf; global $langs, $user, $conf;
dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG); dol_syslog(__METHOD__." selected=".$selected.", htmlname=".$htmlname, LOG_DEBUG);
@ -3182,6 +3205,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of payment methods * Return list of payment methods
* *
@ -3196,9 +3220,9 @@ class Form
* @param string $morecss Add more CSS on select tag * @param string $morecss Add more CSS on select tag
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='') function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
{ {
// phpcs:enable
global $langs,$user; global $langs,$user;
dol_syslog(__METHOD__." ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG); dol_syslog(__METHOD__." ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
@ -3458,6 +3482,7 @@ class Form
return $return; return $return;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return a HTML select list of bank accounts * Return a HTML select list of bank accounts
* *
@ -3470,9 +3495,9 @@ class Form
* @param int $showcurrency Show currency in label * @param int $showcurrency Show currency in label
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0) function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0)
{ {
// phpcs:enable
global $langs, $conf; global $langs, $conf;
$langs->load("admin"); $langs->load("admin");
@ -3562,6 +3587,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of categories having choosed type * Return list of categories having choosed type
* *
@ -3574,9 +3600,9 @@ class Form
* @return string * @return string
* @see select_categories * @see select_categories
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0) function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0)
{ {
// phpcs:enable
global $conf, $langs; global $conf, $langs;
$langs->load("categories"); $langs->load("categories");
@ -3648,6 +3674,7 @@ class Form
return $output; return $output;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a confirmation HTML form or AJAX popup * Show a confirmation HTML form or AJAX popup
* *
@ -3664,9 +3691,9 @@ class Form
* @deprecated * @deprecated
* @see formconfirm() * @see formconfirm()
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{ {
// phpcs:enable
print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width); print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width);
} }
@ -3960,6 +3987,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a form to select a project * Show a form to select a project
* *
@ -3973,9 +4001,9 @@ class Form
* @param int $nooutput No print is done. String is returned. * @param int $nooutput No print is done. String is returned.
* @return string Return html content * @return string Return html content
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0)
{ {
// phpcs:enable
global $langs; global $langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
@ -4019,6 +4047,7 @@ class Form
return $out; return $out;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a form to select payment conditions * Show a form to select payment conditions
* *
@ -4028,9 +4057,9 @@ class Form
* @param int $addempty Add empty entry * @param int $addempty Add empty entry
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0) function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
{ {
// phpcs:enable
global $langs; global $langs;
if ($htmlname != "none") if ($htmlname != "none")
{ {
@ -4053,6 +4082,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a form to select a delivery delay * Show a form to select a delivery delay
* *
@ -4062,9 +4092,9 @@ class Form
* @param int $addempty Ajoute entree vide * @param int $addempty Ajoute entree vide
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_availability($page, $selected='', $htmlname='availability', $addempty=0) function form_availability($page, $selected='', $htmlname='availability', $addempty=0)
{ {
// phpcs:enable
global $langs; global $langs;
if ($htmlname != "none") if ($htmlname != "none")
{ {
@ -4128,6 +4158,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a form + html select a date * Show a form + html select a date
* *
@ -4140,9 +4171,9 @@ class Form
* @return string * @return string
* @see select_date * @see select_date
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
{ {
// phpcs:enable
global $langs; global $langs;
$ret=''; $ret='';
@ -4170,6 +4201,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a select form to choose a user * Show a select form to choose a user
* *
@ -4180,9 +4212,9 @@ class Form
* @param array $include List of users id to include * @param array $include List of users id to include
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='') function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='')
{ {
// phpcs:enable
global $langs; global $langs;
if ($htmlname != "none") if ($htmlname != "none")
@ -4209,6 +4241,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show form with payment mode * Show form with payment mode
* *
@ -4219,9 +4252,9 @@ class Form
* @param int $active Active or not, -1 = all * @param int $active Active or not, -1 = all
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1) function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1)
{ {
// phpcs:enable
global $langs; global $langs;
if ($htmlname != "none") if ($htmlname != "none")
{ {
@ -4244,6 +4277,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show form with multicurrency code * Show form with multicurrency code
* *
@ -4252,9 +4286,9 @@ class Form
* @param string $htmlname Name of select html field * @param string $htmlname Name of select html field
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code') function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code')
{ {
// phpcs:enable
global $langs; global $langs;
if ($htmlname != "none") if ($htmlname != "none")
{ {
@ -4272,6 +4306,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show form with multicurrency rate * Show form with multicurrency rate
* *
@ -4281,9 +4316,9 @@ class Form
* @param string $currency Currency code to explain the rate * @param string $currency Currency code to explain the rate
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='') function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='')
{ {
// phpcs:enable
global $langs, $mysoc, $conf; global $langs, $mysoc, $conf;
if ($htmlname != "none") if ($htmlname != "none")
@ -4314,6 +4349,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a select box with available absolute discounts * Show a select box with available absolute discounts
* *
@ -4329,9 +4365,9 @@ class Form
* @param int $discount_type 0 => customer discount, 1 => supplier discount * @param int $discount_type 0 => customer discount, 1 => supplier discount
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0) function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0)
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
if ($htmlname != "none") if ($htmlname != "none")
{ {
@ -4410,6 +4446,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show forms to select a contact * Show forms to select a contact
* *
@ -4419,9 +4456,9 @@ class Form
* @param string $htmlname Name of HTML select. If 'none', we just show contact link. * @param string $htmlname Name of HTML select. If 'none', we just show contact link.
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_contacts($page, $societe, $selected='', $htmlname='contactid') function form_contacts($page, $societe, $selected='', $htmlname='contactid')
{ {
// phpcs:enable
global $langs, $conf; global $langs, $conf;
if ($htmlname != "none") if ($htmlname != "none")
@ -4455,6 +4492,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Output html select to select thirdparty * Output html select to select thirdparty
* *
@ -4468,9 +4506,9 @@ class Form
* @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array()) function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array())
{ {
// phpcs:enable
global $langs; global $langs;
if ($htmlname != "none") if ($htmlname != "none")
@ -4498,6 +4536,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Retourne la liste des devises, dans la langue de l'utilisateur * Retourne la liste des devises, dans la langue de l'utilisateur
* *
@ -4505,9 +4544,9 @@ class Form
* @param string $htmlname name of HTML select list * @param string $htmlname name of HTML select list
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_currency($selected='',$htmlname='currency_id') function select_currency($selected='',$htmlname='currency_id')
{ {
// phpcs:enable
print $this->selectCurrency($selected,$htmlname); print $this->selectCurrency($selected,$htmlname);
} }
@ -4610,15 +4649,16 @@ class Form
return $out; return $out;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load into the cache vat rates of a country * Load into the cache vat rates of a country
* *
* @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'") * @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'")
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO * @return int Nb of loaded lines, 0 if already loaded, <0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_vatrates($country_code) function load_cache_vatrates($country_code)
{ {
// phpcs:enable
global $langs; global $langs;
$num = count($this->cache_vatrates); $num = count($this->cache_vatrates);
@ -4676,6 +4716,7 @@ class Form
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Output an HTML select vat rate. * Output an HTML select vat rate.
* The name of this function should be selectVat. We keep bad name for compatibility purpose. * The name of this function should be selectVat. We keep bad name for compatibility purpose.
@ -4697,9 +4738,9 @@ class Form
* @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key * @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0) function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0)
{ {
// phpcs:enable
global $langs,$conf,$mysoc; global $langs,$conf,$mysoc;
$langs->load('errors'); $langs->load('errors');
@ -4864,6 +4905,7 @@ class Form
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes.
* Fields are preselected with : * Fields are preselected with :
@ -4887,9 +4929,9 @@ class Form
* @return string|null Nothing or string if nooutput is 1 * @return string|null Nothing or string if nooutput is 1
* @see form_date, select_month, select_year, select_dayofweek * @see form_date, select_month, select_year, select_dayofweek
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
$retstring=''; $retstring='';
@ -5241,6 +5283,7 @@ class Form
return; return;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Function to show a form to select a duration on a page * Function to show a form to select a duration on a page
* *
@ -5254,9 +5297,9 @@ class Form
* @param int $nooutput Do not output html string but return it * @param int $nooutput Do not output html string but return it
* @return string|null * @return string|null
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
{ {
// phpcs:enable
global $langs; global $langs;
$retstring=''; $retstring='';
@ -6440,6 +6483,7 @@ class Form
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of export templates * Return list of export templates
* *
@ -6449,10 +6493,9 @@ class Form
* @param int $useempty Affiche valeur vide dans liste * @param int $useempty Affiche valeur vide dans liste
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0) function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
{ {
// phpcs:enable
$sql = "SELECT rowid, label"; $sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."export_model"; $sql.= " FROM ".MAIN_DB_PREFIX."export_model";
$sql.= " WHERE type = '".$type."'"; $sql.= " WHERE type = '".$type."'";
@ -6815,6 +6858,7 @@ class Form
return $ret; return $ret;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return select list of groups * Return select list of groups
* *
@ -6830,9 +6874,9 @@ class Form
* @return string * @return string
* @see select_dolusers * @see select_dolusers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false) function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false)
{ {
// phpcs:enable
global $conf,$user,$langs; global $conf,$user,$langs;
// Permettre l'exclusion de groupes // Permettre l'exclusion de groupes

View File

@ -58,7 +58,7 @@ class LoanSchedule extends CommonObject
* @deprecated * @deprecated
* @see amount, amounts * @see amount, amounts
*/ */
var $total; public $total;
/** /**
* Constructor * Constructor
@ -372,6 +372,7 @@ class LoanSchedule extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Calculate mensuality * Calculate mensuality
* *
@ -380,9 +381,9 @@ class LoanSchedule extends CommonObject
* @param int $nbterm nb term * @param int $nbterm nb term
* @return double mensuality * @return double mensuality
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function calc_mens($capital, $rate, $nbterm) function calc_mens($capital, $rate, $nbterm)
{ {
// phpcs:enable
$result=''; $result='';
if (!empty($capital) && !empty($rate) && !empty($nbterm)) { if (!empty($capital) && !empty($rate) && !empty($nbterm)) {
@ -465,7 +466,7 @@ class LoanSchedule extends CommonObject
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function trans_paiment() function trans_paiment()
{ {
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';

View File

@ -230,6 +230,7 @@ class Address
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Charge depuis la base toutes les adresses d'une societe * Charge depuis la base toutes les adresses d'une societe
* *
@ -237,9 +238,9 @@ class Address
* @param User $user Objet de l'utilisateur * @param User $user Objet de l'utilisateur
* @return int >0 si ok, <0 si ko * @return int >0 si ok, <0 si ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($socid, $user=null) function fetch_lines($socid, $user=null)
{ {
// phpcs:enable
global $langs, $conf; global $langs, $conf;
$sql = 'SELECT rowid, nom as name, client, fournisseur'; $sql = 'SELECT rowid, nom as name, client, fournisseur';
@ -324,6 +325,7 @@ class Address
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Charge depuis la base l'objet adresse * Charge depuis la base l'objet adresse
* *
@ -331,9 +333,9 @@ class Address
* @param User $user Objet de l'utilisateur * @param User $user Objet de l'utilisateur
* @return int >0 si ok, <0 si ko * @return int >0 si ok, <0 si ko
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_address($id, $user=null) function fetch_address($id, $user=null)
{ {
// phpcs:enable
global $langs; global $langs;
global $conf; global $conf;

View File

@ -47,14 +47,15 @@ class Client extends Societe
$this->fournisseur = 0; $this->fournisseur = 0;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load indicators into this->nb for board * Load indicators into this->nb for board
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
// phpcs:enable
global $user; global $user;
$this->nb=array("customers" => 0,"prospects" => 0); $this->nb=array("customers" => 0,"prospects" => 0);