diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index a9164676716..e5615aa66ba 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -762,7 +762,7 @@ if ($id > 0)
{
$contratstatic=new Contrat($db);
- $sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut, c.datec as dc";
+ $sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut, c.datec as dc, c.date_contrat as dcon, c.ref_supplier as refsup";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
$sql.= " WHERE c.fk_soc = s.rowid ";
$sql.= " AND s.rowid = ".$object->id;
@@ -779,7 +779,7 @@ if ($id > 0)
print '
';
print '';
- print '| '.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).' | ';
+ print ' | ';
print ' ';
}
@@ -796,7 +796,9 @@ if ($id > 0)
$contrat->ref=$objp->ref?$objp->ref:$objp->id;
print $contrat->getNomUrl(1,12);
print "\n";
+ print ''.dol_trunc($objp->refsup,12)." | \n";
print ''.dol_print_date($db->jdate($objp->dc),'day')." | \n";
+ print ''.dol_print_date($db->jdate($objp->dcon),'day')." | \n";
print ' | ';
print '';
$contrat->fetch_lines();
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 8df0e0fcbc2..5f3caf18369 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -986,7 +986,7 @@ class ExtraFields
$sqlwhere .= ' WHERE ' . $InfoFieldList[4];
}
} else {
- $sqlwhere .= ' WHERE 1';
+ $sqlwhere .= ' WHERE 1=1';
}
if (in_array($InfoFieldList[0], array (
'tablewithentity'
|
|