Skip to content
Snippets Groups Projects
Commit fad9fe71 authored by aspangaro's avatar aspangaro
Browse files

Sort out type & subtype by Chart of accounts

parent f9dc25cf
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,9 @@ class FormVentilation extends Form ...@@ -166,7 +166,9 @@ class FormVentilation extends Form
$out = ''; $out = '';
$sql = "SELECT DISTINCT pcg_type "; $sql = "SELECT DISTINCT pcg_type ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount "; $sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " ORDER BY pcg_type"; $sql .= " ORDER BY pcg_type";
dol_syslog(get_class($this) . "::select_pcgtype sql=" . $sql, LOG_DEBUG); dol_syslog(get_class($this) . "::select_pcgtype sql=" . $sql, LOG_DEBUG);
...@@ -220,7 +222,9 @@ class FormVentilation extends Form ...@@ -220,7 +222,9 @@ class FormVentilation extends Form
$out = ''; $out = '';
$sql = "SELECT DISTINCT pcg_subtype "; $sql = "SELECT DISTINCT pcg_subtype ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount "; $sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
$sql .= " ORDER BY pcg_subtype"; $sql .= " ORDER BY pcg_subtype";
dol_syslog(get_class($this) . "::select_pcgsubtype sql=" . $sql, LOG_DEBUG); dol_syslog(get_class($this) . "::select_pcgsubtype sql=" . $sql, LOG_DEBUG);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment