tamouh Posted October 25, 2012 Share Posted October 25, 2012 Hello, We're planning to migrate from MBv4 to WHMCS v5.1.2. I've noticed in the Setup -> Payments -> Tax Rules that I can select the Country and Province (Canadian) to assign for the tax code. However, when a new client signs up or added, there is no drop down box to select that province. Often times customer will use variety of short names (like QC for Quebec or ON for Ontario) and this causes the tax code not to apply to the client. I also found no way to add these short names manually. I had to go into the DB and add them one by one through phpMyAdmin. Please advise... Thanks, Tamouh 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted October 29, 2012 WHMCS Support Manager Share Posted October 29, 2012 Hi, You can add a list of states for your country to the /includes/jscript/statesdropdown.js file and that will allow your clients to select one of the pre-defined sates from a dropdown. Just duplicate one of the existing lines, change it to "CA" and enter your states in the format of the existing entries. This will solve the problem with them entering different variations of state names. 0 Quote Link to comment Share on other sites More sharing options...
gbrennae Posted November 3, 2012 Share Posted November 3, 2012 This is an issue for those who are trying to process .ca domain registrations/transfers for Canadian customers. The .ca registry rejects any submission that does not strictly conform to the standard Canadian province abbreviations. For example: Customer selects Province "Ontario" as part of their address information which then gets copied over to the domain registrant information. When the domain is submitted submitted to the registry it is rejected because it requires the province to be "ON". You can update the statesdropdown.js file to show the abbreviations instead of full province names but then you break the tax calculation as noted in this post because ON does not map to Ontario in WHMCS so the taxes cannot be calculated because WHMCS does not recognize the province. I'm currently working on a fix for this. When I come to a solution I will post it up. 0 Quote Link to comment Share on other sites More sharing options...
gbrennae Posted November 5, 2012 Share Posted November 5, 2012 Ok, As John Mentioned add the Canadian Provinces to the /includes/jscript/statesdropdown.js file Take out the existing states['CA'] line and add this: states['CA'] = ["AB","BC","MB","NB","NL","NT","NS","NU","ON","PE","QC","SK","YT","end"]; If you've already setup your tax table you must update it so the names map and WHMCS can detect the correct province for your customers. For example if one of your customers has their state/province set to "Ontario" in their profile you now need to change that to "ON" for the tax to apply accordingly. Also make sure that you update the state field in tbltax to "ON" rather than "Ontario" if you have already setup your tax items, or just delete them and re-add them. If you need to batch convert your customer fields you can run some SQL like this on your WHMCS database for each province: UPDATE tblclients SET state='ON' WHERE state='Ontario' AND country='CA' Do this for each province. Good Luck! 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.