Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Vat Change - Keep End Price The Same Rate Topic   - - - - -

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 17 December 2020 - 04:42 PM #1

Hi all,
 
On 1-1-2021 the normal VAT (MwSt) goes back up from 16% to 19% here in Germany, and the low VAT goes back from 5 to 7%.
 
Therefore I need to change the tax percentages, but I would like to keep the final prices the same for the customer. So a product that costs 20 euro now including 16% VAT, should after 1-1 cost 20 euro incl 20% vat, and for the low vat rates (not many products have this), a product that cost 20 euro incl 5% VAT now, should still cost 20 euro incl 7% VAT after 2020.
 
When we went from 19% to 16% I did it myself with an export and import raising the prices and then lowering the tax percentage, but I ran into some issues, the most difficult one being the change of the option modifiers. I also had a couple of products that did not import back in correctly.
 
How would you guys do it? I guess directly in the database would be best / easiest?
 
Thanks!

When life hands you lemons, bring on the Tequila baby!


 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3496 posts

Posted 17 December 2020 - 05:15 PM #2

What about /admin.php?dispatch=products.global_update



 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 18 December 2020 - 11:11 AM #3

What about /admin.php?dispatch=products.global_update

 

Won't work, because I can't filter on taxes, and I don't think it changes option modifiers?


When life hands you lemons, bring on the Tequila baby!


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 21 December 2020 - 09:34 AM #4

Nobody? I don't mind hiring someone who can make a script or so - unfortunately my usual developer has no time until 1-1. So feel free to PM me an offer :)


When life hands you lemons, bring on the Tequila baby!


 
  • E.Qi.Librium
  • Senior Member
  • Members
  • Join Date: 05-Sep 09
  • 472 posts

Posted 21 December 2020 - 03:27 PM #5

Odd thing, I have different VAT % depending on the shipping country and the end price for each product remains the same, even for the 0% vat as it is inclusive.

When I read this I got worried and went to change several percentages to try it out but no matter to what percentage I change it to, the price remains the same.

On Administration/shipping & taxes I have the "Price includes tax" checked and that's it.


4.11.5


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 21 December 2020 - 05:09 PM #6

Odd thing, I have different VAT % depending on the shipping country and the end price for each product remains the same, even for the 0% vat as it is inclusive.

When I read this I got worried and went to change several percentages to try it out but no matter to what percentage I change it to, the price remains the same.

On Administration/shipping & taxes I have the "Price includes tax" checked and that's it.

 

Yeah that works, but it won't work for my setup. I need prices without VAT in our system since we also sell wholesale with automatic EU VAT nr check, etc... 


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11998 posts

Posted 21 December 2020 - 09:33 PM #7



Yeah that works, but it won't work for my setup. I need prices without VAT in our system since we also sell wholesale with automatic EU VAT nr check, etc... 

 

Hi Flow, I'm kinda confused now as to what you want...  I thought you originally stated that your prices include VAT and you want to adjust the prices based on changes in VAT so that the "price including tax" remained the same.  But now you state you want prices without VAT?

 

Trouble with changing price based on VAT is that you'll have to calculate the change in VAT and then reduce the price by that amount.  However due to rounding and other math issues, you may not get to the exact same price.... If you want to adjust your prices by some fixed amount (based on delta of VAT change), you could use something like below.  But note that it will change all prices for all usergroups.  Would require adding constraints to have adjust only selected usergroup_ids.

function my_adjust_prices_by($price_change /* absolute or % e.g 1 or .003% */) {
  $percent_adjust = 0;
  if( strpos($price_change, '%') ) {
    $percent_adjust = floatval($price_change) / 100;
  }
  if( $percent_adjust > 0.00 ) {
    db_query('UPDATE ?:product_prices SET price=`price` - `price` * ?d', $percent_adjust);
    // To include all storefronts uncomment below
    //db_query('UPDATE ?:ult_product_prices SET price=`price` - `price` * ?d', $percent_adjust);
  } elseif ($price_change = floatval($price_change) ) {
    db_query('UPDATE ?:product_prices SET price=`price` - ?d', $price_change);
    // To include all storefronts uncomment below
    //db_query('UPDATE ?:ult_product_prices SET price=`price` - ?d', $price_change);
  }
}
 
It assume you are adjusting price 'down' and that the amount/percent as the parameter is the amount to adjust the prices.  I.e. if VAT changed by 0.03%, that's what you would pass.  Note that suggest you backup both the cscart_product_prices and cscart_ult_product_prices tables BEFORE running the above....

UNTESTED


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 22 December 2020 - 06:02 PM #8

Hi Flow, I'm kinda confused now as to what you want...  I thought you originally stated that your prices include VAT and you want to adjust the prices based on changes in VAT so that the "price including tax" remained the same.  But now you state you want prices without VAT

 

Hi Tony, 

 

Thanks a lot for your response. In my admin I have prices without VAT - on the frontend they show including VAT (as obliged in the EU).

6 months ago when we got this temporary change (as covid support the government lowered the VAT), like you said, I adjusted the pricing up by a certain amount, and then changed the VAT. This indeed resulted in some cents being off here and there, but this is not a huge issue - we manually fixed these. I also manually adjusted the discounts for certain user groups.

The problem is mostly the modifiers of the options. We had to do these manually which was a lot of work. Would your script work with these? Maybe you would like to have a look on our dev server and make me a quote for doing this trick this for me?

 

Thanks!


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11998 posts

Posted 22 December 2020 - 08:33 PM #9

That function would not handle modifiers.  However, it could certainly be modified to so so.  That was just an example without much real analysis.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 23 December 2020 - 04:21 PM #10

I sent you an email Tony! :)


When life hands you lemons, bring on the Tequila baby!


 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2380 posts

Posted 01 January 2021 - 03:16 PM #11

Just to let everyone know, Tony did a great job writing a script for me so last minute. Thanks again Ez-ms!


When life hands you lemons, bring on the Tequila baby!


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11998 posts

Posted 01 January 2021 - 10:36 PM #12

You're welcome, glad I could help.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.