@@ -16,7 +16,7 @@ $sql = 'SELECT ds.rowid d_oid, op.oid p_oid, dp.ref, ds.reel, ps.quantity, ps.ph
LEFT JOIN '.DB_BASE.'._objects_p op ON op.id=od.id
LEFT JOIN '.DB_P_BASE.'.'.DB_P_PREFIX.'stock_available ps ON ps.id_stock_available=op.oid
WHERE (ds.fk_entrepot = '.$d_fk_entrepot.')
- AND ((ps.quantity IS NULL AND ds.reel != 0) OR (ps.quantity IS NOT NULL AND ds.reel != ps.physical_quantity))
+ AND ((ps.quantity IS NULL AND ds.reel != 0) OR (ps.quantity IS NOT NULL AND ds.reel != ps.physical_quantity AND ds.reel != ps.quantity))
GROUP BY ds.rowid';
$q = DB::o_select($sql);