Fix: Erreur sur mysql 5
This commit is contained in:
parent
9f9f849813
commit
131cdca0c7
@ -709,12 +709,12 @@ else
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
||||
print img_object($langs->trans("ShowService"),"service").' '.$objp->ref.'</a>';
|
||||
print $objp->label?' - '.$objp->label:'';
|
||||
if ($objp->description) print '<br />'.stripslashes(nl2br($objp->description));
|
||||
if ($objp->description) print '<br />'.nl2br($objp->description);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>".stripslashes(nl2br($objp->description))."</td>\n";
|
||||
print "<td>".nl2br($objp->description)."</td>\n";
|
||||
}
|
||||
// TVA
|
||||
print '<td align="center">'.$objp->tva_tx.'%</td>';
|
||||
|
||||
@ -107,8 +107,9 @@ $sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.d
|
||||
$sql.= ' sum('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,';
|
||||
$sql.= " c.rowid as cid, c.ref, c.datec, c.statut, s.nom, s.idp as sidp";
|
||||
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
|
||||
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,";
|
||||
if (!$user->rights->commercial->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
|
||||
$sql.= " WHERE c.fk_soc = s.idp ";
|
||||
if (!$user->rights->commercial->client->voir && !$socid) $sql .= " AND s.idp = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user