Jump to content

How to manage country tax ?


Interdit

Recommended Posts

Hello,

 

When a company/customer enters its VAT number on the order form I would like to have another type of invoice without the VAT included.

Is that possible ?

 

If the VAT field is not filled, the VAT will be included.

 

Thanks,

Francois

Link to comment
Share on other sites

  • 8 months later...
I know this is a stupid question but do we have to creat a custom field and lnk thsi to it and if so what do we put in the validation field

 

Yep, the default custom field name needs to be "VAT Number", but if you want to change that name you can do this in the vatnumbervalidation.php file (includes/hooks/), line 24. Also, don't forget to follow the rest of the "installation" (line 15 to 20 in that same file).

Link to comment
Share on other sites

Just a daft question,but does this need to be done for each product?

 

If so is there a quick way to do this, as we have over 90 products, and I just don't fancy adding this 90 times!!

 

No, you can just define this as a field in your client details (Setup > Custom clients field in your WHMCS admin). It is not necessary to define it as a custom field in your products.

Link to comment
Share on other sites

Thanks moo saved me a ton of legwork there.

 

However it doesn't appear to be working correctly, I have followed all the steps in the file, uncommented the lines etc, but it doesnt appear to automatically change the exempt staus when a valid number is entered.

 

Additionally, in order to validate it, the country code (i.e GB) had to be added to the entry box manually, shouldn't this do that automatically, based upon the address selected?

 

Thanks

Link to comment
Share on other sites

You can edit line 41 of the vatvalidationnumber.php file to the following:

 

$vatnumber = $_POST['country'].$_POST["customfield"][$VAT_CUSTOM_FIELD_ID];

 

And line 71:

 

$VAT_CUSTOM_FIELD_VALUE = $vars["country"].$data["value"];

 

This will take over the current country shortcut (like NL or GB), but please note that the official way to write an European VAT number is including the country shortcut.

Edited by m00
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated