60 P$="Micro-Aid IBM PC & COMPATIBLES PAYROLL":GOSUB 10000
62 PRINT:P$="PAYROLL RUN":GOSUB 10000
65 LOCATE 10,1:COLOR 4
70 PRINT TAB(25)"Enter 'W' for Weekly Pay"
72 PRINT:PRINT TAB(25)"Enter 'F' for Fortnightly Pay"
74 PRINT:PRINT TAB(25)"Enter '4' for Four Weekly Pay"
76 PRINT:PRINT TAB(25)"Enter 'M' for Monthly Pay"
78 P$="Enter choice for period, W, F, 4 or M to proceed or any key to abort.":GOSUB 64600
79 GOSUB 61000:GOSUB 62000
80 GOSUB 16000
90 WM=52
91 IF INSTR("4FfMmWw",G$)=0 THEN RUN "selectp
92 IF INSTR("Ww",G$) THEN PW=1
94 IF INSTR("Ff",G$) THEN PW=2
96 IF G$="4" THEN PW=4
98 IF INSTR("Mm",G$) THEN PW=1:WM=12
100 X=1
110 DIM C(X),R(X+1),K(X),N(26,3,3),G(10),S(M,5),T(10)
112 OT1=1.25 : OT2=1.5 : OT3=2
113 P$="To amend overtime rates press Y otherwise 1.25, 1.5 and 2 times ":GOSUB 64600:GOSUB 16000:IF INSTR("Yy",G$)=0 THEN 118
114 P$="Enter overtime rate 1, default is 1.25 ":GOSUB 64700:IF T>0 THEN OT1=T
115 P$="Enter overtime rate 2, default is 1.5 ":GOSUB 64700:IF T>0 THEN OT2=T
116 P$="Enter overtime rate 3, default is 2 ":GOSUB 64700:IF T>0 THEN OT3=T
118 P$="Wait while NI data is loaded into tables.":GOSUB 64600
120 C(1)=19300
130 R(1)=0.25
131 R(2)=0.4
140 K(1)=4825
150 GPTR=1:MTC=480
160 RESTORE:FOR J=0 TO 26:FOR K=0 TO 3:FOR H=0 TO 3:READ T
162 IF T=-999 THEN H=3:K=3:GOTO 166
164 N(J,K,H)=T/100
166 NEXT H,K,J
200 NU=305
205 IF WM=12 THEN NU=1322
210 NL=41
215 IF WM=12 THEN NL=178
220 N1=70:N2=105:N3=155
225 IF WM=12 THEN N1=304:N2=455:N3=672
250 BW=1
255 IF WM=12 THEN BW=4
260 TB=NL
400 DIM E$(M,2),E(M,25),P(10),TAB%(8)
410 I%=10:Z=1
420 RESTORE 950:FOR I%=1 TO 8:READ TAB%(I%):NEXT I%
430 P$="Enter H for horizontal or V for vertical payslips ":GOSUB 64600:GOSUB 16000
435 IF INSTR("Hh",G$)>0 THEN PAYSLIP$="H" ELSE PAYSLIP$="V"
440 IF PAYSLIP$="V" THEN P$="Enter number of copies of vertical payslips ":GOSUB 64700:Z=T:IF Z=0 THEN Z=1
450 IF PAYSLIP$="H" THEN P$="Align Micro-Aid twin NCR payslips and press ENTER to align ":GOSUB 64700:LPRINT TAB(TAB%(2)/2-1)".":P$="If period (.) is line above & just right of 'COMPANY :' press Y else ENTER":GOSUB 64600:INPUT G$:IF G$ ="" THEN GOTO 450
460 GOSUB 40000
500 CLS
510 PRINT
520 P$="MICRO-AID PAYROLL FOR THE AMSTRAD PC1512":GOSUB 10000:PRINT:PRINT
540 GOSUB 17010
550 D$=DA$
560 PRINT
570 PRINT:INPUT "Enter Tax Period Number ";W
585 IF W/PW<>INT(W/PW) THEN W=W+1:GOTO 585
590 IF W<1 OR W>WM+PW THEN PRINT "INVALID - RE-ENTER":PRINT:GOTO 570
600 COLOR 1
700 REM ** N.I. DATA **
790 REM C (Cont Out)
791 DATA 0,0,0,0,5,7,9,10.45,0,0,0,0,1.2,3.2,5.2,6.65
800 REM A
801 DATA 5,7,9,9,5,7,9,10.45,-999
805 REM B
806 DATA 3.85,3.85,3.85,3.85,5,7,9,10.45,-999
810 REM C
811 DATA 0,0,0,0,5,7,9,10.45,-999
815 REM D
816 DATA 5,7,9,9,5,7,9,10.45,3,5,7,7,1.2,3.2,5.2,6.65
820 REM E
821 DATA 3.85,3.85,3.85,3.85,5,7,9,10.45,3.85,3.85,3.85,3.85,1.2,3.2,5.2,6.65
825 REM F
826 DATA 4.75,6.75,8.75,8.75,4.85,6.85,8.85,10.3
827 DATA 2.6,4.6,6.6,6.6,.75,2.75,4.75,6.2
830 REM G
831 DATA 3.6,3.6,3.6,3.6,4.85,6.85,8.85,10.3,3.6,3.6,3.6,3.6,.75,2.75,4.75,6.2
835 REM H
836 DATA 4.75,6.75,8.75,8.75,4.35,6.35,8.35,9.8
837 DATA 2.6,4.6,6.6,6.6,.25,2.25,4.25,5.7
840 REM I
841 DATA 4.75,6.75,8.75,8.75,4.35,6.35,8.35,9.8,-999
845 REM J (not used)
846 DATA -999
850 REM K
851 DATA 3.6,3.6,3.6,3.6,4.35,6.35,8.35,9.8,3.6,3.6,3.6,3.6,.25,2.25,4.25,5.7
855 REM L
856 DATA 4.75,6.75,8.75,8.75,4.85,6.85,8.85,10.3,-999
860 REM M
861 DATA 3.6,3.6,3.6,3.6,4.85,6.85,8.85,10.3,-999
865 REM N
866 DATA 5,7,9,9,4.5,6.5,8.5,9.95,2.85,4.85,6.85,6.85,.4,2.4,4.4,5.85
870 REM O
871 DATA 3.85,3.85,3.85,3.85,4.5,6.5,8.5,9.95
872 DATA 3.85,3.85,3.85,3.85,.4,2.4,4.4,5.85
875 REM P
876 DATA 3.6,3.6,3.6,3.6,4.35,6.35,8.35,9.8,-999
880 REM Q (not used)
881 DATA -999
885 REM R
886 DATA 5,7,9,9,4.5,6.5,8.5,9.95,-999
890 REM S
891 DATA 0,0,0,0,4.85,6.85,8.85,10.3,-999
895 REM T
896 DATA 3.85,3.85,3.85,3.85,4.5,6.5,8.5,9.95,-999
8935 IF P%=8 THEN LPRINT USING"#######.##";S(J,H);
8940 NEXT H:IF P%=0 THEN PRINT ELSE IF P%=8 THEN LPRINT
8950 NEXT J
8955 IF P%=0 THEN PRINT ELSE IF P%=8 THEN LPRINT
8960 Q$="TOTAL"+STRING$(15," "):GOSUB 64300
8970 FOR H=0 TO 5
8980 IF P%=0 THEN PRINT USING"#######.##";S(0,H);
8985 IF P%=8 THEN LPRINT USING"#######.##";S(0,H);
8990 NEXT H
8995 Q$="":GOSUB 64200:Q$="* Includes S.M.P.":GOSUB 64200
9000 Q$=STRING$(80,"-"):GOSUB 64200:P%=0
9020 P$="Press R to repeat, P for Cumulative Period Summary or SPACE to record data":GOSUB 64600
9080 GOSUB 11000
9090 IF INSTR("Rr",Q$) THEN 8820
9100 IF Q$=" " THEN 9500
9110 IF INSTR("Pp",Q$)=0 THEN 9080
9120 GOSUB 64000:IF P%=0 THEN CLS ELSE LPRINT
9130 Q$=CL$:GOSUB 64200
9135 IF P%=0 THEN PRINT ELSE LPRINT
9140 Q$="CUMULATIVE PERIOD SUMMARY - PERIOD ENDING "+D$:GOSUB 64200
9150 IF P%=0 THEN PRINT:PRINT ELSE IF P%=8 THEN LPRINT:LPRINT
9160 Q$="GROSS PAY":T=P(0):GOSUB 18000
9170 Q$="TAX":T=P(1):GOSUB 18000
9180 Q$="N.I.":T=P(2):GOSUB 18000
9190 Q$="SSP":T=P(3):GOSUB 18000
9195 Q$="SMP":T=P(4):GOSUB 18000
9200 Q$="TOTAL TO I.R.":T=(P(1)+P(2))-(P(3)+P(4)):GOSUB 18000
9210 Q$="N.I. (EE)":T=P(5):GOSUB 18000
9220 Q$="N.I. (ER)":T=P(6):GOSUB 18000
9230 Q$="N.I. U.B. (ER)":T=P(8):GOSUB 18000
9250 Q$="PENSION (EE)":T=P(9):GOSUB 18000
9260 Q$="PENSION (ER)":T=P(10):GOSUB 18000
9270 GOSUB 64100:P%=0
9300 GOSUB 10999
9310 P$="Press R to repeat, SPACE to record data or C to re-set Period Summary":GOSUB 64600
9350 GOSUB 11000
9360 IF INSTR("Rr",Q$) THEN 9080
9365 IF INSTR("Cc",Q$) THEN 9400
9370 IF Q$<>" " THEN 9350
9400 FOR J=0 TO 10
9410 P(J)=0
9420 NEXT J
9500 GOSUB 50000
9505 GOSUB 20000
9520 P$="Press R to Record Back-up copy on separate disc or SPACE to end.":GOSUB 64600
9550 GOSUB 11000
9560 IF INSTR("Rr",Q$) THEN GOSUB 50000:GOTO 9520
9570 IF Q$<>" " THEN 9550
9600 CLS
9610 CLEAR
9620 RUN "selectp
10000 PRINT TAB(LL/2-(LEN(P$)/2))P$
10010 RETURN
10999 P$="Press any key to continue":GOSUB 64600:RETURN
11000 PRINT "? ";:Q$="": WHILE Q$="":Q$=INKEY$:WEND
11010 RETURN
12000 P$="Press 'D' to continue to SAVE data - 'M' not to SAVE":GOSUB 64600:RETURN
14000 CLS
14010 PRINT:PRINT
14020 RETURN
15000 T=INT(T*100+0.5)/100
15010 RETURN
16000 G$=""
16010 WHILE G$=""
16020 G$=INKEY$
16030 IF G$="" THEN 16020
16040 WEND
16050 RETURN
17000 PRINT:PRINT TAB(30)"Enter Tax Period "N
17010 COLOR 4:PRINT:PRINT" Current date is ";DATE$;" (MM.DD.YY). If OK press 'Y' else any key. ";:GOSUB 11000:IF INSTR("Yy",Q$) THEN DA$=DATE$:GOTO 17030
17020 PRINT:PRINT:INPUT"DD.MM.YY ";DA$:IF LEN(DA$)<>8 THEN 17020
17030 RETURN
18000 IF R=0 AND T=0 THEN RETURN
18010 GOSUB 15000
18020 IF P%=0 THEN PRINT Q$;:PRINT TAB(30);USING"#######,.##";T
18025 IF P%=8 THEN LPRINT Q$;:LPRINT TAB(30);USING"#######,.##";T
60000 CLS:PRINT:PRINT "AN ERROR HAS BEEN FOUND AS FOLLOWS:_":PRINT:
60010 PRINT "PROGRAM LINE "ERL
60020 PRINT "ERROR TYPE "ERR
60030 PRINT
60040 IF ERR=53 THEN PRINT "FILE NOT FOUND - CHECK CORRECT DISC IS IN DRIVE A":PRINT:PRINT "THE FILES ON THE DISC ARE AS FOLLOWS:-":PRINT:FILES:PRINT:PRINT STRING$(80,"_"):PRINT
60045 IF ERR=25 THEN PRINT "PRINTER NOT ON OR CONNECTED"
60050 PRINT:PRINT"Press any key to continue ";
60060 G$=INKEY$:IF G$="" THEN 60060
60070 CLS:RESUME 120
61000 COLOR 2
61020 R1=1:C1=1:R2=24:C2=79
61050 FOR I = R1+1 TO R2-1
61060 LOCATE I,C1:PRINT CHR$(186);
61070 LOCATE I,C2:PRINT CHR$(186);
61080 NEXT I
61090 FOR J = C1+1 TO C2-1
61100 LOCATE R1,J:PRINT CHR$(205);
61110 LOCATE R2,J:PRINT CHR$(205);
61120 NEXT J
61130 LOCATE R1,C1:PRINT CHR$(201);
61140 LOCATE R1,C2:PRINT CHR$(187);
61150 LOCATE R2,C1:PRINT CHR$(200);
61160 LOCATE R2,C2:PRINT CHR$(188);
61190 RETURN
62000 TITLE.POS=40-INT(LEN(TEXT$)/2)
62020 R1=8:C1=22:R2=18:C2=56
62030 COLOR 1
62040 FOR II=R1+1 TO R2-1
62050 LOCATE II,C1:PRINT CHR$(179);
62060 LOCATE II,C2:PRINT CHR$(179);
62070 NEXT
62080 FOR JJ=C1+1 TO C2-1
62090 LOCATE R1,JJ:PRINT CHR$(196);
62100 LOCATE R2,JJ:PRINT CHR$(196);
62110 NEXT
62120 LOCATE R1,C1:PRINT CHR$(218);
62130 LOCATE R1,C2:PRINT CHR$(191);
62140 LOCATE R2,C1:PRINT CHR$(192);
62150 LOCATE R2,C2:PRINT CHR$(217);
62160 RETURN
64000 P$="Enter 'Y' if paper printout required else press any key ":GOSUB 64600:GOSUB 11000:IF INSTR("Yy",Q$) THEN P%=8 ELSE P%=0
64010 RETURN
64100 IF P%=0 THEN PRINT STRING$(40,"-") ELSE LPRINT STRING$(40,"-")
64110 RETURN
64200 IF P%=0 THEN PRINT Q$ ELSE LPRINT Q$
64210 RETURN
64300 IF P%=0 THEN PRINT Q$; ELSE LPRINT Q$;
64310 RETURN
64400 IF P%=0 THEN PRINT TAB(TB);Q$; ELSE LPRINT TAB(TB);Q$;
64410 RETURN
64500 IF P%=0 THEN PRINT TAB(TB);USING"####";VAL(Q$); ELSE LPRINT TAB(TB);USING"####";VAL(Q$);
64510 RETURN
64600 COLOR 14,0:LOCATE 25,2:PRINT STRING$(78," ");:LOCATE 25,2:PRINT TAB((78-LEN(P$))/2)P$;:COLOR 1,7:P$="":RETURN
64700 COLOR 14,0:LOCATE 25,2:PRINT STRING$(78," ");:LOCATE 25,2:PRINT TAB((78-LEN(P$))/2)P$;:P$="":INPUT T:COLOR 1,7:RETURN