Add UK with GB.

This commit is contained in:
Laurent Destailleur 2013-04-24 19:14:59 +02:00
parent 0301d04fc4
commit 3896b99bad
4 changed files with 6 additions and 5 deletions

View File

@ -974,7 +974,7 @@ class Account extends CommonObject
$country_code=$this->getCountryCode(); $country_code=$this->getCountryCode();
if (in_array($country_code,array('CH','DE','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon if (in_array($country_code,array('CH','DE','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon
if (in_array($country_code,array('AU','BE','CA','DK','GR','GB','ID','IE','IR','KR','NL','NZ','US'))) return 2; // Australia, Great Britain... if (in_array($country_code,array('AU','BE','CA','DK','GR','GB','ID','IE','IR','KR','NL','NZ','UK','US'))) return 2; // Australia, Great Britain...
return 0; return 0;
} }

View File

@ -2443,6 +2443,7 @@ abstract class CommonObject
'SE', // Sweden 'SE', // Sweden
'SK', // Slovakia 'SK', // Slovakia
'SI', // Slovenia 'SI', // Slovenia
'UK', // United Kingdom
//'CH', // Switzerland - No. Swizerland in not in EEC //'CH', // Switzerland - No. Swizerland in not in EEC
); );
//print "dd".$this->country_code; //print "dd".$this->country_code;

View File

@ -699,7 +699,7 @@ function dol_bc($var,$moreclass='')
function dol_format_address($object,$withcountry=0,$sep="\n") function dol_format_address($object,$withcountry=0,$sep="\n")
{ {
$ret=''; $ret='';
$countriesusingstate=array('AU','US','IN','GB','ES'); $countriesusingstate=array('AU','US','IN','GB','ES','UK');
// Address // Address
$ret .= $object->address; $ret .= $object->address;
@ -713,7 +713,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n")
} }
if ($object->zip) $ret .= ', '.$object->zip; if ($object->zip) $ret .= ', '.$object->zip;
} }
else if (in_array($object->country_code,array('GB'))) // UK: title firstname name \n address lines \n town state \n zip \n country else if (in_array($object->country_code,array('GB','UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country
{ {
$ret .= ($ret ? $sep : '' ).$object->town; $ret .= ($ret ? $sep : '' ).$object->town;
if ($object->state && in_array($object->country_code,$countriesusingstate)) if ($object->state && in_array($object->country_code,$countriesusingstate))

View File

@ -2228,7 +2228,7 @@ class Societe extends CommonObject
$url=''; $url='';
if ($idprof == 1 && $soc->country_code == 'FR') $url='http://www.societe.com/cgi-bin/recherche?rncs='.$soc->idprof1; if ($idprof == 1 && $soc->country_code == 'FR') $url='http://www.societe.com/cgi-bin/recherche?rncs='.$soc->idprof1;
if ($idprof == 1 && $soc->country_code == 'GB') $url='http://www.companieshouse.gov.uk/WebCHeck/findinfolink/'; if ($idprof == 1 && ($soc->country_code == 'GB' || $soc->country_code == 'UK')) $url='http://www.companieshouse.gov.uk/WebCHeck/findinfolink/';
if ($idprof == 1 && $soc->country_code == 'ES') $url='http://www.e-informa.es/servlet/app/portal/ENTP/screen/SProducto/prod/ETIQUETA_EMPRESA/nif/'.$soc->idprof1; if ($idprof == 1 && $soc->country_code == 'ES') $url='http://www.e-informa.es/servlet/app/portal/ENTP/screen/SProducto/prod/ETIQUETA_EMPRESA/nif/'.$soc->idprof1;
if ($idprof == 1 && $soc->country_code == 'IN') $url='http://www.tinxsys.com/TinxsysInternetWeb/dealerControllerServlet?tinNumber='.$soc->idprof1.';&searchBy=TIN&backPage=searchByTin_Inter.jsp'; if ($idprof == 1 && $soc->country_code == 'IN') $url='http://www.tinxsys.com/TinxsysInternetWeb/dealerControllerServlet?tinNumber='.$soc->idprof1.';&searchBy=TIN&backPage=searchByTin_Inter.jsp';