english language standardization

This commit is contained in:
Grand Philippe 2013-02-25 09:52:24 +01:00
parent 6decab1847
commit b081589129
37 changed files with 65 additions and 85 deletions

View File

@ -423,7 +423,6 @@ abstract class ActionsAdherentCardCommon
{
dol_print_error($this->db);
}
$this->object->pays_code = $obj->code;
$this->object->pays = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
$this->object->country_code = $obj->code;
$this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;

View File

@ -63,7 +63,6 @@ class Adherent extends CommonObject
var $country_id;
var $country_code;
var $country;
var $pays_code; // deprecated
var $pays; // deprecated
var $email;
@ -1068,7 +1067,6 @@ class Adherent extends CommonObject
$this->country = $langs->transnoentitiesnoconv("Country".$obj->country_code);
else
$this->country=$obj->country;
$this->pays_code = $obj->country_code; // deprecated
$this->pays = $this->country; // deprecated
$this->phone = $obj->phone;

View File

@ -728,7 +728,6 @@ else
if ($object->country_id)
{
$tmparray=getCountry($object->country_id,'all');
$object->pays_code=$tmparray['code'];
$object->pays=$tmparray['code'];
$object->country_code=$tmparray['code'];
$object->country=$tmparray['label'];
@ -957,7 +956,6 @@ else
{
dol_print_error($db);
}
$object->pays_code=$obj->code;
$object->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->label;
$object->country_id=$obj->rowid;
$object->country_code=$obj->code;

View File

@ -128,20 +128,20 @@ $tablib[24]= "DictionnaryAccountancysystem";
// Requete pour extraction des donnees des dictionnaires
$tabsql=array();
$tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.code as pays_code, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid";
$tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libelle, d.fk_region as region_id, r.nom as region, p.code as pays_code, p.libelle as pays, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1";
$tabsql[3] = "SELECT r.rowid as rowid, code_region as code, nom as libelle, r.fk_pays as country_id, p.code as pays_code, p.libelle as pays, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1";
$tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.code as country_code, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid";
$tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libelle, d.fk_region as region_id, r.nom as region, p.code as country_code, p.libelle as pays, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1";
$tabsql[3] = "SELECT r.rowid as rowid, code_region as code, nom as libelle, r.fk_pays as country_id, p.code as country_code, p.libelle as pays, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1";
$tabsql[4] = "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_pays";
$tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.civilite AS libelle, c.active FROM ".MAIN_DB_PREFIX."c_civilite AS c";
$tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a";
$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, p.code as pays_code, p.libelle as pays, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_pays as p WHERE a.fk_pays=p.rowid and p.active=1";
$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, p.code as country_code, p.libelle as pays, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_pays as p WHERE a.fk_pays=p.rowid and p.active=1";
$tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent";
$tabsql[9] = "SELECT code_iso as code, label, unicode, active FROM ".MAIN_DB_PREFIX."c_currencies";
$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, p.libelle as pays, p.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
$tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
$tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c';
$tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c";
$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, p.code as pays_code, p.libelle as pays, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1";
$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, p.code as country_code, p.libelle as pays, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1";
$tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format";
$tabsql[16]= "SELECT code, label as libelle, active FROM ".MAIN_DB_PREFIX."c_prospectlevel";
$tabsql[17]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_fees";
@ -151,7 +151,7 @@ $tabsql[20]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREF
$tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_availability AS c";
$tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
$tabsql[23]= "SELECT rowid as rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number as accountancy_code, account_parent, label, active FROM ".MAIN_DB_PREFIX."accountingaccount";
$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, p.code as pays_code, p.libelle as pays, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_pays as p WHERE s.fk_pays=p.rowid and p.active=1";
$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, p.code as country_code, p.libelle as pays, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_pays as p WHERE s.fk_pays=p.rowid and p.active=1";
// Critere de tri du dictionnaire
$tabsqlsort=array();
@ -183,7 +183,7 @@ $tabsqlsort[24]="pcg_version ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire
$tabfield=array();
$tabfield[1] = "code,libelle,pays";
$tabfield[2] = "code,libelle,region_id,region,pays"; // "code,libelle,region,pays_code-pays"
$tabfield[2] = "code,libelle,region_id,region,pays"; // "code,libelle,region,country_code-pays"
$tabfield[3] = "code,libelle,country_id,pays";
$tabfield[4] = "code,libelle";
$tabfield[5] = "code,libelle";
@ -673,8 +673,8 @@ if ($id)
if ($sortfield)
{
// If sort order is "pays", we use pays_code instead
if ($sortfield == 'pays') $sortfield='pays_code';
// If sort order is "pays", we use country_code instead
if ($sortfield == 'pays') $sortfield='country_code';
$sql.= " ORDER BY ".$sortfield;
if ($sortorder)
{
@ -923,14 +923,14 @@ if ($id)
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='pays') {
if (empty($obj->pays_code))
if (empty($obj->country_code))
{
$valuetoshow='-';
}
else
{
$key=$langs->trans("Country".strtoupper($obj->pays_code));
$valuetoshow=($key != "Country".strtoupper($obj->pays_code)?$obj->pays_code." - ".$key:$obj->pays);
$key=$langs->trans("Country".strtoupper($obj->country_code));
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->pays);
}
}
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm' || $fieldlist[$field] == 'deductible') {
@ -1196,7 +1196,7 @@ function fieldList($fieldlist,$obj='',$tabname='')
if ($fieldlist[$field] == 'pays') {
if (in_array('region_id',$fieldlist)) { print '<td>&nbsp;</td>'; continue; } // For region page, we do not show the country input
print '<td>';
print $form->select_country((! empty($obj->pays_code)?$obj->pays_code:(! empty($obj->pays)?$obj->pays:'')), 'pays', '', 28);
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->pays)?$obj->pays:'')), 'pays', '', 28);
print '</td>';
}
elseif ($fieldlist[$field] == 'country_id') {

View File

@ -205,7 +205,7 @@ if ($action == 'create')
$object->note = $_POST["note"];
}
// On positionne country_id, pays_code et libelle du pays choisi
// On positionne country_id, country_code et libelle du pays choisi
$object->country_id = (GETPOST('country_id','int') ? GETPOST('country_id','int') : $mysoc->country_id);
if ($object->country_id)
{
@ -333,7 +333,7 @@ elseif ($action == 'edit')
$object->fax = $_POST["fax"];
$object->note = $_POST["note"];
// On positionne country_id, pays_code et libelle du pays choisi
// On positionne country_id, country_code et libelle du pays choisi
if ($object->country_id)
{
$tmparray=getCountry($object->country_id,'all');

View File

@ -71,7 +71,6 @@ class Account extends CommonObject
var $state;
var $fk_pays; // deprecated
var $pays_code; // deprecated
var $pays; // deprecated
var $country_id;
var $country_code;
@ -661,7 +660,6 @@ class Account extends CommonObject
$this->state = $obj->state;
$this->fk_pays = $obj->country_id; // deprecated
$this->pays_code = $obj->country_code; // deprecated
$this->pays = $obj->country; // deprecated
$this->country_id = $obj->country_id;
$this->country_code = $obj->country_code;

View File

@ -2124,12 +2124,12 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
}
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
}
print '<tr><td>'.$langs->trans('TotalTTC').'</td><td colspan="2">'.price($objectsrc->total_ttc)."</td></tr>";
}
@ -2980,13 +2980,13 @@ else if ($id > 0 || ! empty($ref))
// Amount Local Taxes
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>';
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
print '<td align="right" colspan="2" nowrap>'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>';
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
print '<td align="right" colspan="2" nowrap>'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}

