********************************************************** * * bestellungen eingeben und drucken f€r flex-db * * (c) hado hein 1991 * * keine verwendung des quelltextes ohne mein einverst€ndnis * *********************************************************** * * vorgang : * * typ und herst eingeben * satz aus kuda disp * best€tigen * abfragen daten f€r arda * plausibilit€tskontrolle * kontrolldisplay * druck der bestellung * bzw. speicherung in druckdatei (fortlaufende nummer) * eingabe bestellschein-nr * app blank * REPLACE-en * * * vielleicht wieder lieferanten adressen in dbf * und dann aus dbf in briefkopf setzen * * ------- just to remember * 4,1 to 21,78 ist der arbeitsbereich !... !! ...... *********************************************************** parameter satznr progteil="BESTELLUNG" private wahl,dr_nr,filename,prinadr,dr_ok if pcount() = 0 private ende,s_typ,s_firma store space(40) to s_firma,s_typ ende=.f. do ssc do sucheing do case case !empty(s_typ) .and. empty(s_firma) suche=trim(upper(s_typ)) set order to 2 seek suche set order to 1 case empty(s_typ) .and. !empty(s_firma) suche=trim(upper(s_firma)) seek suche case !empty(s_typ) .and. !empty(s_firma) suche=trim(upper(s_typ)) set order to 2 seek suche set order to 1 if found() .and. trim(upper(s_firma)) = trim(upper(firma)) ende=.f. else ende=.t. endif endcase if lastkey()=27 && wenn abfrage mit esc verlassen wurde return endif if !found() .or. ende do lauf with 11," Nicht vorhanden ... " ende=.t. return endif endif && *************** von ohne para aufgerufen (suchen kunde) do norm do ku_disp do inv @ 16,10 say "Die Bestellung wird unter diesem Kunden abgespeichert." do hell do lauf with 18,"Jede Taste zum Weitermachen € Abbruch mit ESC" if lastkey()=27 return endif clear typeahead do ssc do cout with 4,"Geben Sie bitte die Artikeldaten ein." @ 5,5 say "Anlage" do hell @ 5,12 say upper(kuda->herst)+" "+upper(kuda->typ) DECLARE na[9] && Die neuen Feldinhalte AFILL (na,space(25)) ende=.f. do while !ende do nachricht with "Abbruch mit ESC" for i = 1 to 9 do norm @ i+6,10 say au[i+2] do hell @ i+6,36 get na[i] picture "@K" next i READ if lastkey()=27 return endif for i = 1 to 9 do norm @ i+6,10 say au[i+2] do hell @ i+6,36 say na[i] picture ap[i+2] do inv @ i+6,63 say iif(ae[i+2]," EDITIERBAR ","NICHT EDITIERBAR") next i do norm @ 17,35 prompt " €ndern " @ 18,35 prompt " OK " wahl=1 menu to wahl if wahl=2 ende=.t. endif enddo dummy=printcheck() dr_ok=.f. do while !dr_ok do pron &&&********************und ab den fisch do header with "TESTDRUCK FDB-SYSTEM" ? "bestellung von : " ? "anlage herst / kennung " ? "Herst : "+herst ? "Typ _-: "+typ for i = 1 to 9 ? au[i+2]+" --- "+na[i] next i eject do proff &&&********************pfffffffffffffff do frame do ssc do hell do cout with 10,"Ist der Ausdruck korrekt ?" @ 14,35 prompt " OK " @ 15,35 prompt "Wiederholen" clear typeahead menu to wahl if wahl=1 dr_ok=.t. endif enddo * * * * Editieren der sp€ter-felder (wie zb bestellschein-nr) * * * private n_typ n_typ=typ select 2 append blank if rlog() replace typ with upper(n_typ) replace datum with date() replace ad1 with na[1] replace ad2 with na[2] replace ad3 with na[3] replace ad4 with na[4] replace ad5 with na[5] replace ad6 with na[6] replace ad7 with na[7] replace ad8 with na[8] replace ad9 with na[9] commit do relog endif select 1 €