From 7a853e04089317911d2006f6dd725ebf3d7bcfce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Oct 2009 23:07:54 +0000 Subject: [PATCH] Fix: Bad request --- htdocs/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index aa9d5739ed6..ef7d7efe71f 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -838,7 +838,7 @@ class CommonObject $sql = 'SELECT sourceid, sourcetype, targetid, targettype'; $sql.= ' FROM '.MAIN_DB_PREFIX.'element_element'; $sql.= " WHERE (sourceid = '".$this->id."' AND sourcetype = 'invoice')"; - $sql.= " OR (targetid = '".$this->id."' AND targetid = 'invoice')"; + $sql.= " OR (targetid = '".$this->id."' AND targettype = 'invoice')"; dol_syslog("CommonObject::load_object_linked sql=".$sql); $resql = $this->db->query($sql); if ($resql)