July 22, 20179 yr Hi, Could someone else please check that when enabled the EU Advanced Compliance module takes the shipping price and adds VAT on top of it? This is surprising for me and I don't know whether it's intended or not. I would expect the module to take the shipping price entered at the carrier as gross, i.e. including taxes, and not net. What would you expect?
July 29, 20179 yr It's indeed intention! With enabled AEUC you have to be aware that shipping costs will be treated as tax included. But I can confirm this, tb treats the tax as net and adds the tax to shipping costs in checkout, really confusing. This is a bug!
July 30, 20179 yr Author Thanks, @Occam! That means that if I have "Proportionate tax for shipping and wrapping" enabled the shipping rate will change dependent on the contents of the cart? Is there any way to fix this? That's really a big bug - we need to tell our customers in advance what the shipping rate is, but we can't if it's dynamic.
July 30, 20179 yr Yep, I guess @mdekker just wasn't aware that AEUC treats the entered shipping fee as tax included. Which means, the calculation algorithm for the proportionate tax has to be slightly reworked.
July 30, 20179 yr You can find the bug in function getPackageShippingCost of class Cart.php It starts absolutely right from line 1882: if (Configuration::get('PS_ATCP_SHIPWRAP')) { // With PS_ATCP_SHIPWRAP, pre-tax price is deduced // from post tax price, so no $carrier_tax here // even though it sounds weird. $carrierTax = 0; (...) But it ends wrong from line 2003 on, because with AEUC option enabled the tax is added to the shipping costs and not deducted from this figure which would be correct: if (Configuration::get('PS_ATCP_SHIPWRAP')) { if ($useTax) { // With PS_ATCP_SHIPWRAP, we apply the proportionate tax rate to the shipping // costs. This is on purpose and required in many countries in the European Union. $shippingCost *= (1 + $this->getAverageProductsTaxRate()); } A workaround is quite simple. Just deactivate line 2007 if (Configuration::get('PS_ATCP_SHIPWRAP')) { if ($useTax) { // With PS_ATCP_SHIPWRAP, we apply the proportionate tax rate to the shipping // costs. This is on purpose and required in many countries in the European Union. //$shippingCost *= (1 + $this->getAverageProductsTaxRate()); }
July 30, 20179 yr Author @mdekker I think generally you're right, though in Germany the legal opinion is divided whether displaying the shipping costs directly before the "Buy now" step is enough or whether you need to show them also before. However, something else to take into consideration is that the link "Shipping excluded" (which should be changed to "plus shipping") next to the price on the product page leads to the shipping cost overview page. I don't think listing net shipping costs and explaining that the total will depend on a proportionate calculation makes sense.
July 30, 20179 yr @30knees said in Bug in EU Advanced Compliance with shipping taxes?: @mdekker I think generally you're right, though in Germany the legal opinion is divided whether displaying the shipping costs directly before the "Buy now" step is enough or whether you need to show them also before. However, something else to take into consideration is that the link "Shipping excluded" (which should be changed to "plus shipping") next to the price on the product page leads to the shipping cost overview page. I don't think listing net shipping costs and explaining that the total will depend on a proportionate calculation makes sense. At least in Germany in my opinion it should be ok when you show the exact shipping costs during the checkout process, because AEUC provides the link to shipping costs near every product price. You can avoid this irritating "free shipping" in the cart (as long as the shipping costs can not be calculated) by adding a boolean condition to hide this display when $is_logged is not true. @mdekker There seems to be another bug in the proportianate taxes for shipping. If you have mixed taxes in the order and the quantity of products with the lower amount is greater than 1 the proportionate tax on shipping is the same as for the other tax rate, but negative. And btw there are problems with the invoice, too: 1. If you entered a base price for at least one of the products, instead of tax label/tax rates the base price is shown. But this should not be considered as alternative. {if isset($layout.before_discount)} <th class="product header small" width="{$layout.unit_price_tax_excl.width}%">{l s='Base price' pdf='true'} <br /> {l s='(Tax excl.)' pdf='true'}</th> {/if} 2. The variable $order_detail.total_price_tax_excl_including_ecotax contains the same as $order_detail.unit_price_tax_excl_before_specific_price. It's not the total amount!
July 30, 20179 yr Author Is there a way to give eg Shipping costs a fixed tax rate regardless of the shopping cart contents until the bugs have been fixed? Ideally, the carrier prices would then always be incl. taxes of X%.
July 30, 20179 yr Yes, but it's not an easy way. Or use a module like Presta plus. Not really cheap, but solid in programming and very useful. Works with thirty bees.
September 10, 20179 yr Author @occam I'm revisiting this now because I'm testing the checkout flow prior to launching the shop with thirty bees. Does the Presta plus module solve all the issues of this thread? If so, I'd get it to move on with the shop.
September 11, 20179 yr @30knees Technically yes, it should solve the bug. But as long as TB ignores overrides in this place, the clear answer is NO. It works fine with PrestaShop, but not with TB. Btw some of the additional features of PrestaPlus like individual delivery times (in stock and OOS) for every single product were implemented into PS 1.7 core last week.
November 22, 20206 yr Author I've been looking into this again and I don't think the bug is fixed: https://github.com/thirtybees/thirtybees/pull/327 and https://github.com/thirtybees/thirtybees/issues/326 What would fixing this cost?
November 22, 20206 yr I wouldn't agree, because I cannot reproduce the behavior you were talking of at Github. My fix there from 2017 is currently implemented in a slightly different way to tb so that the workaround I posted is obsolete and outdated now. if (Configuration::get('PS_ATCP_SHIPWRAP')) { if ($useTax) { // With PS_ATCP_SHIPWRAP, we apply the proportionate tax rate to the shipping // costs. This is on purpose and required in many countries in the European Union. $shippingCost *= 1 + $this->getAverageProductsTaxRate(); } } else { // Apply tax if ($useTax && isset($carrierTax)) { $shippingCost *= 1 + ($carrierTax / 100); } } In my release issue-905 from Bleeding Edge it's line 2138-2149 in /classes/Cart.php. I tested it with both the standard invoice and my own invoice (adapted to tb). Each and every figure is correct. Works fine. I guess there's else something causing your problems, provided that everything configured is properly.
November 22, 20206 yr Author Well, it's very encouraging that it works for you. I wonder where the issue could be. I'll fiddle around and try. I adapted your 2017 fix to the appropriate place in the new /classes/cart.php. For me, that starts at line 2169.
November 22, 20206 yr Author Would you mind commenting whether this configuration is correct: 1. Disable AEUC. 2. Set tax rate for shipping. 3. Add shipping rate. 4. Enable AEUC. 5. Activate proportional calculation.
November 22, 20206 yr 1 hour ago, 30knees said: Would you mind commenting whether this configuration is correct: 1. Disable AEUC. YES, otherwise you cannot disable the tax rate 2. Set tax rate for shipping. NO, delete it. 3. Add shipping rate.NO 4. Enable AEUC. YES 5. Activate proportional calculation. YES Seems to me that it was a misconfiguration. Never set a shipping tax rate when you use AEUC (hopefully my own modified release)
November 23, 20206 yr Author 8 hours ago, Occam said: AEUC (hopefully my own modified release) Where can I find it? I checked here and on Github but didn't come across a release of yours. 8 hours ago, Occam said: 3. Add shipping rate.NO So I add the shipping rate (cost) after I activate proportional calculation?
November 23, 20206 yr Nope, no shipping rate, just the shipping costs! Otherwise the proportional calculation wouldn't make sense. Edited November 23, 20206 yr by Occam
November 26, 20206 yr Author OK, so I deleted the carrier and entered it anew and it looks like it works! I'll keep an eye on it but: Thank you sooooo much. I'll post on Github, the fix needs to be implemented!
November 26, 20206 yr Author Actually, I was too hasty. I still get this. The base price of the shipping is still tax included. This is how my cart.php file looks: if (!Configuration::get('PS_ATCP_SHIPWRAP')) { // if ($useTax) { // With PS_ATCP_SHIPWRAP, we apply the proportionate tax rate to the shipping // costs. This is on purpose and required in many countries in the European Union. // $shippingCost *= 1 + $this->getAverageProductsTaxRate(); // } // } else { // Apply tax if ($useTax && isset($carrierTax)) { $shippingCost *= 1 + ($carrierTax / 100); } } $shippingCost = round($shippingCost, _TB_PRICE_DATABASE_PRECISION_); Any ideas? As I said, I'm more than happy to pay someone and have this fixed and flow into the codebase.
December 9, 20205 yr Author @OccamI'm still struggling. Would you mind showing a screenshot of your invoice with a mixed basket and the tax rate, please? Thanks!
December 9, 20205 yr Of course! German invoice with mixed taxes: RE000019.pdf And please, don't try to "approve" the Cart.php. Leave the code (where it deals with AEUC) like this: if (Configuration::get('PS_ATCP_SHIPWRAP')) { if ($useTax) { // With PS_ATCP_SHIPWRAP, we apply the proportionate tax rate to the shipping // costs. This is on purpose and required in many countries in the European Union. $shippingCost *= 1 + $this->getAverageProductsTaxRate(); } } else { // Apply tax if ($useTax && isset($carrierTax)) { $shippingCost *= 1 + ($carrierTax / 100); } } $shippingCost = round($shippingCost, _TB_PRICE_DATABASE_PRECISION_); Cache::store($cacheId, $shippingCost); return $shippingCost; Edited December 9, 20205 yr by Occam
December 10, 20205 yr Author Thanks, will report back! So the only code modification you have is what you posted? Because then I totally misunderstood the suggested edits on Github. Edited December 10, 20205 yr by 30knees
Create an account or sign in to comment