mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #32210 from atm-maxime/detect_country_code
NEW : auto-detect country from code in creation
This commit is contained in:
commit
458579342a
|
|
@ -1010,6 +1010,11 @@ class Societe extends CommonObject
|
|||
$this->fk_multicurrency = 0;
|
||||
}
|
||||
|
||||
if (empty($this->country_id) && !empty($this->country_code)) {
|
||||
$country_id = getCountry($this->country_code, '3');
|
||||
$this->country_id = is_int($country_id) ? $country_id : 0;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::create ".$this->name);
|
||||
|
||||
$now = dol_now();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user