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)
This commit is contained in:
Josep Lluís 2019-03-27 13:41:29 +01:00 committed by GitHub
parent 661a984b8e
commit 3d1ebb8379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
*
* 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)."'";