Fix sql error on web service

This commit is contained in:
Laurent Destailleur 2022-02-19 00:41:45 +01:00
parent 05f0f1733d
commit 6b8793e171

View File

@ -350,8 +350,8 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty)
if (!$error) {
$linesinvoice = array();
$sql .= "SELECT f.rowid as facid";
$sql .= " FROM '.MAIN_DB_PREFIX.'facture_fourn as f";
$sql = "SELECT f.rowid as facid";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql .= " WHERE f.entity = ".((int) $conf->entity);
if ($idthirdparty != 'all') {
$sql .= " AND f.fk_soc = ".((int) $idthirdparty);