diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 39bb71e6e95..9933c94876d 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1454,6 +1454,10 @@ if ($id) {
print $tdsoffields;
+ // Line to enter new values
+ print '';
+ print '
';
+
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd')) {
@@ -1473,9 +1477,6 @@ if ($id) {
unset($fieldlist[2]); // Remove field ??? if dictionary Regions
}
- // Line to enter new values
- print '';
- print '
';
if (empty($reshook)) {
fieldList($fieldlist, $obj, $tabname[$id], 'add');
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index 5fe028e1268..a42003e3c2a 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -110,6 +110,10 @@ if ($mode == 'supplier') {
if ($object_status != '' && $object_status >= 0) {
$stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($object_status).')';
}
+ if (is_array($custcats) && !empty($custcats)) {
+ $stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_fournisseur as cat ON (f.fk_soc = cat.fk_soc)';
+ $stats->where .= ' AND cat.fk_categorie IN ('.$db->sanitize(implode(',', $custcats)).')';
+ }
}
// Build graphic number of object