Compucolor.org – Virtual Media

Listing of file='EXPRPT.BAS;01' on disk='vmedia/chip_128-sector.ccvf'

18 REM  *****************************************
20 REM  **** XEROX COMPANY CAR EXPENSE REPORT ***
22 REM  ****   WRITTEN BY: ART TACK           ***
24 REM  ****      JULY 1982                   ***
26 REM  **** WRITTEN IN MICROSOFT BASIC       ***
28 REM  ****  USING AN EPSON MX-80FT PRINTER  ***
30 REM  *****************************************
50 DIM DBM(32),GAL(32),CG(32),Q(32),CO(32),MR(32),TR(32),P(32),W(32),T(32),LT(32),AR(32),MISC(32)
51 DIM NCE(32),ST(32)
200 REM  *** INPUT SUBROUTINE ***
210 GOSUB 3000
800 REM  *** TOTALS ***
804 FOR N= 1TO 31
805 ST(N)= CG(N)+ CO(N)+ MR(N)+ TR(N)+ P(N)+ W(N)+ T(N)+ LT(N)+ AR(N)+ MISC(N)+ NCE(N)
806 NEXT N
810 FOR N= 1TO 31:DBM(T)= DBM(T)+ DBM(N):NEXT N
820 FOR N= 1TO 31:GAL(T)= GAL(T)+ GAL(N):NEXT N
825 FOR N= 1TO 31:CG(T)= CG(T)+ CG(N):NEXT N
830 FOR N= 1TO 31:Q(T)= Q(T)+ Q(N):NEXT N
835 FOR N= 1TO 31:CO(T)= CO(T)+ CO(N):NEXT N
840 FOR N= 1TO 31:MR(T)= MR(T)+ MR(N):NEXT N
845 FOR N= 1TO 31:TR(T)= TR(T)+ TR(N):NEXT N
850 FOR N= 1TO 31:P(T)= P(T)+ P(N):NEXT N
855 FOR N= 1TO 31:W(T)= W(T)+ W(N):NEXT N
860 FOR N= 1TO 31:T(T)= T(T)+ T(N):NEXT N
865 FOR N= 1TO 31:LT(T)= LT(T)+ LT(N):NEXT N
870 FOR N= 1TO 31:AR(T)= AR(T)+ AR(N):NEXT N
875 FOR N= 1TO 31:MISC(T)= MISC(T)+ MISC(N):NEXT N
880 FOR N= 1TO 31:NCE(T)= NCE(T)+ NCE(N):NEXT N
885 FOR N= 1TO 32:ST(T)= ST(T)+ ST(N):NEXT N
900 REM  *** PRINT HEADING ***
910 PRINT "EXPENSE REPT. PERFORATION SHOULD BE 1/8 INCH ABOVE"
915 PRINT "THE RIBBON.  TURN PRINTER ON AND ON LINE.
920 PRINT
925 INPUT "HIT RETURN WHEN READY ";A$
980 PLOT 14,27,18,7,15
990 GOSUB 9000:REM  **SEND OUTPUT TO PRINTER
1000 PRINT CHR$ (27)"8";
1010 PRINT CHR$ (27)"G";
1020 PRINT CHR$ (27)"E";
1100 PRINT TAB( 29)MO;DA;YR;"  5-14.0 28  86292   WASHINGTON STATE"
1105 PRINT
1110 PRINT TAB( 30);"ARTHUR R. TACK      892D"
1185 S= 43
1187 PRINT CHR$ (27)"F";
1190 PRINT CHR$ (27)"3"CHR$ (S)
1200 REM  *** PRINT REPORT INFORMATION ***
1205 PRINT CHR$ (15)
1207 FOR N= 16TO 31
1215 PRINT N;
1216 GOSUB 1225
1217 NEXT N
1218 FOR N= 1TO 15
1219 PRINT N;
1220 GOSUB 1225
1222 NEXT N
1223 GOTO 1302
1225 PRINT TAB( 8)DBM(N);
1228 IF GAL(N)= 0GOTO 1235
1230 PRINT TAB( 17)GAL(N);
1235 IF CG(N)= 0GOTO 1245
1238 M= CG(N):GOSUB 6000
1240 PRINT TAB( 25)M$;
1245 IF Q(N)= 0GOTO 1255
1250 PRINT TAB( 37)Q(N);
1255 IF CO(N)= 0GOTO 1263
1257 M= CO(N):GOSUB 6000
1258 PRINT TAB( 40)M$;
1263 IF MR(N)= 0GOTO 1267
1264 M= MR(N):GOSUB 6000
1265 PRINT TAB( 47)M$;
1267 IF TR(N)= 0GOTO 1273
1268 M= TR(N):GOSUB 6000
1270 PRINT TAB( 55)M$;
1273 IF P(N)= 0GOTO 1278
1274 M= P(N):GOSUB 6000
1275 PRINT TAB( 64)M$;
1278 IF W(N)= 0GOTO 1283
1279 M= W(N):GOSUB 6000
1280 PRINT TAB( 72)M$;
1283 IF T(N)= 0GOTO 1286
1284 M= T(N):GOSUB 6000
1285 PRINT TAB( 82)M$;
1286 IF LT(N)= 0GOTO 1289
1287 M= LT(N):GOSUB 6000
1288 PRINT TAB( 89)M$;
1289 IF AR(N)= 0GOTO 1292
1290 M= AR(N):GOSUB 6000
1291 PRINT TAB( 98)M$;
1292 IF MISC(N)= 0GOTO 1295
1293 M= MISC(N):GOSUB 6000
1294 PRINT TAB( 106)M$;
1295 IF NCE(N)= 0GOTO 1298
1296 M= NCE(N):GOSUB 6000
1297 PRINT TAB( 114)M$;
1298 IF ST(N)= 0THEN PRINT :GOTO 1301
1299 M= ST(N):GOSUB 6000
1300 PRINT TAB( 122)M$
1301 RETURN
1302 REM  *** PRINT TOTALS ****
1305 PRINT TAB( 8)DBM(T);
1310 PRINT TAB( 17)GAL(T);
1313 M= CG(T):GOSUB 6000
1315 PRINT TAB( 25)M$;
1320 PRINT TAB( 37)Q(T);
1322 M= CO(T):GOSUB 6000
1325 PRINT TAB( 40)M$;
1327 M= MR(T):GOSUB 6000
1330 PRINT TAB( 47)M$;
1333 M= TR(T):GOSUB 6000
1335 PRINT TAB( 55)M$;
1337 M= P(T):GOSUB 6000
1340 PRINT TAB( 64)M$;
1343 M= W(T):GOSUB 6000
1345 PRINT TAB( 72)M$;
1347 M= T(T):GOSUB 6000
1350 PRINT TAB( 82)M$;
1353 M= LT(T):GOSUB 6000
1355 PRINT TAB( 89)M$;
1357 M= AR(T):GOSUB 6000
1360 PRINT TAB( 98)M$;
1363 M= MISC(T):GOSUB 6000
1365 PRINT TAB( 106)M$;
1367 M= NCE(T):GOSUB 6000
1370 PRINT TAB( 114)M$;
1373 M= ST(T):GOSUB 6000
1375 PRINT TAB( 122)M$;
1700 REM  *** FIGURE SUMMARY INFO ***
1701 PRINT CHR$ (27)"T";
1703 PRINT CHR$ (27)"E";
1704 PRINT CHR$ (27)"G";
1705 CCP= ST(T)- TCE
1715 TM= EM- BM
1720 TPM= TM- DBM(T)
1722 R= .095:REM  *** PERSONAL MILEAGE RATE ***
1725 PMC= TPM* R
1730 NE= PMC- TCE
1735 CM= D* 6:REM  *** DAILY COMMUTING MILEAGE=6 ***
1740 BD= NE- CA
1745 OPM= TPM- CM
1750 MPG= TM/ GAL(T)
1755 CPG= CG(T)/ GAL(T)
1801 PRINT CHR$ (18)
1804 T1= 69:T2= 47:S= 40
1805 PRINT CHR$ (27)"3"CHR$ (S)
1807 M= ST(T):GOSUB 6000
1810 PRINT TAB( T1)M$
1820 PRINT TAB( T2)EM;
1824 S= 25
1825 PRINT CHR$ (27)"3"CHR$ (S)
1827 M= CCP:GOSUB 6000
1830 PRINT TAB( T1)M$
1840 PRINT TAB( T2)BM
1847 M= TCE:GOSUB 6000
1850 PRINT TAB( T1)M$
1860 PRINT TAB( T2)TM
1865 C= R* 100
1867 M= PMC:GOSUB 6000
1870 PRINT TAB( 63)C;TAB( T1)M$
1880 PRINT TAB( T2)DBM(T)
1887 M= NE:GOSUB 6000
1890 PRINT TAB( T1)M$
1900 PRINT TAB( T2)TPM
1907 M= CA:GOSUB 6000
1910 PRINT TAB( T1)M$
1920 PRINT TAB( T2)CM
1927 M= BD:GOSUB 6000
1930 IF BD< 0THEN PRINT TAB( T1)M$
1931 IF BD= < 0THEN PRINT
1940 PRINT TAB( T2)OPM
1950 IF BD= > 0THEN PRINT TAB( T1)M$
1960 PRINT :PRINT :PRINT
1965 MPG= TM/ GAL(T)
1966 M= MPG:GOSUB 6000
1967 PRINT TAB( T2)"MILES PER GALLON = ";M$
1968 M= CPG:GOSUB 6000
1980 PRINT TAB( T2)"COSTS PER GALLON = ";M$
1999 PRINT CHR$ (27)"@"
2000 GOSUB 9500:REM  RETURN OUTPUT TO CRT
2005 INPUT "IS OUTPUT OK? (Y/N)";A$
2010 IF A$= "N"GOTO 900
2015 END
3000 REM  *** INPUT SUBROUTINE ***
3005 PLOT 12
3010 INPUT "EXPENSE REPORT ENDING DATE:(MONTH,DAY,YEAR) ";MO,DA,YR
3020 INPUT "BEGINNING MILEAGE ";BM
3025 PRINT
3030 INPUT "ENDING MILEAGE ";EM
3035 PRINT
3050 PRINT "YOU CAN NOW INPUT YOUR GAS EXPENSES "
3060 PRINT "ENTER 0 FOR THE LAST AMOUNT.  "
3065 PRINT
3070 INPUT "DATE OF PURCHASE? (DAY ONLY) ";N
3075 IF N= 0THEN GOTO 3100
3080 INPUT "AMOUNT OF PURCHASE? ";CG(N)
3090 INPUT "NUMBER OF GALLONS? ";GAL(N)
3095 GOTO 3065
3100 REM   *** INPUT DAILY BUSINESS MILES ***
3105 PRINT
3110 PRINT "I WILL LIST THE DAYS, AND YOU"
3111 PRINT "TYPE IN THE BUSINESS MILES DRIVEN THAT DAY. "
3112 PRINT
3120 FOR N= 16TO 31
3130 PRINT "DAY"N"=";:INPUT DBM(N)
3135 IF DBM(N)> 0THEN D= D+ 1
3140 NEXT N
3150 FOR N= 1TO 15
3160 PRINT "DAY "N"= ";:INPUT DBM(N)
3165 IF DBM(N)> 0THEN D= D+ 1
3170 NEXT N
3200 REM  *** INPUT OIL ***
3205 PRINT
3210 INPUT "DID YOU BUY ANY OIL THIS MONTH?SPC( (Y/N) ";A$
3220 IF A$= "N"GOTO 3300
3225 INPUT "DAY OF PURCHASE? ";N
3228 IF N= 0GOTO 3300
3230 INPUT "NUMBER OF QUARTS";Q(N)
3240 INPUT "TOTAL COST? ";CO(N)
3260 GOTO 3225
3300 REM  ***INPUT MAINTENCE REPAIRS ***
3305 PRINT
3310 INPUT "ANY MAINT. & REPAIR EXPENSES THIS MONTH? (Y/N)";A$
3320 IF A$= "N"THEN GOTO 3400
3330 INPUT "DATE OF EXPENSE";N
3340 IF N= 0THEN 3400
3350 INPUT "AMOUNT OF EXPENSE";MR(N)
3360 GOTO 3330
3400 REM  *** INPUT TIRE & TIRE REPAIR COST ***
3405 PRINT
3410 INPUT "ANY TIRE OR TIRE REPAIR EXPENSES? (Y/N)";A$
3420 IF A$= "N"THEN 3500
3430 INPUT "DATE OF TIRE EXPENSE ";N
3440 IF N= 0THEN 3500
3450 INPUT "AMOUNT OF EXPENSE ";TR(N)
3460 GOTO 3430
3500 REM  *** PARKING EXPENSES ***
3505 PRINT
3510 INPUT "ANY PARKING EXPENSES TO REPORT (Y/N)";A$
3520 IF A$= "N"THEN 3600
3525 PRINT
3530 INPUT "DATE OF EXPENSE ";N
3540 IF N= 0THEN 3600
3550 INPUT "AMOUNT OF EXPENSE ";P(N)
3560 GOTO 3530
3600 REM  *** WASHING EXPENSES ***
3605 PRINT
3610 INPUT "ANY WASHING EXPENSES? (Y/N) ";A$
3620 IF A$= "N"THEN 3700
3630 INPUT "DATE OF WASHING EXPENSE ";N
3640 IF N= 0THEN 3700
3650 INPUT "COST OF CAR WASH ";W(N)
3660 GOTO 3630
3700 REM  *** TOLL EXPENSES ***
3705 PRINT
3710 INPUT "ANY TOLLS THIS MONTH? (Y/N) ";A$
3720 IF A$= "N"GOTO 3800
3730 INPUT "DATE OF TOLL ";N
3740 IF N= 0THEN 3800
3750 INPUT "COST OF TOLL ";T(N)
3760 GOTO 3730
3800 REM  *** LICENSE & TAXES ***
3805 PRINT
3810 INPUT "ANY LICENSE OR TAX EXPENSES? (Y/N)";A$
3820 IF A$= "N"THEN 3900
3830 INPUT "DATE OF EXPENSE ";N
3840 IF N= 0THEN 3900
3850 INPUT "COST OF LICENSE OR TAX ";LT(N)
3860 GOTO 3830
3900 REM  *** ACCIDENT REPAIRS ***
3905 PRINT
3910 INPUT "ANY ACCIDENT REPAIRS? (Y/N)";A$
3920 IF A$= "N"THEN 4000
3930 INPUT "DATE OF ACCIDENT REPAIR ";N
3940 IF N= 0THEN 4000
3950 INPUT "COST OF ACCIDENT REPAIRS ";AR(N)
3960 GOTO 3930
4000 REM  *** MISC. EXPENSES ***
4005 PRINT
4010 INPUT "ANY MISC. EXPENSES? (Y/N) ";A$
4020 IF A$= "N"THEN 4100
4030 INPUT "DATE OF MISC. EXPENSE ";N
4040 IF N= 0THEN 4100
4050 INPUT "AMOUNT OF MISC. EXPENSE ";MISC(N)
4060 GOTO 4030
4100 REM  *** NON-CAR EXPENSES ***
4105 PRINT
4110 INPUT "ANY NON-CAR EXPENSES (Y/N) ";A$
4120 IF A$= "N"THEN 4200
4130 INPUT "DATE OF EXPENSE ";N
4140 IF N= 0THEN 4200
4150 INPUT "AMOUNT OF NON-CAR EXPENSES ";NCE(N)
4155 PRINT
4160 GOTO 4130
4200 REM  *** INPUT CASH EXPENSES ***
4203 PRINT
4205 INPUT "LIST YOUR CASH EXPENSES ";CE
4210 IF CE= 0GOTO 4300
4220 TCE= TCE+ CE
4230 GOTO 4205
4300 RETURN
6000 REM  *** FORMAT MONEY AMOUNTS ***
6005 REM  M=NUMERIC VALUE TO BE FORMATTED
6010 REM  M$=STRING VALUE TO PRINT MONEY AMOUNT
6020 IN= INT (SGN (M)* M)
6030 RE= (SGN (M)* M)- IN
6040 M$= "   "+ STR$ (SGN (M)* IN):REM  "   " CONTAINS 3 SPACES
6050 IF RE= 0THEN M$= M$+ ".00":GOTO 6070
6060 M$= M$+ MID$ (STR$ (RE+ .001),2,3)
6070 N$= RIGHT$ (N$,6)
6080 RETURN
9000 BA= PEEK (33265):REM  SAVE BASIC OUTPUT FLAG ***
9005 POKE 33289,135
9010 PLOT 27,13:REM  *** OUTPUT TO RS-232 PORT ***
9020 RETURN
9500 POKE 33265,BA:REM  RESET OUTPUT TO CRT ***
9510 RETURN