better fix
This commit is contained in:
parent
b04bb9e392
commit
f1ea0ce5a1
@ -171,6 +171,7 @@ class AccountingAccount extends CommonObject
|
|||||||
$sql .= " a.rowid = " . (int) $rowid;
|
$sql .= " a.rowid = " . (int) $rowid;
|
||||||
} elseif ($account_number) {
|
} elseif ($account_number) {
|
||||||
$sql .= " a.account_number = '" . $this->db->escape($account_number) . "'";
|
$sql .= " a.account_number = '" . $this->db->escape($account_number) . "'";
|
||||||
|
$sql .= " AND a.entity = ".$conf->entity;
|
||||||
}
|
}
|
||||||
if (! empty($limittocurrentchart)) {
|
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) . ')';
|
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')';
|
||||||
@ -178,7 +179,6 @@ class AccountingAccount extends CommonObject
|
|||||||
if (! empty($limittoachartaccount)) {
|
if (! empty($limittoachartaccount)) {
|
||||||
$sql .= " AND a.fk_pcg_version = '".$this->db->escape($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);
|
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user