Fix bad separation of address

This commit is contained in:
Laurent Destailleur 2016-08-01 19:37:17 +02:00
parent 5eda10e0dd
commit a35dd9f2d1

View File

@ -1045,7 +1045,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
else // Other: title firstname name \n address lines \n zip town \n country
{
$ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : '';
$ret .= ($object->town?(($object->zip?' ':$sep).$object->town):'');
$ret .= ($object->town?(($object->zip?' ':($ret ? $sep : '' )).$object->town):'');
if ($object->state && in_array($object->country_code,$countriesusingstate))
{
$ret.=($ret?", ":'').$object->state;