Commit 39e694b76e13b725e0c1099cb21459d7ab18bb0c

Authored by Florian HENRY
1 parent fbc722cc
Exists in 3.5 and in 1 other branch 3.6

Oops, hard coded char of account...

accountingex/customer/liste.php
... ... @@ -122,7 +122,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product
122 122 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_sell = aa.account_number";
123 123 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
124 124 $sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation = 0";
125   -$sql .= " AND (accsys.rowid='2' OR p.accountancy_code_sell IS NULL)";
  125 +$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL)";
126 126 if (! empty($conf->multicompany->enabled)) {
127 127 $sql .= " AND f.entity = '" . $conf->entity . "'";
128 128 }
... ...
accountingex/supplier/liste.php
... ... @@ -124,7 +124,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product
124 124 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_buy = aa.account_number";
125 125 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
126 126 $sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation = 0";
127   -$sql .= " AND (accsys.rowid='2' OR p.accountancy_code_sell IS NULL)";
  127 +$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL)";
128 128 if (! empty($conf->multicompany->enabled)) {
129 129 $sql .= " AND f.entity = '" . $conf->entity . "'";
130 130 }
... ...