Merge pull request #10926 from joseplluis/patch-1

FIX filter by name_alias field on fetch
This commit is contained in:
Laurent Destailleur 2019-03-31 18:55:58 +02:00 committed by GitHub
commit 61fad96bcb
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)."'";