LemonStand Forum: UK TAX etc - LemonStand Forum

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

UK TAX etc

#1 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 30 January 2012 - 06:27 AM

Hi there,

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
0

#2 User is offline   apepp 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 233
  • Joined: 30-October 11

Posted 30 January 2012 - 10:56 PM

...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: 30 January 2012 - 11:23 PM

0

#3 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 31 January 2012 - 01:42 AM

Exactly, the only way around it is to do what I said in my post above.

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!
0

#4 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 3,633
  • Joined: 31-October 09

Posted 01 February 2012 - 03:50 PM

Hi Scott,

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 User is offline   apepp 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 233
  • Joined: 30-October 11

Posted 01 February 2012 - 04:05 PM

Hi Aleksey,

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
0

#6 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 03 February 2012 - 05:43 AM

Sorry Aleksey,

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!
0

#7 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 14 February 2012 - 04:20 AM

So i'm guessing Lemonstand are just ignoring this and the UK customers just have to deal with it then?
0

#8 User is offline   webgroup 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 15-July 11

Posted 14 February 2012 - 06:49 AM

View Postfudge, on 14 February 2012 - 04:20 AM, said:

So i'm guessing Lemonstand are just ignoring this and the UK customers just have to deal with it then?


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... ?
0

#9 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 14 February 2012 - 06:55 AM

View Postwebgroup, on 14 February 2012 - 06:49 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... ?



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.
0

#10 User is offline   webgroup 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 15-July 11

Posted 14 February 2012 - 07:13 AM

View Postfudge, on 14 February 2012 - 06:55 AM, said:

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.


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.
0

#11 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 14 February 2012 - 07:17 AM

If thats the case then it has to be the code doesn't it?

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?
0

#12 User is offline   webgroup 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 15-July 11

Posted 14 February 2012 - 07:24 AM

View Postfudge, on 14 February 2012 - 07:17 AM, said:

If thats the case then it has to be the code doesn't it?

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)?
0

#13 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 14 February 2012 - 07:36 AM

I've sent you a message.
0

#14 User is offline   webgroup 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 15-July 11

Posted 14 February 2012 - 08:32 AM

Aleksey,

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?
0

#15 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 3,633
  • Joined: 31-October 09

Posted 14 February 2012 - 05:02 PM

Hi,

I will look into this issue soon.

Thank you

#16 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 3,633
  • Joined: 31-October 09

Posted 14 February 2012 - 07:55 PM

Paul, please describe the tests you ran. I need to reproduce the problem in order to fix it.

Thank you

#17 User is offline   apepp 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 233
  • Joined: 30-October 11

Posted 15 February 2012 - 09:31 AM

View PostAleksey, on 14 February 2012 - 07:55 PM, said:

Paul, please describe the tests you ran. I need to reproduce the problem in order to fix it.

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

0

#18 User is offline   webgroup 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 57
  • Joined: 15-July 11

Posted 16 February 2012 - 03:49 AM

View Postapepp, on 15 February 2012 - 09:31 AM, said:

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?



That's pretty much as it goes for us too?
0

#19 User is offline   fudge 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 43
  • Joined: 26-November 10

Posted 16 February 2012 - 09:42 AM

I find I have to put the product price as - 8.32500000000

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?)
0

#20 User is offline   Aleksey 

  • Co-Founder
  • Group: +Administrators
  • Posts: 3,633
  • Joined: 31-October 09

Posted 16 February 2012 - 03:19 PM

Hi guys,

Quote

To achieve the £9.99 figure. Which is fine until you click on 'checkout' then the totals inside those pages round to £10.

Apparently, different total amount is a bug, which should be fixed.

Quote

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.

This feature is planned.

I will look into this problem today and will let you know soon.

Thank you

Share this topic:


  • 2 Pages +
  • 1
  • 2

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users