Skip to content

Commit

Permalink
Merge pull request #698 from grandoc/develop
Browse files Browse the repository at this point in the history
english language standardization
  • Loading branch information
eldy committed Feb 27, 2013
2 parents ed8a746 + 44683a0 commit 0a62832
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 32 deletions.
6 changes: 3 additions & 3 deletions htdocs/admin/company.php
Expand Up @@ -68,7 +68,7 @@
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN",$_POST["town"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP",$_POST["zipcode"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE",$_POST["state_id"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"],'chaine',0,'',$conf->entity);
Expand Down Expand Up @@ -296,7 +296,7 @@

$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$mysoc->country_code,'departement_id');
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id');
print '</td></tr>'."\n";

$var=!$var;
Expand Down Expand Up @@ -667,7 +667,7 @@

$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
if (! empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE);
else print '&nbsp;';
print '</td></tr>';

Expand Down
8 changes: 4 additions & 4 deletions htdocs/comm/prospect/list.php
Expand Up @@ -41,8 +41,8 @@
$stcomm = GETPOST("stcomm",'int');
$search_nom = GETPOST("search_nom");
$search_zipcode = GETPOST("search_zipcode");
$search_town = GETPOST("search_town");
$search_departement = GETPOST("search_departement");
$search_town = GETPOST("search_town");
$search_state = GETPOST("search_state");
$search_datec = GETPOST("search_datec");
$search_categ = GETPOST("search_categ",'int');
$catid = GETPOST("catid",'int');
Expand Down Expand Up @@ -195,7 +195,7 @@
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'";
if ($search_zipcode) $sql .= " AND s.zip LIKE '".$db->escape(strtolower($search_zipcode))."%'";
if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape(strtolower($search_town))."%'";
if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'";
if ($search_state) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_state))."%'";
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
// Insert levels filters
if ($search_levels)
Expand Down Expand Up @@ -318,7 +318,7 @@
print '<input type="text" class="flat" name="search_town" size="10" value="'.$search_town.'">';
print '</td>';
print '<td class="liste_titre" align="center">';
print '<input type="text" class="flat" name="search_departement" size="10" value="'.$search_departement.'">';
print '<input type="text" class="flat" name="search_state" size="10" value="'.$search_state.'">';
print '</td>';
print '<td align="center" class="liste_titre">';
print '<input class="flat" type="text" size="10" name="search_datec" value="'.$search_datec.'">';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/bank/bankid_fr.php
Expand Up @@ -65,7 +65,7 @@
$account->domiciliation = trim($_POST["domiciliation"]);
$account->proprio = trim($_POST["proprio"]);
$account->owner_address = trim($_POST["owner_address"]);
$account->fk_departement = trim($_POST["fk_departement"]);
$account->state_id = trim($_POST["state_id"]);
//$account->country_id = trim($_POST["country_id"]); // We do not change this.

if ($account->id)
Expand Down
25 changes: 9 additions & 16 deletions htdocs/compta/bank/class/account.class.php
Expand Up @@ -62,10 +62,6 @@ class Account extends CommonObject
var $proprio;
var $owner_address;


var $fk_departement; // deprecated
var $departement_code; // deprecated
var $departement; // deprecated
var $state_id;
var $state_code;
var $state;
Expand Down Expand Up @@ -351,7 +347,7 @@ function create()
// Clean parameters
if (! $this->min_allowed) $this->min_allowed=0;
if (! $this->min_desired) $this->min_desired=0;
$this->state_id = ($this->state_id?$this->state_id:$this->fk_departement);
$this->state_id = ($this->state_id?$this->state_id:$this->state_id);
$this->country_id = ($this->country_id?$this->country_id:$this->country_id);

