Expand my Community achievements bar.

Need help with discount column

Avatar

Former Community Member

Hi,

I have managed to create an invoive after discovering that I had LiveCycleDesigner included with Creative Suite 3

I only have very basic skills in this area, so please bear with me

I'm hoping what I am after is easy enough for someone out there to help me with.

As you can see, I have created the below columns.

Capture.JPG

The amount column is...     Show: calculate*    Quantity * Unit Price (with unit price being the Binding name under the Object tab)

So what I would like to do is add the discount variable in and need to know the script to enable this.

The Binding names are Quantity, Decgription, UnitPrice, ItemDiscount and Amount.

I got somewhere with the amount column as...       Show: calculate*    Quantity * UnitPrice * ItemDiscount / 100

But this left me with the actual discount in the amount column rather than the amount - discount.

I tried a few other ideas, but couldn't seem to get it right so I thought it best to get those who know to give me the right answer.

The other question is after I open the template with Adobe Reader, and fill it out , is it possible to save the resulting document as a 'standard' PDF?
So far I have had to export as jpg and then convert to PDF. I'm sure I must be missing something obvious....

I'm using windows 7 and LiveCycle Designer 8

Thanks

Martin

3 Replies

Avatar

Level 7

OK, looks like you just need a little extra math. Maybe you could try:

Show: calculate* (Quantity*UnitPrice)-(Quantity*UnitPrice*ItemDiscount/100)

or

Show: calculate* Quantity*UnitPrice*(1-ItemDiscount/100)

As far as saving a pdf later. You'll probably have to save the pdf in LiveCycle and close. Open it in Acrobat (should be part of CS3), save as extended pdf and choose to allow users to save (you'll see it under the File menu). Then when the user opens the pdf in Reader, he/she can save the file as a pdf with the form filled out. Then they can send it to you or whatever happens to it.

Avatar

Former Community Member

Hi,

Thanks for your help.

Wasn't sure how to apply the maths to the script and get it to work:)
They both worked perfectly

Is it possible for the Amount field to be left blank  unless data is enetered in the other columns?
Right now the Preview PDF has a coloum of $0.00 under amount

Capture.JPG

As for saving the PDF
When I go to Save As in Adober Reader I get the following message

Capture02.JPG

I've had a look through both the LiveCycle and PDF documents but have been unable to find any adjustable settings that might change this.s

I presume the Feild Display Pattern Szzz,zz9.99 is the correct way to remove the $ signs?

Thanks again

Martin

Avatar

Level 7

savePDFasReadable.png

This is the save path in Adobe Acrobat.If you save it this way (you can safely overwrite whatever the file is) you can save the PDF after you've filled it out.