Merge pull request #4294 from marcosgdf/bug-4287

FIX #4287 SQL error when accessing an unexisting proposal
This commit is contained in:
Laurent Destailleur 2015-12-27 17:33:09 +01:00
commit 299e34f3ee

View File

@ -1026,7 +1026,7 @@ class Form
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
$sql.= " re.description, re.fk_facture_source";
$sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re";
$sql.= " WHERE fk_soc = ".$socid;
$sql.= " WHERE fk_soc = ".(int) $socid;
if ($filter) $sql.= " AND ".$filter;
$sql.= " ORDER BY re.description ASC";