Thread: Price Rounding

Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2009
    Posts
    41
    Plugin Contributions
    0

    red flag Price Rounding

    Hi

    So I have another strange problem!

    The order totals I get are different to those that Zen Cart works out.

    Name:  huh.jpg
Views: 284
Size:  4.1 KB

    You can see the Price [Inc] is R795 (x2 cause the customer placed two on order) which means the total should be R1590.00

    Problems:

    • My tax rate is 14% so the Sub-Total (ex VAT) should be R1395
      Total is incorrect as (R795 * 2) + R75 = R1665 and not R1664


    I have gone through the database and changed most of the DECIMAL (X,xx) to (X,0)

    Any other ideas?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Price Rounding

    Not sure how you are entering your prices, or how you are applying vat.

    If your price INCLUDING vat is 795, to get to the NON VAT price you must divide that by 1.14, so your EX VAT price is 697.368421052.....

    This should be rounded up to 697.38.

    Decimal places should be set to THREE (in the "database") - not ONE.

    Zencart adds the total NET prices, and applies the tax rate to the TOTAL - not to individual items. This sometimes results in small rounding discrepancies, most of which can be alleviated by setting the decimal places to THREE.

    But you need to get your EX vat prices correct. You take the INC price and divide it by 1.14.

    Alternatively, when you add a product, put the price in the PRICE WITH TAX field, and it will insert the nett price automatically - if you have the correct vat value and 3 decimal places.
    20 years a Zencart User

  3. #3
    Join Date
    Dec 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: Price Rounding

    Hi

    I am adding the product price using EasyPopulate.

    I have changed the products_price in the products table to decimal(15,3) - not sure if that is what you want me to change.

    I am not sure why the EX Vat (Subtotal) is showing the incorrect amount - is there a coding line I can have a look at?

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Price Rounding

    Try to avoid the temptation to mess about in the database.

    In the PRODUCTS table, this is the setting:
    products_price decimal(15,4)

    In the ORDERS table, these are the settings:
    currency_value decimal(14,6)
    order_total decimal(14,2)
    order_tax decimal(14,2)


    In the ORDERS_PRODUCTS table, these settings are:
    products_price decimal(15,4)
    final_price decimal(15,4)
    products_tax decimal(7,4)


    In the ORDERS_TOTAL table, the setting is:
    value decimal(15,4)

    If you are using Easy Populate to load prices, then these must be EX VAT on the spreadsheet. You then need to make sure that your zone and zone tax rates are set properly and the store is set to display prices with/without tax as you need it to.

    In general, when I load prices into Easy Populate, I take them to FOUR decimal places... So in your case, your EXCL VAT prices (if we take your example of a VAT INCL price being 795.00 ...

    The EX VAT figure on your spreadsheet should be: 697.3684

    If you have a lot of products, apply a simple formula in the spreadsheet to give you all the prices in the format you need them.
    20 years a Zencart User

  5. #5
    Join Date
    Dec 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: Price Rounding

    Thanks,

    I am doing to try this and let you know.

    So far some orders are R3 out (in total).

    Thanks

    Quote Originally Posted by schoolboy View Post
    Try to avoid the temptation to mess about in the database.

    In the PRODUCTS table, this is the setting:
    products_price decimal(15,4)

    In the ORDERS table, these are the settings:
    currency_value decimal(14,6)
    order_total decimal(14,2)
    order_tax decimal(14,2)


    In the ORDERS_PRODUCTS table, these settings are:
    products_price decimal(15,4)
    final_price decimal(15,4)
    products_tax decimal(7,4)


    In the ORDERS_TOTAL table, the setting is:
    value decimal(15,4)

    If you are using Easy Populate to load prices, then these must be EX VAT on the spreadsheet. You then need to make sure that your zone and zone tax rates are set properly and the store is set to display prices with/without tax as you need it to.

    In general, when I load prices into Easy Populate, I take them to FOUR decimal places... So in your case, your EXCL VAT prices (if we take your example of a VAT INCL price being 795.00 ...

    The EX VAT figure on your spreadsheet should be: 697.3684

    If you have a lot of products, apply a simple formula in the spreadsheet to give you all the prices in the format you need them.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 12 Apr 2015, 10:31 PM
  2. v151 Price rounding
    By rebel tech in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 2 Dec 2012, 05:27 PM
  3. Price rounding up
    By BillNally in forum General Questions
    Replies: 7
    Last Post: 30 Mar 2011, 08:04 PM
  4. Rounding price
    By tatiana77 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 24 Nov 2007, 06:12 AM
  5. price rounding
    By sylsau in forum General Questions
    Replies: 3
    Last Post: 9 Aug 2006, 05:48 AM

Posting Permissions

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