Results 1 to 3 of 3

Thread: Quote rounding

  1. #1
    mlautz is offline Junior Member
    Join Date
    Jan 2007
    Posts
    2

    Default Quote rounding

    When using the quote module on the quote entry screen and quote detail screen it always rounds to 2 decimal points even though I have precisions et to 6. We have items that sell for .005 USD per minute and trying to create quotes with that as the unit price.

    Any ideas?

    Thank you in advance.

  2. #2
    mlautz is offline Junior Member
    Join Date
    Jan 2007
    Posts
    2

    Default Re: Quote rounding

    After digging through the code I found that in the quote module it does not pull the precision setting for the user or system it is hard coded to be 2 precision. Had to update the code to have it pull from the user setting.

  3. #3
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default Re: Quote rounding

    The number of digits is not enough. In Swiss Francs the smallest possible unit is 0.05. Therefore all prices have to be rounded to 0.05. At the moment you can only choose to round the prices to 0.1 Or did I miss something?

    And since it is hard-coded in quotes.js I doesn't work either ... formatNumber(toDecimal(total), num_grp_sep, dec_sep, 2, 2);

    Pro-only modules like products and quotes are not usable in Switzerland without alot of changes.

    I am using the folling js function to round the prices differently...
    Code:
    function roundBySteps(value,step) {
      return Math.round(value/step) * step;
    }
    roundBySteps(10.532, 0.05) => 10.55
    Last edited by simple; 2007-08-31 at 01:42 PM.
    Cheers Pascal
    Simplicity GmbH

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •