Multibyte_VATFix - Version 1.0.4

Version Notes

Add configuration to enable or disable the VATfix
Configuration is at customer -> create_account

Download this release

Release Info

Developer Roman Hutterer
Extension Multibyte_VATFix
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Multibyte/VATFix/Helper/Data.php CHANGED
@@ -19,7 +19,7 @@ class Multibyte_VATFix_Helper_Data extends Mage_Customer_Helper_Data {
19
  */
20
  public function checkVatNumber($countryCode, $vatNumber, $requesterCountryCode = '', $requesterVatNumber = '') {
21
  //@RHU take the VAT without the first two signs (which are the countrycode)
22
- if ($this->includesCountryCode($vatNumber)) {
23
  $vatNumber = substr(str_replace(' ', '', trim($vatNumber)), 2);
24
  }
25
  return parent::checkVatNumber($countryCode, $vatNumber, $requesterCountryCode, $requesterVatNumber);
19
  */
20
  public function checkVatNumber($countryCode, $vatNumber, $requesterCountryCode = '', $requesterVatNumber = '') {
21
  //@RHU take the VAT without the first two signs (which are the countrycode)
22
+ if (Mage::getStoreConfig('customer/create_account/vatfix_enabled') && $this->includesCountryCode($vatNumber)) {
23
  $vatNumber = substr(str_replace(' ', '', trim($vatNumber)), 2);
24
  }
25
  return parent::checkVatNumber($countryCode, $vatNumber, $requesterCountryCode, $requesterVatNumber);
app/code/community/Multibyte/VATFix/etc/system.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <customer>
5
+ <groups>
6
+ <create_account translate="label">
7
+ <fields>
8
+ <vatfix_enabled>
9
+ <label>VATFix enabled</label>
10
+ <comment>Enable the VATFix to accept VAT's (UID's) include Countrycode ?</comment>
11
+ <frontend_type>select</frontend_type>
12
+ <source_model>adminhtml/system_config_source_yesno</source_model>
13
+ <sort_order>20</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ </vatfix_enabled>
18
+ </fields>
19
+ </create_account>
20
+ </groups>
21
+ </customer>
22
+ </sections>
23
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Multibyte_VATFix</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
@@ -11,11 +11,12 @@
11
  <description>The VatFix extension for magento fixes the broken VAT check in Magento for European Companies which want to use the built-in feature of Customergroups based on valid VAT-number in Magento.&#xD;
12
  &#xD;
13
  With this extension the ability to change a Customers Usergroup bases on a valid VAT number is possible.</description>
14
- <notes>Optimization of Code</notes>
 
15
  <authors><author><name>Roman Hutterer</name><user>roman204</user><email>info@multibyte.at</email></author></authors>
16
- <date>2013-08-26</date>
17
- <time>14:38:23</time>
18
- <contents><target name="magecommunity"><dir name="Multibyte"><dir name="VATFix"><dir name="Helper"><file name="Countries.php" hash="3dcb13f1bdeb978d3be3edd875231228"/><file name="Data.php" hash="b53b47865a9eb00cb4250364269a0aee"/></dir><dir name="etc"><file name="config.xml" hash="be3a4af513e7fc31f526f9638c8fed4e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Multibyte_VATFix.xml" hash="3dd4e35b16777f8edb2c4e2da4034e72"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.1.0</min><max>5.4.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Multibyte_VATFix</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
11
  <description>The VatFix extension for magento fixes the broken VAT check in Magento for European Companies which want to use the built-in feature of Customergroups based on valid VAT-number in Magento.&#xD;
12
  &#xD;
13
  With this extension the ability to change a Customers Usergroup bases on a valid VAT number is possible.</description>
14
+ <notes>Add configuration to enable or disable the VATfix&#xD;
15
+ Configuration is at customer -&gt; create_account</notes>
16
  <authors><author><name>Roman Hutterer</name><user>roman204</user><email>info@multibyte.at</email></author></authors>
17
+ <date>2013-10-06</date>
18
+ <time>10:54:04</time>
19
+ <contents><target name="magecommunity"><dir name="Multibyte"><dir name="VATFix"><dir name="Helper"><file name="Countries.php" hash="3dcb13f1bdeb978d3be3edd875231228"/><file name="Data.php" hash="434cae20d1ca7f28109fd978bf98e05c"/></dir><dir name="etc"><file name="config.xml" hash="be3a4af513e7fc31f526f9638c8fed4e"/><file name="system.xml" hash="8afda4bebf69e9709c9c16470fb2674a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Multibyte_VATFix.xml" hash="3dd4e35b16777f8edb2c4e2da4034e72"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.1.0</min><max>5.4.0</max></php></required></dependencies>
22
  </package>