diff --git a/htdocs/compta/hrm.php b/htdocs/compta/hrm.php
index cd2d2b60f7ec731948ad5b6e04eb15de43f61882..c0b2afd38c8db330c1e2507caea35bd5b2ae0ab3 100644
--- a/htdocs/compta/hrm.php
+++ b/htdocs/compta/hrm.php
@@ -1,7 +1,7 @@
 <?php
-/* Copyright (C) 2011	   Dimitri Mouillard	<dmouillard@teclib.com>
- * Copyright (C) 2013-2014 Laurent Destailleur	<eldy@users.sourceforge.net>
- * Copyright (C) 2012	   Regis Houssin		<regis.houssin@capnetworks.com>
+/* Copyright (C) 2011		Dimitri Mouillard	<dmouillard@teclib.com>
+ * Copyright (C) 2013-2014	Laurent Destailleur	<eldy@users.sourceforge.net>
+ * Copyright (C) 2012-2014	Regis Houssin		<regis.houssin@capnetworks.com>
  *
  * 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 +117,7 @@ if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAI
 $sql.= " WHERE u.rowid = d.fk_user";
 $sql.= " AND d.entity = ".$conf->entity;
 if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
-if ($socid) $sql.= " AND d.fk_soc = ".$socid;
+if (!empty($socid)) $sql.= " AND d.fk_soc = ".$socid; // FIXME $socid is not defined
 $sql.= $db->order("d.tms","DESC");
 $sql.= $db->plimit($max, 0);