diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 51b9c5b43bb..ed2ce1340c7 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -136,7 +136,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
{
foreach($extrafields->attribute_label as $key => $val)
{
- $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
+ if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
}
}
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 2495d512c55..99fdc6dde76 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -326,7 +326,7 @@ if ($id > 0)
print '
';
if ($action == 'editmode')
{
- $form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->mode_reglement_id,'mode_reglement_id', 'CRDT');
}
else
{
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index c9f534820fb..49d54dd63f8 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -2045,7 +2045,7 @@ if ($action == 'create')
print '';
print ' | ';
if ($action == 'editmode') {
- $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT');
} else {
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none');
}
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 27fc1821a03..da7855b961b 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2196,7 +2196,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '';
print ' | ';
if ($action == 'editmode') {
- $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT');
} else {
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none');
}
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index bbf5694fc2c..2d241ad6dcb 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -1809,10 +1809,10 @@ class FactureFournisseur extends CommonInvoice
$sql = "SELECT f.rowid as rowid, f.ref, f.fk_statut, f.type, f.paye, pf.fk_paiementfourn";
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf ON f.rowid = pf.fk_facturefourn";
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as ff ON (f.rowid = ff.fk_facture_source AND ff.type=".self::TYPE_REPLACEMENT.")";
$sql.= " WHERE f.entity = ".$conf->entity;
$sql.= " AND f.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")";
- $sql.= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de remplacement
+ $sql.= " AND NOT EXISTS (SELECT rowid from ".MAIN_DB_PREFIX."facture_fourn as ff WHERE f.rowid = ff.fk_facture_source";
+ $sql.= " AND ff.type=".self::TYPE_REPLACEMENT.")";
$sql.= " AND f.type != ".self::TYPE_CREDIT_NOTE; // Type non 2 si facture non avoir
if ($socid > 0) $sql.=" AND f.fk_soc = ".$socid;
$sql.= " ORDER BY f.ref";
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 8449181907c..732e408d66e 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -525,6 +525,7 @@ if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_request_author) $sql.=natural_search(array('u.lastname','u.firstname','u.login'), $search_request_author) ;
if ($search_billed != '' && $search_billed >= 0) $sql .= " AND cf.billed = ".$db->escape($search_billed);
+if ($search_product_category > 0) $sql.= " AND cp.fk_categorie = ".$search_product_category;
//Required triple check because statut=0 means draft filter
if (GETPOST('statut', 'intcomma') !== '')
|