Skip to content
Snippets Groups Projects
Commit 85cc5cbf authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #5210 from simnandez/3.9

FIX issues with entity in leave creation
parents 7bbb3a7d 21b639ef
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
* Copyright (C) 2012-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
*
* 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
......@@ -117,7 +118,7 @@ class Holiday extends CommonObject
*/
function create($user, $notrigger=0)
{
global $conf, $langs;
global $conf;
$error=0;
$now=dol_now();
......@@ -137,7 +138,8 @@ class Holiday extends CommonObject
$sql.= "statut,";
$sql.= "fk_validator,";
$sql.= "fk_type,";
$sql.= "fk_user_create";
$sql.= "fk_user_create,";
$sql.= "entity";
$sql.= ") VALUES (";
$sql.= "'".$this->fk_user."',";
$sql.= " '".$this->db->idate($now)."',";
......@@ -148,7 +150,8 @@ class Holiday extends CommonObject
$sql.= " '1',";
$sql.= " '".$this->fk_validator."',";
$sql.= " '".$this->fk_type."',";
$sql.= " ".$user->id;
$sql.= " ".$user->id.",";
$sql.= " ".$conf->entity;
$sql.= ")";
$this->db->begin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment