Merge pull request #9607 from atm-gauthier/7.0_fix_replenish_entity

FIX : need to filter on current entity on replenish
This commit is contained in:
Laurent Destailleur
2018-09-27 09:22:44 +02:00
committed by GitHub

View File

@@ -185,6 +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 IN (".getEntity('commande_fournisseur').")";
$sql.= " ORDER BY date_creation DESC";
$resql = $db->query($sql);
if($resql && $db->num_rows($resql) > 0) {