Problem on request for category on account

This commit is contained in:
Alexandre SPANGARO 2025-12-14 22:06:13 +01:00
parent ecfbc8293b
commit a9d41338d0

View file

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