home *** CD-ROM | disk | FTP | other *** search
- 1000 rem ******************************
- 1010 rem * programm stromkosten *
- 1020 rem * v 2.1 *
- 1030 rem * u. schwebinghaus *
- 1040 rem * erbschloer str. 115 *
- 1050 rem * 5600 wuppertal 21 *
- 1060 rem * *
- 1070 rem ******************************
- 1080 :
- 1085 :
- 1086 :
- 1087 :
- 1100 rem ******* vorbereitung *********
- 1110 :
- 1120 dim vt(12),vn(12)
- 1130 :
- 1225 :
- 1226 :
- 1240 cd$=""
- 1245 tt$="s t r o m - r e c h n u n g"
- 1250 tu$="[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
- 1255 mp$(1)="informationen "
- 1260 mp$(2)="kostendaten-eingabe "
- 1265 mp$(3)="zaehlerdaten-eingabe"
- 1270 mp$(4)="datums-eingabe "
- 1275 mp$(5)="uebersicht der daten"
- 1280 mp$(6)="abrechnung "
- 1285 mp$(7)="speichern der daten "
- 1290 mp$(8)="laden von daten "
- 1295 mp$(9)="programm-ende "
- 1300 poke 53280,15:poke 53281,15
- 1305 print"[147]"tab(5)tt$:print tab(5)tu$
- 1310 print:print
- 1315 for i=1 to 9:print"[158]"tab(5) mp$(i):print:next i
- 1320 print"[144]wahl mit cursor up und down und return";
- 1325 if r=0 then r=1
- 1327 gosub1365
- 1330 get a$:if a$="" then1330
- 1335 if a$="" then gosub1385
- 1340 if a$="[145]" then gosub1400
- 1345 if a$<>chr$(13) then1330
- 1350 if r=9 then print"[147]":end
- 1355 on r gosub 7000,1540,2000,4130,8000,2300,5000,6000:goto 1305
- 1360 :
- 1365 print""left$(cd$,(r-1)*2)tab(5)""mp$(r):return
- 1370 :
- 1375 print""left$(cd$,(r-1)*2)tab(5)"[158]"mp$(r):return
- 1380 :
- 1385 gosub1375:r=r+1:if r>9 then r=1
- 1390 gosub1365:return
- 1395 :
- 1400 gosub1375:r=r-1:if r<1 then r=9
- 1405 gosub1365:return
- 1410 :
- 1530 :
- 1540 rem **** kostendaten-eingabe *****
- 1550 :
- 1560 print"[147]"
- 1570 print"kostendaten-eingabe"
- 1580 print
- 1590 input"anzahl der kostensaetze";ak%
- 1595 print
- 1600 if ak%>12 then 1560
- 1605 :
- 1610 : for i=1 to ak%
- 1615 :
- 1617 print"[147]kostendaten-satz"i
- 1620 print"preis pro kwh in pf (tag)"
- 1630 input pt(i)
- 1640 print"preis pro kwh in pf (nacht)"
- 1650 input pn(i)
- 1660 print"grundpreis pro monat in dm"
- 1670 input gp(i)
- 1680 print"ausgleichsabgabe in %"
- 1690 input aa(i)
- 1700 print"mehrwertsteuer in %"
- 1710 input mw(i)
- 1720 print"daten gueltig bis einschl.";
- 1730 print" [146]. [146][157][157][157][157][157][157][157]";
- 1740 input gk$(i)
- 1741 d$=gk$(i):gosub 9000
- 1742 if er=1 then 1720
- 1743 d1$=gk$(i-1):d2$=gk$(i):gosub 9200
- 1744 if er=1 then 1720
- 1745 :
- 1746 print"k[146]orrektur oder w[146]eiter?"
- 1747 :
- 1750 get a$:if a$="" then 1750
- 1755 :
- 1760 if a$="k"then 1617
- 1770 if a$="w"then 1800
- 1775 :
- 1780 goto 1750
- 1790 :
- 1800 : next i
- 1810 :
- 1820 : return
- 1830 :
- 1840 :
- 2000 rem **** zaehlerdaten-eingabe ****
- 2010 :
- 2020 print"[147]zaehlerdaten-eingabe"
- 2030 :
- 2040 print"alte zaehlerstaende:"
- 2050 print"zaehler nacht in kwh"
- 2060 input zn(0)
- 2070 print"zaehler tag in kwh"
- 2080 input zt(0)
- 2090 :
- 2100 print"neue zaehlerstaende:"
- 2110 print"zaehler nacht in kwh"
- 2120 input zn(1)
- 2130 print"zaehler tag in kwh"
- 2140 input zt(1)
- 2145 zt=zt(1)-zt(0):zn=zn(1)-zn(0)
- 2146 if zt<0 then zt=zt+100000
- 2147 if zn<0 then zn=zn+100000
- 2150 :
- 2160 print"k[146]orrektur oder m[146]enue?"
- 2165 :
- 2170 get a$:if a$="" then 2170
- 2180 :
- 2190 if a$="k" then 2020
- 2200 if a$="m" then 2250
- 2210 :
- 2220 goto 2170
- 2230 :
- 2250 : return
- 2260 :
- 2270 :
- 2300 rem ******** abrechnung **********
- 2310 :
- 2320 if ak%=0 then 3280
- 2330 if zt=0 and zn=0 then 3280
- 2340 if ab$="" or ae$="" then 3280
- 2350 :
- 2440 :
- 2445 print"[147]";
- 2450 printtab(8)"stromkosten-abrechnung"
- 2455 printtab(8)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
- 2460 print tab(5)"von "ab$;
- 2470 print" bis einschl. "ae$
- 2480 print:print
- 2490 k$="monat verbrauch rohpreis"
- 2500 k$=k$+" endpreis"
- 2510 print k$
- 2520 k$="[183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
- 2530 k$=k$+"[183][183][183][183][183][183][183][183][183][183][183]"
- 2540 print" tag nacht"
- 2550 print k$
- 2560 :
- 2570 :
- 2580 a=val(left$(ab$,2))
- 2590 e=val(left$(ae$,2))
- 2600 i=a:dv=0
- 2605 :
- 2610 if i=12 or i=1 then dv=dv+15
- 2620 if i=10 or i=11 then dv=dv+10
- 2630 if i=2 or i=3 then dv=dv+10
- 2640 if i>3 and i<10 then dv=dv+5
- 2645 :
- 2650 if i=e then 2700
- 2660 i=i+1
- 2670 if i>12 then i=i-12
- 2680 goto 2610
- 2690 :
- 2700 for i=1 to 12
- 2710 :
- 2720 : vt(i)=0
- 2730 : vn(i)=0
- 2740 :
- 2750 next i
- 2760 :
- 2770 : i=a
- 2780 :
- 2790 if i=12 or i=1 then vt(i)=zt/dv*15
- 2800 if i=12 or i=1 then vn(i)=zn/dv*15
- 2810 if i=10 or i=11 then vt(i)=zt/dv*10
- 2820 if i=10 or i=11 then vn(i)=zn/dv*10
- 2825 if i=2 or i=3 then vt(i)=zt/dv*10
- 2827 if i=2 or i=3 then vn(i)=zn/dv*10
- 2830 if i>3 and i<10 then vt(i)=zt/dv*5
- 2840 if i>3 and i<10 then vn(i)=zn/dv*5
- 2850 :
- 2860 if i=e then 2920
- 2870 :
- 2880 : i=i+1
- 2890 : if i>12 then i=i-12
- 2900 goto 2790
- 2910 :
- 2920 rem eigentliche abrechnung
- 2930 :
- 2940 : i=a
- 2945 sr=0:se=0
- 2947 : ja=val(right$(ab$,2))
- 2950 ma=i
- 2960 if ma>12 then ma=ma-12:ja=ja+1
- 2990 gosub 9400:rem kosatz
- 3000 if er=1 then 3280
- 3010 :
- 3030 rp=vt(ma)*pt(ks)+vn(ma)*pn(ks)
- 3040 rp=rp/100+gp(ks)
- 3045 sr=sr+rp
- 3060 ep=rp+aa(ks)*rp/100
- 3070 ep=ep+mw(ks)*ep/100
- 3075 se=se+ep
- 3080 :
- 3085 : gosub 9640
- 3087 :
- 3090 :
- 3100 : if ma=e then 3140
- 3110 : i=i+1
- 3120 : goto 2947
- 3130 :
- 3140 rem schlusszeilen drucken
- 3150 :
- 3160 print k$
- 3170 pr$=str$(zt)
- 3180 print tab(4+6-len(pr$)) pr$;
- 3190 pr$=str$(zn)
- 3195 print tab(10+6-len(pr$)) pr$;
- 3197 pr$=str$(int(sr*100)/100)
- 3200 :
- 3202 : gosub 9800
- 3204 :
- 3206 print tab(18+7-len(pr$)) pr$;
- 3207 pr$=str$(int(se*100)/100)
- 3208 :
- 3209 : gosub 9800
- 3210 :
- 3211 print tab(28+7-len(pr$)) pr$
- 3212 print tab(28)"=======":print
- 3215 :
- 3220 : gosub 9900
- 3250 :
- 3280 : return
- 3290 :
- 3300 :
- 4130 rem ***** abrechnungszeitraum ****
- 4140 :
- 4150 print"[147]abrechnungszeitraum":print
- 4160 print"von monat.jahr (mm.jj) ";
- 4170 print" [146]. [146][157][157][157][157][157][157][157]";
- 4180 inputab$:rem * abrechnungsbeginn *
- 4182 d$=ab$:gosub 9000
- 4185 if er=1 then 4130
- 4190 print"bis einschl. (mm.jj) ";
- 4200 print" [146]. [146][157][157][157][157][157][157][157]";
- 4210 inputae$:rem ** abrechnungsende **
- 4211 :
- 4212 d$=ae$:gosub 9000
- 4214 if er=1 then 4130
- 4215 d1$=ab$:d2$=ae$:gosub 9200
- 4224 if er=1 then 4130
- 4230 :
- 4240 : return
- 4250 :
- 4260 :
- 5000 rem ***** datenspeicherung *******
- 5010 :
- 5020 if ak%=0 and zt=0 and zn=0 and ab$="" and ae$="" then 5190
- 5040 :
- 5045 print"[147]datenspeicherung"
- 5046 print"daten werden abgelegt"
- 5047 :
- 5049 open 2,8,15,"s:strom-daten"
- 5050 close 2
- 5052 open 1,8,4,"strom-daten,s,w"
- 5060 :
- 5070 print#1,ab$: print#1,ae$
- 5075 print#1,zt(0):print#1,zt(1)
- 5077 print#1,zn(0):print#1,zn(1)
- 5080 print#1,zt:print#1,zn
- 5085 print#1,ak%
- 5090 :
- 5100 : for i=1 to ak%
- 5110 :
- 5120 print#1,pt(i):print#1,pn(i)
- 5125 print#1,gp(i):print#1,aa(i)
- 5130 print#1,mw(i):print#1,gk$(i)
- 5140 :
- 5150 : next i
- 5160 :
- 5170 close 1
- 5180 :
- 5190 : return
- 5200 :
- 5210 :
- 6000 rem ****** stromdaten laden ******
- 6010 :
- 6012 print"[147]stromdaten laden"
- 6013 print"daten werden eingelesen"
- 6015 :
- 6020 open 1,8,4,"strom-daten,s,r"
- 6030 :
- 6040 input#1,ab$:input#1,ae$
- 6045 input#1,zt(0):input#1,zt(1)
- 6047 input#1,zn(0):input#1,zn(1)
- 6050 input#1,zt:input#1,zn
- 6060 input#1,ak%
- 6070 :
- 6080 : for i=1 to ak%
- 6090 :
- 6100 input#1,pt(i):input#1,pn(i)
- 6102 input#1,gp(i):input#1,aa(i)
- 6110 input#1,mw(i):input#1,gk$(i)
- 6120 :
- 6130 : next i
- 6140 :
- 6150 close 1
- 6160 : return
- 6170 :
- 6180 :
- 7000 rem ******* informationen ********
- 7010 :
- 7015 print"[147]"tab(6);
- 7020 print"i n f o r m a t i o n e n"
- 7030 printtab(6)"zum pgm stromkosten"
- 7035 print
- 7040 print" dieses pgm soll ihre stromrechnung"
- 7060 print" kontrollierbar und verstaendlicher"
- 7080 print" machen.":print
- 7085 print" dateneingaben":print
- 7090 print" geben sie zuerst die zaehlerdaten"
- 7100 print" ihrer stromzaehler ein."
- 7110 print" (anwahl mit cursor down, danach <ret>)"
- 7120 print
- 7130 print" haben sie nur einen tarif, geben sie"
- 7140 print" fuer zaehler nacht immer 0 ein."
- 7150 print
- 7160 print" dann werden die kostendaten eingegeben"
- 7180 print" unter grundpreis wird hier auch "
- 7200 print" bereitstellungs- und verrechnungspreis"
- 7220 print" mit einbezogen.":print
- 7230 print" schliesslich wird noch der"
- 7250 print" abrechnungszeitraum eingegeben"
- 7260 :
- 7270 : print:gosub 9900
- 7280 :
- 7290 print"[147] i n f o stromdaten"
- 7291 print" der maximale abrechnungszeitraum"
- 7293 print" betraegt 12 monate."
- 7295 print" speichern und laden"
- 7300 print:print" weiterhin koennen sie eine"
- 7320 print" abrechnung speichern, wenn alle daten"
- 7340 print" angegeben wurden."
- 7350 print" diese datei koennen sie auch wieder"
- 7360 print" von diskette laden."
- 7370 print" bei neuspeicherung wird die zuvor"
- 7390 print" gespeicherte abrechnung geloescht."
- 7410 print" berechnungsgrundlagen"
- 7420 print" da nur noch einmal pro jahr abgelesen"
- 7440 print" wird, muss man die zwischenstaende bei"
- 7460 print" tarifaenderungen schaetzen."
- 7470 :
- 7480 : print:gosub 9900
- 7490 :
- 7500 print"[147] i n f o stromdaten"
- 7510 print" dazu wird hier der verbrauch auf die"
- 7530 print" monate der abrechnung verteilt unter"
- 7550 print" beachtung des hoeheren verbrauchs"
- 7570 print" in den winter- und uebergangsmonaten."
- 7590 print" beim errechnen der monatsendpreise"
- 7610 print" wird nach addition der ausgleichs-"
- 7620 print" abgabe die mehrwertsteuer zuge-"
- 7640 print" schlagen."
- 7650 print" bei groesseren unstimmigkeiten"
- 7670 print" sprechen sie am besten mit ihren"
- 7690 print" stadtwerken!"
- 7700 :
- 7710 : print:gosub 9900
- 7720 :
- 7730 : return
- 7740 :
- 7750 :
- 7900 end
- 8000 rem ****** daten-ausgabe ********
- 8010 :
- 8020 print"[147]"tab(10)"daten-ausgabe"
- 8030 print:print
- 8035 :
- 8037 z=0
- 8040 if ak%=0 then z=z+1
- 8050 if zt=0 and zn=0 then z=z+1
- 8060 if ab$="" or ae$="" then z=z+1
- 8065 if z=3 then 8400
- 8070 :
- 8080 print"abrechnungsbeginn ";
- 8090 if ab$="" then print "?":goto 8110
- 8100 print ab$
- 8110 print:print"abrechnungsende ";
- 8120 if ae$="" then print "?":goto 8140
- 8130 print ae$
- 8140 print:print
- 8150 print"zaehler tag (alt)"zt(0)
- 8155 print
- 8160 print"zaehler tag (neu)"zt(1)
- 8165 print
- 8170 print"zaehler nacht (alt)"zn(0)
- 8175 print
- 8180 print"zaehler nacht (neu)"zn(1)
- 8185 print
- 8190 print
- 8200 :
- 8210 : print:gosub 9900
- 8220 :
- 8230 print"[147]"tab(10)"daten-ausgabe"
- 8240 print""tab(10)"kostensaetze"
- 8250 print:print
- 8260 if ak%=0 then 8400
- 8265 :
- 8270 : for i=1 to ak%
- 8274 print"[147]"tab(10)"daten-ausgabe"
- 8275 print""tab(10)"kostensaetze"
- 8277 print:print
- 8280 print"preis p. kwh tag"pt(i)" pf"
- 8285 print
- 8290 print"preis p. kwh nacht"pn(i)" pf"
- 8295 print
- 8300 print"grundpreis p.monat"gp(i)" dm"
- 8305 print
- 8310 print"ausgleichsabgabe "aa(i)"[160]%"
- 8315 print
- 8320 print"mehrwertsteuer "mw(i)" %"
- 8325 print
- 8330 print"gueltig bis monat "gk$(i)
- 8335 print
- 8340 :
- 8350 : print:gosub 9900
- 8360 :
- 8370 : next i
- 8380 :
- 8390 goto 8500
- 8395 :
- 8400 print:print
- 8410 print"es wurden noch keine daten";
- 8420 print" eingegeben!"
- 8430 :
- 8440 : print:gosub 9900
- 8450 :
- 8500 : return
- 8510 :
- 8520 :
- 9000 rem ***** subroutine datplau *****
- 9010 :
- 9020 if len(d$)<>5 then 9100
- 9030 if mid$(d$,3,1)<>"." then 9100
- 9040 if val(left$(d$,2))<1 then 9100
- 9050 if val(left$(d$,2))>12 then 9100
- 9060 if val(right$(d$,2))<60 then 9100
- 9070 :
- 9080 er=0:goto 9120
- 9100 er=1
- 9110 :
- 9120 : return
- 9130 :
- 9140 :
- 9200 rem ***** subroutine datklei *****
- 9210 :
- 9220 j1=val(right$(d1$,2))
- 9230 j2=val(right$(d2$,2))
- 9240 m1=val(left$(d1$,2))
- 9250 m2=val(left$(d2$,2))
- 9260 :
- 9265 if j1=0 then 9300
- 9270 if j2<j1 then 9310
- 9275 if j2-j1>1 then 9310
- 9277 if j1<j2 and m1<=m2 then 9310
- 9280 if m2<m1 and j1=j2 then 9310
- 9290 :
- 9300 er=0:goto 9330
- 9310 er=1
- 9320 :
- 9330 : return
- 9340 :
- 9350 :
- 9400 rem ***** subroutine kosatz ******
- 9410 :
- 9420 ii=1
- 9430 :
- 9440 mk=val(left$(gk$(ii),2))
- 9450 jk=val(right$(gk$(ii),2))
- 9460 :
- 9470 if ja=jk and ma<=mk then 9570
- 9475 if ja<jk then 9570
- 9480 if ii=ak% then 9530
- 9490 :
- 9500 ii=ii+1
- 9510 goto 9440
- 9520 :
- 9530 print"[147]kostensaetze unpassend "
- 9540 print"zu abrechnungszeitraum!"
- 9545 :
- 9550 : print:gosub 9900:goto 9590
- 9560 :
- 9570 ks=ii
- 9580 er=0:goto 9600
- 9590 er=1
- 9600 :
- 9610 : return
- 9620 :
- 9630 :
- 9640 rem ***** subroutine ausdruck ****
- 9650 :
- 9660 if ma<10 then print " "ma;
- 9670 if ma>9 then print ma;
- 9680 pr$=str$(int(vt(ma)))
- 9690 print tab(4+6-len(pr$)) pr$;
- 9700 pr$=str$(int(vn(ma)))
- 9710 print tab(10+6-len(pr$)) pr$;
- 9720 pr$=str$(int(rp*100)/100)
- 9725 :
- 9727 : gosub 9800
- 9728 :
- 9730 print tab(18+7-len(pr$)) pr$;
- 9740 pr$=str$(int(ep*100)/100)
- 9742 :
- 9745 : gosub 9800
- 9747 :
- 9750 print tab(28+7-len(pr$)) pr$
- 9760 :
- 9770 : return
- 9780 :
- 9790 :
- 9800 rem ** subroutine spaltendruck ***
- 9810 :
- 9820 if mid$(pr$,len(pr$)-1,1)="." then pr$=pr$+"0"
- 9830 if mid$(pr$,len(pr$)-2,1)<>"." then pr$=pr$+".00"
- 9840 :
- 9850 : return
- 9860 :
- 9870 :
- 9900 rem ****** subroutine weiter *****
- 9910 :
- 9912 print tab(10)">>>>> w[146]eiter";
- 9915 :
- 9920 get a$:if a$="" then 9920
- 9925 :
- 9930 if a$<>"w" then 9920
- 9940 :
- 9950 : return
- 9960 :
- 9970 :
- 9980 rem ****** programm-ende *********
- 9990 rem ******************************
-