From 3d1ebb8379e8f472e78e12a73692ced51f4fa4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Wed, 27 Mar 2019 13:41:29 +0100 Subject: [PATCH] FIX filter by name_alias field on fetch In fetch, when filtering by name_alias field, is used a wrong name of field (nom_alias) --- htdocs/societe/class/societe.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 31de0f24b20..9af346b35e3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -14,6 +14,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2017 Rui Strecht * Copyright (C) 2018 Philippe Grand + * Copyright (C) 2019 Josep Lluís Amador * * 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 @@ -1278,7 +1279,7 @@ class Societe extends CommonObject $sql .= ' WHERE s.entity IN ('.getEntity($this->element).')'; if ($rowid) $sql .= ' AND s.rowid = '.$rowid; if ($ref) $sql .= " AND s.nom = '".$this->db->escape($ref)."'"; - if ($ref_alias) $sql .= " AND s.nom_alias = '".$this->db->escape($ref_alias)."'"; + if ($ref_alias) $sql .= " AND s.name_alias = '".$this->db->escape($ref_alias)."'"; if ($ref_ext) $sql .= " AND s.ref_ext = '".$this->db->escape($ref_ext)."'"; if ($ref_int) $sql .= " AND s.ref_int = '".$this->db->escape($ref_int)."'"; if ($idprof1) $sql .= " AND s.siren = '".$this->db->escape($idprof1)."'";