';
// Date
$date=$obj->periode;
if (empty($date)) $date=$obj->date_ech;
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
index 00817ee5799..56427347dd4 100644
--- a/htdocs/contact/consumption.php
+++ b/htdocs/contact/consumption.php
@@ -170,7 +170,7 @@ if ($type_element == 'fichinter')
{ // Customer : show products from invoices
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
$documentstatic=new Fichinter($db);
- $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle, ';
+ $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'fichinterdet d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'fichinter as f ON d.fk_fichinter=f.rowid';
$tables_from.= ' INNER JOIN '.MAIN_DB_PREFIX.'element_contact ec ON ec.element_id=f.rowid AND ec.fk_socpeople='.$object->id;
@@ -183,7 +183,7 @@ elseif ($type_element == 'invoice')
{ // Customer : show products from invoices
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$documentstatic=new Facture($db);
- $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle, ';
+ $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'facturedet d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture as f ON d.fk_facture=f.rowid';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
@@ -198,7 +198,7 @@ elseif ($type_element == 'propal')
{
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$documentstatic=new Propal($db);
- $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle, ';
+ $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'propaldet d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'propal as c ON d.fk_propal=c.rowid';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
@@ -213,7 +213,7 @@ elseif ($type_element == 'order')
{
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$documentstatic=new Commande($db);
- $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle, ';
+ $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'commandedet d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande as c ON d.fk_commande=c.rowid';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
@@ -228,7 +228,7 @@ elseif ($type_element == 'supplier_invoice')
{ // Supplier : Show products from invoices.
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$documentstatic=new FactureFournisseur($db);
- $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle, ';
+ $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'facture_fourn_det d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn as f ON d.fk_facture_fourn=f.rowid';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
@@ -256,7 +256,7 @@ elseif ($type_element == 'supplier_order')
{ // Supplier : Show products from orders.
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
$documentstatic=new CommandeFournisseur($db);
- $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle, ';
+ $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'commande_fournisseurdet d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur as c ON d.fk_commande=c.rowid';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
@@ -272,7 +272,7 @@ elseif ($type_element == 'contract')
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
$documentstatic=new Contrat($db);
$documentstaticline=new ContratLigne($db);
- $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, tc.libelle, ';
+ $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, tc.libelle as type_contact_label, ';
$tables_from = MAIN_DB_PREFIX.'contratdet d';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'contrat as c ON d.fk_contrat=c.rowid';
$tables_from.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON d.fk_product=p.rowid';
@@ -344,14 +344,14 @@ if ($sql_select)
$num = $db->num_rows($resql);
- $param="&socid=".$socid."&type_element=".$type_element;
- if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ $param="&socid=".urlencode($socid)."&type_element=".urlencode($type_element);
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($sprod_fulldescr) $param.= "&sprod_fulldescr=".urlencode($sprod_fulldescr);
if ($sref) $param.= "&sref=".urlencode($sref);
- if ($month) $param.= "&month=".$month;
- if ($year) $param.= "&year=".$year;
- if ($optioncss != '') $param.='&optioncss='.$optioncss;
+ if ($month) $param.= "&month=".urlencode($month);
+ if ($year) $param.= "&year=".urlencode($year);
+ if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit);
@@ -408,6 +408,7 @@ if ($sql_select)
$documentstatic->statut=$objp->status;
$documentstatic->status=$objp->status;
$documentstatic->paye=$objp->paid;
+ $documentstatic->paid=$objp->paid;
if (is_object($documentstaticline)) $documentstaticline->statut=$objp->status;
@@ -573,8 +574,7 @@ if ($sql_select)
*/
print '';
- //print '
'.$prodreftxt.'
';
- print '
'.$objp->libelle.'
';
+ print '
'.$objp->type_contact_label.'
'; // Type of contact label
print '
'.$objp->prod_qty.'
';
$total_qty+=$objp->prod_qty;
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index 30eba9867b8..07f058f2fe2 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -1617,7 +1617,7 @@ function getListOfModels($db, $type, $maxfilenamelength = 0)
$found=0;
$dirtoscan='';
- $sql = "SELECT nom as id, nom as lib, libelle as label, description as description";
+ $sql = "SELECT nom as id, nom as doc_template_name, libelle as label, description as description";
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
$sql.= " WHERE type = '".$type."'";
$sql.= " AND entity IN (0,".$conf->entity.")";
@@ -1677,18 +1677,18 @@ function getListOfModels($db, $type, $maxfilenamelength = 0)
}
else
{
- if ($type == 'member' && $obj->lib == 'standard') // Special case, if member template, we add variant per format
+ if ($type == 'member' && $obj->doc_template_name == 'standard') // Special case, if member template, we add variant per format
{
global $_Avery_Labels;
include_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php';
foreach($_Avery_Labels as $key => $val)
{
- $liste[$obj->id.':'.$key]=($obj->label?$obj->label:$obj->lib).' '.$val['name'];
+ $liste[$obj->id.':'.$key]=($obj->label?$obj->label:$obj->doc_template_name).' '.$val['name'];
}
}
else // Common usage
{
- $liste[$obj->id]=$obj->label?$obj->label:$obj->lib;
+ $liste[$obj->id]=$obj->label?$obj->label:$obj->doc_template_name;
}
}
$i++;
diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php
index 25ffcb717fd..43d6ae08213 100644
--- a/htdocs/core/modules/mailings/fraise.modules.php
+++ b/htdocs/core/modules/mailings/fraise.modules.php
@@ -129,7 +129,7 @@ class mailing_fraise extends MailingTargets
$s.=' ';
$s.=$langs->trans("Type").': ';
$s.='
';
}
}
@@ -1548,7 +1548,7 @@ if ($action == 'create')
{
$warehouseObject=new Entrepot($db);
$warehouseObject->fetch($warehouse_selected_id);
- print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->libelle);
+ print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label);
}
else
{
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index e4f6f06b5a0..6d8a2e74319 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1777,7 +1777,8 @@ class Expedition extends CommonObject
{
$line=new ExpeditionLigne($this->db);
$line->desc=$langs->trans("Description")." ".$xnbp;
- $line->libelle=$langs->trans("Description")." ".$xnbp;
+ $line->libelle=$langs->trans("Description")." ".$xnbp; // deprecated
+ $line->label=$langs->trans("Description")." ".$xnbp;
$line->qty=10;
$line->qty_asked=5;
$line->qty_shipped=4;
@@ -1836,7 +1837,7 @@ class Expedition extends CommonObject
global $langs;
$this->meths = array();
- $sql = "SELECT em.rowid, em.code, em.libelle";
+ $sql = "SELECT em.rowid, em.code, em.libelle as label";
$sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em";
$sql.= " WHERE em.active = 1";
$sql.= " ORDER BY em.libelle ASC";
@@ -1847,7 +1848,7 @@ class Expedition extends CommonObject
while ($obj = $this->db->fetch_object($resql))
{
$label=$langs->trans('SendingMethod'.$obj->code);
- $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
+ $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label);
}
}
}
@@ -1867,7 +1868,7 @@ class Expedition extends CommonObject
$this->listmeths = array();
$i=0;
- $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active";
+ $sql = "SELECT em.rowid, em.code, em.libelle as label, em.description, em.tracking, em.active";
$sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em";
if ($id!='') $sql.= " WHERE em.rowid=".$id;
@@ -1879,7 +1880,7 @@ class Expedition extends CommonObject
$this->listmeths[$i]['rowid'] = $obj->rowid;
$this->listmeths[$i]['code'] = $obj->code;
$label=$langs->trans('SendingMethod'.$obj->code);
- $this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->libelle);
+ $this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label);
$this->listmeths[$i]['description'] = $obj->description;
$this->listmeths[$i]['tracking'] = $obj->tracking;
$this->listmeths[$i]['active'] = $obj->active;
diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php
index 6fb4e539d9d..156bd329d49 100644
--- a/htdocs/expensereport/class/paymentexpensereport.class.php
+++ b/htdocs/expensereport/class/paymentexpensereport.class.php
@@ -663,7 +663,7 @@ class PaymentExpenseReport extends CommonObject
$result='';
- if (empty($this->ref)) $this->ref=$this->lib;
+ if (empty($this->ref)) $this->ref=$this->label;
$label = $langs->trans("ShowPayment").': '.$this->ref;
if (!empty($this->id))
diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php
index f88653e70eb..2e3fd9ef1c8 100644
--- a/htdocs/fichinter/class/fichinterrec.class.php
+++ b/htdocs/fichinter/class/fichinterrec.class.php
@@ -342,12 +342,11 @@ class FichinterRec extends Fichinter
$objp = $this->db->fetch_object($result);
$line = new FichinterLigne($this->db);
- $line->rowid = $objp->rowid;
+ $line->id = $objp->rowid;
$line->label = $objp->custom_label; // Label line
$line->desc = $objp->description; // Description line
$line->product_type = $objp->product_type; // Type of line
$line->product_ref = $objp->product_ref; // Ref product
- $line->libelle = $objp->product_label; // deprecated
$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
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index de31ae1b624..f3535d3cd1c 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -706,7 +706,7 @@ if ($object->id > 0)
if ($user->rights->fournisseur->facture->lire)
{
// TODO move to DAO class
- $sql = 'SELECT f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,';
+ $sql = 'SELECT f.rowid, f.libelle as label, f.ref, f.ref_supplier, f.fk_statut, f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,';
$sql.= ' SUM(pf.amount) as am';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn';
@@ -741,13 +741,14 @@ if ($object->id > 0)
$facturestatic->id=$obj->rowid;
$facturestatic->ref=($obj->ref?$obj->ref:$obj->rowid);
$facturestatic->ref_supplier = $obj->ref_supplier;
- $facturestatic->libelle = $obj->libelle;
+ $facturestatic->libelle = $obj->label; // deprecated
+ $facturestatic->label = $obj->label;
$facturestatic->total_ht = $obj->total_ht;
$facturestatic->total_tva = $obj->total_tva;
$facturestatic->total_ttc = $obj->total_ttc;
print $facturestatic->getNomUrl(1);
print $obj->ref_supplier?' - '.$obj->ref_supplier:'';
- print ($obj->libelle?' - ':'').dol_trunc($obj->libelle, 14);
+ print ($obj->label?' - ':'').dol_trunc($obj->label, 14);
print '';
print '
Found line with id '.$obj->id.', label "'.$obj->libelle.'" of module "'.$obj->module.'" to delete';
+ print '
Found line with id '.$obj->id.', label "'.$obj->label.'" of module "'.$obj->module.'" to delete';
if (GETPOST('clean_perm_table', 'alpha') == 'confirmed')
{
$sqldelete = 'DELETE FROM '.MAIN_DB_PREFIX.'rights_def WHERE id = '.$obj->id;
diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php
index bf407b8fc90..2da7bd3fae6 100644
--- a/htdocs/livraison/card.php
+++ b/htdocs/livraison/card.php
@@ -559,7 +559,7 @@ else
$entrepot = new Entrepot($db);
$entrepot->fetch($object->entrepot_id);
print '