diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php index f59cb8b6e26..57656915d62 100644 --- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -96,11 +96,11 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('supplier_order').")"; - $sql .= " AND c.fk_statut = ".CommandeFournisseur::STATUS_ORDERSENT; + $sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")"; if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($user->socid) $sql .= " AND s.rowid = ".$user->socid; - if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC "; - else $sql .= " ORDER BY c.date_livraison ASC, c.fk_statut ASC "; + if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC"; + else $sql .= " ORDER BY c.date_livraison ASC, c.fk_statut ASC"; $sql .= $this->db->plimit($max, 0); $result = $this->db->query($sql); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 13c1e966c6d..2bc539ea07e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2897,7 +2897,7 @@ class CommandeFournisseur extends CommonOrder } $sql .= $clause." c.entity = ".$conf->entity; if ($mode === 'awaiting') { - $sql .= " AND c.fk_statut = ".self::STATUS_ORDERSENT; + $sql .= " AND c.fk_statut IN (".self::STATUS_ORDERSENT.", ".self::STATUS_RECEIVED_PARTIALLY.")"; } else { $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; } @@ -2918,7 +2918,7 @@ class CommandeFournisseur extends CommonOrder if ($mode === 'awaiting') { $response->label = $langs->trans("SuppliersOrdersAwaitingReception"); $response->labelShort = $langs->trans("AwaitingReception"); - $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=3&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=3,4&mainmenu=commercial&leftmenu=orders_suppliers'; } while ($obj = $this->db->fetch_object($resql)) @@ -3084,7 +3084,7 @@ class CommandeFournisseur extends CommonOrder $now = dol_now(); $date_to_test = empty($this->date_delivery) ? $this->date_commande : $this->date_delivery; - return ($this->statut > 0 && $this->statut < 4) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); + return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); } /** diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 5ff7da8a9f0..ad4662a156c 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2001,9 +2001,9 @@ if ($action == 'create') if ($object->methode_commande_id > 0) { print '