Index: KLPUTZ.mac.rou =================================================================== diff -u -r1146 -r1273 --- KLPUTZ.mac.rou (.../KLPUTZ.mac.rou) (revision 1146) +++ KLPUTZ.mac.rou (.../KLPUTZ.mac.rou) (revision 1273) @@ -212,8 +212,6 @@ Set IsChanged=1 Quit ; - ; - ; ; Geef volgende voor een bepaald niveau SORTNEXT(%J,SortKey) New Next @@ -409,4 +407,20 @@ Set Skip=$G(Skip) Do DELOBJ^KLPUTZ2(KLNr,NoSa,Skip) Quit + ; + ; Klant heeft een uitzondering? + ; Niveau: 1 = HoofdGroep, 2 = Groep, 3 = SubGroep, 4 = product +HeeftUitzondering(KLNr,PRNr,Niveau,SoSa) + New HeeftUitzondering,KKey,HoofdGroep,Groep,SubGroep + If $G(NoSa)="" Set NoSa="N" + If NoSa'="N",NoSa'="S" Quit 0 + Set KKey=$$KKEY^KLASS(PRNr) + Set HoofdGroep=$$GETSORT^KLASS(KKey,1) + Set:Niveau>1 Groep=$$GETSORT^KLASS(KKey,2) + Set:Niveau>2 SubGroep=$$GETSORT^KLASS(KKey,3) + Set:Niveau=1 HeeftUitzondering=''$D(^KLPUTZ(NoSa,KLNr,HoofdGroep)) + Set:Niveau=2 HeeftUitzondering=''$D(^KLPUTZ(NoSa,KLNr,HoofdGroep,Groep)) + Set:Niveau=3 HeeftUitzondering=''$D(^KLPUTZ(NoSa,KLNr,HoofdGroep,Groep,SubGroep)) + Set:Niveau=4 HeeftUitzondering=''$D(^KLPUTZ(NoSa,KLNr,HoofdGroep,Groep,SubGroep,PRNr)) + Quit +$G(HeeftUitzondering) ; \ No newline at end of file