![]() |
| Adobe Forums » Software Discussions » Adobe Acrobat » Acrobat Scripting Languge » invoice script. add gratuity, tax subtotal ect.... |
| Tags: |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
can someone please help me out. looked eveywhere, found nothing... seems very simple for someone who knows a thing or two about acrobat... and javascript.
have a form that WE fill out, Quantity, Amount,.. and i would like it to automatically calculate gratuity (at 20%), sales tax (6.5%) make it visible on the form... and then subtotaled, and TOTAL... can someone please help me out! i would GREATLY appreciate it! thanks again ps. this is my first post! be gentle! |
|
|||
|
need to know it all, all the javascript side... can someone make a dummy form for me? so i can see the guts... i have no idea what i am doing... my javascript knowledge is very very limited.
would like 'price of each' times cost x 20% gratuity, plus sales tax (6.5%) equals total all broken down... so i can see each field.. price of each, amount, what the gratuity will be at 20% then add tax to everything, show me how much is tax, then add it all together for a total... thank you pj |
|
|||
|
Shouldn't need any javascript, this is doable with calculation fields.
If you name the line item price fields as "ItemPrice.1", "ItemPrice.2"...etc. then you can create a field to calculate the sum of "ItemPrice" Create a field for the gratuity and the sales tax (set the Default values to ".2" and ".065" and make them uneditable) and you can then use them in the calculations (sums and products) for the other 'Totals" fields you need. |
|
|||
|
hey mark, thanks for posting!
ive still been messing about... have the form all layed out correctly... just need someone to help me wiht the behind the scenes work... could i email it to you? thanks again for your post! pj |
|
|||
|
Unless you want to go into the custom JavaScript calculation, you should make a subtotal field that can be accessed by the simpler calculation methods and you could also add a sales tax rate field and a gratutity rate field to hold those rates. If you are going to use the "simplified field" notation be careful as to how you name your fields, no special or white space characters.
|
|
|||
|
think i did that already... ive been messing with it a bit.. i really wish i could email it to someone who knows what they are doing.. clearly i do not...
it is all set to go (layout-wise) just not functioning correctly... it keeps adding up in the total, even after i erase the lines... (do i need a reset button?) also, curious about emailing it to email address entered in email_line form.. if this is possible... not xml data, but the actual pdf form.. thanks again pj |
|
|||
|
In Acrobat Forms you can use the calculation option of "Value is the ___ of the following fields:" You will need to select your operation and fields.
If you are using the LiveCycle Designer, use for the 'amount.1' field: quantity.1 * priceEach.1 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|