Skip to content

Commit

Permalink
better fix
Browse files Browse the repository at this point in the history
  • Loading branch information
altairis-tof committed Jan 29, 2020
1 parent b04bb9e commit f1ea0ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/accountancy/class/accountingaccount.class.php
Expand Up @@ -171,14 +171,14 @@ public function fetch($rowid = null, $account_number = null, $limittocurrentchar
$sql .= " a.rowid = " . (int) $rowid;
} elseif ($account_number) {
$sql .= " a.account_number = '" . $this->db->escape($account_number) . "'";
$sql .= " AND a.entity = ".$conf->entity;
}
if (! empty($limittocurrentchart)) {
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')';
}
if (! empty($limittoachartaccount)) {
$sql .= " AND a.fk_pcg_version = '".$this->db->escape($limittoachartaccount)."'";
}
$sql.= " AND a.entity = ".$conf->entity;

dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);
Expand Down

0 comments on commit f1ea0ce

Please sign in to comment.