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:
Laurent Destailleur
2014-11-28 02:20:01 +01:00
16 changed files with 76 additions and 21 deletions

View File

@@ -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;
}