Download & Extend

VAT price recalculation on product kits is not correct

Project:Ubercart 2 VAT support
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,
is it possible to use the correct VAT-calculation on an existing productentry? I have +400 products in my shop with prices VAT incl. and would like to use this module for correct VAT calculation. Right now the VAT will be added on my prices regardless if they contain VAT or no.

There is only the setting for future entries containing VAT but i found nothing for using my actual VAT inlc. prices.

Is it necessary to change manually all productentries, or is there a setting i haven´t found right now? I maybe there is a way to make a bulk edit of my existing prices, similar to if i use the autocalculation of the price when inputting prices containing VAT.

Thanks in advance for every idea.
Yours
ingolf

Comments

#1

Subscribing, same issue here.
Have to open and Save every Product to have VAT included in existing Products...

#2

Hi,
haven't found a setting for that, but it is fairly easy to change all the products through UPDATE right in the database, as you can do all the maths you need right in the MySQL Query. Like this:

UPDATE products SET pricewithoutvat = pricewithoutvat*1.16;

Have a look at the MySQL docs for more info - and remember to backup your database before you try anything like that.

#3

Status:active» fixed

You can work around this with the "Keep VAT inclusive prices the same after a rate change" option available in recent development releases.

Please make a backup of your database before trying these steps in case anything goes wrong!

1. Go to /admin/store/settings/taxes/vat and disable "Keep VAT inclusive prices the same after a rate change".
2. Edit your tax rule and set the rate to 0%.
3. Go back to /admin/store/settings/taxes/vat and enable "Keep VAT inclusive prices the same after a rate change".
4. Edit your tax rule again and set the rate to the correct percentage.

This should recalculate all prices in your store so they will stay the same to end users, but the ex-VAT prices will be correctly recalculated against the current rate. This will only work if all your prices already include VAT, if you have added new products that are ex-VAT then you will have to work around this yourself.

#4

Nice workaround longwave. I have 3000+ lines (and haven't finished populating yet!), so I have someone else to blame if it screws up, rather than a screwup with my own direct manipulation of the database ;-)

Thanks (especially to the developer)
Jon

#5

Title:VAT calculation on existing productentries» VAT calculation on existing product kits is apparently erroneous (assuming not user error :-) )
Category:support request» bug report
Status:fixed» needs work

Using Longwave's workaround works great for all EXCEPT Product Kits. It's increasing the price on these, and not by the new VAT rate, so I think there must be some core logic which is not dealing with the discounted amount (ie it may be discounting the final price by only the VAT exclusive value of the discount amount entered)

eg Product kit consisting: Item 1 £88 inc vat + item 2 £34 inc vat, discount £34 on item 2 (ie it's free) == Changing VAT from 0 to 15% as per longwave above. Now getting the kit price as £98.81 inc vat.

Any ideas or thoughts welcome.

EDIT: UC 2.0 (not rc)

Update: I re-entered the values for the items in one of the product kits detailed above, and got a total price less than the selling price. (Still don't know why I still have the original higher price as shown above. It appears that now (when the prices for components have been re-entered) the discounted amount in the product kit is taken by the module as excluding VAT, whereas it includes VAT.

#6

Title:VAT calculation on existing product kits is apparently erroneous (assuming not user error :-) )» VAT price recalculation on product kits is not correct
Status:needs work» active

Product kits need special support as they make internal calculations for the discounts, and I am not entirely sure VAT is handled correctly here. This is further complicated by the fact you can have different VAT rates applied to different products in a kit, and I am not sure how to calculate the discounted VAT in this case!

Further testing and development is needed to make this work fully, any suggestions, patches or offers of sponsorship to help fix this are more than welcome!

#7

I can confirm this bug ... very annoying when your store relies on several kits.
The kit main page displays prices correctly but not the catalog.

See attached screenshots:
* Shot1.png is the individual kit, which calculates VAT very well.
* Shot2.png is the display in a catalog. The price is wrong.

AttachmentSize
shot1.png 7.45 KB
shot2.png 14.16 KB

#8

UP.

This isssue is not linked to different VAT rates, as we have only ONE vat rate in our shop.
This is a major problem as it does not allow European shops to offer kits.

#9

Could you explain me where to start looking for the bug?

#10

Title:VAT price recalculation on product kits is not correct» array unshift error
Version:6.x-1.x-dev» 6.x-1.1

i instlled and configured this module but got an error like this.. seems insted of the array a nonarray value is coming there

warning: array_unshift() [function.array-unshift]: The first argument should be an array in /var/www/cart/modules/uc_vat/uc_vat.module on line 122.

#11

Title:array unshift error» VAT price recalculation on product kits is not correct
Version:6.x-1.1» 6.x-1.x-dev

@lipinponmala007: this sounds like a completely different issue, please create a new issue instead of retitling this one. Also, I haven't seen that error occur "out of the box" so please describe exactly what you did for it to occur.

#12

Has anyone had any joy working around this - I can't get my product kit pricing in the catalogue to match the correct price in the node/cart .

I have no issue with having to enter kit total price in exclusive of tax but even that doesnt fix it.