Solved VAT Calcs

Status
Not open for further replies.

Mel

New Member
Hi

I have a process that needs to read the Net value and add the vat on. I am using a calc stage to do this but once I add the net and vat together I get the calculated value coming out as 34.400 instead of 34.40

Any ideas on why its doing this and how I can stop it happening, I know i could possibly just remove the extra zero on the end of the calculation but would like to understand how im getting this figure, I am using the standard [net value]/100*20 to get the VAT which is fine, the problem occurs when I attempt to [Net Value] + [VAT] which also works fine except for the extra zero given.

Thanks in advance

Mel
 

VJR

Well-Known Member
Hi Mel,

May have got to do with the formatting and the rounding.
In your example, [VAT] = [Net value]/100*20

can you give the information on the below

1. Data type of [Net Value]
2. Data type of [VAT]
3. What is the Input you are giving for [Net value] (The one that gives you 34.400?)
 

Mel

New Member
Hi

Both data types are number, the Net Value is read from a text collection, converted to a number item vaia calc stage and then the problems start when the VAT is calculated, as thats where i can see the first extra zero.

It appears this is intermittent too as sometimes it works correctly and sometimes it appears with three decimal places.

Thanks for your help

Mel
 

Attachments

  • VAT Calc Stage.PNG
    VAT Calc Stage.PNG
    12.8 KB · Views: 12
Status
Not open for further replies.
Top