Update replenish.php

This commit is contained in:
Laurent Destailleur 2018-09-27 09:22:38 +02:00 committed by GitHub
parent fc7c0ce521
commit ff3f1e933a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,7 +185,7 @@ if ($action == 'order' && isset($_POST['valid']))
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur";
$sql.= " WHERE fk_soc = ".$suppliersid[$i];
$sql.= " AND source = 42 AND fk_statut = 0";
$sql.= " AND entity = ".$conf->entity;
$sql.= " AND entity IN (".getEntity('commande_fournisseur').")";
$sql.= " ORDER BY date_creation DESC";
$resql = $db->query($sql);
if($resql && $db->num_rows($resql) > 0) {