SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Watford, UK
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    performing calculation on some output

    I'm working on an instant quote form at:
    http://www.3steponline.com/quote2.htm

    I've been given all the product prices at trade price, but i need to take 10% off for ordering online, then add vat at 17.5%. I figure it's much easier than manually calculating each product to just do this calculation on the form output.

    This is the basic code, but at the moment i can't seem to take 10% off then add 17.5%:
    function format(sAmount)
    {
    sAmount = Math.round(sAmount * 100) / 100;
    return '' + ((sAmount != parseInt(sAmount)) ? sAmount : sAmount + '.00');
    }
    Could someone help here? Thanks

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Watford, UK
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorted, it was really easy. Thanks for looking anyway!


Bookmarks

Posting Permissions

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