diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index d26d20059fc..580b729c8c3 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -279,7 +279,6 @@ class Entrepot extends CommonObject include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $tmp=getCountry($this->country_id,'all'); - $this->pays=$tmp['label']; // deprecated $this->country=$tmp['label']; $this->country_code=$tmp['code']; diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index b8da31aa889..de0a8df9c7c 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -81,7 +81,7 @@ if ($_GET["id"]) print ''.$langs->trans('Town').''.$entrepot->town.''; print ''.$langs->trans('Country').''; - print $entrepot->pays; + print $entrepot->country; print ''; // Statut diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index beca4a88b56..a5423468a2e 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -93,7 +93,7 @@ if ($id > 0) print ''.$langs->trans("Company").''.$object->societe.' '; print ''.$langs->trans("Address").''.nl2br($object->address).' '; print ''.$langs->trans("Zip").' '.$langs->trans("Town").''.$object->zip.' '.$object->town.' '; - print ''.$langs->trans("Country").''.$object->pays.' '; + print ''.$langs->trans("Country").''.$object->country.' '; print ''.$langs->trans("EMail").''.$object->email.' '; print ''.$langs->trans("Birthday").''.$object->naiss.' '; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index fc275858e94..d6539f917cc 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -123,11 +123,11 @@ if ($socid) print ''.$langs->trans('Town').''.$soc->town.""; // Country - if ($soc->pays) { + if ($soc->country) { print ''.$langs->trans('Country').''; $img=picto_from_langcode($soc->country_code); print ($img?$img.' ':''); - print $soc->pays; + print $soc->country; print ''; } diff --git a/htdocs/societe/ajaxcountries.php b/htdocs/societe/ajaxcountries.php index f71da96fed4..82dda71e042 100644 --- a/htdocs/societe/ajaxcountries.php +++ b/htdocs/societe/ajaxcountries.php @@ -65,12 +65,12 @@ if (! empty($country)) if ($resql) { print ''; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 2fdfe9e744e..13ad2739efc 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -154,7 +154,7 @@ class ActionsCardCompany extends ActionsCardCommon } else { - $this->tpl['tva_intra'] = $s.'object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; + $this->tpl['tva_intra'] = $s.'object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; } } else @@ -193,7 +193,7 @@ class ActionsCardCompany extends ActionsCardCommon } else { - $this->tpl['tva_intra'] = $s.'object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; + $this->tpl['tva_intra'] = $s.'object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; } } else diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 911a69c710c..4c3e7cc45ae 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -375,8 +375,6 @@ class Address $this->note = $obj->note; // deprecated - $this->pays_code = $this->country_code; - $this->pays = $this->country; $this->tel = $this->phone; $result = 1; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 73395fdec1e..8d39c99462c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2500,11 +2500,11 @@ class Societe extends CommonObject // We define country_id, country_code and country $country_id=$country_code=$country_label=''; - if (! empty($conf->global->MAIN_INFO_SOCIETE_PAYS)) + if (! empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) { - $tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS); + $tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_COUNTRY); $country_id=$tmp[0]; - if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label" + if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label" { $country_code=$tmp[1]; $country_label=$tmp[2]; @@ -2521,7 +2521,6 @@ class Societe extends CommonObject $this->country_code=$country_code; $this->country=$country_label; if (is_object($langs)) $this->country=($langs->trans('Country'.$country_code)!='Country'.$country_code)?$langs->trans('Country'.$country_code):$country_label; - $this->pays=$this->country; // TODO deprecated $this->tel=empty($conf->global->MAIN_INFO_SOCIETE_TEL)?'':$conf->global->MAIN_INFO_SOCIETE_TEL; // TODO deprecated $this->phone=empty($conf->global->MAIN_INFO_SOCIETE_TEL)?'':$conf->global->MAIN_INFO_SOCIETE_TEL; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index ca21354e8e3..141e76a892b 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -128,7 +128,7 @@ if ($_GET["socid"]) print ''.$langs->trans('Zip').''.$soc->zip.""; print ''.$langs->trans('Town').''.$soc->town.""; - print ''.$langs->trans('Country').''.$soc->pays.''; + print ''.$langs->trans('Country').''.$soc->country.''; print ''.$langs->trans('Phone').''.dol_print_phone($soc->tel,$soc->country_code,0,$soc->id,'AC_TEL').''; print ''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 6ddb35b270b..1908e145b2e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -894,7 +894,7 @@ else } else { - $s.='id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; + $s.='country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; } } print $s; @@ -1339,7 +1339,7 @@ else } else { - $s.='id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; + $s.='country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; } } print $s; @@ -1673,7 +1673,7 @@ else } else { - $s.='id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; + $s.='country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; } } print $s; diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index fefb218114b..c10c4183468 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -533,10 +533,8 @@ function getContactsForThirdParty($authentication,$idthirdparty) 'state_code' => $contact->state_code?$contact->state_code:'', 'state' => $contact->state?$contact->state:'', - 'fk_pays' => $contact->fk_pays?$contact->fk_pays:'', 'country_id' => $contact->country_id?$contact->country_id:'', 'country_code' => $contact->country_code?$contact->country_code:'', - 'pays' => $contact->pays?$contact->pays:'', 'country' => $contact->country?$contact->country:'', 'socid' => $contact->socid?$contact->socid:'', diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 91feba6bddf..91b70713914 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -196,7 +196,6 @@ if ($result >= 0) $member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; $member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; $member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; - $member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // deprecated $member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; $member->country_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid']; $member->country_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code']; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 07c7703605a..a0ee0efac83 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -282,7 +282,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase $template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITE%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'. '%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%NAISS%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'. - '%NOM%,%SOCIETE%,%ADDRESS%,%CP%,%TOWN%,%PAYS%'; + '%NOM%,%SOCIETE%,%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%'; $expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',0,New firstname,New name,New firstname New name,'. 'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->naiss,'day').',,'.