Just a reminder: The latest version of the VAT-mod is 1.1 (look in the txt-file) and could be downloaded from here the file in the download section is still version 1.0, I've tried to upload it again...
Cheers!
Printable View
Just a reminder: The latest version of the VAT-mod is 1.1 (look in the txt-file) and could be downloaded from here the file in the download section is still version 1.0, I've tried to upload it again...
Cheers!
Thnaks for the mod, this should make life easier when we are selling to other companies in the EU as we are just about to become VAT registered.
I set up the module as directed in the "Install_130.txt" file and it seems to work as described, though we don't have out VAT registration number yet so I can't try it out on a live transaction.
Last night I changed all of our products to tax class "VAT" and made modifications to the pricing so that the price including VAT should be at the price points (e.g. £9.95) we want rather than all over the place (e.g.£10.11). I have set "Admin -> Configuration ->My Store -> Display Prices with Tax" to "true" but none of the prices actually display with tax included to EU resident non-companies. The tax is added on checkout correctly.
Any ideas?
I notice this mod uses the function file_get_contents. My host has disabled the fopen wrappers so I get the following error if I try to verify the VAT number.
Warning: file_get_contents(): URL file-access is disabled in the server configuration in /xxxxxxxx/xxxxxxxx/public_html/shop/includes/functions/functions_email.php on line 529
Warning: file_get_contents(http://www.europa.eu.int/comm/taxati...AT=999943280): failed to open stream: no suitable wrapper could be found in /xxxxxxxx/xxxxxxxx/public_html/shop/includes/functions/functions_email.php on line 529
without fopen wrappers you will not be able to use file_get_contents for web services requests. does anyone have a work around for this? (Other than change hosts :P)
I replaced some of the code in the file "functions_email.php" to use cURL insted of the file_get_contents function. If you want to try to use this edit you can replace the code starting at line 522 ending 539 with the code you see below.
function zen_verif_tva($num_tva){
$num_tva=preg_replace('/ +/', "", $num_tva);
$prefix = substr($num_tva, 0, 2);
if (array_search($prefix, zen_get_tva_intracom_array() ) === false) {
return 'false';
}
$tva = substr($num_tva, 2);
// create a new curl resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, 'http://ec.europa.eu/taxation_customs/vies/cgi-bin/viesquer?MS=' . $prefix . '&Lang=FR&VAT=' . $tva);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
// grab URL and pass it to a string
$monfd = curl_exec($ch);
// close curl resource, and free up system resources
curl_close($ch);
if ( eregi("TVA non valide", $monfd) ) {
return 'false';
} elseif ( eregi("TVA valide", $monfd) ){
return 'true';
} else {
$myVerif = 'no_verif';
}
return $myVerif;
}
That's handy.
Just a sidenote ... all the changes made to the functions_email.php in this mod .... should have been put into a separate file, in order to make impact on upgrades much simpler.
Since all the "changes" were really just the addition of some extra functions, they would be best placed into a new file at:
/includes/functions/extra_functions/tva_vat_lookup.php
It works fine as-is ... but would be more efficient done this other way.
Thanks. Great job. But in Turkey we have VAT numbers and Tax office.Only VAT numder in not enough. Both of them is a must for commercial sales. Means: On the invoice we have to write both of them. Do yıu have any ide to write two seperate items .Shortly: I need TWO separete inputs. 1- VAT Number and 2-Tax Office
Any help
:no:
High,
I have a problem. By check-out, I want change my adress . In the new form the VAT field is too small. Where can I change the the size of the VAT box for entry VAT number? The filed in the create account is OK. Only by changing / editing the adress, the new box is small!
Thanks
I added a picture . The same problem occures also by changing the invoice adress !Quote:
Originally Posted by Remzi
Quote:
Originally Posted by DrByte
we have been thinkin alot back and forth about that.. how to do with functions and additional files.. sometime in the begining we thought of not creaing to much new files and as aour modifications grew i guess we stuck to that thought.. but so thanks for pointing out the convention.. we will conform to your standard soon.. love standards - it makes stuff much easier in the future. thanks again. :)
what is the 'tax office' input for? how does it affect the tax? how do you want the mod to calculate with those two inputs and then with countries and such.. you probably must tell us some more about how the turkish vat-system/laws works.. and further since i gather you are not a member of the EU-VAT laws..Quote:
Originally Posted by Remzi
but besides that i can say im not sure how much work we are able to put into such country-specific matters.. sorry.. but again please feel free to let us know how your vat-laws works and maybe it is not too much work to be done..
i also wonder how the number-check is thought to be done and what server should be used..
thanks for shown intrest and good luck.. let us know..
/vike