// Check parameters
Expand Down Expand Up @@ -390,7 +386,7 @@ function create()
$sql.= ", min_allowed";
$sql.= ", min_desired";
$sql.= ", comment";
$sql.= ", fk_departement";
$sql.= ", state_id";
$sql.= ", fk_pays";
$sql.= ") VALUES (";
$sql.= "'".$this->db->idate($now)."'";
Expand Down Expand Up @@ -475,7 +471,7 @@ function update($user='')
// Clean parameters
if (! $this->min_allowed) $this->min_allowed=0;
if (! $this->min_desired) $this->min_desired=0;
$this->state_id = ($this->state_id?$this->state_id:$this->fk_departement);
$this->state_id = ($this->state_id?$this->state_id:$this->state_id);
$this->country_id = ($this->country_id?$this->country_id:$this->country_id);

// Check parameters
Expand Down Expand Up @@ -510,7 +506,7 @@ function update($user='')
$sql.= ",min_desired = '".price2num($this->min_desired)."'";
$sql.= ",comment = '".$this->db->escape($this->comment)."'";

$sql.= ",fk_departement = ".($this->state_id>0?"'".$this->state_id."'":"null");
$sql.= ",state_id = ".($this->state_id>0?"'".$this->state_id."'":"null");
$sql.= ",fk_pays = ".$this->country_id;

$sql.= " WHERE rowid = ".$this->id;
Expand Down Expand Up @@ -542,7 +538,7 @@ function update_bban($user='')
global $conf,$langs;

// Clean parameters
$this->state_id = ($this->state_id?$this->state_id:$this->fk_departement);
$this->state_id = ($this->state_id?$this->state_id:$this->state_id);
$this->country_id = ($this->country_id?$this->country_id:$this->country_id);

// Chargement librairie pour acces fonction controle RIB
Expand All @@ -568,7 +564,7 @@ function update_bban($user='')
$sql.= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
$sql.= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql.= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql.= ",fk_departement = ".($this->state_id>0?"'".$this->state_id."'":"null");
$sql.= ",state_id = ".($this->state_id>0?"'".$this->state_id."'":"null");
$sql.= ",fk_pays = ".$this->country_id;
$sql.= " WHERE rowid = ".$this->id;
$sql.= " AND entity = ".$conf->entity;
Expand Down Expand Up @@ -608,14 +604,14 @@ function fetch($id,$ref='')

$sql = "SELECT ba.rowid, ba.ref, ba.label, ba.bank, ba.number, ba.courant, ba.clos, ba.rappro, ba.url,";
$sql.= " ba.code_banque, ba.code_guichet, ba.cle_rib, ba.bic, ba.iban_prefix as iban,";
$sql.= " ba.domiciliation, ba.proprio, ba.owner_address, ba.fk_departement, ba.fk_pays as country_id,";
$sql.= " ba.domiciliation, ba.proprio, ba.owner_address, ba.state_id, ba.fk_pays as country_id,";
$sql.= " ba.account_number, ba.currency_code,";
$sql.= " ba.min_allowed, ba.min_desired, ba.comment,";
$sql.= ' p.code as country_code, p.libelle as country,';
$sql.= ' d.code_departement as state_code, d.nom as state';
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON ba.fk_pays = p.rowid';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON ba.fk_departement = d.rowid';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON ba.state_id = d.rowid';
$sql.= " WHERE entity = ".$conf->entity;
if ($id) $sql.= " AND ba.rowid = ".$id;
if ($ref) $sql.= " AND ba.ref = '".$this->db->escape($ref)."'";
Expand Down Expand Up @@ -650,10 +646,7 @@ function fetch($id,$ref='')
$this->proprio = $obj->proprio;
$this->owner_address = $obj->owner_address;

$this->fk_departement = $obj->fk_departement; // deprecated
$this->departement_code= $obj->state_code; // deprecated
$this->departement = $obj->state; // deprecated
$this->state_id = $obj->fk_departement;
$this->state_id = $obj->state_id;
$this->state_code = $obj->state_code;
$this->state = $obj->state;

