Skip to content

Commit

Permalink
Merge branch 'aspangaro-develop-accounting3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 13, 2014
2 parents 64513c1 + de3d66e commit 1fad543
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
10 changes: 5 additions & 5 deletions htdocs/admin/dict.php
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/deplacement/class/deplacement.class.php
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/html.form.class.php
Expand Up @@ -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";

Expand Down
6 changes: 3 additions & 3 deletions htdocs/install/mysql/data/llx_c_type_fees.sql
Expand Up @@ -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);
3 changes: 3 additions & 0 deletions htdocs/install/mysql/migration/3.6.0-3.7.0.sql
Expand Up @@ -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;
12 changes: 7 additions & 5 deletions htdocs/install/mysql/tables/llx_c_type_fees.sql
@@ -1,6 +1,7 @@
-- ========================================================================
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
--
-- 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
Expand All @@ -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;

0 comments on commit 1fad543

Please sign in to comment.