UK TAX etc
#1
Posted 30 January 2012 - 06:27 AM
How do I set up LS to work out proper UK tax?
Currently the UK tax is at 20%
I've set this all up within the backend of LS admin area.
However when adding a product that is £9.99 (inc tax) into the shopping basket its fine, but when you click on checkout or checkout as a guest the price jumps up by 0.01 and changes the price to £10.
The only way I've found to get around this is:
Go into Modules >> Shop >> Models >> shop_taxclass.php and change line 376 from:
$result->tax_total = $tax_total;
to:
$result->tax_total = round($tax_total, 2);
But obviously I have to keep doing this on every update to LS that updates this file online.
Surely theres a fix / way around this?
Cheers
Scott
#2
Posted 30 January 2012 - 10:56 PM
...is £9.996 technically speaking £10.00 or £9.99?
...when i make a product at £8.33 it displays as £10.00 on the product page (to include tax @ 20%).
http://www.zen63258....%2007.07.20.png
http://www.zen63258....%2007.07.30.png
...so the question above really is, do we really need to be rounding up £0.005p and above to make £0.01p?
This post has been edited by apepp: 30 January 2012 - 11:23 PM
#3
Posted 31 January 2012 - 01:42 AM
But when LS update the document, it overwrites it of course, so I then have to re-upload it.
Products do sell for 9.99 in the UK so this is a major flaw in the LS system that I think needs addressing ASAP for their UK market users!
#4
Posted 01 February 2012 - 03:50 PM
As far as I can see, line 376 in the tax class script already has the round function call:
$result->tax_total = round($tax_total, 2);
Please check if you use the latest version of the application.
Thank you
#5
Posted 01 February 2012 - 04:05 PM
Thanks for reply...apepp here in response...before Scott comes back on it...
...i confirm i do have the latest LS install here, so line 376 does have it (shop_taxclass.php file was modifed Sept 1st 2011):
$result->tax_total = round($tax_total, 2);
...from my post above:
...is £9.996 technically speaking £10.00 or £9.99?
...i would probably argue that in rounding terms £9.996 should indeed be £10.00...
...i would also argue in rounding terms that £0.005p and above should make £0.01p...
...so with the rounding code above on line 376...my test does round up £9.996 to £10.00...
...i would gather from this the code is working correctly? No?
...in anycase, it could also be argued that perhaps a rounding up of £9.996 to £10.00 might perhaps be lacking in any major significance or is it a big problem to be rounding that up?
...i for one am not sure.
many thanks!
Andrew
#6
Posted 03 February 2012 - 05:43 AM
I meant to say, in order to get around this I have to change the following:
$result->tax_total = round($tax_total, 2);
to:
$result->tax_total = $tax_total;
I had put them the wrong way around in my first post!
#7
Posted 14 February 2012 - 04:20 AM
#8
Posted 14 February 2012 - 06:49 AM
fudge, on 14 February 2012 - 04:20 AM, said:
We have several LS based websites in the UK and we don't seem to have this issue?
It always rounds it up to the same amount as the Sage Accounts software does... ?
#9
Posted 14 February 2012 - 06:55 AM
webgroup, on 14 February 2012 - 06:49 AM, said:
It always rounds it up to the same amount as the Sage Accounts software does... ?
How do you do it then?
It shows 9.99 on the product page / shopping basket. But as soon as I hit the checkout it rounds it up to £10.
#10
Posted 14 February 2012 - 07:13 AM
fudge, on 14 February 2012 - 06:55 AM, said:
It shows 9.99 on the product page / shopping basket. But as soon as I hit the checkout it rounds it up to £10.
Nope, not the same here buddy:
- I have a product at £9.99
- I add it to the cart which displays it as £9.99
- I hit checkout and it shows £9.99
I have checked this on 3 of our UK websites and they all work in exactly the same way.
I'm not sure what your issue is - or how to fix it without following the code myself - but if there is anything I can do to assist such as file comparisons just send me a PM.
#11
Posted 14 February 2012 - 07:17 AM
Have you done anything to the code to make it work for the UK 20% VAT or does LS just work fine for you straight out of the box?
#12
Posted 14 February 2012 - 07:24 AM
fudge, on 14 February 2012 - 07:17 AM, said:
Have you done anything to the code to make it work for the UK 20% VAT or does LS just work fine for you straight out of the box?
Straight from the box it works like a charm. We didn't amend any checkout code form what I can recall and I can be 99% sure on that. Are you able to tell me which website this is effecting so I can look at the front end (or is it a development site)?
#14
Posted 14 February 2012 - 08:32 AM
Having run some tests on one of our websites I have to agree with fudge and LS is calculating the tax incorrectly for UK VAT.
I remember many years ago seeing a similar issue with OScommerce but according to HMRC (the UK tax man) it should work like this:
HMRC website - see section 17.5
How many decimal places does LS use to work out tax?
Also, rather oddly: if we display the products on the frontend ex-vat then the calculation seems to work out fine at the checkout stage / tax is correct. There could be something in that?
#16
Posted 14 February 2012 - 07:55 PM
Thank you
#17
Posted 15 February 2012 - 09:31 AM
Aleksey, on 14 February 2012 - 07:55 PM, said:
Thank you
Hi Aleksey,
I believe this thread refers to my testing as the above post:
...so if the base price is £8.32 + VAT @ 20%? This would equal £9.984, whereas £8.33 + VAT @ 20% = £9.996 will round up to £10.00 as it really makes (and rounds UP above £0.006) £9.996 to £10.00. If it were £9.994 it would be £9.99. I gather that £0.005 is made to be £0.01p as no half pennies really exist (anymore)...
...is £9.996 technically speaking £10.00 or £9.99?
...when i make a product at £8.33 it displays as £10.00 on the product page (to include tax @ 20%).
http://www.zen63258....%2007.07.20.png
http://www.zen63258....%2007.07.30.png
...so the question above really is, do we really need to be rounding up £0.005p and above to make £0.01p?
This post has been edited by apepp: 15 February 2012 - 09:34 AM
#18
Posted 16 February 2012 - 03:49 AM
apepp, on 15 February 2012 - 09:31 AM, said:
I believe this thread refers to my testing as the above post:
...so if the base price is £8.32 + VAT @ 20%? This would equal £9.984, whereas £8.33 + VAT @ 20% = £9.996 will round up to £10.00 as it really makes (and rounds UP above £0.006) £9.996 to £10.00. If it were £9.994 it would be £9.99. I gather that £0.005 is made to be £0.01p as no half pennies really exist (anymore)...
...is £9.996 technically speaking £10.00 or £9.99?
...when i make a product at £8.33 it displays as £10.00 on the product page (to include tax @ 20%).
http://www.zen63258....%2007.07.20.png
http://www.zen63258....%2007.07.30.png
...so the question above really is, do we really need to be rounding up £0.005p and above to make £0.01p?
That's pretty much as it goes for us too?
#19
Posted 16 February 2012 - 09:42 AM
To achieve the £9.99 figure. Which is fine until you click on 'checkout' then the totals inside those pages round to £10.
It would also be good to have the option of just inputting the total price which includes the TAX (vAT) and the system sorts it out for you. So if I input 9.99 LS would know that it includes the 20% tax based on the figures that I had set. (Don't know if there is an option for this already?)
#20
Posted 16 February 2012 - 03:19 PM
Quote
Apparently, different total amount is a bug, which should be fixed.
Quote
This feature is planned.
I will look into this problem today and will let you know soon.
Thank you

Help













