diff --git a/APPL/API2/model_reportsx.inc b/APPL/API2/model_reportsx.inc index d223841fd5..bd1712e252 100644 --- a/APPL/API2/model_reportsx.inc +++ b/APPL/API2/model_reportsx.inc @@ -102,6 +102,10 @@ function model_reportsx(usrrap_key, params) + " WHERE w.prs_perslid_key = " + user_key + " ) OR fac_functie_key IS NULL)"); } + if ((S("fac_usrrap_mode") & 1) != 1) // Als je niet mag clonen heb je niets aan UDR rapporten + { + query.wheres.push("UPPER(fac_usrrap_view_name) NOT LIKE '%\\_V\\_UDR%' ESCAPE '\\'"); + } var sql = "SELECT " + query.selects.join(", ") + " FROM " + query.tables.join(", ") + (query.wheres.length ? " WHERE " + query.wheres.join(" AND " ) : "")