Save translation

This commit is contained in:
Laurent Destailleur 2018-05-21 19:37:47 +02:00
parent c141c3ecfd
commit 1b20ec05d1
2 changed files with 9 additions and 6 deletions

View File

@ -455,7 +455,6 @@ abstract class CommonObject
{
if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
{
$langs->load("dict");
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
$tmparray=getCountry($this->country_id,'all');
$this->country_code=$tmparray['code'];
@ -2705,7 +2704,7 @@ abstract class CommonObject
$sql .= ", multicurrency_total_ttc='".price2num($this->multicurrency_total_ttc, 'MT', 1)."'";
$sql .= ' WHERE rowid = '.$this->id;
dol_syslog(get_class($this)."::update_price", LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql)

View File

@ -1654,9 +1654,9 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='',
}
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).')'):'');
$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
{
@ -1668,7 +1668,11 @@ function dol_format_address($object, $withcountry=0, $sep="\n", $outputlangs='',
}
}
if (! is_object($outputlangs)) $outputlangs=$langs;
if ($withcountry) $ret.=($object->country_code?($ret?$sep:'').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
if ($withcountry)
{
$langs->load("dict");
$ret.=($object->country_code?($ret?$sep:'').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
}
return $ret;
}