30knees Posted July 22, 2017 Posted July 22, 2017 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?
Occam Posted July 29, 2017 Posted July 29, 2017 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!
30knees Posted July 30, 2017 Author Posted July 30, 2017 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.
Occam Posted July 30, 2017 Posted July 30, 2017 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.
30knees Posted July 30, 2017 Author Posted July 30, 2017 Bug report filed: https://github.com/thirtybees/thirtybees/issues/326
Occam Posted July 30, 2017 Posted July 30, 2017 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()); }
30knees Posted July 30, 2017 Author Posted July 30, 2017 @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.
Occam Posted July 30, 2017 Posted July 30, 2017 @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!
30knees Posted July 30, 2017 Author Posted July 30, 2017 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%.
Occam Posted July 30, 2017 Posted July 30, 2017 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.
30knees Posted September 10, 2017 Author Posted September 10, 2017 @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.
Occam Posted September 11, 2017 Posted September 11, 2017 @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.
30knees Posted November 22, 2020 Author Posted November 22, 2020 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?
Occam Posted November 22, 2020 Posted November 22, 2020 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. 1
30knees Posted November 22, 2020 Author Posted November 22, 2020 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.
30knees Posted November 22, 2020 Author Posted November 22, 2020 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.
Occam Posted November 22, 2020 Posted November 22, 2020 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)
30knees Posted November 23, 2020 Author Posted November 23, 2020 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?
Occam Posted November 23, 2020 Posted November 23, 2020 (edited) Nope, no shipping rate, just the shipping costs! Otherwise the proportional calculation wouldn't make sense. Edited November 23, 2020 by Occam
30knees Posted November 26, 2020 Author Posted November 26, 2020 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!
30knees Posted November 26, 2020 Author Posted November 26, 2020 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.
30knees Posted December 9, 2020 Author Posted December 9, 2020 @OccamI'm still struggling. Would you mind showing a screenshot of your invoice with a mixed basket and the tax rate, please? Thanks!
Occam Posted December 9, 2020 Posted December 9, 2020 (edited) 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, 2020 by Occam
30knees Posted December 10, 2020 Author Posted December 10, 2020 (edited) 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, 2020 by 30knees
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now