PDF Javascript Calculation

Job ID: 35980324

Budget: $30 – $250 USD

Need help with a very basic calculation. I had this working and then for some reason it stopped working. No matter what I do I cannot get it to calculate correctly.

Here is the calculation I need in all Total Cost boxes
((XS+S+M+L+XL)* UNIT COST)+(2XL*(UNIT COST+2))+(3XL*(UNITCOST+3))+(4XL*(UNIT COST+4))

The calculation works on a calculator but I cannot get it to work in javascript.

I have attached the actual form along with a sample calculation.

Looking to get this back as soon as possible.
Related categories: PHP JavaScript jQuery / Prototype Adobe Acrobat