diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index f76d9843e02..066c5080f45 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1741,7 +1741,7 @@ class Holiday extends CommonObject /** - * Tous les types + * Return array with list of types * * @return boolean Return array with list of types */ diff --git a/htdocs/install/mysql/data/llx_c_holiday_type.sql b/htdocs/install/mysql/data/llx_c_holiday_type.sql new file mode 100644 index 00000000000..a0ee0b065b7 --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_holiday_type.sql @@ -0,0 +1,33 @@ +-- Copyright (C) 2001-2004 Rodolphe Quiedeville +-- Copyright (C) 2003 Jean-Louis Bergamo +-- Copyright (C) 2004-2009 Laurent Destailleur +-- Copyright (C) 2004 Benoit Mortier +-- Copyright (C) 2004 Guillaume Delecourt +-- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2012 Tommaso Basilici +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l'install et tous les sigles '--' sont supprimés. +-- + +insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country) values ('LEAVE_PAID', 'Paid vacation', 1, 7, 0, NULL); +insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country) values ('LEAVE_SICK', 'Sick leave', 0, 0, 0, NULL); +insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country) values ('LEAVE_OTHER','Other leave', 0, 0, 0, NULL); + +-- Leaves specific to France +insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country) values ('LEAVE_RTT', 'RTT' , 1, 7, 0.83, 1); + diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index a406ad9c6d0..79ab44a5aef 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -674,3 +674,17 @@ ALTER TABLE llx_c_stcomm ADD COLUMN picto varchar(128); -- New trigger for Supplier invoice unvalidation INSERT INTO llx_c_action_trigger (code, label, description, elementtype, rang) VALUES ('BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15); + + +DROP TABLE llx_holiday_types; + +CREATE TABLE llx_c_holiday_types ( + rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, + code varchar(16) NOT NULL, + label varchar(255) NOT NULL, + affect integer NOT NULL, + delay integer NOT NULL, + newByMonth double(8,5) DEFAULT 0 NOT NULL, + fk_country integer DEFAULT NULL +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_holiday_types.sql b/htdocs/install/mysql/tables/llx_c_holiday_types.sql similarity index 64% rename from htdocs/install/mysql/tables/llx_holiday_types.sql rename to htdocs/install/mysql/tables/llx_c_holiday_types.sql index d49a79f5748..dac1a10fdad 100755 --- a/htdocs/install/mysql/tables/llx_holiday_types.sql +++ b/htdocs/install/mysql/tables/llx_c_holiday_types.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2014 Laurent Destailleur +-- Copyright (C) 2014-2015 Laurent Destailleur -- -- 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 @@ -16,15 +16,12 @@ -- -- =================================================================== -CREATE TABLE llx_holiday_types ( +CREATE TABLE llx_c_holiday_types ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, - label varchar(45) NOT NULL, - description varchar(255) NOT NULL, - affect integer NOT NULL, - delay integer NOT NULL, - insertAt DATETIME NOT NULL, - updateAt DATETIME, - deleteAt DATETIME, - nbCongesDeducted varchar(255) NOT NULL, - nbCongesEveryMonth varchar(255) NOT NULL + code varchar(16) NOT NULL, + label varchar(255) NOT NULL, + affect integer NOT NULL, -- a request will change sold or not + delay integer NOT NULL, -- Minimum delay to be allowed to make request + newByMonth double(8,5) DEFAULT 0 NOT NULL, -- Amount of new days for each user each month + fk_country integer DEFAULT NULL -- This type is dedicated to a country ) ENGINE=innodb;