     rem This is the General Ledger Tab Entry Program

%INCLUDE ALL.BAS
     RESTORE
	DIM T%(20),A(16),D$(8),N(2,2),DATE1$(8)
500 BIZMII.FLAG=0
505 z5$="b:glt"
506 z6$="b:gltback"
515 repeat$="------------------------------"
516 fill$="                               "
520 dim z$(5,5),n(2,20),k$(6,20)
530 dim t(20)
540 K$(6,1)="1 - ENTER TABS":K$(6,2)="2 - EXAMINE TABS"
550 K$(6,3)="3 - MODIFY TABS"
570 K$(6,4)="4 - CREATE NEW FILE":K$(6,5)="5 - CLEAR EXISTING FILE"
590 K$(6,6)="6 - FINISHED"
     print clear$:print
1100 K$(1,1)="PAGE WIDTH":K$(1,2)="TAG TAB"
1105 K$(1,3)="ACCOUNT NUMBER TAB"
1110 K$(1,4)="MAJOR HEADING TAB"
1115 K$(1,5)="SUBHEADING TAB"
1120 K$(1,6)="PARTIAL TOTAL TAB"
1125 K$(1,7)="PARTIAL TOTAL DOLLAR TAB"
1130 K$(1,8)="FINAL TOTAL TAB"
1135 K$(1,9)="FINAL TOTAL DOLLAR TAB"
1140 K$(1,10)="DATE TAB"
1145 K$(1,11)="PAGE NUMBER TAB"
1150 K$(1,12)="COMPANY NAME TAG #"
1155 K$(1,13)="LOWEST BALANCE SHEET ACCT #"
1160 K$(1,14)="HIGHEST BALANCE SHEET ACCT #"
1165 K$(1,15)="LOW COST OF GOODS ACCT #"
1170 K$(1,16)="HIGH COST OF GOODS ACCT #"
1200 K$(2,1)="1 - PAGE WIDTH":K$(2,2)="2 - TAG TAB"
1205 K$(2,3)="3 - ACCOUNT NUMBER TAB"
1210 K$(2,4)="4 - MAJOR HEADING TAB"
1215 K$(2,5)="5 - SUBHEADING TAB"
1220 K$(2,6)="6 - PARTIAL TOTAL TAB"
1225 K$(2,7)="7 - PARTIAL TOTAL DOLLAR TAB"
1230 K$(2,8)="8 - FINAL TOTAL TAB"
1235 K$(2,9)="9 - FINAL TOTAL DOLLAR TAB"
1240 K$(2,10)="10- DATE TAB"
1245 K$(2,11)="11- PAGE NUMBER TAB"
1250 K$(2,12)="12- COMPANY NAME TAG #"
1255 K$(2,13)="13- LOWEST BAL SHEET ACCT #"
1260 K$(2,14)="14- HIGHEST BAL SHEET ACCT #"
1265 K$(2,15)="15- LOW COST OF GOODS ACCT #"
1270 K$(2,16)="16- HIGH COST OF GOODS ACCT #"
1275 K$(2,17)="17- NONE"
1300 N(1,1)=3:N(1,2)=3:N(1,3)=3:N(1,4)=3:N(1,5)=3:N(1,6)=3
1305 N(1,7)=3:N(1,8)=3:N(1,9)=3:N(1,10)=3:N(1,11)=3:N(1,12)=4
1310 N(1,13)=10:N(1,14)=10:N(1,15)=10:N(1,16)=10
     if end #1 then 6000
1500 open z5$ as 1
     close 1
1510 Z1=1:Z2=1
1600 PRINT clear$
1605 PRINT
1650 PRINT "THIS IS A LIST OF OPERATIONS."
1655 PRINT
1660 FOR Z=1 TO 6:PRINT K$(6,Z):NEXT Z:PRINT
1665 PRINT "INDICATE WHAT YOU WOULD LIKE TO DO BY TYPING"
1670 PRINT "THE CORRESPONDING NUMBER."
1675 PRINT
1680 INPUT Z
	IF Z<1 OR Z>6 then 1600
1685 ON Z GOSUB 2000,3000,4000,6000,7000,10000
1690 FOR Z=1 TO 20:T%(Z)=0:T(Z)=0:NEXT Z:N$=""
1705 GOTO 1600
2000 PRINT clear$:PRINT
2005 PRINT "TABS ARE USED IN ALL GENERAL LEDGER PRINTOUTS. A"
2010 PRINT "CHECK SHOULD BE MADE BY RUNNING ONE OF THESE TO"
2015 PRINT "ENSURE THAT TABS ARE CORRECTLY SET."
2025 PRINT
2040 FOR Z=1 TO 12
	PRINT CUR$
2045 PRINT TAB(30);left$(repeat$,n(1,z))
	PRINT UP$;
2050 PRINT K$(1,Z);TAB(30);
2055 INPUT T%(Z):PRINT chr$(13)
	PRINT CLEAR$
2060 NEXT Z
2065 FOR Z=13 TO 16
	PRINT CUR$
2070 PRINT TAB(30);left$(repeat$,n(1,z))
	PRINT UP$;
2075 PRINT K$(1,Z);TAB(30);
2080 INPUT T(Z):PRINT chr$(13)
	PRINT CLEAR$
