Interdit Posted April 14, 2009 Share Posted April 14, 2009 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 0 Quote Link to comment Share on other sites More sharing options...
scurrell Posted April 14, 2009 Share Posted April 14, 2009 This is included in version 4 - any help? Optional VAT Number Validation Action Hook for verifying supplied VAT number is valid and setting tax exempt status on client for order automatically 0 Quote Link to comment Share on other sites More sharing options...
Interdit Posted April 14, 2009 Author Share Posted April 14, 2009 Thanks, I will try to setup that on my V4RC2 then. Is a procedure available somewhere ? Thanks again, Francois 0 Quote Link to comment Share on other sites More sharing options...
Interdit Posted April 14, 2009 Author Share Posted April 14, 2009 All is explained here in the file includes/hooks/vatnumbervalidation.php 0 Quote Link to comment Share on other sites More sharing options...
Milliment Posted January 7, 2010 Share Posted January 7, 2010 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 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted January 7, 2010 Share Posted January 7, 2010 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). 0 Quote Link to comment Share on other sites More sharing options...
ChrisGooding Posted January 8, 2010 Share Posted January 8, 2010 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!! 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted January 8, 2010 Share Posted January 8, 2010 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. 0 Quote Link to comment Share on other sites More sharing options...
ChrisGooding Posted January 8, 2010 Share Posted January 8, 2010 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 0 Quote Link to comment Share on other sites More sharing options...
m00 Posted January 8, 2010 Share Posted January 8, 2010 (edited) 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 January 8, 2010 by m00 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.