Ok, long question coming up. Please have patience. TLDR: How can i deduct correct tax within eu given tax rate depending on a combination of store front and shipping address but still sell with no tax outside of EU.
So I have a Swedish store front and an UK store front. If a sweden resident shops in the Swedish store I want product X to cost 100 kr including tax with a tax rate of 25%. If a UK resident shops in the UK store I want the price to be £10 including tax with a tax rate of 20%. If someone from outside the EU shops in either store no tax should be taken so the price should be 80 kr in the swedish store and £8.33 in the UK store. Now for the tricky part: if someone from outside UK but within EU shops in the UK store I want the total price to still be £10 but with a tax rate of 25%. I also always want the price to be displayed as £10 in the store. The only time it changes from £10 is if a non-eu resident proceeds to the checkout.
The UK store has default tax destination and origin country set to UK. The Swedish store has default tax destination and origin country set to Sweden.
A tax rate for the UK is setup at 20% and one for Sweden at 25%. The product shares the same tax class. A tax rule is set up for that tax class and the customer class "End customer" that includes all tax paying regions (all EU countries including Sweden and the UK.
Catalog prices are set to be including tax.
The result is a correct price for a swedish resident at the swedish store (80 kr + 20 kr tax = 100 kr total), correct for a UK resident at the UK store (£8.33 + £1.67 = £10 total) and correct for a non-eu resident in the EU store (£8.33 total).
The problem comes if now a German or other EU resident (outside of UK) shops in the UK store. The price is now (£8.34 + £2.08 = £10.42 total). The error being it calculates the price excluding tax using the UK tax rate instead of the German. Plus there is some rounding error to show a different price ex VAT now then when the country was UK but let's ignore that... :)
With Magento 1.9 I can though set Magento to cross border trade (CBT). This will then give me correct behaviour for all EU countries but leave the non-EU customer to pay full tax (although the tax won't be specified separately in the summary).
So I see two solutions: 1. Have CBT enabled but with an exception for non-EU customers where they get the final price excluding VAT. 2. Not enable CBT and have magento calculate the price excluding tax using the shipping tax rate but only if the tax rate is more than 0%, else it should use the tax rate of the origin country.
Any other ideas out there? If not, any suggestions to where I would hack the code to enable 1 or 2 (1 seems like the easiest path)?