From a9d41338d05fbd7b4c04fdefe5ff7abfb56ce6c1 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 14 Dec 2025 22:06:13 +0100 Subject: [PATCH] Problem on request for category on account --- htdocs/accountancy/class/accountancycategory.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 3c9881dcd9f..2c0d985e41e 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -443,10 +443,9 @@ class AccountancyCategory // extends CommonObject $sql = "SELECT t.rowid, t.account_number, t.label"; $sql .= " FROM ".$this->db->prefix()."accounting_account as t"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON t.fk_pcg_version = asy.pcg_version"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON t.fk_pcg_version = asy.pcg_version AND asy.rowid = ".((int) $pcgver); $sql .= " WHERE t.fk_accounting_category = ".((int) $id); $sql .= " AND t.entity = ".$conf->entity; - $sql .= " AND asy.rowid = ".((int) $pcgver); $this->lines_display = array();