Browse Source

Work on renaming libelle into label

Laurent Destailleur 1 year ago
parent
commit
e3e73d9096

+ 1 - 1
htdocs/adherents/canvas/actions_adherentcard_common.class.php

@@ -275,7 +275,7 @@ abstract class ActionsAdherentCardCommon
 				$obj = $this->db->fetch_object($resql);
 
 				$this->object->country_code = $obj->code;
-				$this->object->country = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->libelle;
+				$this->object->country = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->label;
 			} else {
 				dol_print_error($this->db);
 			}

+ 1 - 1
htdocs/comm/propal/card.php

@@ -542,7 +542,7 @@ if (empty($reshook)) {
 							$num = count($lines);
 							for ($i = 0; $i < $num; $i++) {
 								$label = (!empty($lines[$i]->label) ? $lines[$i]->label : '');
-								$desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle);
+								$desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->label);
 
 								// Positive line
 								$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);

+ 5 - 4
htdocs/commande/class/commande.class.php

@@ -1329,8 +1329,8 @@ class Commande extends CommonOrder
 
 		$error = 0;
 
-
 		$this->date_commande = dol_now();
+		$this->date = dol_now();
 		$this->source = 0;
 
 		$num = count($object->lines);
@@ -1357,7 +1357,7 @@ class Commande extends CommonOrder
 			$line->fk_parent_line    = $object->lines[$i]->fk_parent_line;
 			$line->fk_unit = $object->lines[$i]->fk_unit;
 
-			$line->date_start = $object->lines[$i]->date_start;
+			$line->date_start 		= $object->lines[$i]->date_start;
 			$line->date_end    		= $object->lines[$i]->date_end;
 
 			$line->fk_fournprice	= $object->lines[$i]->fk_fournprice;
@@ -1810,8 +1810,9 @@ class Commande extends CommonOrder
 			$line->tva_tx = $tva_tx;
 			$line->localtax1_tx = $localtax1_tx;
 			$line->localtax2_tx = $localtax2_tx;
-			$line->ref = $prod->ref;
-			$line->libelle = $prod->label;
+
+			$line->product_ref = $prod->ref;
+			$line->product_label = $prod->label;
 			$line->product_desc = $prod->description;
 			$line->fk_unit = $prod->fk_unit;
 

+ 1 - 1
htdocs/compta/facture/card.php

@@ -1655,7 +1655,7 @@ if (empty($reshook)) {
 									}
 
 									$label = (!empty($lines[$i]->label) ? $lines[$i]->label : '');
-									$desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle);
+									$desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->label);
 									if ($object->situation_counter == 1) {
 										$lines[$i]->situation_percent = 0;
 									}

+ 1 - 1
htdocs/compta/facture/class/facture-rec.class.php

@@ -701,7 +701,7 @@ class FactureRec extends CommonInvoice
 				$line->ref              = $objp->product_ref; // Ref product
 				$line->product_ref      = $objp->product_ref; // Ref product
 				$line->libelle          = $objp->product_label; // deprecated
-				$line->product_label = $objp->product_label; // Label product
+				$line->product_label 	= $objp->product_label; // Label product
 				$line->product_desc     = $objp->product_desc; // Description product
 				$line->product_type     = $objp->product_type; // Type of line
 				$line->fk_product_type  = $objp->fk_product_type; // Type of product

+ 2 - 2
htdocs/compta/facture/class/facture.class.php

