Skip to content

Commit

Permalink
Merge pull request #5210 from simnandez/3.9
Browse files Browse the repository at this point in the history
FIX issues with entity in leave creation
  • Loading branch information
eldy committed May 18, 2016
2 parents 7bbb3a7 + 21b639e commit 85cc5cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions htdocs/holiday/class/holiday.class.php
Expand Up @@ -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
Expand Down Expand Up @@ -117,7 +118,7 @@ function updateBalance()
*/
function create($user, $notrigger=0)
{
global $conf, $langs;
global $conf;
$error=0;

$now=dol_now();
Expand All @@ -137,7 +138,8 @@ function create($user, $notrigger=0)
$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)."',";
Expand All @@ -148,7 +150,8 @@ function create($user, $notrigger=0)
$sql.= " '1',";
$sql.= " '".$this->fk_validator."',";
$sql.= " '".$this->fk_type."',";
$sql.= " ".$user->id;
$sql.= " ".$user->id.",";
$sql.= " ".$conf->entity;
$sql.= ")";

$this->db->begin();
Expand Down

0 comments on commit 85cc5cb

Please sign in to comment.