2085 NEXT Z
2105 PRINT clear$:PRINT
2110 T$="####"
2112 U$="##########"
2115 FOR Z=1 TO 12
2120 PRINT K$(2,Z);TAB(30);:print using T$;T%(Z)
2125 NEXT Z
2130 FOR Z=13 TO 17
2135 PRINT K$(2,Z);TAB(30);:print using U$;T(Z)
2140 NEXT Z
2145 PRINT
2150 PRINT "IF AN ITEM IS TO BE CHANGED, TYPE THE APPROPRIATE NUMBER."
2155 PRINT:INPUT Z
2160 PRINT
2165 IF Z>16 THEN 2225
2166 IF Z>12 THEN 2195
2170 IF Z<1 THEN 2105
2180 PRINT TAB(30);left$(repeat$,n(1,z))
	PRINT UP$;
2185 PRINT K$(1,Z);TAB(30);
2190 INPUT T%(Z)
2192 GOTO 2225
2195 PRINT TAB(30);left$(repeat$,n(1,z))
	PRINT UP$;
2200 PRINT K$(1,Z);TAB(30);
2205 INPUT T(Z)
2225 input "ANY MORE CHANGES";line temp$
2230 if left$(temp$,1)="y" or left$(temp$,1)="Y" then 2105
2235 PRINT
2240 input "IS RECORD TO BE ENTERED";line temp$
2245 PRINT
2250 if left$(temp$,1)="y" or left$(temp$,1)="Y" then 2280
2255 if left$(temp$,1)<>"n" and left$(temp$,1)<>"N" then 2235
2260 PRINT clear$:PRINT
2270 PRINT "*** RECORD NOT ENTERED ***":PRINT:PRINT
2275 FOR Z=1 TO 200:NEXT Z:RETURN
2280 open z5$ as 1
     print #1;T%(1),T%(2),T%(3),T%(4),T%(5),T%(6),T%(7),T%(8),\
     T%(9),T%(10),T%(11),T%(12),t(13),t(14),t(15),t(16)
     close 1
2300 RETURN
3000 PRINT clear$:PRINT
     open z5$ as 1
     read #1;T%(1),T%(2),T%(3),T%(4),T%(5),T%(6),T%(7),T%(8),\
     T%(9),T%(10),T%(11),T%(12),t(13),t(14),t(15),t(16)
     close 1
3030 PRINT
	PRINT "Should this be a 'hard-copy' listing (Y or N)?"
	INPUT LINE LIST$
	IF LIST$="y" OR LIST$="Y" THEN LPRINTER
3031 T$="####"
3032 U$="##########"
3035 FOR Z=1 TO 12
3040 PRINT K$(1,Z);TAB(30);:print using T$;T%(z)
3045 NEXT Z
3050 FOR Z=13 TO 16
3055 PRINT K$(1,Z);TAB(30);:print using U$;t(z)
3060 NEXT Z
	PRINT CHR$(13):PRINT CHR$(12)
	CONSOLE
3070 PRINT
3080 input "IF FINISHED, TYPE RETURN.";line temp$
3095 RETURN
4000 PRINT clear$:PRINT
     open z5$ as 1
     read #1;T%(1),T%(2),T%(3),T%(4),T%(5),T%(6),T%(7),T%(8),\
     T%(9),T%(10),T%(11),T%(12),t(13),t(14),t(15),t(16)
     close 1
4070 GOTO 2105
6000 PRINT clear$:PRINT
6005 PRINT "IF YOU HAVE ARRIVED HERE, AND HAVE A TABS FILE"
6010 PRINT "ALREADY ON A DISK, YOU SHOULD INSTALL THAT DISK THEN"
6015 PRINT "TYPE THE letter c FOLLOWED BY A RETURN TO CONTINUE."
6020 PRINT
6025 PRINT "IF YOU WISH TO CREATE A NEW FILE, TYPE THE letter n"
6030 PRINT "FOLLOWED BY RETURN.":PRINT
6035 input line temp$
6040 IF left$(temp$,1)="c" or left$(temp$,1)="C" THEN INITIALIZE:GOTO 1600
6045 PRINT clear$:PRINT
6050 for z=1 to 20:T%(z)=0:t(z)=0:next z
     create z5$ as 1
     print #1;T%(1),T%(2),T%(3),T%(4),T%(5),T%(6),T%(7),T%(8),\
     T%(9),T%(10),T%(11),T%(12),t(13),t(14),t(15),t(16)
     close 1
6095 PRINT clear$:PRINT
6100 PRINT "TABS FILE CREATED AND CLEARED.":PRINT
6110 input "TO CONTINUE, TYPE RETURN.";line temp$
6115 GOTO 1600
7000 INPUT "ARE YOU SURE !!! (YES OR NO)";line temp$
7007 IF left$(temp$,1)<>"y" and left$(temp$,1)<>"Y" THEN RETURN
     open z5$ as 1
     print #1;T%(1),T%(2),T%(3),T%(4),T%(5),T%(6),T%(7),T%(8),\
     T%(9),T%(10),T%(11),T%(12),t(13),t(14),t(15),t(16)
     close 1
7035 PRINT clear$:PRINT
7040 PRINT "TABS FILE CLEARED!":PRINT
7045 input "TO CONTINUE, TYPE RETURN.";line temp$
7900 RETURN
10000 CHAIN "MASTER7"
