From 5d55d75c8eabc079e3f42464f8357179e468efdd Mon Sep 17 00:00:00 2001 From: omogenot Date: Thu, 10 Apr 2025 12:50:24 +0200 Subject: [PATCH] FIX Extend late search option for open and awaiting supplier orders (#33810) * Create two alert levels Make search_status be 1,2 for regular late orders and 3,4 for order to be received late state. * Fix url late target On main screen, choosing late awaiting orders does not lead to a list of awaiting orders that are in alert. * Missing space --- htdocs/fourn/class/fournisseur.commande.class.php | 1 + htdocs/fourn/commande/list.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index dc94226663c..e501c9d0f21 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3465,6 +3465,7 @@ class CommandeFournisseur extends CommonOrder $response->label = $langs->trans("SuppliersOrdersAwaitingReception"); $response->labelShort = $langs->trans("AwaitingReception"); $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?search_status=3,4&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->url_late = DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&search_option=recv_late'; } while ($obj = $this->db->fetch_object($resql)) { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ec011d8d991..71723935bc5 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -149,6 +149,9 @@ $search_option = GETPOST('search_option', 'alpha'); if ($search_option == 'late') { $search_status = '1,2'; } +if ($search_option == 'recv_late') { + $search_status = '3,4'; +} $diroutputmassaction = $conf->fournisseur->commande->dir_output.'/temp/massgeneration/'.$user->id; @@ -1358,7 +1361,7 @@ if ($resql) { } // alert on late date $moreforfilter .= '
'; - $moreforfilter .= $langs->trans('Alert').' '; + $moreforfilter .= $langs->trans('Alert').' '; $moreforfilter .= '
'; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook