home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 87 / 087.d81 / myb (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  24KB  |  627 lines

  1. 10 poke56,144:poke55,0:clr:de=peek(186):ifde<8thende=8
  2. 15 ifpeek(2048)=0thenload"inventory font",de,1
  3. 20 dimma$(6),edit$(4),prnt$(2),ca$(1),s$(10),n(10),su$(8),sy$(8),vec(8,2)
  4. 25 dimbu$(8),li(8),offset(8),em$(8),c$(8),it$(100,3),ps$(7),pi$(6),cp$(8),cb$(8)
  5. 30 close15:open15,de,15,"r:inv.system=inv.system":input#15,a:poke53272,19
  6. 35 ifa<>63thengosub6830:goto45
  7. 40 open2,de,2,"inv.system,s,r":fori=1to6:input#2,sy$(i):next:close2
  8. 45 print#15,"r:invoice.set.myb=invoice.set.myb":input#15,a
  9. 50 ifa<>63thengosub7260:goto60
  10. 55 open2,de,2,"invoice.set.myb,s,r":fori=1to6:input#2,pi$(i):next:close2
  11. 60 print#15,"r:tax rate.myb=tax rate.myb":input#15,a
  12. 65 ifa<>63thentr=.05:goto75
  13. 70 open2,de,2,"tax rate.myb,s,r":input#2,tr:close2
  14. 75 print#15,"r:header.myb=header.myb":input#15,a
  15. 80 ifa<>63thengosub7890:goto90
  16. 85 open2,de,2,"header.myb,s,r":input#2,hl:fori=1tohl:input#2,hd$(i):next:close2
  17. 90 fori=1to6:readma$(i):next
  18. 95 fori=1to4:readed$(i):next
  19. 100 fori=1to2:readpr$(i):next
  20. 105 readca$(0),ca$(1):f=128
  21. 110 fori=1to10:reads$(i):next
  22. 115 fori=1to9:readn(i):next
  23. 120 fori=1to8:readsu$(i):next
  24. 125 fori=1to8:readvectrs(i,0),vec(i,1),vec(i,2):next
  25. 130 fori=1to8:readlimits(i):next
  26. 135 fori=1to8:readoffsets(i):next
  27. 140 fori=1to8:readem$(i):next
  28. 145 fori=1to8:readc$(i):next
  29. 150 fori=1to7:readps$(i):next
  30. 155 fori=1to8:readcp$(i):next
  31. 160 ifleft$(hd$(hl),1)="\"thenhl=hl-1:hd$(hl+1)=mid$(hd$(hl+1),2)
  32. 165 wi$="                               "
  33. 166 gosub1100
  34. 170 print"";:poke53272,19:poke53280,0:poke53281,0:menu=1
  35. 174 print"";:poke53272,19:poke53280,0:poke53281,0:menu=1
  36. 175 sys49152,"[205] [201] [206] [196][160][160][160][217][160][207][160][213][160][210][160][160][160][194][160][213] [211] [201] [206] [197] [211] [211]","[199]o [212]o [215]ork [211]creen"
  37. 180 ifpeek(198)<>1thenpoke2048,0:poke53272,23:poke44,8:clr:sys49152+36:end
  38. 185 poke198,0:sys49170:sys49167:getdevice$:getmenu$:gethiglight$:gettext$
  39. 190 mc=asc(me$)and15:hi=asc(hi$)and15:te=asc(te$)and15:h=hi:t=te:b=mc:de=asc(de$)
  40. 195 rem work screen menu setup
  41. 300 sys49179,0,39,0,24,0,asc(text$)
  42. 310 sys49152+39,"[195][210][211][210] [204][197][198][212]/[210][201][199][200][212] [212][207][160][195][200][193][206][199][197][160][205][197][206][213][211]"
  43. 320 print:poke646,hi:print"                                        ";
  44. 330 poke646,asc(text$):print"  [208]roject    [197]dit       [197]xpansion       ";
  45. 340 poke646,asc(menu$):print"                                        ";
  46. 350 onmenugoto360,430,490
  47. 360 menu=1:sys49173:geta$:ifa$<>""then360
  48. 370 sys49158,5:sys49179,3,19,3,8,0,asc(menu$)
  49. 380 sys49155,70,2,2,mcor128,hi,te,ma$(1),ma$(2),ma$(3),ma$(4),ma$(5),ma$(6)
  50. 390 geta$:ifa$="[157]"thensys49161,5:goto490
  51. 400 rem sys49161,5:geta$:ifa$="[157]"then380
  52. 410 ifa$=""thensys49161,5:goto430
  53. 420 sys49152+39,"[146]  ":onval(a$)goto6000,2920,2780,7560,175,50010
  54. 430 menu=2:sys49173:geta$:ifa$<>""then430
  55. 440 sys49158,5:sys49179,14,29,3,6,0,asc(menu$)
  56. 450 sys49155,4,13,2,mcor128,hi,te,ed$(1),ed$(2),ed$(3),ed$(4)
  57. 460 sys49161,5:geta$:ifa$="[157]"then360
  58. 470 ifa$=""then490
  59. 480 onval(a$)goto2200,6860,7730,50030
  60. 490 menu=3:sys49173:geta$:ifa$<>""then490
  61. 500 sys49158,5:sys49179,25,39,3,4,0,mc
  62. 510 sys49155,2,24,2,mcor128,hi,te,pr$(1),pr$(2)
  63. 520 sys49161,5:geta$:ifa$="[157]"then430
  64. 530 ifa$=""then360
  65. 540 onval(a$)goto60000,50050
  66. 1000 ms$="[196]ata [196]isk [201]n drive"+str$(asc(de$))+"/[210][197][212][213][210][206]"
  67. 1010 gosub2000:print:geta$:ifa$="q"thena$="2":return
  68. 1020 ifa$<>chr$(13)thengosub1050:ifa$="1"then1010
  69. 1030 ifa$="2"thenreturn
  70. 1040 return
  71. 1050 sys49173:geta$:ifa$=""then1050
  72. 1060 sys49155,2,13,13,mcand15,hi,te,ca$(0),ca$(1):geta$:return
  73. 1070 rem **** get time ****
  74. 1100 fori=8to16:t$="":close15:open15,i,15:close15:ifstthen1140
  75. 1110 open15,i,15:print#15,"t-ra":input#15,a$,b$:ifval(a$)then1140
  76. 1115 print#15,"t-ra"
  77. 1120 get#15,a$:ifa$<>chr$(13)thent$=t$+a$:goto1120
  78. 1130 ifval(t$)=0theni=16:goto1140
  79. 1140 next
  80. 1145 ifval(t$)ort$=""then1200
  81. 1150 da$=left$(t$,13)
  82. 1160 ti$=mid$(t$,15,2)+mid$(t$,18,2)+mid$(t$,21,2):return
  83. 1200 sys49179,0,39,22,24,0,13
  84. 1210 poke787,255:sys49152+39,"[212]oday's date? "
  85. 1220 sys39424,1,4,37-peek(211):da$=w$:return
  86. 1999 rem **** message ****
  87. 2000 sys49158,6:sys49179,3,38,09,13,0,asc(me$)
  88. 2010 sys36864,3,37,8,12,160,hi,te
  89. 2020 poke646,hi:poke199,1:sys39171,20-len(ms$)/2,10,ms$
  90. 2030 poke198,0:wait198,15:sys49161,6
  91. 2040 return
  92. 2050 rem edit invoice
  93. 2200 poke646,te:print"              [197][196][201][212][160][201][206][214][197][206][212][207][210][217]          ":gosub3970
  94. 2210 ms$="[196]ata [196]isk [201]n drive:"+sy$(1)+"/[210][197][212][213][210][206]"
  95. 2220 gosub2000:print:geta$:ifa$="q"then300
  96. 2230 ifa$<>chr$(13)thengosub1050:ifa$="1"then2210
  97. 2240 re=1:ifa$="2"then300
  98. 2250 close15:pt$=sy$(5)+":":ifsy$(5)="[210][207][207][212]"thenpt$=""
  99. 2260 close2:open15,val(sy$(1)),15:open2,val(sy$(1)),2,pt$+"inventory.myb"
  100. 2270 input#15,a$,b$,c$,d$:ifval(a$)<>0then2770
  101. 2280 sys49152+6,4:gosub2750:sys37123,1,0:gosub4300:rem pos at record 1
  102. 2290 sys49152+39,"  [145]":print:poke646,hi:print" [213][208]/[196][207][215][206] [146]";:poke646,te
  103. 2300 print" [206]ext/[208]rev ";:poke646,hi:print" [205] [146]";:poke646,te:print" [205]enu ";
  104. 2310 poke646,hi:print" [209] [146]";:poke646,te:print" [209]uit"
  105. 2320 geta$:ifa$=""then2320
  106. 2330 ifa$=""then2580
  107. 2340 ifa$="[145]"then2560
  108. 2350 ifa$="g"thengosub4620:goto2290
  109. 2355 ifa$="r"then2570
  110. 2360 ifa$="c"thengosub4680:goto2290
  111. 2370 ifa$="s"thengosub4710:goto2290
  112. 2380 ifa$="m"thengosub2440:goto2330
  113. 2390 ifa$="w"ora$="p"thengosub4430:goto2290
  114. 2400 ifa$="e"thenfori=1to8:bu$(i)="":next:gosub4330:goto2610
  115. 2410 ifa$="q"thenclose2:goto300
  116. 2420 goto2320
  117. 2430 rem edit menu
  118. 2440 sys49152+6,2:sys49179,7,34,9,18,0,mc
  119. 2450 sys49155,8+64,6,9,mcand15,hi,te,em$(1),em$(2),em$(3),em$(4),em$(5),em$(6),em$(7),em$(8)
  120. 2460 sys49152+9,2:geta$:onval(a$)goto2470,2480,2490,2510,2520,2530,2530,2540
  121. 2470 a$="w":return
  122. 2480 a$="r":return
  123. 2490 a$="e":return
  124. 2500 a$="d":return
  125. 2510 a$="g":return
  126. 2520 a$="c":return
  127. 2530 return
  128. 2540 a$="q":return
  129. 2550 rem crsr up
  130. 2560 rec=rec+1:sys37123,rec,offset(1):input#15,z$,z$:ifz$<>"ok"thengosub4560
  131. 2570 sys49152+9,4:gosub2750:gosub4300:goto2290
  132. 2580 rec=rec-1:ifrec<1thengosub4510
  133. 2590 goto2570
  134. 2600 rem choose field of invoice to edit
  135. 2610 it=1
  136. 2620 sys39168,2,vec(it,1),vec(it,0),vec(it,2)+vec(it,0),te
  137. 2630 sys49152+39,"[195][210][211][210]/[210][197][212][213][210][206] to select [216] to [197]xit"
  138. 2640 geta$:ifa$=""then2640
  139. 2650 ot=it:ifa$="q"thensys39168,1,ve(it,1),ve(it,0),ve(it,2)+ve(it,0),hi
  140. 2660 ifa$="q"ora$="x"then2290
  141. 2670 ifa$=""thenit=it+1:ifit>8thenit=1
  142. 2680 ifa$="[145]"thenit=it-1:ifit<1thenit=8
  143. 2690 ifa$="w"thengosub4430:goto2620
  144. 2700 ifa$<>chr$(13)thengosub2730:goto2640
  145. 2710 ifa$<>chr$(13)then2640
  146. 2720 gosub4160:sys39168,1,vec(it,1),vec(it,0),vec(it,2)+vec(it,0),hi:goto2630
  147. 2730 sys39168,1,vec(ot,1),vec(ot,0),vec(ot,2)+vec(ot,0),hi
  148. 2740 sys39168,2,vec(it,1),vec(it,0),vec(it,2)+vec(it,0),te:return
  149. 2750 poke646,hi:sys39171,15,4,"                    [145]":print
  150. 2760 printtab(15)"[210]ecord:"re:return
  151. 2770 ms$=a$+","+b$+","+c$+","+d$:gosub2000:goto300
  152. 2780 menu=1:sys49173:geta$:ifa$=""then2780
  153. 2790 m=49155:x=6:y=6:sys49152+39,"[208]lease [211]elect [201]nitial [198]ile [211]ize"
  154. 2800 sys49158,5:sys49179,x+1,35,y+1,y+10,0,asc(menu$):t=te
  155. 2810 sysm,10,x,y,f,h,t,s$(1),s$(2),s$(3),s$(4),s$(5),s$(6),s$(7),s$(8),s$(9),s$(10)
  156. 2820 sys49161,5:geta$:ifa$=":"then300
  157. 2830 n=n(val(a$)):pt$=sy$(5)+":":ifsy$(5)="[210][207][207][212]"thenpt$=""
  158. 2840 ms$="[196]isk w/"+str$(int(n*166/254))+" blocks in drive "+sy$(1)
  159. 2841 sys49152+39,"[210][197][212][213][210][206] to create file.  [209] to [209]uit"
  160. 2845 gosub2000:getb$:ifb$<>chr$(13)then310
  161. 2850 close15:open15,val(sy$(1)),15,"s:"+pt$+"inventory.myb":poke186,val(sy$(1))
  162. 2860 sys49152+39,"[195]reating [201]nventory [198]ile..."
  163. 2870 sys37120,pt$+"inventory.myb",166,n
  164. 2880 close2:input#15,a$,ms$
  165. 2890 ifa$<>"4?"thenifms$<>"ok"andms$<>"record not present"thengosub2000:geta$
  166. 2900 gosub9830:goto300
  167. 2910 rem setup system
  168. 2920 menu=1:sys49173:geta$:n=val(a$):ifa$=""then2920
  169. 2930 m=49155:x=6:y=4
  170. 2940 sys49158,5:sys49179,1,38,14,21,32,asc(menu$):gosub3010:gosub3100
  171. 2950 sys49152+39,"[208]lease [211]elect [201]