Inform-All Posted July 28, 2022 Posted July 28, 2022 (edited) This module is all you need for intra-Community supply orders. The module does the following: Automatically checks an VAT number for delivery address Checks if it's a valid VAT number on the official VIES database Gives 0% tax if a VAT is verified In the settings of the module you fill in your companies Origin Country. Because you can't ship with 0% tax in the same country your company is based. Every order is checked for their shipping address, NOT the invoice address. Since the VIES database has some reoccurring offline time, there is an option in how to handle this. Prestashop 1.7 vatchecker.zip Got any ideas or updates? Feel free to commit on GIT. Latest update: 29-09-2022 Edited September 30, 2022 by Inform-All update (see edit history) 3 Share this post Link to post Share on other sites More sharing options...
WorDym Posted August 4, 2022 Posted August 4, 2022 Looks like it works great so far! I'd just like to ask - am I just blind, or is the phrase "EU VIES server not responding" not available for translation in the administration? Share this post Link to post Share on other sites More sharing options...
Inform-All Posted August 8, 2022 Posted August 8, 2022 On 8/4/2022 at 8:16 AM, WorDym said: Looks like it works great so far! I'd just like to ask - am I just blind, or is the phrase "EU VIES server not responding" not available for translation in the administration? The translation should just be there. International > Translations > Translation of modules > Vat Checker > your language Share this post Link to post Share on other sites More sharing options...
WorDym Posted August 10, 2022 Posted August 10, 2022 Yes, I checked the traslation settings, but still can't see the phrase "EU VIES server not responding" over there in either "vatchecker" category or "configure". Share this post Link to post Share on other sites More sharing options...
Inform-All Posted August 11, 2022 Posted August 11, 2022 On 8/10/2022 at 7:08 AM, WorDym said: Yes, I checked the traslation settings, but still can't see the phrase "EU VIES server not responding" over there in either "vatchecker" category or "configure". That is actually really weird. I've tested it in multiple stores, and it always in the list of your screenshot. Please reinstall the module to check if that helps. Share this post Link to post Share on other sites More sharing options...
nailandlash Posted August 24, 2022 Posted August 24, 2022 Hi, is there any option to have it for 1.6.1? Thanks!! Share this post Link to post Share on other sites More sharing options...
Inform-All Posted September 6, 2022 Posted September 6, 2022 On 8/24/2022 at 11:57 AM, nailandlash said: Hi, is there any option to have it for 1.6.1? Thanks!! No, and i won't make new modules for PS1.6. 1 Share this post Link to post Share on other sites More sharing options...
Hart Posted October 13, 2022 Posted October 13, 2022 (edited) private $euVatFormats = array( 'AT' => '(AT)?U[0-9]{8}', # Austria 'BE' => '(BE)?0[0-9]{9}', # Belgium 'BG' => '(BG)?[0-9]{9,10}', # Bulgaria 'CY' => '(CY)?[0-9]{8}[A-Z]', # Cyprus 'CZ' => '(CZ)?[0-9]{8,10}', # Czech Republic 'DE' => '(DE)?[0-9]{9}', # Germany 'DK' => '(DK)?[0-9]{8}', # Denmark 'EE' => '(EE)?[0-9]{9}', # Estonia 'GR' => '(EL)?[0-9]{9}', # Greece 'ES' => '(ES)?[A-Z][0-9]{7}(?:[0-9]|[A-Z])', # Spain 'FI' => '(FI)?[0-9]{8}', # Finland 'FR' => '(FR)?[0-9A-Z]{2}[0-9]{9}', # France //'GB' => '(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})', # United Kingdom // Brexit! 'HR' => '(HR)?[0-9]{11}', # Croatia 'HU' => '(HU)?[0-9]{8}', # Hungary 'IE' => '(IE)?[0-9]{7}[A-Z]{1,2}', # Ireland 'IE2' => '(IE)?[0-9][A-Z][0-9]{5}[A-Z]', # Ireland (2) 'IT' => '(IT)?[0-9]{11}', # Italy 'LT' => '(LT)?([0-9]{9}|[0-9]{12})', # Lithuania 'LU' => '(LU)?[0-9]{8}', # Luxembourg 'LV' => '(LV)?[0-9]{11}', # Latvia 'MT' => '(MT)?[0-9]{8}', # Malta 'NL' => '(NL)?[0-9]{9}B[0-9]{2}', # Netherlands 'PL' => '(PL)?[0-9]{10}', # Poland 'PT' => '(PT)?[0-9]{9}', # Portugal 'RO' => '(RO)?[0-9]{2,10}', # Romania 'SE' => '(SE)?[0-9]{12}', # Sweden 'SI' => '(SI)?[0-9]{8}', # Slovenia 'SK' => '(SK)?[0-9]{10}', # Slovakia ); in this list missing XI that is North Ireland and IE2 what is it? Quote As of 01/01/2021, the VoW service to validate UK (GB) VAT numbers ceased to exist while a new service to validate VAT numbers of businesses operating under the Protocol on Ireland and Northern Ireland appeared. These VAT numbers are starting with the “XI” prefix, which may be found in the “Member State / Northern Ireland” drop down under the new entry “XI-Northern Ireland”. Moreover, any quote of “Member State” is replaced by “Member State / Northern Ireland” and any quote of “MS” is replaced by “MS / XI”. All traders seeking to validate UK (GB) VAT numbers may address their request to the UK Tax Administration. https://ec.europa.eu/taxation_customs/vies/#/vat-validation XI has same VAT syntax of GB VAT: (XI)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3}) please avoid the VIES check if the VAT code is in the same country of the Shop. Edited October 13, 2022 by Hart (see edit history) Share this post Link to post Share on other sites More sharing options...
Ritter Posted November 29, 2022 Posted November 29, 2022 The module also works in PS 8.0.0. 👍 2 Share this post Link to post Share on other sites More sharing options...
Ritter Posted December 16, 2022 Posted December 16, 2022 I get the following message when calling up e.g. the shopping cart: Unknown error in Zeile 719 der Datei /is/htdocs/wp1131087_P0JXD1MK8I/www/shop/modules/vatchecker/vatchecker.php [8192] ltrim(): Passing null to parameter #1 ($string) of type string is deprecated Unknown error in Zeile 719 der Datei /is/htdocs/wp1131087_P0JXD1MK8I/www/shop/modules/vatchecker/vatchecker.php [8192] ltrim(): Passing null to parameter #1 ($string) of type string is deprecated There have been no changes to the vatchecker. php Share this post Link to post Share on other sites More sharing options...
Inform-All Posted December 16, 2022 Posted December 16, 2022 45 minutes ago, Ritter said: I get the following message when calling up e.g. the shopping cart: Unknown error in Zeile 719 der Datei /is/htdocs/wp1131087_P0JXD1MK8I/www/shop/modules/vatchecker/vatchecker.php [8192] ltrim(): Passing null to parameter #1 ($string) of type string is deprecated Unknown error in Zeile 719 der Datei /is/htdocs/wp1131087_P0JXD1MK8I/www/shop/modules/vatchecker/vatchecker.php [8192] ltrim(): Passing null to parameter #1 ($string) of type string is deprecated There have been no changes to the vatchecker. php Has been bug fixed on git. Share this post Link to post Share on other sites More sharing options...
Ritter Posted December 16, 2022 Posted December 16, 2022 Thanks 🙂 Share this post Link to post Share on other sites More sharing options...
Ritter Posted January 2 Posted January 2 There is a problem with the VATChecker, the entered gross price suddenly is not accepted and strange behavior when changing the tax rule. Shop country: Germany, VAT 19% Uninstalled and reinstalled modules VATChecker, changed vatchecker.php as described on Github. Share this post Link to post Share on other sites More sharing options...
Inform-All Posted January 4 Posted January 4 On 1/2/2023 at 3:48 PM, Ritter said: There is a problem with the VATChecker, the entered gross price suddenly is not accepted and strange behavior when changing the tax rule. Shop country: Germany, VAT 19% Uninstalled and reinstalled modules VATChecker, changed vatchecker.php as described on Github. This bug is not related to the vat checker module. The moment you edit your tax incl price it should also edit the tax excl price. You have a different module/edit because your price edit display page is not the Prestashop's default. And besides that the Vatchecker module does not interfere with the product edit pages. Share this post Link to post Share on other sites More sharing options...
Ritter Posted January 5 Posted January 5 Thank you for the information. Prestashop runs with the default theme and settings, only VAT Checker is installed as third-party module. Presta is present on the European market, so I expected that the different VAT rates would incorporated in PS 8 - this is unfortunately not the case, a thrid-party module is nessesary . Since it is not due to the VAT checker module, I am opening a new thread with the problem of incorrectly gross prices by saving. Share this post Link to post Share on other sites More sharing options...
Hart Posted January 24 Posted January 24 I've found 2 bugs, please take a look to the github ticket i opened: https://github.com/NKoonen/vatchecker/issues/27 Share this post Link to post Share on other sites More sharing options...
Hart Posted January 24 Posted January 24 there is something i don't understand here on this code (override) in your module class TaxRulesTaxManager extends TaxRulesTaxManagerCore { /** * Return the tax calculator associated to this address. * * @return TaxCalculator */ public function getTaxCalculator() { static $tax_enabled = null; if ( isset( $this->tax_calculator ) ) { return $this->tax_calculator; } if ( null === $tax_enabled ) { $tax_enabled = Configuration::get( 'PS_TAX' ); } if ( $tax_enabled && $this->address ) { /** @var Vatchecker $vatchecker */ $vatchecker = Module::getInstanceByName('vatchecker'); if ( $vatchecker && $vatchecker->canOrderWithoutVat( $this->address ) ) { // Disable TAX. $tax_enabled = false; } } if ( ! $tax_enabled ) { return new TaxCalculator( array() ); } return parent::getTaxCalculator(); } } in BO config of the module you can select countries from EU where you can order without VAT (based on the note here) Looking inside the code if i disable a country TAXATION is not applied? Was mopre logical instead that if i dsable Spain flag in config i can order from there only if the customer as a VALID VAT number, because the UX and the message seems to indicate that i will forcing only VAT purcasing not liek i see in the code that is added or not the tax. There is something i still misunderstanding here? Thanks! Share this post Link to post Share on other sites More sharing options...
Inform-All Posted January 25 Posted January 25 20 hours ago, Hart said: there is something i don't understand here on this code (override) in your module class TaxRulesTaxManager extends TaxRulesTaxManagerCore { /** * Return the tax calculator associated to this address. * * @return TaxCalculator */ public function getTaxCalculator() { static $tax_enabled = null; if ( isset( $this->tax_calculator ) ) { return $this->tax_calculator; } if ( null === $tax_enabled ) { $tax_enabled = Configuration::get( 'PS_TAX' ); } if ( $tax_enabled && $this->address ) { /** @var Vatchecker $vatchecker */ $vatchecker = Module::getInstanceByName('vatchecker'); if ( $vatchecker && $vatchecker->canOrderWithoutVat( $this->address ) ) { // Disable TAX. $tax_enabled = false; } } if ( ! $tax_enabled ) { return new TaxCalculator( array() ); } return parent::getTaxCalculator(); } } in BO config of the module you can select countries from EU where you can order without VAT (based on the note here) Looking inside the code if i disable a country TAXATION is not applied? Was mopre logical instead that if i dsable Spain flag in config i can order from there only if the customer as a VALID VAT number, because the UX and the message seems to indicate that i will forcing only VAT purcasing not liek i see in the code that is added or not the tax. There is something i still misunderstanding here? Thanks! I responded on Git Share this post Link to post Share on other sites More sharing options...
Serdar Hakan Posted Thursday at 01:55 PM Posted Thursday at 01:55 PM Doesn't work in version 1.7.8 Share this post Link to post Share on other sites More sharing options...
Inform-All Posted Thursday at 01:57 PM Posted Thursday at 01:57 PM (edited) On 1/26/2023 at 2:55 PM, Serdar Hakan said: Doesn't work in version 1.7.8 It does work on PS.1.7.8 please send me a PM with details. * edit: problem fixed. Edited Monday at 04:52 PM by Inform-All (see edit history) Share this post Link to post Share on other sites More sharing options...
Shin_P Posted Monday at 03:40 PM Posted Monday at 03:40 PM Hi, I just installed your module on my 1.7.8.8 and it gives me an errror when debug is ON I'm afraid I can't give you access, because I'm working on localhost PS: thank you for bringing back this feature free of charge, really appreciate it Share this post Link to post Share on other sites More sharing options...
Inform-All Posted Monday at 04:51 PM Posted Monday at 04:51 PM 1 hour ago, Shin_P said: Hi, I just installed your module on my 1.7.8.8 and it gives me an errror when debug is ON I'm afraid I can't give you access, because I'm working on localhost PS: thank you for bringing back this feature free of charge, really appreciate it What PHP version are you using? Are you sure you can do a Soap call to the external VIES database? It's a rather odd error message, please send me a DM if you need more help. Share this post Link to post Share on other sites More sharing options...
Shin_P Posted 22 hours ago Posted 22 hours ago well it doesnt matter. on production seems to be working: debug is off and that was just a notice right? not an error, so nothing to worry about I hope i also turned off the "Validation required" option and it works great, I will validate manually thank you again, coffee is on me this morning ☕ 🤪 1 Share this post Link to post Share on other sites More sharing options...
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