mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
Merge remote-tracking branch 'origin/3.6' into 3.7
Conflicts: htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php htdocs/core/tpl/objectline_create.tpl.php htdocs/fichinter/fiche.php
This commit is contained in:
@@ -766,11 +766,12 @@ function dol_bc($var,$moreclass='')
|
||||
* @param Object $object A company or contact object
|
||||
* @param int $withcountry 1=Add country into address string
|
||||
* @param string $sep Separator to use to build string
|
||||
* @param Tranlsate $outputlangs Object lang that contains language for text translation.
|
||||
* @return string Formated string
|
||||
*/
|
||||
function dol_format_address($object,$withcountry=0,$sep="\n")
|
||||
function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
{
|
||||
global $conf;
|
||||
global $conf,$langs;
|
||||
|
||||
$ret='';
|
||||
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR');
|
||||
@@ -815,8 +816,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n")
|
||||
$ret.=", ".$object->state;
|
||||
}
|
||||
}
|
||||
|
||||
if ($withcountry) $ret.=($object->country?$sep.$object->country:'');
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user