View File

@ -100,7 +100,7 @@ $tva = new Tva($db);
$textprevyear="<a href=\"index.php?year=" . ($year_current-1) . "\">".img_previous()."</a>";
$textnextyear=" <a href=\"index.php?year=" . ($year_current+1) . "\">".img_next()."</a>";
print_fiche_titre($langs->transcountry("LT2",$mysoc->pays_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear");
print_fiche_titre($langs->transcountry("LT2",$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear");
print $langs->trans("VATReportBuildWithOptionDefinedInModule").'<br>';
print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')<br>';
@ -108,10 +108,10 @@ print '<br>';
print '<table width="100%" class="nobordernopadding">';
print '<tr><td>';
print_titre($langs->transcountry("LT2Summary",$mysoc->pays_code));
print_titre($langs->transcountry("LT2Summary",$mysoc->country_code));
print '</td><td width="5">&nbsp;</td><td>';
print_titre($langs->transcountry("LT2Paid",$mysoc->pays_code));
print_titre($langs->transcountry("LT2Paid",$mysoc->country_code));
print '</td></tr>';
print '<tr><td width="50%" valign="top">';

View File

@ -459,7 +459,6 @@ abstract class ActionsContactCardCommon
{
dol_print_error($this->db);
}
$this->object->pays_code = $obj->code;
$this->object->pays = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
$this->object->country_code = $obj->code;
$this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;

View File

@ -54,7 +54,6 @@ class Contact extends CommonObject
var $state; // Label of department
var $fk_pays; // deprecated
var $pays_code; // deprecated
var $pays; // deprecated
var $country_id; // Id of country
var $country_code; // Code of country
@ -525,7 +524,6 @@ class Contact extends CommonObject
$this->fk_pays = $obj->country_id;
$this->country_id = $obj->country_id;
$this->pays_code = $obj->country_id?$obj->country_code:'';
$this->country_code = $obj->country_id?$obj->country_code:'';
$this->pays = ($obj->country_id > 0)?$langs->transnoentitiesnoconv("Country".$obj->country_code):'';
$this->country = ($obj->country_id > 0)?$langs->transnoentitiesnoconv("Country".$obj->country_code):'';

View File

@ -585,7 +585,6 @@ else
if (isset($_POST["country_id"]) || $object->country_id)
{
$tmparray=getCountry($object->country_id,'all');
$object->pays_code = $tmparray['code'];
$object->pays = $tmparray['label'];
$object->country_code = $tmparray['code'];
$object->country = $tmparray['label'];

View File

@ -116,7 +116,7 @@ $form=new Form($db);
$sql = "SELECT s.rowid as socid, s.nom as name,";
$sql.= " p.rowid as cidp, p.name as lastname, p.firstname, p.poste, p.email,";
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
$sql.= " cp.code as pays_code";
$sql.= " cp.code as country_code";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as cp ON cp.rowid = p.fk_pays";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
@ -368,16 +368,16 @@ if ($result)
if ($view == 'phone')
{
// Phone
print '<td>'.dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
print '<td>'.dol_print_phone($obj->phone,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
// Phone mobile
print '<td>'.dol_print_phone($obj->phone_mobile,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
print '<td>'.dol_print_phone($obj->phone_mobile,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
// Fax
print '<td>'.dol_print_phone($obj->fax,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
print '<td>'.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
}
else
{
// Phone
print '<td>'.dol_print_phone($obj->phone,$obj->pays_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
print '<td>'.dol_print_phone($obj->phone,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
// EMail
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
}

View File

@ -54,8 +54,8 @@ $v->setPhoneNumber($contact->phone_pro, "PREF;WORK;VOICE");
$v->setPhoneNumber($contact->phone_mobile, "CELL;VOICE");
$v->setPhoneNumber($contact->fax, "WORK;FAX");
$v->setAddress("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL");
$v->setLabel("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->pays_code?$contact->pays:''), "WORK");
$v->setAddress("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code?$contact->pays:''), "WORK;POSTAL");
$v->setLabel("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code?$contact->pays:''), "WORK");
$v->setEmail($contact->email,'internet,pref');
$v->setNote($contact->note);
@ -67,7 +67,7 @@ if ($company->id)
$v->setURL($company->url, "WORK");
if (! $contact->phone_pro) $v->setPhoneNumber($company->tel, "WORK;VOICE");
if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX");
if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->pays_code, "WORK;POSTAL");
if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country_code, "WORK;POSTAL");
if ($company->email != $contact->email) $v->setEmail($company->email,'internet');
// Si contact lie a un tiers non de type "particulier"
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom);

View File

@ -293,7 +293,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($targetcontact->getFullName($outputlangs,1));
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcontact))."\n";
// Country
if ($targetcontact->country_code && $targetcontact->country_code != $sourcecompany->pays_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->pays_code))."\n";
if ($targetcontact->country_code && $targetcontact->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->pays_code))."\n";
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
@ -311,7 +311,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
{
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcompany))."\n";
// Country
if ($targetcompany->country_code && $targetcompany->country_code != $sourcecompany->pays_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->pays_code))."\n";
if ($targetcompany->country_code && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->pays_code))."\n";
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{

View File

@ -67,7 +67,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
// Recupere emmetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<27>tait pas d<>fini
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
// Defini position des colonnes
$this->line_height = 5;

View File

@ -82,7 +82,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
// Recupere emetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'etait pas defini
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
}

View File

@ -541,7 +541,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('','', $default_font_size - 1);
// If France, show VAT mention if not applicable
if ($this->emetteur->pays_code == 'FR' && $this->franchise == 1)
if ($this->emetteur->country_code == 'FR' && $this->franchise == 1)
{
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
@ -740,7 +740,7 @@ class pdf_einstein extends ModelePDFCommandes
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -774,7 +774,7 @@ class pdf_einstein extends ModelePDFCommandes
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -832,7 +832,7 @@ class pdf_einstein extends ModelePDFCommandes
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' ';
if ($localtax_type == '7') { // amount on order
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -872,7 +872,7 @@ class pdf_einstein extends ModelePDFCommandes
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
if ($localtax_type == '7') { // amount on order
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);

View File

@ -65,7 +65,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
// Recupere emmetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // By default if not defined
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
}

View File

@ -64,7 +64,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
// Recupere emmetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // By default if not defined
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
// Defini position des colonnes
$this->posxdesc=$this->marge_gauche+1;

View File

@ -82,7 +82,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
// Recupere emetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'etait pas defini
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // Par defaut, si n'etait pas defini
}

View File

@ -668,7 +668,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('','', $default_font_size - 1);
// If France, show VAT mention if not applicable
if ($this->emetteur->pays_code == 'FR' && $this->franchise == 1)
if ($this->emetteur->country_code == 'FR' && $this->franchise == 1)
{
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
@ -872,7 +872,7 @@ class pdf_crabe extends ModelePDFFactures
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -907,7 +907,7 @@ class pdf_crabe extends ModelePDFFactures
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -965,7 +965,7 @@ class pdf_crabe extends ModelePDFFactures
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' ';
if ($localtax_type == '7') { // amount on order
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -1006,7 +1006,7 @@ class pdf_crabe extends ModelePDFFactures
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
if ($localtax_type == '7') { // amount on order
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);

View File

@ -77,7 +77,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Recupere emmetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<27>tait pas d<>fini
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
// Defini position des colonnes
$this->posxdesc=$this->marge_gauche+1;

View File

@ -73,7 +73,7 @@ class pdf_baleine extends ModelePDFProjects
// Recupere emmetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<27>tait pas d<>fini
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
// Defini position des colonnes
$this->posxref=$this->marge_gauche+1;

View File

@ -82,7 +82,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
// Recupere emetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'etait pas defini
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
}

View File

@ -537,7 +537,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('','', $default_font_size - 1);
// If France, show VAT mention if not applicable
if ($this->emetteur->pays_code == 'FR' && $this->franchise == 1)
if ($this->emetteur->country_code == 'FR' && $this->franchise == 1)
{
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);
@ -769,7 +769,7 @@ class pdf_azur extends ModelePDFPropales
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -804,7 +804,7 @@ class pdf_azur extends ModelePDFPropales
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -862,7 +862,7 @@ class pdf_azur extends ModelePDFPropales
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT1".$mysoc->country_code).' ';
if ($localtax_type == '7') { // amount on order
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@ -902,7 +902,7 @@ class pdf_azur extends ModelePDFPropales
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat = $outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
if ($localtax_type == '7') { // amount on order
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);

View File

@ -586,7 +586,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$tvakey=str_replace('*','',$tvakey);
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
}
$totalvat =$outputlangs->transnoentities("TotalLT2".$mysoc->pays_code).' ';
$totalvat =$outputlangs->transnoentities("TotalLT2".$mysoc->country_code).' ';
$totalvat.=vatrate($tvakey,1).$tvacompl;
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);

View File

@ -491,7 +491,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('','', $default_font_size - 1);
// If France, show VAT mention if not applicable
/*if ($this->emetteur->pays_code == 'FR' && $this->franchise == 1)
/*if ($this->emetteur->country_code == 'FR' && $this->franchise == 1)
{
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy);

View File

@ -17,6 +17,6 @@
-- ========================================================================
ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_code (code);
ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_code_iso (code_iso);
ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_country_code (code);
ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_country_code_iso (code_iso);
ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_libelle (libelle);

View File

@ -116,7 +116,7 @@ function html_print_paypal_footer($fromcompany,$langs)
$line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->currency);
}
// Prof Id 1
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || ! $fromcompany->idprof2))
{
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->country_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];

View File

@ -280,7 +280,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->pays_code=$tmp['code']; // deprecated
$this->country=$tmp['label'];
$this->country_code=$tmp['code'];

View File

@ -775,7 +775,7 @@ if (GETPOST("source") == 'contractline' && $valid)
$shipToStreet=$contract->thirdparty->address;
$shipToCity=$contract->thirdparty->town;
$shipToState=$contract->thirdparty->state_code;
$shipToCountryCode=$contract->thirdparty->pays_code;
$shipToCountryCode=$contract->thirdparty->country_code;
$shipToZip=$contract->thirdparty->zip;
$shipToStreet2='';
$phoneNum=$contract->thirdparty->tel;

View File

@ -558,7 +558,7 @@ abstract class ActionsCardCommon
$this->tpl['checksuppliercode'] = $this->object->check_codefournisseur();
$this->tpl['address'] = dol_nl2br($this->object->address);
$img=picto_from_langcode($this->object->pays_code);
$img=picto_from_langcode($this->object->country_code);
if ($this->object->isInEEC()) $this->tpl['country'] = $form->textwithpicto(($img?$img.' ':'').$this->object->country,$langs->trans("CountryIsInEEC"),1,0);
$this->tpl['country'] = ($img?$img.' ':'').$this->object->country;
@ -701,7 +701,7 @@ abstract class ActionsCardCommon
$this->object->localtax1_assuj = $_POST["localtax1assuj_value"];
$this->object->localtax2_assuj = $_POST["localtax2assuj_value"];
// We set country_id, and pays_code label of the chosen country
// We set country_id, and country_code label of the chosen country
if ($this->object->country_id)
{
$tmparray=getCountry($this->object->country_id,'all',$this->db,$langs,0);

View File

@ -41,7 +41,6 @@ class Address
var $zip;
var $town;
var $country_id;
var $pays_code; // deprecated
var $country_code;
var $tel; // deprecated
var $phone;
@ -301,7 +300,6 @@ class Address
$line->note = $objp->note;
// deprecated
$line->pays_code = $line->country_code;
$line->pays = $line->country;
$line->tel = $line->phone;

View File

@ -60,7 +60,6 @@ class Societe extends CommonObject
var $departement_code; // deprecated
var $departement; // deprecated
var $pays_code; // deprecated
var $pays; // deprecated
var $country_id;
var $country_code;
@ -757,7 +756,6 @@ class Societe extends CommonObject
$this->town = $obj->town;
$this->country_id = $obj->country_id;
$this->pays_code = $obj->country_id?$obj->country_code:''; // TODO obsolete
$this->country_code = $obj->country_id?$obj->country_code:'';
$this->pays = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->trans('Country'.$obj->country_code):$obj->country):''; // TODO obsolete
$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->trans('Country'.$obj->country_code):$obj->country):'';
@ -2434,7 +2432,6 @@ class Societe extends CommonObject
$this->address=$member->address;
$this->zip=$member->zip;
$this->town=$member->town;
$this->pays_code=$member->country_code; // TODO obsolete
$this->country_code=$member->country_code;
$this->country_id=$member->country_id;
$this->tel=$member->phone; // deprecated
@ -2521,7 +2518,6 @@ class Societe extends CommonObject
}
}
$this->country_id=$country_id;
$this->pays_code=$country_code; // TODO deprecated
$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;

View File

@ -1114,7 +1114,7 @@ else
$object->localtax1_assuj = GETPOST('localtax1assuj_value');
$object->localtax2_assuj = GETPOST('localtax2assuj_value');
// We set country_id, and pays_code label of the chosen country
// We set country_id, and country_code label of the chosen country
// TODO move to DAO class
if ($object->country_id)
{

View File

@ -535,7 +535,6 @@ function getContactsForThirdParty($authentication,$idthirdparty)
'fk_pays' => $contact->fk_pays?$contact->fk_pays:'',
'country_id' => $contact->country_id?$contact->country_id:'',
'pays_code' => $contact->pays_code?$contact->pays_code:'',
'country_code' => $contact->country_code?$contact->country_code:'',
'pays' => $contact->pays?$contact->pays:'',
'country' => $contact->country?$contact->country:'',

View File

@ -199,7 +199,6 @@ if ($result >= 0)
$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->pays_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code']; // deprecated
$member->country_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code'];
$member->phone=$ldapuser[$conf->global->LDAP_FIELD_PHONE];