home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG022.ARC
/
TAX86.BAS
< prev
next >
Wrap
BASIC Source File
|
1979-12-31
|
13KB
|
372 lines
5 ' REPRODUCED FROM ''YOUR COMPUTER'' JUNE 1986
10 ' Copyright (C) 1986, Worthwords Pty Ltd.
20 ' Permission granted for personal, non-profit use on
30 ' the condition the lines 10 to 100 inclusive are
40 ' retained and executed as is and the disclaimer
50 ' carried in subroutine 500 is included.
60 PRINT : PRINT "______________________________"
70 PRINT "Income Tax Calculator 1985/1986"
80 PRINT "Copyright, Worthwords Pty Ltd"
90 PRINT "______________________________
100 PRINT : INPUT "Hit RETURN to get started.....";X$
110 CLS$=CHR$(26)
120 DEFDBL A-Z
130 FALSE% = 0: TRUE% = NOT FALSE%
135 PROV%=FALSE%
140 GOSUB 500
150 GOSUB 1000
160 GOSUB 300
170 GOSUB 2000
180 GOSUB 3000
190 GOSUB 3500
200 PRINT CLS$;TAB(10):INPUT "Any other Calculations, (Y/N) ";ANS$
210 IF LEFT$(ANS$,1)="N" OR LEFT$(ANS$,1)="n" THEN SYSTEM
220 RUN
297 '
298 ' work out appropriate tax rate depending on income
299 '
300 IF TI>34999! THEN GOSUB 35000
310 IF (TI>27999 AND TI<35000!) THEN GOSUB 28000
320 IF (TI>19499 AND TI<28000) THEN GOSUB 19500
330 IF (TI>12499 AND TI<19500) THEN GOSUB 12500
340 IF (TI>4594 AND TI<12500) THEN GOSUB 4595
350 IF TI<4595 THEN GOSUB 4000
360 RETURN
497 '
498 ' explain ourselves
499 '
500 PRINT CLS$
530 PRINT : PRINT
540 PRINT "This 'ready reckoner' calculates the tax owed or refund due based"
550 PRINT "on your taxable income (as worked out on your 1985/86 return, after"
560 PRINT "deductions) and the tax already paid (either shown on your Group"
570 PRINT "Certificates, or remitted in Provisional Tax payments for the"
580 PRINT "you run the programme."
590 PRINT : PRINT
600 PRINT "The programme will take into account rebates available to you"
610 PRINT "and (where applicable) calculate provisional tax. However, it is"
650 PRINT "We offer this program as a guide only and will accept no"
660 PRINT "responsibility for its accuracy or applicability..."
670 PRINT : PRINT
680 PRINT "Do you have your Taxable Income and Tax Paid figures to hand"
690 INPUT "Enter (N)o to quit, any other key to continue";ANS$
700 IF ANS$="N" OR ANS$="n" THEN SYSTEM
710 RETURN
997 '
998 ' ask for total income, total tax paid, check if provisional applies
999 '
1000 PRINT CLS$
1010 PRINT : PRINT : PRINT
1040 PRINT TAB(20);"YC Income Tax Calculator 1986"
1050 PRINT TAB(20);"=============================="
1060 PRINT : PRINT
1070 PRINT TAB(15):INPUT "Total Income (from ALL sources) ";TI
1080 PRINT
1090 PRINT TAB(15); "Provisional Tax applies to any non-PAYE"
1100 PRINT TAB(15); "income, such as contract work, investment"
1110 PRINT TAB(15); "returns, and so on. Does this apply to"
1120 PRINT TAB(15):INPUT "any of your Taxable Income as shown above ";ANS$
1130 IF LEFT$(ANS$,1)="Y" OR LEFT$(ANS$,1)="y" THEN GOSUB 1500
1140 PRINT
1150 PRINT TAB(15);"Tax Paid (shown on Group Certificate,"
1160 PRINT TAB(15):INPUT "tax stamps, or Provisional Tax payments) ";TP
1170 RETURN
1497 '
1498 ' determine how much of income is subject to provisional tax
1499 '
1500 PRINT TAB(15):INPUT "Amount subject to provisional tax ";PTI
1510 IF PTI>1000 THEN PROV% = TRUE%
1520 RETURN
1997 '
1998 ' check which rebates apply
1999 '
2000 REB = 0 : IN = 99
2010 DIM CH(11) :DIM MSG$(11): DIM RB(9)
2015 FOR I% = 1 TO 9: RB(I%) = 0 : NEXT I%
2020 FOR I% = 0 TO 11 : CH(I%) = FALSE% : NEXT I%
2030 MSG$(0) = " 0 - Exit"
2031 MSG$(1) = " 1 - Spouse"
2032 MSG$(2) = " 2 - Daughter-housekeeper"
2033 MSG$(3) = " 3 - Invalid relative"
2034 MSG$(4) = " 4 - Parent"
2035 MSG$(5) = " 5 - Housekeeper"
2036 MSG$(6) = " 6 - Sole Parent"
2037 MSG$(7) = " 7 - Pensioner"
2038 MSG$(8) = " 8 - Unemployment/sickness benefits"
2039 MSG$(9) = " 9 - Medical expenses exceeding $1000"
2040 MSG$(10) = " 10 - Home Loan Interest"
2041 MSG$(11) = " 11 - Zone Allowances"
2050 WHILE IN<>0
2060 PRINT CLS$
2070 PRINT:PRINT:PRINT
2080 PRINT TAB(10);"Select a rebate you qualify for:"
2090 PRINT
2100 FOR I% = 0 TO 11
2110 IF CH(I%)=FALSE% THEN PRINT TAB(15);MSG$(I%)
2120 NEXT I%
2130 PRINT
2140 PRINT TAB(15):INPUT "Select - ";IN
2150 IF IN=0 THEN RETURN
2160 IF (IN>11 OR CH(IN)<>FALSE%) THEN 2190
2170 CH(IN)=TRUE%
2180 ON IN GOSUB 2200,2200,2200,2200,2300,2400,2500,2600,2700,2800,2900
2190 WEND
2197 '
2198 ' spouse, daughter, relative or parent
2199 '
2200 PRINT : PRINT
2205 FOR I% = 1 TO 6: CH(I%)=TRUE% : NEXT I%
2210 PRINT TAB(10):INPUT "What is the dependant's separate net income ";SI
2220 PRINT TAB(10):INPUT "Do you also have a dependant child/student ";CS$
2230 IF IN<3 THEN TMP=830
2240 IF IN=3 THEN TMP=376
2250 IF IN=4 THEN TMP=749
2260 IF SI>282 THEN GOSUB 2280
2265 RB(IN)=TMP
2270 IF LEFT$(CS$,1)="Y" OR LEFT$(CS$,1)="y" THEN RB(IN)=RB(IN)+200
2275 RETURN
2277 '
2278 'reduce rebate by $1 for every $4 separate net income >$282
2279 '
2280 SI=SI-282
2282 SI=INT(SI/4)
2284 TMP=TMP-SI
2286 IF TMP<0 THEN TMP=0
2288 RETURN
2297 '
2298 ' housekeeper
2299 '
2300 RB(IN)=830 : PRINT : PRINT
2305 FOR I%=1 TO 6: CH(I%)=TRUE% : NEXT I%
2310 PRINT TAB(10):INPUT "Do you also have a dependant child/student ";CS$
2320 IF LEFT$(CS$,1)="y" OR LEFT$(CS$,1)="Y" THEN RB(IN)=RB(IN)+200
2330 RETURN
2397 '
2398 ' sole parent - unconditional rebate
2399 '
2400 RB(IN)=780
2405 FOR I% = 1 TO 6:CH(I%)=TRUE%: NEXT I%
2410 RETURN
2497 '
2498 ' pensioner gets $250 less 12.5c for every $1 income >$5595
2499 '
2500 TMP=250 : MAX = 5595
2510 GOSUB 2550
2520 RETURN
2547 '
2548 ' calculates sliding scale for pension and unemployed/sickness
2549 '
2550 T2=T1-MAX
2555 IF T2>TMP/.125 THEN RETURN
2560 IF T2<1 THEN RB(IN)=RB(IN)+TMP : RETURN
2565 RB(IN)=RB(IN)+(TMP-(T2*.125))
2570 RETURN
2597 '
2598 ' unemployed/sickness benefitss recipients (sliding scale like pension)
2599 '
2600 PRINT : PRINT
2610 PRINT TAB(10):INPUT "Are you married (Y/N) ";ANS$
2620 MAX=5275:TMP=170
2630 IF LEFT$(ANS$,1)="Y" OR LEFT$(ANS$,1)="y" THEN MAX=8795:TMP=220
2640 GOSUB 2550
2650 RETURN
2697 '
2698 ' 30% of net medical expenses >$1000 are rebated
2699 '
2700 PRINT : PRINT
2710 PRINT TAB(10);"Net Medical expenses (i.e after Medicare and insurance"
2720 PRINT TAB(10);"refunds are subject to rebate if they exceed $1000"
2730 PRINT TAB(10);"By how much do your expenses exceed $1000"
2740 PRINT TAB(10):INPUT "(Enter 0 to exit) ";NM
2750 IF NM>0 THEN RB(IN)=NM*.3
2760 RETURN
2797 '
2798 ' home loan interest rebate is npow a rarity. only advise it is available
2799 '
2800 PRINT : PRINT
2810 PRINT TAB(10);"Home loan interest rebate is applicable the first five"
2820 PRINT TAB(10);"years of owner/occupancy of sole or principal residence."
2830 PRINT TAB(10);"It is limited to first occupation dates between"
2840 PRINT TAB(10);"June 1977 and october 1983. This must be calculated"
2850 PRINT TAB(10);"manually if it applies to you...."
2860 PRINT
2870 PRINT TAB(10);"Hit RETURN to continue......";TMP$
2880 RETURN
2896 '
2897 ' zone allowance apply to remote areas. people to whom
2898 ' it applies usually know it
2899 '
2900 PRINT : PRINT : PRINT
2910 PRINT TAB(10);"The following Zone rebates apply for 1985/1986. Please"
2915 PRINT TAB(10);CALCULATE THESE MANUALLY IF THEY APPLY TO YOU. NOTE"
2920 PRINT TAB(10);"the percentage figure quoted is to be added to any"
2925 PRINT TAB(10);DEPENDANT, HOUSEKEPER OR SOLE PARENT REBATES YOU"
2930 PRINT TAB(10);"qualify for."
2935 PRINT : PRINT
2940 PRINT TAB(10);"Ordinary Zone A - $270 plus 50 per cent"
2945 PRINT TAB(10);" Special Zone A - $938 plus 50 per cent"
2950 PRINT TAB(10);"Ordinary Zone B - $ 45 plus 20 per cent"
2955 PRINT TAB(10);" Special Zone B - $938 plus 20 per cent"
2960 PRINT TAB(1);"Defence Force - Same as Ordinary Zone A"
2965 PRINT : PRINT : PRINT
2970 PRINT TAB(10):INPUT "Hit RETURN to continue.....";TMP$
2980 RETURN
2997 '
2998 ' calculate tax, medicare levy
2999 '
3000 TAX=BTAX+(XTRA*MRGN)
3010 '
3020 MEDI=TI*.01
3030 RETURN
3497 '
3498 ' show the result
3499 '
3500 PRINT CLS$
3505 FMT$="##,###.##"
3510 PRINT : PRINT : PRINT
3520 PRINT TAB(15);"Taxable Income - $";
3522 PRINT USING FMT$;TI
3525 PRINT
3530 PRINT TAB(15);"Tax Payable - $";
3531 PRINT USING FMT$;TAX
3533 PRINT TAB(15);"Medicare Levy - $";
3534 PRINT USING FMT$;MEDI
3536 TAX=TAX+MEDI
3540 PRINT
3545 PRINT TAB(15);"Less:"
3550 PRINT TAB(15);" Tax Paid - $";
3553 PRINT USING FMT$;TP
3555 PRINT TAB(15);"Rebates:"
3560 FOR I%=1 TO 9
3561 SPC$=" "
3562 MSG$(I%)=LEFT$(RIGHT$(MSG$(I%),LEN(MSG$(I%))-5)+SPC$,33)
3565 IF RB(I%)>0 THEN PRINT TAB(20);MSG$(I%);"- $";
3567 IF RB(I%)>0 THEN PRINT USING FMT$;RB(I%)
3570 REB=REB+RB(I%)
3572 NEXT I%
3575 PRINT TAB(15);"Total Credits: - $";
3577 PRINT USING FMT$;REB+TP
3580 PRINT
3585 IF PROV%=TRUE% THEN GOSUB 3800
3590 PRINT : PRINT TAB(15);
3600 AMT = TAX-(TP+REB)
3610 IF AMT<0 THEN PRINT "Your refund will be - $";
3615 IF AMT<0 THEN PRINT USING FMT$;-AMT
3620 IF AMT=>0 THEN PRINT "You will have to pay - $";
3625 IF AMT>=0 THEN PRINT USING FMT$;AMT
3630 PRINT : PRINT
3640 PRINT TAB(15):INPUT "Hit P to Print, any other key to continue ";ANS$
3645 IF LEFT$(ANS$,1)="P" OR LEFT$(ANS$,1)="p" THEN GOSUB 3870
3650 RETURN
3797 '
3798 ' provisional tax payable for next year (at current +11%)
3799 '
3800 OTAX=TAX: OTI=TI : OMRGN=MRGN : OMEDI=MEDI : OTP=TP : OREB=REB
3803 TI=OTI*1.11 'total income + 11%
3806 GOSUB 300 'work out tax scale for new rate
3809 GOSUB 3000 'calculate tax on new amount
3812 BIGTAX=TAX+MEDI 'total tax payable on new amount
3815 TI=(OTI-PTI)*1.11 'PAYE compnent for next year (i.e +11%)
3816 GOSUB 300 'work out tax scale for PAYE amount
3818 GOSUB 3000 'calc tax on PAYE amount
3819 PROVTAX=BIGTAX-TAX-MEDI 'difference is the provisional amount
3820 ' so far this program ignores the potential rebates which could
3821 ' apply to next years provisional tax. It could be calculated
3822 ' roughly using the next three lines which are based on taking a
3823 ' percentage of the current rebate amount equal to the percentage
3824 ' ratio of the current PAYE/provisional tax income.
3825 PROVPC=PROVTAX/BIGTAX ' Approximate the pro-rata rebates
3826 PROVREB=REB*PROVPC ' which could then be applied to prov tax
3827 PROVTAX=PROVTAX-PROVREB ' <---- like this
3828 TAX=OTAX : TI=OTI : MRGN=OMRGN : MEDI=OMEDI : TP=OTP : REB=OREB
3829 TAX=TAX+PROVTAX
3830 PRINT TAB(15);"Add:"
3840 PRINT TAB(15);" Provisional Tax Payabale - $";
3845 PRINT USING FMT$;PROVTAX
3850 PRINT
3860 RETURN
3870 LPRINT : LPRINT : LPRINT : LPRINT : LPRINT
3875 LPRINT TAB(17);"Your Computer Magazine Tax calculator for 1985/86"
3880 LPRINT TAB(17);"================================================="
3885 LPRINT : LPRINT : LPRINT
3890 LPRINT TAB(15);"Taxable Income - $";
3895 LPRINT USING FMT$;TI
3900 LPRINT
3905 LPRINT TAB(15);"Tax Payable - $";
3910 LPRINT USING FMT$;TAX-MEDI-PROVTAX
3912 LPRINT TAB(15);"Medicare Levy - $";
3914 LPRINT USING FMT$;MEDI
3916 LPRINT
3918 LPRINT TAB(15);"Less:"
3920 LPRINT TAB(15);" Tax Paid - $";
3922 LPRINT USING FMT$;TP
3924 LPRINT TAB(15);"Rebates:"
3926 FOR I%=1 TO 9
3927 IF RB(I%)>0 THEN LPRINT TAB(21);MSG$(I%);"- $";
3930 IF RB(I%)>0 THEN LPRINT USING FMT$;RB(I%)
3932 NEXT I%
3934 LPRINT TAB(15);"Total Credits: - $";
3936 LPRINT USING FMT$;REB+TP
3938 LPRINT
3939 IF PROV% = TRUE% THEN GOSUB 3970
3940 LPRINT : LPRINT TAB(15);
3942 IF AMT<0 THEN LPRINT "Your refund will be - $";
3944 IF AMT<0 THEN LPRINT USING FMT$;-AMT
3946 IF AMT>=0 THEN LPRINT "You will have to pay - $";
3948 IF AMT>=0 THEN LPRINT USING FMT$;AMT
3950 LPRINT : LPRINT CHR$(12)
3960 RETURN
3970 LPRINT TAB(15);"Add:"
3975 LPRINT TAB(15);" Provisional Tax payable - $";
3980 LPRINT USING FMT$;PROVTAX
3985 LPRINT
3990 RETURN
3997 '
3998 ' tax below $4,595 is nil
3999 '
4000 BTAX = 0
4010 BASE = 0
4020 XTRA=TI
4030 MRGN=0
4040 RETURN
4592 '
4593 ' tax on $4,559 is nil, marginal rate is 25%
4594 '
4595 BTAX=0
4605 BASE=4595
4615 XTRA=TI-BASE
4624 MRGN=.25
12497 '
12498 ' tax on $12500 is $1976.25. marginal rate is 30%
12499 '
12500 BTAX=1976.25
12510 BASE=12500
12520 XTRA=TI-BASE
12530 MRGN=.3
12540 RETURN
19497 '
19498 ' tax on $19500 is $4076.25. marginal rate is 46%
19499 '
19500 BTAX=4076.25
19510 BASE=19500
19520 XTRA=TI-BASE
19530 MRGN=.45
19540 RETURN
27997 '
27998 ' tax on $28000 is $7986.25. marginal rate is 60%
27999 '
28000 BTAX=7986.25
28010 BASE=28000
28020 XTRA=TI-BASE
28030 MRGN=.48
28040 RETURN
34997 '
34998 ' tax on $35000 is $11346.25
34999 '
35000 BTAX=11346.3
35010 BASE=35000!
35020 XTRA=TI-BASE
35030 MRGN=.6
35040 RETURN
' tax on $35000 is $11346.25
3