forked from Wavyzz/dolibarr
Added China into the list of country using State / province in address
This commit is contained in:
@@ -2130,7 +2130,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
|
||||
global $conf, $langs;
|
||||
|
||||
$ret = '';
|
||||
$countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
|
||||
$countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR', 'CN'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
|
||||
|
||||
// See format of addresses on https://en.wikipedia.org/wiki/Address
|
||||
// Address
|
||||
@@ -2138,7 +2138,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
|
||||
$ret .= ($extralangcode ? $object->array_languages['address'][$extralangcode] : (empty($object->address) ? '' : $object->address));
|
||||
}
|
||||
// Zip/Town/State
|
||||
if (isset($object->country_code) && in_array($object->country_code, array('AU', 'CA', 'US')) || !empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) {
|
||||
if (isset($object->country_code) && in_array($object->country_code, array('AU', 'CA', 'US', 'CN')) || !empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) {
|
||||
// US: title firstname name \n address lines \n town, state, zip \n country
|
||||
$town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : (empty($object->town) ? '' : $object->town));
|
||||
$ret .= ($ret ? $sep : '').$town;
|
||||
|
||||
Reference in New Issue
Block a user