Merge pull request #7787 from libersoft/feature/correct-italian-address-format

NEW Support Italian addresses format. Fixes #7785
This commit is contained in:
Laurent Destailleur
2017-11-11 17:38:29 +01:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@@ -1579,6 +1579,12 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
$ret.="\n".$object->state;
}
}
else if (in_array($object->country_code,array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country
{
$ret .= ($ret ? $sep : '' ).$object->zip;
$ret .= ($object->town?(($object->zip?' ':'').$object->town):'');
$ret .= ($object->departement_id?(' ('.($object->departement_id).')'):'');
}
else // Other: title firstname name \n address lines \n zip town \n country
{
$ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : '';