FIX: postgresql: rename the oly column with uppercase characters to lowercase
This commit is contained in:
parent
2a85a32659
commit
fdb6ebe80e
@ -2056,7 +2056,7 @@ CREATE TABLE `llx_c_holiday_types` (
|
||||
`label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`affect` int(11) NOT NULL,
|
||||
`delay` int(11) NOT NULL,
|
||||
`newByMonth` double(8,5) NOT NULL DEFAULT 0.00000,
|
||||
`newbymonth` double(8,5) NOT NULL DEFAULT 0.00000,
|
||||
`fk_country` int(11) DEFAULT NULL,
|
||||
`active` int(11) DEFAULT 1,
|
||||
PRIMARY KEY (`rowid`),
|
||||
|
||||
@ -1448,7 +1448,7 @@ class Holiday extends CommonObject
|
||||
|
||||
// Update each user counter
|
||||
foreach ($users as $userCounter) {
|
||||
$nbDaysToAdd = (isset($typeleaves[$userCounter['type']]['newByMonth']) ? $typeleaves[$userCounter['type']]['newByMonth'] : 0);
|
||||
$nbDaysToAdd = (isset($typeleaves[$userCounter['type']]['newbymonth']) ? $typeleaves[$userCounter['type']]['newbymonth'] : 0);
|
||||
if (empty($nbDaysToAdd)) {
|
||||
continue;
|
||||
}
|
||||
@ -2097,7 +2097,7 @@ class Holiday extends CommonObject
|
||||
$num = $this->db->num_rows($result);
|
||||
if ($num) {
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
$types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newByMonth'=>$obj->newbymonth);
|
||||
$types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newbymonth'=>$obj->newbymonth);
|
||||
}
|
||||
|
||||
return $types;
|
||||
|
||||
@ -25,12 +25,12 @@
|
||||
--
|
||||
|
||||
-- Generic to all countries
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country, active) values ('LEAVE_SICK', 'Sick leave', 0, 0, 0, NULL, 1);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country, active) values ('LEAVE_OTHER', 'Other leave', 0, 0, 0, NULL, 1);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newbymonth, fk_country, active) values ('LEAVE_SICK', 'Sick leave', 0, 0, 0, NULL, 1);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newbymonth, fk_country, active) values ('LEAVE_OTHER', 'Other leave', 0, 0, 0, NULL, 1);
|
||||
|
||||
-- Not enabled by default, we prefer to have an entrey dedicated to country
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country, active) values ('LEAVE_PAID', 'Paid vacation', 1, 7, 0, NULL, 0);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newbymonth, fk_country, active) values ('LEAVE_PAID', 'Paid vacation', 1, 7, 0, NULL, 0);
|
||||
|
||||
-- Leaves specific to France
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country, active) values ('LEAVE_RTT_FR', 'RTT' , 1, 7, 0.83, 1, 1);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newByMonth, fk_country, active) values ('LEAVE_PAID_FR', 'Paid vacation', 1, 30, 2.08334, 1, 1);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newbymonth, fk_country, active) values ('LEAVE_RTT_FR', 'RTT' , 1, 7, 0.83, 1, 1);
|
||||
insert into llx_c_holiday_types(code, label, affect, delay, newbymonth, fk_country, active) values ('LEAVE_PAID_FR', 'Paid vacation', 1, 30, 2.08334, 1, 1);
|
||||
|
||||
@ -626,3 +626,5 @@ CREATE TABLE llx_onlinesignature
|
||||
|
||||
ALTER TABLE llx_facture_fourn CHANGE COLUMN fk_mode_transport fk_transport_mode integer;
|
||||
|
||||
ALTER TABLE llx_c_holiday_types CHANGE COLUMN newByMonth newbymonth double(8,5) DEFAULT 0 NOT NULL;
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ CREATE TABLE llx_c_holiday_types (
|
||||
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
|
||||
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
|
||||
active integer DEFAULT 1
|
||||
) ENGINE=innodb;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user