Introduce table llx_c_holiday_type

This commit is contained in:
Laurent Destailleur 2015-06-21 00:07:03 +02:00
parent a3a5b0d9b0
commit e0d1cbeb16
4 changed files with 56 additions and 12 deletions

View File

@ -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 * @return boolean Return array with list of types
*/ */

View File

@ -0,0 +1,33 @@
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
-- Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2012 Tommaso Basilici <t.basilici@19.coop>
--
-- 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 <http://www.gnu.org/licenses/>.
--
-- 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);

View File

@ -674,3 +674,17 @@ ALTER TABLE llx_c_stcomm ADD COLUMN picto varchar(128);
-- New trigger for Supplier invoice unvalidation -- 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); 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;

View File

@ -1,5 +1,5 @@
-- =================================================================== -- ===================================================================
-- Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2014-2015 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- 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 -- 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, rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
label varchar(45) NOT NULL, code varchar(16) NOT NULL,
description varchar(255) NOT NULL, label varchar(255) NOT NULL,
affect integer NOT NULL, affect integer NOT NULL, -- a request will change sold or not
delay integer NOT NULL, delay integer NOT NULL, -- Minimum delay to be allowed to make request
insertAt DATETIME NOT NULL, newByMonth double(8,5) DEFAULT 0 NOT NULL, -- Amount of new days for each user each month
updateAt DATETIME, fk_country integer DEFAULT NULL -- This type is dedicated to a country
deleteAt DATETIME,
nbCongesDeducted varchar(255) NOT NULL,
nbCongesEveryMonth varchar(255) NOT NULL
) ENGINE=innodb; ) ENGINE=innodb;