Merge pull request #4145 from FHenry/3.8
FIX : Contract date inconsistency between /comm/card.php and #4089
This commit is contained in:
commit
7d7a978ba0
@ -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 '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).'</td>';
|
||||
print '<td colspan="6"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).'</td>';
|
||||
print '<td align="right"><a href="'.DOL_URL_ROOT.'/contrat/list.php?socid='.$object->id.'">'.$langs->trans("AllContracts").' <span class="badge">'.$num.'</span></a></td></tr></table></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -796,7 +796,9 @@ if ($id > 0)
|
||||
$contrat->ref=$objp->ref?$objp->ref:$objp->id;
|
||||
print $contrat->getNomUrl(1,12);
|
||||
print "</td>\n";
|
||||
print '<td class="nowrap">'.dol_trunc($objp->refsup,12)."</td>\n";
|
||||
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n";
|
||||
print '<td align="right" width="80">'.dol_print_date($db->jdate($objp->dcon),'day')."</td>\n";
|
||||
print '<td width="20"> </td>';
|
||||
print '<td align="right" class="nowrap">';
|
||||
$contrat->fetch_lines();
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user