program "ARTIKELEN" dcl tabnum$=4(25) dcl selkode$=24,selzoek$=24,aantart=4,selindex%,vindrek$=8 #INCLUDE "CRINCLU" field=14 dcl hulpkey$=4 field=m #INCLUDE "CRINCLU2" assign=02,bestand(05),wr,si ;artikelbestand assign=03,bestand(01),wr,si ;rekeningenbestand assign=07,left(bestand(05),6)+"S",wr,si ;sort artikelen assign=12,bestand(04),wr,si ;klantenbestand assign=14,"ARTKEY",wr &100 open=2:&105,e goto &110 &105 cfile=2,d=750,rk=4 &110 open=7:&120,e goto &200 &120 cfile=7,k=14 &200 print=1:clear,paint(kh,ka),naam,atb(0)," BEHANDELING ARTIKELS ",tab(70),ndat print=1:paint(kl,0),tab(01,02),ltb,gener(77,hto),rtb print=1:tab(01,03),vtb,tab(79),vte print=1:tab(01,04),lto,gener(77,hto),rto,atb(0) print=1:tab(03,03),paint(kh,ka),"F1=Overzicht",atb(0) goto &205 &204 artkey=hulpkey &205 print=1:tab(01,05),atb(22) selkode=artkey if phil=1 : goto &225 &206 ask=1,i=&1,u=&1,/80=&700,/86=&570,/87=&580,/8a=&217,/8b=&219:tab(01,05),"Geef artikelnummer",esc,selkode,tab(34)=selkode if selkode=" " : goto &206 selkode=large(selkode) artkey=shr(large(left(selkode,4))) &210 search=2,artkey:&550,e,artrec(1),750 goto &225 &211 ask=1,i=&200,u=&200,/86=&570,/87=&580,/8a=&217,/8b=&219:tab(01,24),paint(kh,ka),"Artikel",ng,atb(0)," ",artkey," ",paint(kh,ka),"N",atb(0),"=nieuw ",fvoor,voor,fvolg,volg=j j=large(j) if j<>"N" : goto &205 for tel=1 to 3 artrec(tel)=" " next tel artbtw=1 artreknr=vastrek(28) for tel=1 to 14 artbedr(tel)=0 next tel veraant=0 verbed=0 insert=2,artkey:&200,e,artrec(1),750 goto &225 &217 up=2:&218,e,artdown(1),768 goto &225 &218 print=1:tab(01,24),atb(21) ask=1,i=&200,u=&200,/86=&570,/87=&580,/8b=&219:tab(01,24),paint(kh,ka),berb,atb(0),fvolg,volg=j goto &205 &219 down=2:&220,e,artdown(1),768 goto &225 &220 print=1:tab(01,24),atb(21) ask=1,i=&200,u=&200,/86=&570,/87=&580,/8a=&217:tab(01,24),paint(kh,ka),bere,atb(0),fvoor,voor=j goto &205 &225 phil=0 search=7,artalfa:&226,e &226 print=1:tab(01,05),atb(22) print=1:tab(01,05),"Artikelnummer : ",artkey print=1:tab(01,07),"Alfabet.kode",tab(20),": ",artalfa,"." print=1:tab(01,08),"Omschrijving",tab(20),": ",paint(kh,ka),artoms,atb(0),"." print=1:tab(01,09),"Omschrijving 2",tab(20),": ",artoms2,"." print=1:tab(01,10),"Btw 1--5 ",tab(20),": ",(--),artbtw,tab(30),(u5),vertek(artbtw),(e),"%" print=1:tab(01,11),"Rekeningnummer",tab(20),": ",artreknr,"." print=1:paint(kl,0),tab(01,12),gener(79,hto),atb(0) print=1:tab(01,13),"Verkoopprijs",tab(20),": ",(-8.n4),artbedr(1),(e),"." print=1:tab(01,14),"Aantal",tab(20),": ",(-8.n4),veraant,(e),"." print=1:tab(01,15),"Bedrag",tab(20),": ",(-8.n4),verbed,(e),"." print=1:paint(kl,0),tab(01,20),gener(79,hto),atb(0) if artreknr=" " : goto &250 search=3,artreknr:&240,e,rekrec goto &250 &240 rekoms="Rek.niet gevonden" &250 print=1:tab(30,11),rekoms &260 ask=1,i=&200,u=&200,/8a=&217,/8b=&219,/86=&570:tab(22,07)=artalfa artalfa=large(artalfa) print=1:tab(01,24),atb(21) &270 print=1:tab(01,24),atb(21) ask=1,i=&400,u=&260,/8a=&217,/8b=&219,/86=&570,/87=&580:tab(22,08)=artoms &280 ask=1,i=&400,u=&270,/8a=&217,/8b=&219,/87=&580:tab(22,09),artoms2,tab(22)=artoms2 &300 print=1:tab(01,24),atb(21) ask=1,i=&400,u=&280,/86=&570,/87=&580,/8a=&217,/8b=&219:tab(22,10),(nz)=artbtw if artbtw<1 : goto &300 if artbtw>5 : goto &300 print=1:tab(30,10),vertek(artbtw) &310 print=1:tab(01,24),paint(kh,ka),"N",atb(0)," = Opzoeken rekening",atb(21) ask=1,i=&400,u=&300,/8a=&330,/8b=&340,"nN"=&600:tab(22,11),artreknr,tab(22)=artreknr rekkode=artreknr search=3,rekkode:&320,e,rekrec goto &350 &320 print=1:tab(01,24),atb(21) ask=1,i=&400,u=&310,/8a=&330,/8b=&340,"nN"=&600:tab(01,24),paint(kh,ka),"Rekening",ng,atb(0),fvoor,voor,fvolg,volg=j goto &310 &330 up=3:&335,e,rekdown goto &350 &335 print=1:tab(01,24),atb(21) ask=1,i=&400,u=&310,/8b=&330,"nN"=&600:tab(01,24),paint(kh,ka),berb,atb(0),fvolg,volg=j goto &310 &340 down=3:&345,e,rekdown goto &350 &345 print=1:tab(01,24),atb(21) ask=1,i=&400,u=&310,/8a=&330,"nN"=&600:tab(01,24),paint(kh,ka),bere,atb(0),fvoor,voor=j goto &310 &350 artreknr=rekkode print=1:tab(22,11),rekkode,tab(30),paint(kh,ka),left(rekoms,len$(rekoms)),atb(0),atb(21) if left(artreknr,1)="7" : goto &360 ask=1,i=&400,u=&310,"nN"=&600:bell,tab(01,24),"Deze rekening Y-N : "=j j=large(j) if j<>"Y" : goto &310 &360 ask=1,i=&400,u=&310,/8a=&330,/8b=&340:tab(22,13),(-8.n4)=artbedr(1) &370 ask=1,i=&400,u=&360:tab(22,14),(-8.n4)=veraant &380 print=1:tab(01,24),atb(22) ask=1,i=&400,u=&370:tab(22,15),(-8.n4)=verbed &400 j=" " print=1:tab(01,24),atb(21) ask=1,i=&200,u=&380:tab(01,24),paint(kh,ka),vali,atb(0)," (A=annulatie) : "=j j=large(j) if j="A" : goto &500 if j="N" : goto &200 if j<>"Y" : goto &400 insert=2,artkey:&402,e,artrec(1),750 goto &410 &402 modif=2,artkey:&410,e,artrec(1),750 &410 brtoms=large(artalfa) brtkey=shr(artkey) modif=7,brtkode:&420,e goto &200 &420 insert=7,brtkode:&425,e goto &200 &425 print=1:tab(01,25),"Fout modif brtkode : ",e," ",brtkode stop &500 print=1:tab(01,24),atb(21) ask=1,i=&200,u=&200:bell,tab(01,24),"Annulatie van dit artikel Y-N : "=j j=large(j) if j="N" : goto &200 if j<>"Y" : goto &500 delete=2,artkey:&200,e goto &200 &550 search=7,selkode:&560,e &560 down=7:&211,e,brtdown if brtoms<>selkode : goto &211 goto &595 &570 up=7:&218,e,brtdown goto &595 &580 down=7:&220,e,brtdown &595 artkey=brtkey search=2,artkey:&205,e,artrec(1),750 goto &226 &600 print=1:tab(01,21),atb(22) print=1:tab(01,21),paint(kh,ka),"Opzoeken op naam van de algemene rekening ",atb(0) selzoek=" " vindrek=" " &605 print=1:tab(01,22),atb(22) ask=1,i=&310,u=&310:tab(01,23),"Geef trefwoord : ",selzoek,tab(18)=selzoek if selzoek=" " : goto &605 selzoek=large(selzoek) open=3:&310,e &610 down=3:&310,e,rekdown rekoms=large(rekoms) selindex=0 selindex=index(rekoms,selzoek) if selindex=0 : goto &610 print=1:tab(01,23),atb(22) print=1:tab(01,23),"Rekening : ",reknum," ",rekoms &615 j=" " ask=1,i=&605,u=&605:tab(01,24),"Deze rekening Y-N : "=j j=large(j) if j="N" : goto &610 if j<>"Y" : goto &615 print=1:tab(01,21),atb(22) artreknr=rekkode goto &310 &700 phil=0 lijntel=6 print=1:clear,paint(kh,ka),naam,atb(0)," OVERZICHT VAN DE ARTIKELEN ",tab(70),ndat print=1:paint(kl,0),tab(01,02),gener(79,hto),atb(0) &702 artkey=" " ask=1,i=&200,u=&200:tab(01,05),"Geef beginkode artikeloverzicht : ",artkey,tab(35)=artkey artkey=shr(artkey) print=1:tab(01,03),atb(22) print=1:tab(01,04)," Nr Code Omschrijving Artikel",tab(55),"Prijs",atb(0) print=1:paint(kl,0),tab(01,05),gener(79,hto),atb(0) search=2,artkey:&706,e,artrec(1),750 goto &710 &705 up=2:&707,e,artdown(1),768 goto &710 &706 if phil=1 : goto &705 down=2:&707,e,artdown(1),768 goto &710 &707 zoek=0 print=1:tab(01,24),atb(21) ask=1,i=&200,u=&700:tab(01,24),paint(kh,ka),bere,atb(0),num,ret=zoek if zoek=0 : goto &700 if zoek<6 : goto &707 if zoek>(lijntel-1) : goto &707 artkey=tabnum(zoek) search=2,artkey:&700,e,artrec(1),750 phil=1 goto &200 &710 aantart=aantart+1 print=1:tab(03,lijntel),paint(kn,ka),(--),lijntel,(e),paint(kn,ka2)," ",shr(artkey)," ",paint(kt,ka3)," ",artoms," ",paint(kn,ka4),artbedr(1),atb(0) print=1:tab(01,03),paint(kt,ka),(n4),aantart tabnum(lijntel)=artkey lijntel=lijntel+1 if lijntel<22 : goto &706 &713 zoek=0 print=1:tab(01,24),atb(21) ask=1,i=&200,u=&200,"tT"=&715:tab(01,24),paint(kh,ka),bla,atb(0)," T=terug ",num,ret=zoek if zoek=0 : goto &714 if zoek<6 : goto &713 if zoek>(lijntel-1) : goto &713 artkey=tabnum(zoek) search=2,artkey:&714,e,artrec(1),750 phil=1 goto &200 &714 for lijntel=1 to 24 tabnum(lijntel)=" " next lijntel print=1:tab(01,06),atb(22) lijntel=6 goto &706 &715 if phil=1 : goto &716 phil=1 goto &714 &716 phil=0 goto &714 eseg 0 end ggggend gglllllllllllllllllllllllseg speprijs memdeel(loper)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=mee)=e=