Fix: Remove sql error when no link

This commit is contained in:
Laurent Destailleur 2011-03-01 09:33:59 +00:00
parent eee0d1aa07
commit d34a653734

View File

@ -1540,6 +1540,8 @@ class Propal extends CommonObject
} }
} }
if (sizeof($linkedInvoices) > 0)
{
$sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye"; $sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye";
$sql.= " FROM ".MAIN_DB_PREFIX."facture"; $sql.= " FROM ".MAIN_DB_PREFIX."facture";
$sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")"; $sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")";
@ -1579,6 +1581,8 @@ class Propal extends CommonObject
return -1; return -1;
} }
} }
else return $ga;
}
/** /**
* \brief Efface propal * \brief Efface propal