WooCommerce: tax price filter not being applied in admin - wordpress

I've implemented a filter as per this WooCommerce article on taxes:
add_filter('woocommerce_adjust_non_base_location_prices', '__return_false');
This effectively 'ignores' tax rates on checkout: an €8,99 product (where prices are added inclusive of tax) being sold from a UK store will cost €8,99 to a German customer, a French customer or an ROI customer. This all works fine on the front end.
However, I just created an order in the backend for a German customer, and that €8,99 product is being added to the order at €7,49 with no tax. I understand from a tax perspective why this is happening (a UK store selling in Germany shouldn't apply tax, so 8.99 - 20% UK VAT = 7.49), however this seems to be ignoring my woocommerce_adjust_non_base_location_prices filter.
At the moment my filter call is just a single line in a custom plugin, so being implemented at plugins_loaded, I guess. There's no condition for it (e.g. if (!is_admin()) {}), so I'm wondering if I need some other kind of condition to ensure it is applied to admin orders, or if I'm looking at a bug?

Related

Woocommerce recalculating tax on completed orders ignores that VAT is included in product

Problem: When setting up a site I forgot to activate taxes. My accountant asked me to correct it so I tried the Woocommerce recalculating button on completed (older) orders. Unfortunately, it ignores the setting that VAT is included in the product price and adds tax to product price (increasing the total order amount incorrectly)
Activated taxes for new orders
Now when placing a new order, the tax (21%) gets show correctly on checkout and invoice. The tax is included in the price & order total.
Product price 14,95
Tax 3,14 (product price excl. tax 12,35)
Total: 14,95
Recalculating old orders
For older orders when tax was not enabled however it is a different story:
Woocommerce offers the ability to recalculate orders. If I do this for an old order: the tax is added to the product price instead of shown to be included in the product price.
Product price 14,95
Tax 3,14
Total: 18,09
As you can see recalculation ignores the setting that the product price includes VAT.
Have you seen this behaviour, or do you have an idea how to solve this problem?

Two different prices for the one product on the checkout page (bug)

The correct price for the product is €38 and VAT is included to the price #23%
In the products page the price 30.89 plus 23% = 30.894*1.23 = 37.99962
But when I add a product and go tho the cart, the total price and the cart prices are out by a cent
the cart is €38 but the check out is €38.01
I tried every combination possible to get both prices correct and I can get €37.99 and €40.01 but I can't get €40 in both carts.
I'm not sure how they could be different I thought they would be going by the same calculation but obviously not.
It looks like a rounding issue. Try increasing the number of decimals in WooCommerce > Settings > General

WooCommerce : set TAX on product page

I'd like to set a specific Tax on each product.
I see i can create tax classes, but i'm going to have many different taxes, one per product, on more than 300 products.
Is it possible to set the tax % on the product page when i create it ?
Do you know a plugin for that ?
What want to do is to calculate Tax Based On SKU and not shipping address.
So i need to have a field on product page where i can enter a TVA number, manually.
Do you think it's possible ?
OR an other way maybe :
- have one taxe class
- in the tax class add many taxes rates with all the same country code, and no zip code
- create a field in the product page to assign the right tax rate for the product (instead of assign a class rate)
What do you think about that ?

Woocommerce single product tax status trumps WooTax, and Tax Cloud

I signed up for Tax Cloud and use Woo Tax to calculate tax. I am trying to only collect sales tax when shipping to WA. Some of my products' tax status is set to none while some is set to taxable. When I changed my shipping address on the taxable products the sales tax still showed up, even if the state I chose was listed as states without sales tax in tax cloud. When I chose products tax status none then I got no sales tax, even if I was shipping to WA.
My question is two-fold: 1) Does tax status taxable mean it will add sales tax no matter what?, and 2) what can I do to make sure any and all products get sales tax when shipping to WA?
When using WooTax and TaxCloud, you should leave the WooCommerce "Tax Status" property as "Taxable" (regardless of your local laws - I will explain).
This is because TaxCloud automatically determines the taxable status of what you are selling based upon the Taxability Information Code (TIC) selected (drop-down menu right below the main edit product panel). The TIC along with your orders' origin and destination addresses, and your TaxCloud configuration control where you collect sales tax, and how much sales tax is due and collected.
This way, if you are selling clothing or prewritten software, or any of the other categories of goods options possible, you do not have to know if the item is taxable, exempt, or partially exempt in the jurisdiction of your customer - just select the TIC category, and TaxCloud will handle it correctly for each transaction's unique fact pattern (including sales tax holidays).
So, to answer your questions:
Be sure the product Tax Status is set to Taxable, to ensure
WooCommerce doesn't try to hide the item from TaxCloud for
calculation.
Be sure to set the appropriate TIC code for the
product (review all the options).
Within TaxCloud, in the "Tax States" area, configure where
you want to collect sales tax.
One more thing... Review your WooCommerce --> Settings --> Tax area to be sure everything is configured correctly:
Enable Taxes: True (Checked)
Prices Entered With Tax: No
Calculate Tax Based On: Customer Shipping Address
Shipping Tax Class: Based upon cart items
Rounding: Unchecked
Additional Tax Classes: [irrelevant - overridden by TaxCloud TIC for each product]
Display Prices in the Shop: Excluding Tax
Display Prices During Cart and Checkout: Excluding Tax
Display Tax Totals:: Itemized
That's all there is to it. Please feel free to call or email TaxCloud customer service if we can help in any way.
Thanks!

Drupal and Ubercart - buy products including and excluding tax

I am developing an e-commerce site for use in the UK, and have been required to let the user buy products either with or without tax included.
I have slightly modified the AAC module to show prices either including or excluding VAT depending on a cookie which is set via a "view prices including/excluding" link, but of course whenever a product is added to cart, the price is that from the database - i.e. including VAT.
Does anyone know of any neat tricks or modules that would let me do this?
We've decided to go for just viewing prices excluding the vat, and not being able to buy them at the excluding vat price.
In case anyone needs it, here is the code/formula used to get the full price and work out the lower vat-free price:
(line 217-222 of uc_aac.module in my version - and you will need a div with the class "excluding_VAT").
//Get the updated price, minus VAT
new_val = parseFloat(updated_price.substr(1));
new_val = (100/115) * new_val;
new_val = Math.round(new_val*Math.pow(10,2))/Math.pow(10,2);
$(".excluding_VAT").html("£"+new_val+" exc VAT");

Resources