Fixed: Avoid space into address string
This commit is contained in:
parent
4c64b8ceae
commit
68441a563a
@ -800,7 +800,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||
$ret .= ' '.$object->town;
|
||||
$ret .= ($object->town?' '.$object->town:'');
|
||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||
{
|
||||
$ret.="\n".$object->state;
|
||||
@ -810,14 +810,14 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
else // Other: title firstname name \n address lines \n zip town \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||
$ret .= ' '.$object->town;
|
||||
$ret .= ($object->town?' '.$object->town:'');
|
||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||
{
|
||||
$ret.=", ".$object->state;
|
||||
}
|
||||
}
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
|
||||
if ($withcountry) $ret.=($object->country_code?($ret?$sep:'').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user