Skip to content
Snippets Groups Projects
Commit 21b639ef authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Fix issues with entity control

parent 620c8199
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