Copy link to clipboard
Copied
Hallo zusammen,
ich stehe vor folgender Aufgabe:
Ich habe ein PDF-Formular erstellt (Kaufvertrag) in dem der Netto-Kaufpreis eingetragen wird.
Der Brutto-Kaufpreis wird in einem weitern Feld automatisch angezeigt. Der Betrag ist gerundet ohne Nachkommastellen (kleine Adobe Berechnung).
Nun soll in einem weiteren Feld der ermittelte Brutto-Kaufpreis als WORT ausgegeben werden.
Bekommt man das hin, ohne dass man JEDE Zahl von 0 bis 100.000 im javascript-Befehl schreiben muß? [if(zahl==1) event.value="eins"] ist etwas zu aufwendig wenn man bis 100.000 geht...
Auszug aus meinem Formular:
NettoPreis: 1.000 € (wird per Hand eingegeben)
Mwst (19%): 190 € (wird mittels Adobe berechnet)
BruttoPreis: 1.190 € (wird mittels Adobe berechnet)
in Worten: eintausendeinhundertneunzig (das Wort soll mittels javascript angezeigt werden)
Danke schon mal für die freundliche Hilfe!
Besten Dank und viele Grüße
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It will probably be quite different in German, though...
Copy link to clipboard
Copied
Yes its different, but someone have an idea, how it works?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks, looks good ans work, but 60084 are not "undsechzigtausendvierundachtzig"
Copy link to clipboard
Copied
but someone have an idea, how it works in german?
Copy link to clipboard
Copied
This is both a linguistic as well as a programming challenge. I would suggest looking online. It's very likely someone already wrote JS code that does it in German, and it just needs to be adjusted for Acrobat.
Copy link to clipboard
Copied
Its true, but the postet skript from Bernd works good but not perfect.
Copy link to clipboard
Copied
Not all scripts are perfect.
Copy link to clipboard
Copied
Thanks for help. Now it works good and tansform strings in words