From ba12071ea3ad98d97852a3a2098ece09cdfe1333 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 16 Aug 2021 07:57:40 +0200 Subject: [PATCH] FIX Accountancy - SQL error on select journal on journal --- htdocs/accountancy/class/bookkeeping.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index aeaa42154d8..8d8ba413f21 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1024,6 +1024,8 @@ class BookKeeping extends CommonObject $sqlwhere[] = $key.'\''.$this->db->idate($value).'\''; } elseif ($key == 't.credit' || $key == 't.debit') { $sqlwhere[] = natural_search($key, $value, 1, 1); + } elseif ($key == 't.code_journal' && !empty($value)) { + $sqlwhere[] = natural_search("t.code_journal", join(',', $value), 3, 1); } else { $sqlwhere[] = natural_search($key, $value, 0, 1); }