@@ -1398,7 +1398,7 @@ class Facture extends CommonInvoice
 		for ($i = 0; $i < $num; $i++) {
 			$line = new FactureLigne($this->db);
 
-			$line->libelle = $object->lines[$i]->libelle; // deprecated
+			$line->libelle 			= $object->lines[$i]->libelle; // deprecated
 			$line->label			= $object->lines[$i]->label;
 			$line->desc				= $object->lines[$i]->desc;
 			$line->subprice			= $object->lines[$i]->subprice;
@@ -2350,7 +2350,7 @@ class Facture extends CommonInvoice
 				$line->ref              = $objp->product_ref; // Ref product
 				$line->product_ref      = $objp->product_ref; // Ref product
 				$line->libelle          = $objp->product_label; // deprecated
-				$line->product_label = $objp->product_label; // Label product
+				$line->product_label 	= $objp->product_label; // Label product
 				$line->product_desc     = $objp->product_desc; // Description product
 				$line->fk_product_type  = $objp->fk_product_type; // Type of product
 				$line->qty              = $objp->qty;

+ 0 - 4
htdocs/compta/facture/class/paymentterm.class.php

@@ -177,11 +177,9 @@ class PaymentTerm // extends CommonObject
 	 */
 	public function fetch($id, $code = '')
 	{
-		global $langs;
 		$sql = "SELECT";
 		$sql .= " t.rowid,";
 		$sql .= " t.entity,";
-
 		$sql .= " t.code,";
 		$sql .= " t.sortorder,";
 		$sql .= " t.active,";
@@ -190,8 +188,6 @@ class PaymentTerm // extends CommonObject
 		$sql .= " t.type_cdr,";
 		$sql .= " t.nbjour,";
 		$sql .= " t.decalage";
-
-
 		$sql .= " FROM ".MAIN_DB_PREFIX."c_payment_term as t";
 		if ($id) {
 			$sql .= " WHERE t.rowid = ".((int) $id);

+ 1 - 1
htdocs/contrat/card.php

@@ -333,7 +333,7 @@ if (empty($reshook)) {
 									} else {
 										$label = $lines[$i]->product_label;
 									}
-									$desc = ($lines[$i]->desc && $lines[$i]->desc != $lines[$i]->libelle) ?dol_htmlentitiesbr($lines[$i]->desc) : '';
+									$desc = ($lines[$i]->desc && $lines[$i]->desc != $lines[$i]->label) ? dol_htmlentitiesbr($lines[$i]->desc) : '';
 								} else {
 									$desc = dol_htmlentitiesbr($lines[$i]->desc);
 								}

+ 7 - 7
htdocs/core/class/commonobject.class.php

@@ -1279,7 +1279,7 @@ abstract class CommonObject
 			$sql .= ", t.fk_soc as socid, t.statut as statuscontact";
 		}
 		$sql .= ", t.civility as civility, t.lastname as lastname, t.firstname, t.email";
-		$sql .= ", tc.source, tc.element, tc.code, tc.libelle";
+		$sql .= ", tc.source, tc.element, tc.code, tc.libelle as type_label";
 		$sql .= " FROM ".$this->db->prefix()."c_type_contact tc,";
 		$sql .= " ".$this->db->prefix()."element_contact ec";
 		if ($source == 'internal') {	// internal contact (user)
@@ -1322,7 +1322,7 @@ abstract class CommonObject
 
 				if (!$list) {
 					$transkey = "TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
-					$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
+					$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
 					$tab[$i] = array(
 						'parentId' => $this->id,
 						'source' => $obj->source,
@@ -1367,7 +1367,7 @@ abstract class CommonObject
 	public function swapContactStatus($rowid)
 	{
 		$sql = "SELECT ec.datecreate, ec.statut, ec.fk_socpeople, ec.fk_c_type_contact,";
-		$sql .= " tc.code, tc.libelle";
+		$sql .= " tc.code, tc.libelle as type_label";
 		$sql .= " FROM (".$this->db->prefix()."element_contact as ec, ".$this->db->prefix()."c_type_contact as tc)";
 		$sql .= " WHERE ec.rowid =".((int) $rowid);
 		$sql .= " AND ec.fk_c_type_contact=tc.rowid";
@@ -1412,7 +1412,7 @@ abstract class CommonObject
 		}
 
 		$tab = array();
-		$sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle, tc.position";
+		$sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position";
 		$sql .= " FROM ".$this->db->prefix()."c_type_contact as tc";
 		$sql .= " WHERE tc.element='".$this->db->escape($this->element)."'";
 		if ($activeonly == 1) {
@@ -1435,7 +1435,7 @@ abstract class CommonObject
 				$obj = $this->db->fetch_object($resql);
 
 				$transkey = "TypeContact_".$this->element."_".$source."_".$obj->code;
-				$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
+				$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
 				if (empty($option)) {
 					$tab[$obj->rowid] = $libelle_type;
 				} else {
@@ -1470,7 +1470,7 @@ abstract class CommonObject
 
 		$tab = array();
 
-		$sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle, tc.position, tc.element";
+		$sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position, tc.element";
 		$sql .= " FROM ".$this->db->prefix()."c_type_contact as tc";
 
 		$sqlWhere = array();
@@ -1523,7 +1523,7 @@ abstract class CommonObject
 						$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
 						$tmpelement = $obj->element;
 						$transkey = "TypeContact_".$tmpelement."_".$source."_".$obj->code;
-						$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
+						$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
 						if (empty($option)) {
 							$tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
 						} else {

+ 2 - 2
htdocs/core/class/html.formbarcode.class.php

@@ -138,7 +138,7 @@ class FormBarCode
 
 		$out = '';
 
-		$sql = "SELECT rowid, code, libelle";
+		$sql = "SELECT rowid, code, libelle as label";
 		$sql .= " FROM ".$this->db->prefix()."c_barcode_type";
 		$sql .= " WHERE coder <> '0'";
 		$sql .= " AND entity = ".$conf->entity;
@@ -165,7 +165,7 @@ class FormBarCode
 				} else {
 					$out .= '<option value="'.$obj->rowid.'">';
 				}
-				$out .= $obj->libelle;
+				$out .= $obj->label;
 				$out .= '</option>';
 				$i++;
 			}

+ 4 - 4
htdocs/core/class/html.formcompany.class.php

@@ -55,7 +55,7 @@ class FormCompany extends Form
 
 		$effs = array();
 
-		$sql = "SELECT id, code, libelle";
+		$sql = "SELECT id, code, libelle as label";
 		$sql .= " FROM " . $this->db->prefix() . "c_typent";
 		$sql .= " WHERE active = 1 AND (fk_country IS NULL OR fk_country = " . (empty($mysoc->country_id) ? '0' : $mysoc->country_id) . ")";
 		if ($filter) {
@@ -78,7 +78,7 @@ class FormCompany extends Form
 				if ($langs->trans($objp->code) != $objp->code) {
 					$effs[$key] = $langs->trans($objp->code);
 				} else {
-					$effs[$key] = $objp->libelle;
+					$effs[$key] = $objp->label;
 				}
 				if ($effs[$key] == '-') {
 					$effs[$key] = '';
@@ -104,7 +104,7 @@ class FormCompany extends Form
 		// phpcs:enable
 		$effs = array();
 
-		$sql = "SELECT id, code, libelle";
+		$sql = "SELECT id, code, libelle as label";
 		$sql .= " FROM " . $this->db->prefix() . "c_effectif";
 		$sql .= " WHERE active = 1";
 		if ($filter) {
@@ -125,7 +125,7 @@ class FormCompany extends Form
 					$key = $objp->code;
 				}
 
-				$effs[$key] = $objp->libelle != '-' ? $objp->libelle : '';
+				$effs[$key] = $objp->label != '-' ? $objp->label : '';
 				$i++;
 			}
 			$this->db->free($resql);

+ 0 - 1
htdocs/core/class/html.formother.class.php

@@ -331,7 +331,6 @@ class FormOther
 						$out .= '<option value="'.$obj->taux.($obj->revenuestamp_type == 'percent' ? '%' : '').'"'.($obj->revenuestamp_type == 'percent' ? ' data-type="percent"' : '').' selected>';
 					} else {
 						$out .= '<option value="'.$obj->taux.($obj->revenuestamp_type == 'percent' ? '%' : '').'"'.($obj->revenuestamp_type == 'percent' ? ' data-type="percent"' : '').'>';
-						//print '<option onmouseover="showtip(\''.$obj->libelle.'\')" onMouseout="hidetip()" value="'.$obj->rowid.'">';
 					}
 					$out .= $obj->taux.($obj->revenuestamp_type == 'percent' ? '%' : '');
 					$out .= '</option>';

+ 3 - 4
htdocs/core/lib/company.lib.php

@@ -716,7 +716,7 @@ function getFormeJuridiqueLabel($code)
 		return '';
 	}
 
-	$sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."c_forme_juridique";
+	$sql = "SELECT libelle as label FROM ".MAIN_DB_PREFIX."c_forme_juridique";
 	$sql .= " WHERE code = '".$db->escape($code)."'";
 
 	dol_syslog("Company.lib::getFormeJuridiqueLabel", LOG_DEBUG);
@@ -727,7 +727,7 @@ function getFormeJuridiqueLabel($code)
 		if ($num) {
 			$obj = $db->fetch_object($resql);
 
-			$label = ($obj->libelle != '-' ? $obj->libelle : '');
+			$label = ($obj->label != '-' ? $obj->label : '');
 
 			return $langs->trans($label);
 		} else {
@@ -2056,8 +2056,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
 			$out .= '<td class="tdoverflowmax300"';
 			if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
 				$transcode = $langs->trans("Action".$histo[$key]['acode']);
-				$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
-				//$actionstatic->libelle=$libelle;
+				//$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']);
 				$libelle = $histo[$key]['note'];
 				$actionstatic->id = $histo[$key]['id'];
 				$out .= ' title="'.dol_escape_htmltag($libelle).'">';

+ 3 - 3
htdocs/core/lib/contact.lib.php

@@ -187,7 +187,7 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $
 		print "\n".'<table class="noborder" width=100%>';
 
 		$sql  = 'SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount';
-		$sql .= ', cls.code as opp_status_code, ctc.libelle';
+		$sql .= ', cls.code as opp_status_code, ctc.libelle as type_label';
 		$sql .= ' FROM '.MAIN_DB_PREFIX.'projet as p';
 		$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_lead_status as cls on p.fk_opp_status = cls.rowid';
 		$sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'element_contact as cc ON (p.rowid = cc.element_id)';
@@ -236,8 +236,8 @@ function show_contacts_projects($conf, $langs, $db, $object, $backtopage = '', $
 						print '</td>';
 
 						// Label
-						print '<td>'.$obj->title.'</td>';
-						print '<td>'.$obj->libelle.'</td>';
+						print '<td>'.dol_escape_htmltag($obj->title).'</td>';
+						print '<td>'.dol_escape_htmltag($obj->type_label).'</td>';
 						// Date start
 						print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
 						// Date end

+ 6 - 7
htdocs/delivery/class/delivery.class.php

@@ -851,17 +851,16 @@ class Delivery extends CommonObject
 
 				$line->id = $obj->rowid;
 				$line->label = $obj->custom_label;
-				$line->description		= $obj->description;
-				$line->fk_product = $obj->fk_product;
-				$line->qty_asked = $obj->qty_asked;
-				$line->qty_shipped		= $obj->qty_shipped;
+				$line->description	= $obj->description;
+				$line->fk_product 	= $obj->fk_product;
+				$line->qty_asked 	= $obj->qty_asked;
+				$line->qty_shipped	= $obj->qty_shipped;
 
-				$line->ref = $obj->product_ref; // deprecated
-				$line->libelle = $obj->product_label; // deprecated
 				$line->product_label	= $obj->product_label; // Product label
-				$line->product_ref = $obj->product_ref; // Product ref
+				$line->product_ref 		= $obj->product_ref; // Product ref
 				$line->product_desc		= $obj->product_desc; // Product description
 				$line->product_type		= $obj->fk_product_type;
+
 				$line->fk_origin_line = $obj->fk_origin_line;
 
 				$line->price = $obj->subprice;

+ 2 - 5
htdocs/expedition/class/expedition.class.php

@@ -1958,9 +1958,8 @@ class Expedition extends CommonObject
 		$xnbp = 0;
 		while ($xnbp < $nbp) {
 			$line = new ExpeditionLigne($this->db);
-			$line->desc = $langs->trans("Description")." ".$xnbp;
-			$line->libelle = $langs->trans("Description")." ".$xnbp; // deprecated
-			$line->label = $langs->trans("Description")." ".$xnbp;
+			$line->product_desc = $langs->trans("Description")." ".$xnbp;
+			$line->product_label = $langs->trans("Description")." ".$xnbp;
 			$line->qty = 10;
 			$line->qty_asked = 5;
 			$line->qty_shipped = 4;
@@ -2745,8 +2744,6 @@ class ExpeditionLigne extends CommonObjectLine
 	 */
 	public function insert($user, $notrigger = 0)
 	{
-		global $langs, $conf;
-
 		$error = 0;
 
 		// Check parameters

+ 4 - 4
htdocs/expensereport/class/expensereport.class.php

@@ -1062,7 +1062,7 @@ class ExpenseReport extends CommonObject
 		$sql .= ' de.fk_ecm_files,';
 		$sql .= ' de.total_ht, de.total_tva, de.total_ttc,';
 		$sql .= ' de.total_localtax1, de.total_localtax2, de.rule_warning_message,';
-		$sql .= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees, ctf.accountancy_code as accountancy_code_type_fees,';
+		$sql .= ' ctf.code as code_type_fees, ctf.label as label_type_fees, ctf.accountancy_code as accountancy_code_type_fees,';
 		$sql .= ' p.ref as ref_projet, p.title as title_projet';
 		$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as de';
 		$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id';
@@ -1105,7 +1105,7 @@ class ExpenseReport extends CommonObject
 				$deplig->total_localtax2  = $objp->total_localtax2;
 
 				$deplig->type_fees_code     = empty($objp->code_type_fees) ? 'TF_OTHER' : $objp->code_type_fees;
-				$deplig->type_fees_libelle  = $objp->libelle_type_fees;
+				$deplig->type_fees_libelle  = $objp->label_type_fees;
 				$deplig->type_fees_accountancy_code = $objp->accountancy_code_type_fees;
 
 				$deplig->tva_tx             = $objp->tva_tx;
@@ -2226,14 +2226,14 @@ class ExpenseReport extends CommonObject
 			$this->line->id = ((int) $rowid);
 
 			// Select des infos sur le type fees
-			$sql = "SELECT c.code as code_type_fees, c.label as libelle_type_fees";
+			$sql = "SELECT c.code as code_type_fees, c.label as label_type_fees";
 			$sql .= " FROM ".MAIN_DB_PREFIX."c_type_fees as c";
 			$sql .= " WHERE c.id = ".((int) $type_fees_id);
 			$resql = $this->db->query($sql);
 			if ($resql) {
 				$objp_fees = $this->db->fetch_object($resql);
 				$this->line->type_fees_code      = $objp_fees->code_type_fees;
-				$this->line->type_fees_libelle   = $objp_fees->libelle_type_fees;
+				$this->line->type_fees_libelle   = $objp_fees->label_type_fees;
 				$this->db->free($resql);
 			}
 

+ 17 - 3
htdocs/fourn/class/fournisseur.facture-rec.class.php

@@ -71,15 +71,28 @@ class FactureFournisseurRec extends CommonInvoice
 	protected $table_ref_field = 'titre';
 
 	/**
-	 * @var string The label of recurring invoice
+	 * @var string 	The label of recurring invoice
+	 * @deprecated	Use $title
 	 */
 	public $titre;
+	/**
+	 * @var string The label of recurring invoice
+	 */
+	public $title;
+
 	public $ref_supplier;
 	public $socid;
 
 	public $suspended; // status
 
+	/**
+	 * @var string		Label of invoice
+	 * @deprecated		Use $label
+	 */
 	public $libelle;
+	/**
+	 * @var string		Label of invoice
+	 */
 	public $label;
 
 	/**
@@ -1302,7 +1315,7 @@ class FactureFournisseurRec extends CommonInvoice
 					$new_fac_fourn->fk_fac_rec_source = $facturerec->id; // We will create $facture from this recurring invoice
 
 					$new_fac_fourn->type = self::TYPE_STANDARD;
-					$new_fac_fourn->statut = self::STATUS_DRAFT;
+					$new_fac_fourn->statut = self::STATUS_DRAFT;	// deprecated
 					$new_fac_fourn->status = self::STATUS_DRAFT;
 					$new_fac_fourn->date = empty($facturerec->date_when) ? $now : $facturerec->date_when; // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
 					$new_fac_fourn->socid = $facturerec->socid;
@@ -1310,7 +1323,8 @@ class FactureFournisseurRec extends CommonInvoice
 					$new_fac_fourn->ref_supplier = $facturerec->ref_supplier;
 					$new_fac_fourn->model_pdf = $facturerec->model_pdf;
 					$new_fac_fourn->fk_project = $facturerec->fk_project;
-					$new_fac_fourn->libelle = $facturerec->libelle;
+					$new_fac_fourn->label = $facturerec->label;
+					$new_fac_fourn->libelle = $facturerec->label;	// deprecated
 
 					$invoiceidgenerated = $new_fac_fourn->create($user);
 					if ($invoiceidgenerated <= 0) {

+ 5 - 0
htdocs/fourn/class/fournisseur.facture.class.php

@@ -107,6 +107,11 @@ class FactureFournisseur extends CommonInvoice
 	 */
 	public $ref_supplier;
 
+	/**
+	 * @var string 	Label of invoice
+	 * @deprecated	Use $label
+	 */
+	public $libelle;
 	/**
 	 * @var string Label of invoice
 	 */

+ 2 - 0
htdocs/fourn/facture/card-rec.php

@@ -191,6 +191,7 @@ if (empty($reshook)) {
 			$object->titre = GETPOST('title', 'alphanohtml'); // deprecated
 			$object->title = GETPOST('title', 'alphanohtml');
 			$object->libelle = GETPOST('libelle', 'alpha');
+			$object->label = GETPOST('libelle', 'alpha');
 			$object->fk_project = GETPOST('projectid', 'int');
 			$object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml');
 
@@ -365,6 +366,7 @@ if (empty($reshook)) {
 		// Set label
 		$object->fetch($id);
 		$object->libelle = GETPOST('libelle');
+		$object->label = GETPOST('libelle');
 		$result = $object->update($user);
 
 		if ($result < 0) {

+ 2 - 1
htdocs/fourn/facture/card.php

@@ -758,7 +758,8 @@ if (empty($reshook)) {
 				$object->ref = GETPOST('ref', 'alphanohtml');
 				$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
 				$object->socid = GETPOST('socid', 'int');
-				$object->libelle = GETPOST('label', 'alphanohtml');
+				$object->libelle = GETPOST('label', 'alphanohtml');	// deprecated
+				$object->label = GETPOST('label', 'alphanohtml');
 				$object->date = $dateinvoice;
 				$object->date_echeance = $datedue;
 				$object->note_public = GETPOST('note_public', 'restricthtml');

+ 1 - 1
htdocs/product/stats/facture_fournisseur.php

@@ -246,7 +246,7 @@ if ($id > 0 || !empty($ref)) {
 						$supplierinvoicestatic->id = $objp->facid;
 						$supplierinvoicestatic->ref = $objp->ref;
 						$supplierinvoicestatic->ref_supplier = $objp->ref_supplier;
-						$supplierinvoicestatic->libelle = $objp->label;
+						$supplierinvoicestatic->libelle = $objp->label;	// deprecated
 						$supplierinvoicestatic->label = $objp->label;
 						$supplierinvoicestatic->total_ht = $objp->total_ht;
 						$supplierinvoicestatic->total_ttc = $objp->total_ttc;

+ 2 - 2
htdocs/societe/class/societe.class.php

@@ -5269,7 +5269,7 @@ class Societe extends CommonObject
 		$sql .= ", t.fk_soc as socid, t.statut as statuscontact";
 
 		$sql .= ", t.civility as civility, t.lastname as lastname, t.firstname, t.email";
-		$sql .= ", tc.source, tc.element, tc.code, tc.libelle";
+		$sql .= ", tc.source, tc.element, tc.code, tc.libelle as type_label";
 		$sql .= " FROM ".$this->db->prefix()."c_type_contact tc";
 		$sql .= ", ".$this->db->prefix()."societe_contacts sc";
 
@@ -5299,7 +5299,7 @@ class Societe extends CommonObject
 
 				if (!$list) {
 					$transkey = "TypeContact_".$obj->element."_".$obj->source."_".$obj->code;
-					$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
+					$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->type_label);
 					$tab[$i] = array(
 						'source' => $obj->source,
 						'socid' => $obj->socid,

+ 3 - 3
htdocs/societe/societecontact.php

@@ -216,7 +216,7 @@ if ($id > 0 || !empty($ref)) {
 			$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,";
 			$sql .= " d.datefin,";
 			$sql .= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
-			$sql .= " t.libelle as type, t.subscription";
+			$sql .= " t.libelle as type_label, t.subscription";
 			$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d";
 			$sql .= ", ".MAIN_DB_PREFIX."adherent_type as t";
 			$sql .= " WHERE d.fk_soc = ".((int) $id);
@@ -280,8 +280,8 @@ if ($id > 0 || !empty($ref)) {
 
 						// Type
 						$membertypestatic->id = $objp->type_id;
-						$membertypestatic->libelle = $objp->type;
-						$membertypestatic->label = $objp->type;
+						$membertypestatic->libelle = $objp->type_label;	// deprecated
+						$membertypestatic->label = $objp->type_label;
 
 						print '<td class="nowrap">';
 						print $membertypestatic->getNomUrl(1, 32);

+ 2 - 0
htdocs/user/class/user.class.php

@@ -1594,12 +1594,14 @@ class User extends CommonObject
 			if (!empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER) && !empty($conf->global->STOCK_USERSTOCK_AUTOCREATE)) {
 				require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
 				$langs->load("stocks");
+
 				$entrepot = new Entrepot($this->db);
 				$entrepot->label = $langs->trans("PersonalStock", $this->getFullName($langs));
 				$entrepot->libelle = $entrepot->label; // For backward compatibility
 				$entrepot->description = $langs->trans("ThisWarehouseIsPersonalStock", $this->getFullName($langs));
 				$entrepot->statut = 1;
 				$entrepot->country_id = $mysoc->country_id;
+
 				$warehouseid = $entrepot->create($user);
 
 				$this->fk_warehouse = $warehouseid;

+ 1 - 0
phpstan.neon

@@ -49,6 +49,7 @@ parameters:
 		- '#Undefined variable: \$errors#'
 		- '#Undefined variable: \$form#'
 		- '#Caught class Stripe#'
+		- '#Function llxHeaderVierge invoked with#'
 	internalErrorsCountLimit: 50
 	cache:
 	    nodesByFileCountMax: 512