This program implements a complete General Ledger bookkeeping system, developed for International Correspondence Schools. It manages a chart of accounts with 93 entries across standard accounting categories (Assets 101–143, Liabilities 201–215, Capital 221–225, Revenue 301–305, Cost of Goods 401–408, Operating Expenses 501–525, and Other Income/Expense 601/611), a 25-entry general journal stored as a parallel string/numeric array pair, and produces a trial balance, income statement, and balance sheet via LPRINT. The FAST/SLOW idiom is used around printer output routines to maximise throughput. Account lookup uses a linear search subroutine at line 1500, and the special codes “MDR” and “MCR” flag multi-debit and multi-credit compound journal entries respectively, enabling cash disbursement and sales journal functionality.
Program Analysis
Program Structure
The program is organized as a menu-driven application with a main loop and a set of numbered subroutine blocks. The top-level dispatcher lives at lines 10–200, calling the main menu (line 7000), then branching based on user input S (1–6 dispatch via GOSUB S*1000, 7 for tape save, 8 to reinitialize). Each major function occupies its own thousand-line block:
| Line range | Function |
|---|---|
| 1000–1530 | Chart of Accounts maintenance |
| 2000–2125 | Record journal transactions (wrapper) |
| 3000–3670 | Trial Balance (display and printout) |
| 4000–4240 | List/Correct Journal Entries |
| 5000–5570 | Income Statement printout |
| 6000–6400 | Balance Sheet printout |
| 7000–7095 | Main menu display |
| 8000–8990 | Journal entry input and initialization |
| 9000–9670 | Post to G/L, cash disbursements, sales journal |
Data Structures
Two parallel arrays hold account data: A$() for account names and B() for balances, both indexed 1–93. Account numbers are stored in a separate string array P$(). The journal is stored as a pair of parallel arrays: G$(25,23), a 25-row by 23-character string array, and G(25), a numeric array for amounts. Within each G$ row, the layout is fixed-field:
- Columns 1–2: day (
STR$ E) - Columns 3–17: description (
D$) - Columns 18–20: debit account number or “MDR” flag
- Columns 21–23: credit account number or “MCR” flag
The maximum journal size of 25 entries is set by the DIM G$(25,23) at line 8980 and tracked by counter N.
Account Lookup Subroutine
The subroutine at lines 1500–1530 performs a linear search through the P$() array for a match to J$. It uses FAST mode to accelerate the search, returning the matched index in S. If S exceeds 93 after the loop, the account was not found. This subroutine is called from many places throughout the program — entry input, journal listing, posting, and correction — making it the most-reused component.
Computed GOSUB
Line 170 uses the idiom GOSUB S*1000 to dispatch to the appropriate function subroutine based on the numeric menu selection. This is a compact and efficient ZX81/TS1000 BASIC technique that avoids a chain of IF/GOTO statements for the six main menu options.
Compound Journal Entries: MDR and MCR Flags
Standard double-entry transactions have one debit and one credit account. The program extends this with two special pseudo-account codes: "MDR" (multiple debits) and "MCR" (multiple credits). When the user enters MDR as the debit account, the program branches to the Cash Disbursements routine (line 9100), which accepts up to 10 individual debit sub-entries via arrays Y(10) and Z(10), verifying they sum to the total credit amount before posting. Similarly, "MCR" as the credit account triggers the Sales Journal routine at line 9499. Each sub-entry is posted to the G/L as a separate journal line with a synthetic account field.
Posting Logic and Sign Convention
The posting subroutine at line 9000 implements standard accounting sign conventions without requiring separate debit/credit columns. Accounts whose numbers begin with “2” (Liabilities) or “3” (Revenue), or which are account “601” (Other Income), are incremented by a credit and decremented by a debit. All other accounts (Assets, Expenses) follow the opposite convention. A floating-point rounding guard is applied after each update:
IF B(S1)>-.01 AND B(S1)<.01 THEN LET B(S1)=0— clamps near-zero balances to exactly zero, avoiding floating-point drift accumulating across many transactions.
Trial Balance Subroutine
The trial balance printout (lines 3300–3670) divides the 93 accounts into five segments with alternating debit/credit normal balance sides, controlled by the variables B1 and B2 which are swapped between segments. Running totals TB1 and TB2 accumulate debits and credits respectively for a final balance check line. Column positions for the printed amounts are computed dynamically using LEN(STR$(ABS(B(A)))) to right-justify figures.
FAST/SLOW Usage
The program consistently wraps all LPRINT output blocks with FAST (at the start) and SLOW (at the end). On the ZX81/TS1000, FAST mode suppresses display refresh, dramatically increasing execution speed for the computationally and I/O-intensive printer routines. The account search subroutine at line 1501 also uses FAST/SLOW around its loop for the same reason.
Journal Correction
The correction routine (lines 4180–4240) reverses a journal entry by multiplying the stored amount by -1 (LET F=G(A)*-1) and re-running the posting subroutine GOSUB 9003, effectively negating the original transaction in the account balances. It then blanks the journal line with a 23-space string. This is a reversal approach rather than physical deletion, which is appropriate given the fixed-size array structure.
Initialization and Data Entry Guards
The initialization routine at line 8900 warns the user that proceeding will create a new journal, and requires a non-"N" keypress to continue — using a two-step INKEY$ wait: line 8930 waits for any key to be pressed, then line 8935 checks if it was "N" and returns without initializing if so. This is a known edge-case: if the user holds N and it is still held when line 8935 executes, the cancel works correctly, but there is a brief window where a fast N press could be missed between the two checks.
Notable Anomalies
- Line 8700 (
REM INITIALIZATION SECTION) contains only aRETURNat line 8890 with no actual initialization code — account arraysA$(),B(), andP$()are never dimensioned in the visible listing, suggesting they were loaded from tape rather than set up in code. - The
NETvariable computed in the Income Statement (line 5245) is used directly by the Balance Sheet at lines 6355–6360 without being recalculated, so the Balance Sheet must be run in the same session after the Income Statement, orNETwill be zero or stale. - The Sales Journal at line 9507 calls
GOSUB 1500without first settingJ$to the entered valueY(X), unlike the parallel cash disbursements routine which correctly setsJ$=STR$ Y(X)at line 9172. This means the account lookup for sales journal credits will search on whateverJ$was last set to. - The display routine at line 3160 uses
A$(A, TO 13)to truncate account names to 13 characters for the on-screen trial balance, while the print routine at line 3655 uses the fullA$(A).
Content
Source Code
10 REM
15 GOSUB 8900
20 GOSUB 8700
30 GOSUB 7000
40 INPUT S
50 IF S>0 AND S<7 THEN GOTO 160
60 IF S=7 THEN GOTO 100
65 IF S=8 THEN GOTO 200
70 PRINT AT 20,0;"INVALID SELECTION, RE-ENTER"
80 REM
90 GOTO 40
100 REM THE END
110 CLS
120 PRINT AT 10,0;"SET RECORDER WITH BLANK TAPE"
130 PRINT "PRESS ANY KEY WHEN READY"
140 IF INKEY$="" THEN GOTO 140
141 CLS
142 SAVE "G%L"
143 PRINT "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
144 FOR X=1 TO 20
145 PRINT "% ";TAB 31;"% "
146 NEXT X
147 PRINT "% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
148 PRINT AT 3,9;"GENERAL LEDGER";AT 5,14;"FOR";AT 7,1;"COMPUTER ASSISTED BOOKKEEPING";AT 14,2;"INTERNATIONAL CORRESPONDENCE";AT 15,12;"SCHOOLS";AT 17,6;"SCRANTON, PA. 18515";AT 19,4;"COPYRIGHT ICS INTEXT 1983"
149 PAUSE 20000
150 GOTO 30
160 REM
170 GOSUB S*1000
180 GOTO 30
200 GOSUB 8900
220 GOTO 30
1000 REM CHART OF ACCOUNTS
1050 CLS
1060 PRINT AT 0,6;"CHART OF ACCOUNTS"
1070 PRINT AT 1,5;C$
1080 PRINT AT 3,0;"%A%S%S%E%T%S%: CURRENT 101-115"
1083 PRINT AT 4,18;"FIXED 121-135"
1085 PRINT AT 5,18;"OTHER 141-143"
1087 PRINT AT 7,0;"%L%I%A%B%I%L%I%T%I%E%S%: CURRENT 201-210"
1090 PRINT AT 8,14;"LONG TERM 211-215"
1093 PRINT AT 10,0;"%C%A%P%I%T%A%L%:";AT 10,25;"221-225"
1095 PRINT AT 12,0;"%R%E%V%E%N%U%E%:";AT 12,25;"301-305"
1097 PRINT AT 14,0;"%C%O%S%T% %O%F% %G%O%O%D%S% %S%O%L%D%:";AT 14,25;"401-408"
1100 PRINT AT 16,0;"%O%P%E%R%A%T%I%N%G% %E%X%P%E%N%S%E%S%:";AT 16,25;"501-525"
1110 PRINT AT 18,0;"%O%T%H%E%R% %I%N%C%O%M%E%:";AT 18,25;"601"
1120 PRINT AT 20,0;"%O%T%H%E%R% %E%X%P%E%N%S%E%S%:";AT 20,25;"611"
1270 PRINT AT 21,1;"ENTER NEW ACCOUNT NO.(0 TO END)"
1290 INPUT J$
1295 IF J$="0" THEN RETURN
1296 CLS
1298 GOSUB 1500
1299 IF S>93 THEN GOTO 1270
1310 PRINT AT 1,3;"ACCOUNT NO:";J$;AT 21,1;"ENTER ACCOUNT NAME"
1313 INPUT A$(S)
1315 PRINT AT 3,9;"NAME:";A$(S)
1317 PAUSE 100
1330 GOTO 1000
1500 REM SEARCH FOR ACCT. SUB
1501 FAST
1505 LET S=0
1507 LET S=S+1
1513 IF S>93 THEN GOTO 1520
1514 IF J$=P$(S) THEN GOTO 1520
1515 GOTO 1507
1520 SLOW
1530 RETURN
2000 REM
2060 GOSUB 8000
2080 GOSUB 8500
2090 PRINT AT 18,2;"MORE? (Y/N)"
2100 INPUT R$
2110 IF R$="Y" THEN GOTO 2000
2120 IF R$="N" THEN RETURN
2125 GOTO 2090
3000 REM DISPLAY ACCOUNTS
3010 CLS
3020 PRINT AT 1,9;"TRIAL BALANCE"
3030 PRINT AT 3,7;"A. DISPLAY"
3040 PRINT AT 5,7;"B. PRINTOUT"
3050 PRINT AT 7,7;"C. END"
3070 PRINT AT 18,1;"ENTER CHOICE"
3080 INPUT M$
3090 IF M$="A" THEN GOTO 3145
3100 IF M$="B" THEN GOTO 3300
3110 IF M$="C" THEN RETURN
3130 PRINT AT 18,1;"INVALID CHOICE"
3140 GOTO 3080
3145 REM ACCOUNT BALANCES
3150 CLS
3155 FOR A=1 TO 93
3160 PRINT P$(A);" ";A$(A, TO 13);" ";B(A)
3162 IF NOT (A=21 OR A=42 OR A=63 OR A=84) THEN GOTO 3190
3165 PRINT AT 21,0;"PRESS ANY KEY TO CONTINUE"
3168 PAUSE 32767
3170 CLS
3190 NEXT A
3195 PRINT AT 21,0;"PRESS ANY KEY TO CONTINUE"
3198 PAUSE 32767
3200 GOTO 3000
3300 REM TRIAL BALANCE
3303 CLS
3304 FAST
3305 LPRINT TAB (9);"TRIAL BALANCE"
3310 LPRINT
3315 LPRINT "ACCT";TAB (7);"NAME";TAB (21);"DR";TAB (28);"CR"
3320 LPRINT
3323 LET TB1=0
3324 LET TB2=TB1
3325 LET T1=25
3330 LET T2=31
3331 LET B1=T1
3332 LET B2=T2
3335 LET L=1
3340 LET H=33
3345 GOSUB 3600
3350 LET B1=T2
3353 LPRINT
3355 LET B2=T1
3360 LET L=34
3365 LET H=58
3370 GOSUB 3600
3375 LET B1=T1
3380 LET B2=T2
3385 LET L=59
3390 LET H=91
3395 GOSUB 3600
3400 LET B1=T2
3405 LET B2=T1
3410 LET L=92
3415 LET H=L
3420 GOSUB 3600
3430 LET B1=T1
3435 LET B2=T2
3440 LET L=93
3445 LET H=L
3450 GOSUB 3600
3451 LPRINT
3452 LPRINT "TOTALS";TAB (13);TB1;TAB (23);TB2
3453 SLOW
3455 GOTO 3000
3600 FOR A=L TO H
3605 IF A$(A,1)=" " THEN GOTO 3660
3606 IF B(A)<0 AND B1=T1 THEN LET TB2=TB2+ABS (B(A))
3607 IF B(A)<0 AND B1<>T1 THEN LET TB1=TB1+ABS (B(A))
3608 LET U=LEN (STR$ (ABS (B(A))))
3610 LET Q=B1-U
3630 IF B(A)<0 THEN LET Q=B2-U
3640 IF B(A)>0 AND B1=T1 THEN LET TB1=TB1+B(A)
3650 IF B(A)>0 AND B1<>T1 THEN LET TB2=TB2+B(A)
3655 LPRINT P$(A);" ";A$(A);TAB Q;ABS B(A)
3660 NEXT A
3670 RETURN
4000 REM DISPLAY JOURNAL AND MAKE CORECTIONS
4001 CLS
4003 PRINT AT 4,10;"JOURNAL ENTRIES"
4004 PRINT AT 6,5;"1. LIST JOURNAL ENTRIES"
4005 PRINT AT 8,5;"2. CORRECT JOURNAL ENTRIES"
4006 PRINT AT 18,1;"ENTER CHOICE OR 0 TO END"
4007 INPUT A
4008 IF A=2 THEN GOTO 4180
4009 IF A=0 THEN RETURN
4010 IF A=1 THEN GOTO 4020
4015 GOTO 4001
4020 CLS
4025 FAST
4032 LPRINT
4035 LPRINT TAB (6);"GENERAL JOURNAL ";F$;"/";Y$(3 TO 4)
4040 LPRINT TAB (0);"LINE ";"DAY"
4050 FOR A=1 TO N
4060 LET J$=G$(A,18 TO 20)
4070 GOSUB 1500
4075 IF J$="MDR" THEN GOTO 4090
4080 IF S>93 THEN GOTO 4170
4090 LPRINT TAB (0);A;TAB (6);G$(A,1 TO 2);TAB (10);G$(A,3 TO 17)
4096 IF J$="MDR" THEN GOTO 4105
4100 LPRINT TAB (2);"DR:";P$(S);TAB (20);G(A)
4102 LPRINT A$(S)
4105 LET J$=G$(A,21 TO 23)
4107 GOSUB 1500
4109 IF S>93 THEN GOTO 4170
4110 LPRINT TAB (2);"CR:";P$(S);TAB (20);G(A)
4115 LPRINT A$(S)
4120 LPRINT " "
4170 NEXT A
4173 SLOW
4175 GOTO 4000
4180 CLS
4185 PRINT AT 18,1;"ENTER LINE TO REMOVE-0 TO END"
4190 INPUT A
4200 IF A=0 THEN RETURN
4210 LET F=G(A)*-1
4211 LET J$=G$(A,18 TO 20)
4212 GOSUB 1500
4213 LET S1=S
4214 LET J$=G$(A,21 TO 23)
4215 GOSUB 1500
4216 LET S2=S
4217 LET H$=G$(A,18 TO 20)
4218 LET I$=G$(A,21 TO 23)
4220 GOSUB 9003
4223 LET G$(A)=" "
4240 GOTO 4180
5000 REM INCOME STATEMENT
5005 CLS
5010 FAST
5035 LPRINT TAB (10);C$
5040 LPRINT TAB (8);"INCOME STATEMENT"
5050 LPRINT TAB (7);"01/01/";Y$(3 TO 4);" TO ";F$;"/";E;"/";Y$(3 TO 4)
5060 LET L=54
5070 LET H=58
5080 GOSUB 5500
5090 LET A1=T
5100 LPRINT "NET SALES";TAB (23);A1
5110 LET L=59
5120 LET H=66
5130 GOSUB 5500
5140 LET A2=T
5150 LPRINT "COST OF SALES";TAB (23);A2
5160 LPRINT "GROSS PROFIT";TAB (23);A1-A2
5170 LET L=67
5180 LET H=91
5190 GOSUB 5500
5210 LPRINT "TOTAL OPERATING EXP";TAB (23);T
5220 LPRINT "NET PROFIT/OPNS";TAB (23);A1-A2-T
5230 LPRINT A$(92);TAB (23);B(92)
5240 LPRINT A$(93);TAB (23);B(93)
5245 LET NET=A1-A2-T+B(92)-B(93)
5250 LPRINT "TOTAL NET INCOME";TAB (23);NET
5260 SLOW
5270 RETURN
5500 LPRINT
5510 LET T=0
5520 FOR A=L TO H
5530 IF A$(A,1)=" " THEN GOTO 5560
5540 LPRINT A$(A);TAB (15);B(A)
5550 LET T=T+B(A)
5560 NEXT A
5570 RETURN
6000 REM BALANCE SHEET
6005 CLS
6010 LPRINT TAB (10);C$
6020 LPRINT TAB (9);"BALANCE SHEET"
6030 LPRINT TAB (12);F$;"/";E;"/";Y$(3 TO 4)
6040 LET L=1
6050 LET H=15
6060 GOSUB 5500
6070 LPRINT "CURRENT ASSETS";TAB (23);T
6080 LET A1=T
6090 LET L=16
6100 LET H=30
6110 GOSUB 5500
6120 LPRINT "FIXED ASSETS";TAB (23);T
6130 LET A2=T
6140 LET L=31
6150 LET H=33
6160 GOSUB 5500
6170 LPRINT "OTHER ASSETS";TAB (23);T
6180 LET T1=A1+A2+T
6190 LPRINT "TOTAL ASSETS";TAB (23);T1
6200 LET L=34
6210 LET H=43
6220 GOSUB 5500
6230 LPRINT "CURRENT LIABS";TAB (23);T
6240 LET A1=T
6250 LET L=44
6260 LET H=48
6270 GOSUB 5500
6280 LPRINT "LONG TERM LIABS";TAB (23);T
6290 LET T2=A1+T
6300 LPRINT "TOTAL LIABS";TAB (23);T2
6310 LET L=49
6320 LET H=53
6330 GOSUB 5500
6340 LPRINT "TOTAL CAPITAL";TAB (23);T
6355 LPRINT "(NET INCOME)";TAB (23);NET
6360 LPRINT "TOTAL LIABS/CAPITAL";TAB (23);NET+T+T2
6390 SLOW
6400 RETURN
7000 CLS
7010 PRINT AT 2,8;"GENERAL LEDGER"
7020 PRINT AT 5,4;"1. CHART OF ACCOUNTS"
7030 PRINT AT 7,4;"2. RECORD TRANS IN JOURNAL"
7040 PRINT AT 9,4;"3. TRIAL BALANCE"
7050 PRINT AT 11,4;"4. LIST/CORRECT JOURNAL"
7060 PRINT AT 13,4;"5. INCOME STATEMENT"
7070 PRINT AT 15,4;"6. BALANCE SHEET"
7080 PRINT AT 17,4;"7. SAVE TO TAPE"
7085 PRINT AT 19,4;"8. START NEW MONTH"
7090 PRINT AT 21,0;"ENTER NO. OF SELECTION"
7095 RETURN
8000 CLS
8005 PRINT TAB (3);"THERE IS ROOM FOR ";25-N;" MORE"
8010 PRINT AT 1,8;"JOURNAL ENTRIES"
8075 PRINT AT 5,1;"ENTER DAY DD"
8076 INPUT E
8077 PRINT AT 5,11;" ";AT 5,11;E
8080 PRINT AT 7,1;"ENTER DESC XXXXXXXXXXXXXXX"
8090 INPUT D$
8100 PRINT AT 7,12;Z$;AT 7,12;D$
8105 PRINT AT 8,1;"DEBIT PR XXX"
8110 INPUT H$
8115 PRINT AT 8,11;H$
8122 LET J$=H$
8123 GOSUB 1500
8124 IF H$="MDR" THEN LET S=0
8125 IF S>93 THEN GOTO 8105
8126 LET S1=S
8129 PRINT AT 9,1;"CREDIT PR XXX"
8130 INPUT I$
8135 PRINT AT 9,11;I$
8138 LET J$=I$
8140 GOSUB 1500
8145 IF I$="MCR" THEN LET S=0
8150 IF S>93 THEN GOTO 8129
8160 LET S2=S
8200 PRINT AT 13,1;"ENTER AMOUNT XXXXX.XX "
8210 INPUT F
8220 PRINT AT 13,15;F;" "
8230 PRINT AT 16,2;"OK? (Y/N)"
8240 INPUT R$
8250 IF R$="N" THEN GOTO 8075
8260 IF R$<>"Y" THEN GOTO 8230
8490 RETURN
8500 REM
8501 IF H$<>"MDR" AND I$<>"MCR" THEN GOTO 8504
8502 IF H$="MDR" THEN GOTO 9100
8503 IF I$="MCR" THEN GOTO 9500
8504 GOSUB 9000
8505 LET G$(N,1 TO 2)=STR$ E
8520 LET G$(N,3 TO 17)=D$
8550 LET G(N)=F
8560 LET G$(N,18 TO 20)=H$
8570 LET G$(N,21 TO 23)=I$
8690 RETURN
8700 REM INITIALIZATION SECTION
8890 RETURN
8900 REM DIMENSION JOURNAL TABLE
8910 CLS
8920 PRINT AT 6,0;"IF YOU CONTINUE THIS SECTION, A NEW JOURNAL WILL BE SET UP-YOU SHOULD MAKE SURE THAT YOU HAVE SAVED YOUR LAST JOURNAL ON TAPE AND HAVE A HARD-COPY"
8925 PRINT AT 12,0;"IF YOU WISH TO CANCEL PRESS ""N"", TO CONTINUE PRESS ANY KEY"
8930 IF INKEY$="" THEN GOTO 8930
8935 IF INKEY$="N" THEN RETURN
8940 CLS
8950 LET N=0
8954 PRINT AT 3,1;"ENTER YEAR XXXX"
8956 INPUT Y$
8960 PRINT AT 3,12;Y$
8964 PRINT AT 5,1;"ENTER MONTH MM"
8968 INPUT F$
8970 PRINT AT 5,13;F$;" "
8974 PRINT AT 7,1;"ENTER COMPANY NAME"
8976 INPUT C$
8978 PRINT AT 7,20;C$
8980 DIM G$(25,23)
8985 DIM G(25)
8990 RETURN
9000 REM POST TO ACCOUNTS
9001 LET N=N+1
9003 IF H$="MDR" THEN GOTO 9030
9005 IF H$="601" OR H$(1)="2" OR H$(1)="3" THEN LET B(S1)=B(S1)-F
9007 IF NOT (H$="601" OR H$(1)="2" OR H$(1)="3") THEN LET B(S1)=B(S1)+F
9010 IF B(S1)>-.01 AND B(S1)<.01 THEN LET B(S1)=0
9030 IF I$="MCR" THEN GOTO 9060
9040 IF NOT (I$="601" OR I$(1)="2" OR I$(1)="3") THEN LET B(S2)=B(S2)-F
9050 IF I$="601" OR I$(1)="2" OR I$(1)="3" THEN LET B(S2)=B(S2)+F
9055 IF B(S2)>-.01 AND B(S2)<.01 THEN LET B(S2)=0
9060 RETURN
9100 REM CASH DISBURSEMENTS
9110 DIM Y(10)
9120 DIM Z(10)
9130 LET X=0
9132 LET C1=0
9140 LET X=X+1
9150 PRINT AT 17,0;"PR TO DEBIT-XXX"
9160 INPUT Y(X)
9170 PRINT AT 17,12;Y(X)
9172 LET J$=STR$ Y(X)
9175 GOSUB 1500
9177 IF S>93 THEN GOTO 9150
9180 PRINT AT 17,16;"AMOUNT-XXX.XX"
9190 INPUT Z(X)
9200 PRINT AT 17,22;Z(X);" "
9210 LET C1=C1+Z(X)
9215 IF C1-F>-.009 AND C1-F<.009 THEN GOTO 9300
9220 IF C1<F THEN GOTO 9270
9240 PRINT AT 20,0;"DEBITS NOT EQUAL TO CREDITS"
9245 PRINT AT 21,0;"PRESS ANY KEY AND REENTER"
9250 PAUSE 40000
9260 GOTO 8690
9270 SCROLL
9280 GOTO 9140
9300 REM POST TO G/L AND ACCOUNTS
9310 GOSUB 9000
9320 LET G$(N,1 TO 2)=STR$ E
9330 LET G$(N,3 TO 17)=D$
9340 LET G(N)=F
9350 LET G$(N,21 TO 23)=I$
9360 LET G$(N,18 TO 20)="MDR"
9375 FOR A=1 TO X
9380 LET I$="MCR"
9382 LET H$=STR$ Y(A)
9384 LET F=Z(A)
9386 LET J$=H$
9390 GOSUB 1500
9392 LET S1=S
9399 GOSUB 9000
9400 LET G$(N,18 TO 20)=STR$ Y(A)
9410 LET G(N)=Z(A)
9430 LET G$(N,21 TO 23)="MCR"
9460 NEXT A
9470 GOTO 8690
9499 REM SALES JOURNAL
9500 DIM Y(10)
9501 DIM Z(10)
9502 LET X=0
9503 LET C1=0
9504 LET X=X+1
9505 PRINT AT 17,0;"PR TO CREDIT-XXX"
9506 INPUT Y(X)
9507 GOSUB 1500
9508 PRINT AT 17,13;Y(X);AT 17,17;"AMOUNT-XXX.XX"
9509 INPUT Z(X)
9510 PRINT AT 17,24;Z(X);" "
9511 LET C1=C1+Z(X)
9512 IF C1-F>-.009 AND C1-F<.009 THEN GOTO 9518
9513 IF C1<F THEN GOTO 9515
9514 GOTO 9240
9515 SCROLL
9516 GOTO 9504
9518 REM POST TO G/L AND ACCOUNTS
9519 GOSUB 9000
9520 LET G$(N,1 TO 2)=STR$ E
9530 LET G$(N,3 TO 17)=D$
9540 LET G(N)=F
9550 LET G$(N,21 TO 23)="MCR"
9560 LET G$(N,18 TO 20)=H$
9575 FOR A=1 TO X
9580 LET I$=STR$ Y(A)
9582 LET H$="MDR"
9584 LET F=Z(A)
9586 LET J$=I$
9588 GOSUB 1500
9590 LET S2=S
9599 GOSUB 9000
9600 LET G$(N,21 TO 23)=STR$ Y(A)
9610 LET G(N)=Z(A)
9630 LET G$(N,18 TO 20)="MDR"
9660 NEXT A
9670 GOTO 8690
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


