home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
36.dms
/
36.adf
/
checks.bas
< prev
next >
Wrap
BASIC Source File
|
1988-05-22
|
3KB
|
88 lines
100 screen 1,1:dim ck(120)
1000 i=1: y=3: print inverse(1) at (6,1);" MENU: <c>=Correction <r>=Repeat Ck's <q>=Quit Ck's <p>=Printer "
1010 box (40,8;583,142)
1012 box (41,10;582,142)
1015 print at (40,19)" "
1020 box (200,142;378,152)
1030 box (415,142;449,152)
1050 print at (6,21)"# checks check total"
1060 print at (37,21)"currency coin total deposit"
1080 print at (27,19) "Enter Check ";
1090 input ck$
1092 c$=left$(ck$,1): ck=val(ck$)
1093 if (ck> 999.00) or (ck$="") or (c$="0") then goto 1010
1096 if val(ck$)<>0 then gosub 3000:goto 1010
2010 if c$="c" then gosub 4000
2020 if c$="r" then gosub 5000
2030 if c$="p" then gosub 6000:goto 10000
2040 if c$="q" then gosub 7000
2050 goto 1010
3000 ' * print screen add totals *
3020 count=count+1: i=i+1: x=x+8: if x>69 then x=8: y=y+1
3030 ck(i)=ck: total=total+ck(i)
3050 print at (x,y);: print using"###.##";ck(i)
3060 print at (10,22);count
3070 print at (20,22);:print using"####.##";total
3090 return
4000 ' * correcter sub routine *
4020 goto 4030
4021 t=0: a$= translate$ ("point mouse at amount to correct. push left button")
4025 t%= narrate(a$)
4030 ask mouse x%, y%, b%
4035 tt=tt+1: if tt=1000 then tt=0: goto 4021
4038 if b%<>4 goto 4030
4040 h%=((x%-24)/64):vert%=(y%+2)/8: horz%=h%*8
4055 print at (horz%,vert%);:print using "###.##"; inverse(1);o
4060 xx=x: yy=y: ii=i: x= horz%: y=vert%
4062 i=int((vert%-3)*8)+horz%/8: total=total-ck(i)
4065 print at (20,22);:print using "####.##";total
4067 print at (10,22);count-1
4070 print at (27,19);"correct amt. ";: input ck
4075 gosub 3030
4080 x=xx: y=yy: i=ii
4090 goto 1010
5000 '
5020 print at (37,19)" "
5030 print at (27,19)"how many cks ";:input r$
5031 repeat=val(r$):if val(r$)=0 then 5030
5032 if repeat <0 or repeat >99 then 5030
5038 print at (37,19)" "
5040 print at (50,19)"X";:print at (53,19) repeat
5045 print at (27,19)"enter check ";:input ck
5070 for re=1 to repeat: gosub 3000
5080 next: goto 1010
6000 ' * to printer *
6020 open "o", #2, "prt:":cmd #2
6025 print string$(78,42)
6035 for j=1 to i
6040 print using "####.##";ck(j);
6050 print chr$(9);:next j
6060 print tab(3)"# Checks Check Total";
6065 print tab(36)"Currency Coin Total Deposit"
6070 print tab(5);i;
6072 print tab(20);:print using "####.##";total;
6075 print tab(36);:print using "####.##";currency;
6080 print tab(49);:print using "####.##";coin;
6090 print tab(67);:print using "####.##";deposit
6094 print string$(78,42):close #2: return
7000 ' * routine for inputing currency & coin *
7005 print at (37,19);" "
7010 print at (27,19);"Currency = ";
7020 input currency
7030 print at (37,22);;:print using "####.##";currency
7035 print at (37,19);" "
7040 print at (27,19);"total coin = ";
7050 input coin
7060 print at (48,22);:print using "####.##";coin
7080 deposit= total+currency+coin
7085 print at (65,22);:print using "####.##";deposit
7090 return
8000 '
9999 ' * routine for printing second copy *
10000 print at (27,19);"2 nd Copy <y/n> ";:input sc$
10010 if sc$= "y" then gosub 6000: goto 1000
10020 if sc$= "n" then goto 1000 else goto 10000
20000 d%= 34.33
20001 dd%=d%/10:horz%=dd%
20002 print horz%