Expand Down
8 changes: 4 additions & 4 deletions htdocs/compta/bank/fiche.php
Expand Up @@ -69,7 +69,7 @@

$account->currency_code = trim($_POST["account_currency_code"]);

$account->fk_departement = $_POST["account_departement_id"];
$account->state_id = $_POST["account_departement_id"];
$account->country_id = $_POST["account_country_id"];

$account->min_allowed = $_POST["account_min_allowed"];
Expand Down Expand Up @@ -140,7 +140,7 @@

$account->currency_code = trim($_POST["account_currency_code"]);

$account->state_id = $_POST["account_departement_id"];
$account->state_id = $_POST["account_state_id"];
$account->country_id = $_POST["account_country_id"];

$account->min_allowed = $_POST["account_min_allowed"];
Expand Down Expand Up @@ -282,7 +282,7 @@
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
if ($selectedcode)
{
$formcompany->select_departement(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:'',$selectedcode,'account_departement_id');
$formcompany->select_departement(isset($_POST["account_state_id"])?$_POST["account_state_id"]:'',$selectedcode,'account_state_id');
}
else
{
Expand Down Expand Up @@ -555,7 +555,7 @@
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
if ($selectedcode)
{
print $formcompany->select_state(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:$account->fk_departement,$selectedcode,'account_departement_id');
print $formcompany->select_state(isset($_POST["account_state_id"])?$_POST["account_state_id"]:$account->state_id,$selectedcode,'account_state_id');
}
else
{
Expand Down
8 changes: 4 additions & 4 deletions htdocs/compta/dons/fiche.php
Expand Up @@ -301,9 +301,9 @@

// Zip / Town
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectcountry_id','departement_id'),6);
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
print ' ';
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectcountry_id','departement_id'));
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectcountry_id','state_id'));
print '</tr>';

print "<tr>".'<td>'.$langs->trans("Country").'</td><td><input type="text" name="country" value="'.$_POST["country"].'" size="40"></td></tr>';
Expand Down Expand Up @@ -391,9 +391,9 @@

// Zip / Town
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectcountry_id','departement_id'),6);
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
print ' ';
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectcountry_id','departement_id'));
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectcountry_id','state_id'));
print '</tr>';

print "<tr>".'<td>'.$langs->trans("Country").'</td><td><input type="text" name="country" size="40" value="'.$don->country.'"></td></tr>';
Expand Down
2 changes: 2 additions & 0 deletions htdocs/install/mysql/migration/3.3.0-3.4.0.sql
Expand Up @@ -35,6 +35,7 @@ UPDATE llx_const set name='MAIN_INFO_SOCIETE_ADDRESS' where name='MAIN_INFO_SOCI
UPDATE llx_const set name='MAIN_INFO_SOCIETE_TOWN' where name='MAIN_INFO_SOCIETE_VILLE';
UPDATE llx_const set name='MAIN_INFO_SOCIETE_ZIP' where name='MAIN_INFO_SOCIETE_CP';
UPDATE llx_const set name='MAIN_INFO_SOCIETE_COUNTRY' where name='MAIN_INFO_SOCIETE_PAYS';
UPDATE llx_const set name='MAIN_INFO_SOCIETE_STATE' where name='MAIN_INFO_SOCIETE_DEPARTEMENT';

ALTER TABLE llx_user add COLUMN fk_user integer;

Expand Down Expand Up @@ -72,6 +73,7 @@ alter table llx_socpeople CHANGE COLUMN name lastname varchar(50);
alter table llx_socpeople CHANGE COLUMN ville town text;
alter table llx_socpeople CHANGE COLUMN cp zip varchar(10);
alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text;
alter table llx_bank_account CHANGE COLUMN fk_departement state_id varchar(50);
alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text;
alter table llx_societe_address CHANGE COLUMN ville town text;
alter table llx_societe_address CHANGE COLUMN cp zip varchar(10);
Expand Down

0 comments on commit 0a62832

Please sign in to comment.