AnsweredAssumed Answered

Please help debug my (fairly simple) formula

Question asked by captainllama on Aug 8, 2011
Latest reply on Aug 12, 2011 by philmodjunk

Title

Please help debug my (fairly simple) formula

Post

I just cannot see where I have gone wrong. I have the following formula to calculate Sales Tax:

 

Round( Sales Tax Rate * ( Sum( Line Items::Taxable Amount  ) - Discount i + Shipping ) - Credit VAT ; 2 )

 

For example the "Sales Tax Rate" is 20%,

"( Sum( Line Items::Taxable Amount  )" is £541,

"Discount i" at 5% (calculated elsewhere) is £27.05,

Shipping £12.

"Credit VAT" is zero.

 

541 - 27.05 +12  = 525.95.

525.95 x 20% = 105.19.

 

However the formula above gives 99.78.

 

I renamed "Discount i" from "Discount 1" thinking I had found the flaw by using a reserved character but it made no difference.  What's going on?

Outcomes