Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0

Conflicts:
	htdocs/compta/facture/stats/index.php
	htdocs/compta/prelevement/create.php
This commit is contained in:
Laurent Destailleur 2021-10-16 12:53:57 +02:00
commit 52890c64c1
2 changed files with 8 additions and 3 deletions

View File

@ -1454,6 +1454,10 @@ if ($id) {
print $tdsoffields;
// Line to enter new values
print '<!-- line to add new entry -->';
print '<tr class="oddeven nodrag nodrop nohover">';
$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 '<!-- line to add new entry -->';
print '<tr class="oddeven nodrag nodrop nohover">';
if (empty($reshook)) {
fieldList($fieldlist, $obj, $tabname[$id], 'add');

View File

@ -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