home *** CD-ROM | disk | FTP | other *** search
- global gPrintText
-
- on printit_xobject
- global printer, gpropfont, gmonofont, gxobjfile, Xtrapath, sharedPath
- if not objectp(printer) then
- alert("There is no currently selected printer. Printing features are disabled.")
- else
- cursor(4)
- if the platform contains "mac" then
- set bild1 to "bestell1.pct"
- set bild2 to "bestell2.pct"
- else
- set bild1 to "bestell1.bmp"
- set bild2 to "bestell2.bmp"
- end if
- printer(mreset)
- printer(msetdocumentname, "AOL-Shop")
- printer(msetmargins, 20, 48, 20, 40)
- printer(mnewpage)
- printer(mpicture, sharedPath & bild1, 0, 0)
- printer(msettextfont, gmonofont)
- printer(msettextsize, 10)
- printer(msettextstyle, "mormal")
- printer(msettextjust, "left")
- printer(mtextbox, 60, 220, printer(mgetpaperwidth), 415, 0)
- printer(mSetText, gPrintText)
- printer(mpicture, sharedPath & bild2, 0, printer(mGetPaperHeight) / 2)
- cursor(-1)
- if printer(mdojobsetup) = 1 then
- updateStage()
- printer(mprint)
- end if
- end if
- if objectp(printer) then
- printer(mdispose)
- end if
- closeXLib(Xtrapath & gxobjfile)
- end
-
- on fieldmani
- set gPrintText to EMPTY & RETURN
- leftText("Anz", 5, " ")
- leftText("Produkt", 51, " ")
- leftText("Einzel", 8, " ")
- leftText("Gesamt", 8, " ")
- leftText(RETURN, 0, EMPTY)
- leftText(EMPTY, 70, "_")
- leftText(RETURN, 0, EMPTY)
- repeat with i = 1 to the number of lines in field "Name2" - 1
- rightText(line i of field "Anzahl2", 3, " ")
- leftText(EMPTY, 2, " ")
- leftText(line i of field "Name2", 51, ".")
- rightText(line i of field "EPreis2", 6, ".")
- rightText(line i of field "GPreis2", 8, " ")
- leftText(RETURN, 0, EMPTY)
- end repeat
- leftText(EMPTY, 70, "_")
- leftText(RETURN, 0, EMPTY)
- rightText(the text of field "summe", 70, " ")
- leftText(RETURN, 0, EMPTY)
- rightText("Versandkostenpauschale: 6.95", 70, " ")
- leftText(RETURN, 0, EMPTY)
- rightText("_______", 70, " ")
- leftText(RETURN, 0, EMPTY)
- rightText("Summe:", 62, " ")
- rightText(chckStr(float(value(field "summe")) + 6.95000000000000018), 8, " ")
- return gPrintText
- end
-
- on chckStr fl
- set i to integer(fl)
- if float(i) > fl then
- set i to i - 1
- end if
- set fract to integer((fl - float(i)) * 100.0)
- if fract < 10 then
- set frstr to "0" & string(fract)
- else
- set frstr to string(fract)
- end if
- return string(i) & "." & frstr
- end
-
- on leftText T, n, c
- set gPrintText to gPrintText & char 1 to n of T
- set m to n - length(T)
- if m > 0 then
- repeat with i = 1 to m
- set gPrintText to gPrintText & c
- end repeat
- end if
- end
-
- on rightText T, n, c
- set m to n - length(T)
- if m > 0 then
- repeat with i = 1 to m
- set gPrintText to gPrintText & c
- end repeat
- end if
- set gPrintText to gPrintText & char 1 to n of T
- end
-
- on oldfieldmani
- set the text of member "Anzahl3" to "Anzahl" & RETURN & the text of field "Anzahl2"
- set the textSize of member "Anzahl3" to 10
- set the textSize of line 1 of member "Anzahl3" to 14
- set the text of member "Name3" to "Produkt" & RETURN & the text of field "Name2"
- set the textSize of member "Name3" to 10
- set the textSize of line 1 of member "Name3" to 14
- set the text of member "EPreis3" to "Einzelpreis" & RETURN & the text of field "EPreis2"
- set the textSize of member "EPreis3" to 10
- set the textSize of line 1 of member "EPreis3" to 14
- set the text of member "GPreis3" to "Gesamtpreis" & RETURN & the text of field "GPreis2"
- set the textSize of member "GPreis3" to 10
- set the textSize of line 1 of member "GPreis3" to 14
- set the text of member "Summe3" to the text of field "Summe"
- set the textSize of member "Summe3" to 14
- end
-