FIX Accountancy - SQL error on select journal on journal

This commit is contained in:
Alexandre SPANGARO 2021-08-16 07:57:40 +02:00
parent ef4468153d
commit ba12071ea3

View File

@ -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);
}