diff --git a/APPL/Shared/loadBESDisc.asp b/APPL/Shared/loadBESDisc.asp index 18101f9ccd..976778f82d 100644 --- a/APPL/Shared/loadBESDisc.asp +++ b/APPL/Shared/loadBESDisc.asp @@ -32,7 +32,7 @@ var discsql = "SELECT bd.ins_discipline_key" + " , " + lcl.xsqla('bd.ins_discipline_omschrijving','bd.ins_discipline_key') + " FROM bes_discipline bd" + " WHERE bd.ins_discipline_verwijder IS NULL" - +(disctype == 2 + +(disctype <= 2 ? " AND bd.ins_discipline_key IN (SELECT dp.bes_ins_discipline_key_inkoop" + " FROM bes_disc_params dp" + " WHERE dp.bes_ins_discipline_key_inkoop IS NOT NULL)"