From 769fbdb429a325fb3ab47077b3491a9d798d75eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 May 2019 17:39:37 +0200 Subject: [PATCH] FIX the id was not loaded in fetch of accounting system --- htdocs/accountancy/class/accountancysystem.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index b70fa7238bb..95199ce9500 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -83,13 +83,13 @@ class AccountancySystem if ($rowid > 0 || $ref) { - $sql = "SELECT a.pcg_version, a.label, a.active"; + $sql = "SELECT a.rowid, a.pcg_version, a.label, a.active"; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system as a"; $sql .= " WHERE"; if ($rowid) { $sql .= " a.rowid = '" . $rowid . "'"; } elseif ($ref) { - $sql .= " a.pcg_version = '" . $ref . "'"; + $sql .= " a.pcg_version = '" . $this->db->escape($ref) . "'"; } dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);