diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 7075b601877c0..6d98f2847c7f5 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -148,7 +148,7 @@ $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 country, 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, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectlevel"; -$tabsql[17]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_fees"; +$tabsql[17]= "SELECT id as rowid, code, label, accountancy_code, active FROM ".MAIN_DB_PREFIX."c_type_fees"; $tabsql[18]= "SELECT rowid as rowid, code, libelle, tracking, active FROM ".MAIN_DB_PREFIX."c_shipment_mode"; $tabsql[19]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_effectif"; $tabsql[20]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_input_method"; @@ -206,7 +206,7 @@ $tabfield[14]= "code,libelle,price,organization,country_id,country"; $tabfield[15]= "code,libelle,width,height,unit"; $tabfield[16]= "code,libelle,sortorder"; -$tabfield[17]= "code,libelle"; +$tabfield[17]= "code,label,accountancy_code"; $tabfield[18]= "code,libelle,tracking"; $tabfield[19]= "code,libelle"; $tabfield[20]= "code,libelle"; @@ -235,7 +235,7 @@ $tabfieldvalue[14]= "code,libelle,price,organization,country"; $tabfieldvalue[15]= "code,libelle,width,height,unit"; $tabfieldvalue[16]= "code,libelle,sortorder"; -$tabfieldvalue[17]= "code,libelle"; +$tabfieldvalue[17]= "code,label,accountancy_code"; $tabfieldvalue[18]= "code,libelle,tracking"; $tabfieldvalue[19]= "code,libelle"; $tabfieldvalue[20]= "code,libelle"; @@ -264,7 +264,7 @@ $tabfieldinsert[14]= "code,libelle,price,organization,fk_pays"; $tabfieldinsert[15]= "code,label,width,height,unit"; $tabfieldinsert[16]= "code,label,sortorder"; -$tabfieldinsert[17]= "code,libelle"; +$tabfieldinsert[17]= "code,label,accountancy_code"; $tabfieldinsert[18]= "code,libelle,tracking"; $tabfieldinsert[19]= "code,libelle"; $tabfieldinsert[20]= "code,libelle"; @@ -1082,7 +1082,7 @@ $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->$fieldlist[$field]); } - else if ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') + else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') { $langs->load('trips'); $key = $langs->trans(strtoupper($obj->code)); diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 0f17c543b9dd1..9eeacee312ca2 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -377,7 +377,7 @@ function listOfTypes($active=1) $ret=array(); - $sql = "SELECT id, code, libelle as label"; + $sql = "SELECT id, code, label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees"; $sql.= " WHERE active = ".$active; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9b57e57bc0b60..e6feed321f39a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -606,7 +606,7 @@ function load_cache_types_fees() if (count($this->cache_types_fees)) return 0; // Cache already load - $sql = "SELECT c.code, c.libelle as label"; + $sql = "SELECT c.code, c.label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees as c"; $sql.= " ORDER BY lower(c.libelle) ASC"; diff --git a/htdocs/install/mysql/data/llx_c_type_fees.sql b/htdocs/install/mysql/data/llx_c_type_fees.sql index 55c3268b63545..9e763bf5ba869 100644 --- a/htdocs/install/mysql/data/llx_c_type_fees.sql +++ b/htdocs/install/mysql/data/llx_c_type_fees.sql @@ -30,6 +30,6 @@ -- Type fees -- -insert into llx_c_type_fees (code,libelle,active) values ('TF_OTHER', 'Other', 1); -insert into llx_c_type_fees (code,libelle,active) values ('TF_TRIP', 'Trip', 1); -insert into llx_c_type_fees (code,libelle,active) values ('TF_LUNCH', 'Lunch', 1); +insert into llx_c_type_fees (code,label,active) values ('TF_OTHER', 'Other', 1); +insert into llx_c_type_fees (code,label,active) values ('TF_TRIP', 'Trip', 1); +insert into llx_c_type_fees (code,label,active) values ('TF_LUNCH', 'Lunch', 1); diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index f2d808cb2c174..8f78b14bde4f2 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -960,3 +960,6 @@ CREATE TABLE llx_holiday_types ( nbCongesDeducted varchar(255) NOT NULL, nbCongesEveryMonth varchar(255) NOT NULL ) ENGINE=innodb; + +ALTER TABLE llx_c_type_fees CHANGE libelle label VARCHAR(30); +ALTER TABLE llx_c_type_fees ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER label; diff --git a/htdocs/install/mysql/tables/llx_c_type_fees.sql b/htdocs/install/mysql/tables/llx_c_type_fees.sql index b19aae75e5aaa..145330012eb65 100644 --- a/htdocs/install/mysql/tables/llx_c_type_fees.sql +++ b/htdocs/install/mysql/tables/llx_c_type_fees.sql @@ -1,6 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville -- Copyright (C) 2004 Laurent Destailleur +-- Copyright (C) 2014 Alexandre Spangaro -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -19,9 +20,10 @@ create table llx_c_type_fees ( - id integer AUTO_INCREMENT PRIMARY KEY, - code varchar(12) NOT NULL, - libelle varchar(30), - active tinyint DEFAULT 1 NOT NULL, - module varchar(32) NULL + id integer AUTO_INCREMENT PRIMARY KEY, + code varchar(12) NOT NULL, + label varchar(30), + accountancy_code varchar(32) NULL, + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb;