Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2012
    Posts
    22

    Unanswered: Defaulting Percentages Issue

    In my form I currently have a box where I type in a percentage to calculate added VAT for me (Sales Tax in other countries) The problem is when I want to type in 20% it will default it back to 0.0% and if I type a number between 51% and 100% it will default it to 100% any number higher than 100% will stay for example 7000% will stay.

    My question is, how do I stop my percentage box from defaulting to values 100% or over?

    To work out my VAT I am using this formula:
    Code:
    =CLng(CCur(Nz([TotalLabour])+Nz([TotalParts]))*CDbl(Nz([VATRate]))*100)/100
    Where a user can type in the VAT rate (In England it changes between 15, 17.5 and 20%(This is also where it defaults to 100 or 0%))
    I was also wondering if there was a simpler way I can calculate VAT that would bypass this annoying issue?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    sounds like you have what is effect a rounding issue

    I'd suspect that you are typing in as 20% which the form interprets as 0.2, and if the control is integer that means 0

    Where a user can type in the VAT rate (In England it changes between 15, 17.5 and 20%)
    strictly speaking in the UK (not just England) VAT can be one of 4 rates applying to a specifric good or service
    exempt (Ie these iteme are not included in the scope of VAT legislation
    zero rated (these items are included within the VAT but are currently charged at zero
    Reduced Rate, currently 5%
    Standard Rate, currently 20%

    http://www.hmrc.gov.uk/vat/forms-rates/rates/rates.htm

    VAT applies to the specific good or service, and you can have multiple rates within an invoice
    although VAT is fiendishly, and needlessly complicated (as you would expect any politician created artefact) its isn't that complex to implement). ferinstance biscuits (cookies in American) are zero rated, but if they contain chocolate are treated as 'luxury' goods and therefore attract standard rate, similarly food sold for consumption away frotm eh premises are zero rated, unless they are hot in which case they attract VAT. In essence goods that are zero rated or exempt are there because of politicians meddling.
    if you are creating VAT invoices/line times then you need tobe very very careful about how you implement this as HMRC are known to be very aggressive if they feel your VAT process are incorrect.
    Last edited by healdem; 10-12-12 at 09:15.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2012
    Posts
    22
    How would I go about changing that?

    Edit: I changed it from Long Integer to Double and that has seemed to fix it. Thank you healdem for pointing out where I'd gone wrong

    The VAT rates is something I'd have to cover with my boss, but i do agree that VAT is needlessly complicated. We are an IT consultancy business so I believe everything we do falls under the same VAT rate
    Last edited by Kisageru; 10-12-12 at 09:27.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •