home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 86
/
64er_Magazin_Sonderheft_86_19xx_Markt__Technik_de_Side_A.d64
/
rechnung
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
325 lines
100 ifff$=""thenff$=" ":load"inp/per",8,1
110 poke53272,23:poke650,128
120 poke53281,15:poke53280,15
130 h$="[147] ":h1$=" ......................................"
140 z$=" [196][205]":z1$=" ":m1$="qm/lfm":z2$=" "
150 dimc$(301,3):l$=" [208]reis pro [197]inheit "
160 open3,8,2,"textdaten,l,"+chr$(88)
170 open2,8,15
180 print"[147][144][211]ind schon [196]aten angelegt [202]/[206]"
190 poke198,0:wait198,1:getzz$:ifzz$<>"j"then220
200 print#2,"p"chr$(2)chr$(1)chr$(0)chr$(1)
210 input#3,sm
220 print"[147]"
230 print" [144] "
240 print" [149][146] [205]enue-[193]ngebot [144] "
250 print" [144] "
260 print" 1 [144][146] [212]extdaten eintragen"
270 print" 2 [144][146] [212]extdatei auf [194]ildschirm"
280 print" 3 [144][146] [212]extdatei drucken"
290 print" 4 [144][146] [212]extdatei korrigieren"
300 print" 5 [144][146] [193]ngebot / [210]echnung drucken"
310 print" 6 [144][146] [212]extdatei anlegen/vergroessern"
320 print" e [144][146] [197]nde"
330 geta$:ifa$="e"thenclose2:close3:print"[147]":end
340 ifa$<"1"ora$>"6"then330
350 onval(a$)goto370,520,670,860,1210,3040
360 rem"***************************
370 [143]"* neue texte einspeichern *
380 rem"***************************
390 [153]h$:[153]"(NULL)chluessel (2-";sm;") oder 'e' fuer valnde"
400 [158]49152:[133]s$
410 [139]s$[178]"e"[167]220
420 sl[178][197](s$)
430 [139]sl[179]2[176]sl[177]sm[167][160]1:[137]390
440 [153]h$:t$[178]""
450 [153]"ononmid$etzt bitte den (NULL)ext fuer (NULL)chluessel";sl:[153]h1$:[158]49152:[133]t$
460 [153]"loadcmd";h$:[153]h1$,"onon zweite (NULL)eile fuer (NULL)l";sl:[153]:t1$[178]""
470 [158]49152:[133]t1$
480 [153]h$;"onon(NULL)reis pro valinheit(stck/lfm/qm)":[158]49152:[133]p$
490 [141]2740
500 [137]370
510 [143]"****************************
520 rem"* textdatei auf bildschirm *
530 [143]"****************************
540 gosub2960
550 printchr$(147)
560 forsl=atoe
570 gosub2840
580 ifaa$="leer"then630
590 p$=mid$(ac$,1,4)+","+mid$(ac$,6,2)
600 print""sl"[157] [146]";tab(6)l$;z1$;""p$;z$;" "
610 print""aa$;
620 printab$"[144]"
630 nextsl
640 wait198,1
650 goto220
660 rem"***********************
670 [143]"* textdatei drucken *
680 rem"***********************
690 [153]h$;" peekitte warten !!!"
700 [159]1,4,7
710 x[178]0:[152]1," (NULL)lenleft$(NULL)(NULL)val(NULL)(NULL)val(NULL) - (NULL)right$(NULL)(NULL)val"
720 [152]1," ------------------"
730 lz[178]43:ll$[178]" ":[141]3300:ll$[178]ll$[170]l$:[152]1,ll$:[152]1
740 [141]2960
750 [129]sl[178]a[164]e
760 [141]2840
770 [139]aa$[178]"leer"[167]820
780 p$[178][202](ac$,1,4)[170]","[170][202](ac$,6,2)
790 lz[178]5:ll$[178][196](sl):[141]3300:ll$[178]ll$[170]aa$
800 lz[178]47:[141]3300:ll$[178]ll$[170]p$[170]z$:[152]1,ll$
810 ll$[178]" ":lz[178]5:[141]3300:ll$[178]ll$[170]ab$:[152]1,ll$
820 [130]sl
830 [152]1
840 [160]1:[137]220
850 [143]"**********************
860 rem"* textdaten aendern *
870 [143]"**********************
880 printh$
890 print"[203]orrektur : [211]atzschluessel oder 'e' ";:sys49152:inputsl$:sl=val(sl$)
900 ifsl$="e"then220
910 ifsl<2orsl>smthen880
920 gosub2840
930 printchr$(147)
940 ifaa$="leer"then3030
950 p$=ac$:t$="":t1$=""
960 print"[211]chluessel =";sl
970 printaa$
980 printab$
990 print"[208]reis =";ac$
1000 print"welche [193]enderung wollen sie vornehmen [212]ext o. [208]reis t/p/e "
1010 sys49152:inputq$
1020 ifq$<>"t"andq$<>"p"andq$<>"e"then1000
1030 ifq$="e"then880
1040 ifq$="t"then1060
1050 ifq$="p"then1140
1060 printh$;" ";aa$
1070 print"";:sys49152:inputt$:t$=left$(t$,40)
1080 printh$;" ";ab$
1090 print"";:sys49152:inputt1$:t1$=left$(t1$,40)
1100 print"[145][145]";t$;" ";t1$
1110 wait198,1
1120 gosub2720
1130 goto880
1140 printh$;z1$;ac$:t$=aa$:t1$=ab$
1150 print"";:sys49152:inputp$:p$=right$(p$,7)
1160 print"[145]";aa$;ab$;p$;z$
1170 wait198,1
1180 gosub2720
1190 goto880
1200 rem"****************************
1210 [143]"* angebot zusammen stellen *
1220 rem"****************************
1230 [153]h$:z[178]0:gs[178]0
1240 [153]"onon(NULL)ind die firmeneigenen atnngaben":[153]"gespeichert j/n jcmdcmdcmd";
1250 [158]49152:[133]q$
1260 [139]q$[179][177]"j"[175]q$[179][177]"n"[167]1240
1270 [139]q$[178]"j"[167]2520
1280 [153]"(NULL)ame ihrer ascirma";:[158]49152:[133]f1$
1290 [153]"(NULL)trasse ";:[158]49152:[133]f2$
1300 [153]"(NULL)ohnort ";:[158]49152:[133]f3$
1310 [153]"peekerufszweig ";:[158]49152:[133]f4$
1320 [153]"(NULL)ontonummer ";:[158]49152:[133]f5$
1330 [153]"peekank ";:[158]49152:[133]f6$
1340 [153]"peekankleitzahl ";:[158]49152:[133]f7$
1350 [153]"(NULL)elefon nr. ";:[158]49152:[133]f8$
1360 [153]h$
1370 [153]"ascirmendaten speichern j/n";
1380 [158]49152:[133]q$
1390 [139]q$[179][177]"j"[175]q$[179][177]"n"[167]1360
1400 [139]q$[178]"j"[167]2400
1410 [153]"str$atum";:[158]49152:[133]fa$
1420 [153]"'mein atnngebot/meine (NULL)echnung'":[158]49152:[133]f9$
1430 [153]h$;"atnngaben zum (NULL)unden:wait":[153]
1440 [153]"atnnrede ('left$errn ascrau ascirma')";:[158]49152:[133]a1$:[153]
1450 [153]"(NULL)orname (NULL)achname";:[158]49152:[133]a2$
1460 [153]"(NULL)trasse ";:[158]49152:[133]a3$
1470 [153]"(NULL)ohnort ";:[158]49152:[133]a4$
1480 [153]"peeketrifft: ";:[158]49152:[133]a5$
1490 [153]h$:[153]"(NULL)usammenstellen des atnngebots:":[153]
1500 [153]"(NULL)chluessel 2-";sm"
1510 print"[196]rucken 'd'"
1520 sys49152:inputsl$
1530 ifsl$=""then1520
1540 ifsl$="d"then1750
1550 sl=val(sl$):ifsl<2orsl>smthen1490
1560 gosub2840
1570 ifaa$="leer"then1520
1580 printaa$ab$"1 [197]inheit="ac$"[196][205]"
1590 ifz>300thenprint"[203]eine weiteren [197]ingaben moeglich":goto1520
1600 print"[193]nzahl an [197]inheiten";:sys49152:inputm$
1610 ifm$<"1"orm$>"9"then1600
1620 z=z+1:m=val(m$)
1630 p=val(ac$):ps=p*m
1640 gs=gs+ps
1650 c$(z,1)=aa$+" "
1660 p$=mid$(ac$,1,4)+","+mid$(ac$,6,2)
1670 c$(z,1)=c$(z,1)+" "+p$
1680 a=m:gosub2320
1690 c$(z,1)=c$(z,1)+v1$
1700 a=ps:gosub2320
1710 c$(z,1)=c$(z,1)+v1$+z$
1720 c$(z,2)=ab$
1730 goto1490
1740 rem"************************
1750 [143]"* angebote ausdrucken *
1760 rem"************************
1770 z1[178]28:i[178]1
1780 [159]1,4,7
1790 [152]1
1800 lz[178]4:ll$[178]" ":[141]3300:ll$[178]ll$[170]f1$:lz[178]54:[141]3300:ll$[178]ll$[170]f2$:[152]1,ll$
1810 [141]3290:ll$[178]ll$[170]f3$:[152]1,ll$
1820 lz[178]4:ll$[178]" ":[141]3300:ll$[178]ll$[170]f4$:[152]1,ll$
1830 [141]3290:ll$[178]ll$[170]"den, "[170]fa$:[152]1,ll$
1840 [152]1
1850 [141]3290:[152]1,ll$;"(NULL)to.(NULL)r.: ";f5$
1860 [141]3290:[152]1,ll$;"chr$eldinstitut : "
1870 [141]3290:[152]1,ll$;f6$
1880 [141]3290:[152]1,ll$;"peekankleitzahl : ";f7$
1890 [141]3290:[152]1,ll$;"(NULL)elefon: ";f8$
1900 [152]1," "a1$
1910 [152]1," "a2$
1920 [152]1," "a3$
1930 [152]1,a4$
1940 [152]1
1950 [152]1,"peeketrifft: ";a5$
1960 [152]1
1970 [152]1,"atnls atnnlage uebersende ich right$hnen ";f9$;" zum o.g. peekezug."
1980 [152]1:[152]1
1990 ll$[178]" atnrbeitsaufwand"
2000 lz[178]39:[141]3300:[152]1,ll$;"(NULL)reis stck/qm/lfm (NULL)enge chr$esamt"
2010 [129]xx[178]1[164]80:[152]1,"-";:[130]
2020 [152]1
2030 [129]x[178]1[164]z
2040 [139]c$(x,3)[179][177]""[167]z1[178]z1[170]2:[137]3190
2050 [139]z1[178]67[167]:z1[178]0:[141]2650
2060 [139]z1[177]67[167]:z1[178]1:[141]2650
2070 [152]1,c$(x,1):[141]2620
2080 [152]1,c$(x,2):[141]2620
2090 [130]x
2100 [139]z1[177][178]60[167][141]2650
2110 lz[178]67:ll$[178]" ":[141]3300:[152]1,ll$;"------------"
2120 a[178]gs:[141]2320
2130 gs$[178]v1$
2140 gz[178]gs[172]0.14[170]0.005:gy[178]gz[170]gs
2150 a[178]gz:[141]2320
2160 gz$[178]v1$
2170 a[178]gy:[141]2320
2180 gy$[178]v1$
2190 lz[178]66:ll$[178]" ":[141]3300:[152]1,ll$;gs$;z$
2200 lz[178]67:ll$[178]" ":[141]3300:[152]1,ll$;"------------"
2210 lz[178]55:ll$[178]" ":[141]3300:[152]1,ll$;"+ 14% (NULL)(NULL)(NULL)t ";gz$;z$
2220 lz[178]67:ll$[178]" ":[141]3300:[152]1,ll$;"------------"
2230 lz[178]66:ll$[178]" ":[141]3300:[152]1,ll$;gy$;z$
2240 lz[178]67:ll$[178]" ":[141]3300:[152]1,ll$;"============"
2250 [152]1,"(NULL)it freundlichen chr$ruessen"
2260 [152]1:[152]1
2270 [160]1
2280 [153]h$:[153]"(NULL)ollen (NULL)ie noch einen str$ruck j/n";:[158]49152:[133]q$
2290 [139]q$[179][177]"j"[175]q$[179][177]"n"[167]2280
2300 [139]q$[178]"j"[167][137]1770
2310 [137]220
2320 [143]"********************************
2330 rem"*aufrunden und komma einfuegen *
2340 [143]"********************************
2350 b=int((a+0.005)*100)
2360 v2$=" "+str$(b)
2370 v2$=right$(v2$,9)
2380 v1$=mid$(v2$,1,7)+","+mid$(v2$,8,2)
2390 return
2400 close3
2410 open4,8,2,"@:firmendaten,s,w"
2420 print#4,f1$
2430 print#4,f2$
2440 print#4,f3$
2450 print#4,f4$
2460 print#4,f5$
2470 print#4,f6$
2480 print#4,f7$
2490 print#4,f8$
2500 close4
2510 open3,8,2,"textdaten,l,"+chr$(88):goto1410
2520 open4,8,3,"firmendaten,s,r"
2530 input#4,f1$
2540 input#4,f2$
2550 input#4,f3$
2560 input#4,f4$
2570 input#4,f5$
2580 input#4,f6$
2590 input#4,f7$
2600 input#4,f8$
2610 close4:goto1410
2620 z1=z1+1
2630 ifz1<=66thenreturn
2640 z1=3
2650 forq=1to6
2660 print#1
2670 nextq
2680 i=i+1
2690 print#1," - ";i;" -"
2700 print#1
2710 return
2720 rem"*************************
2730 [143]"* textdaten speichern *
2740 rem"*************************
2750 hb[178][181](sl[173]256)
2760 lb[178]sl[171]hb[172]256
2770 t$[178]t$[170]ff$:t$[178][200](t$,40)
2780 t1$[178]t1$[170]ff$:t1$[178][200](t1$,40)
2790 p$[178]ff$[170]p$:p$[178][201](p$,7)
2800 rc$[178]t$[170]t1$[170]p$
2810 [152]2,"p"[170][199](2)[170][199](lb)[170][199](hb)[170][199](1)
2820 [152]3,rc$
2830 [142]
2840 [143]"**********************
2850 rem"* textdaten lesen *
2860 [143]"**********************
2870 hb=int(sl/256)
2880 lb=sl-hb*256
2890 print#2,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1)
2900 input#3,rc$
2910 ifasc(rc$)=255thenaa$="leer":return
2920 aa$=mid$(rc$,1,40)
2930 ab$=mid$(rc$,41,40)
2940 ac$=mid$(rc$,81,7)
2950 return
2960 rem"**** eingabelimit ******
2970 [153]h$
2980 [153]"onatnb (NULL)chluessel:";:[158]49152:[133]a
2990 [139]a[179]2[176]a[177]sm[167]2980
3000 [153]"onpeekis zu (NULL)chluessel";:[158]49152:[133]e
3010 [139]e[179]2[176]a[177]sm[167]3000
3020 [142]
3030 [153]h$;"str$atensatz nicht vorhanden":[129]x[178]1[164]1000:[130]:[137]880
3040 [143]"******************************
3050 rem"*textdatei einrichten/erweit.*
3060 [143]"******************************
3070 printh$:print"wieviel [211]aetze soll die [196]atei enthalten "
3080 print"oder ende 'e' ";:sys49152:inputsm$
3090 ifsm$="e"then220
3100 sm=val(sm$)
3110 ifsm<2orsm>1800then3070
3120 hb=int(sm/256)
3130 lb=sm-hb*256
3140 print#2,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1)
3150 print#3,chr$(255)
3160 print#2,"p"+chr$(2)+chr$(01)+chr$(0)+chr$(1)
3170 print#3,sm
3180 goto220
3190 print#1,c$(x,3)
3200 zz=len(c$(x,3))
3210 fory=1tozz
3220 print#1,"-";
3230 nexty
3240 print#1,chr$(141)
3250 goto2090
3260 :
3270 rem"* formatieren *
3280 [143]"***************
3290 lz=54:ll$=" "
3300 iflen(ll$)>=lzthen
3310 ll$=ll$+" "
3320 iflen(ll$)<=lzthen3310
3330 return