From ad62062cd533c5409a2e1846d4e8447c4dbc60eb Mon Sep 17 00:00:00 2001 From: jpb Date: Mon, 5 Jul 2021 08:55:03 +0200 Subject: [PATCH 1/6] add filter --- htdocs/commande/list.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 73413d1070f..3acae2f8180 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -494,7 +494,7 @@ if ($search_billed != '' && $search_billed >= 0) { $sql .= ' AND c.facture = '.((int) $search_billed); } if ($search_status <> '') { - if ($search_status < 4 && $search_status > -3) { + if ($search_status < 4 && $search_status > -4) { if ($search_status == 1 && empty($conf->expedition->enabled)) { $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated' } else { @@ -513,6 +513,12 @@ if ($search_status <> '') { //$sql.= ' AND c.facture = 0'; // invoice not created $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed } + if ($search_status == -4) // To bill + { + + $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process + } + } if ($search_datecloture_start) { @@ -675,6 +681,9 @@ if ($resql) { if ($search_status == -3) { $title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill'); } + if ($search_status == -4) { + $title .= ' - '.$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort"); + } $num = $db->num_rows($resql); @@ -1236,6 +1245,7 @@ if ($resql) { Commande::STATUS_SHIPMENTONPROCESS=>$langs->trans("StatusOrderSentShort"), Commande::STATUS_CLOSED=>$langs->trans("StatusOrderDelivered"), -3=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort").'+'.$langs->trans("StatusOrderDelivered"), + -4=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort"), Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort") ); print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100', 1); From bcb06d5c909664e6195acc395bddb23357ba0824 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 5 Jul 2021 07:40:44 +0000 Subject: [PATCH 2/6] Fixing style errors. --- htdocs/commande/list.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3acae2f8180..8971d942de6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -513,12 +513,9 @@ if ($search_status <> '') { //$sql.= ' AND c.facture = 0'; // invoice not created $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed } - if ($search_status == -4) // To bill - { - + if ($search_status == -4) { // To bill $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process } - } if ($search_datecloture_start) { From 1a919c9f2be724d0fdf31e52b216a7d214df6e90 Mon Sep 17 00:00:00 2001 From: jpb Date: Wed, 7 Jul 2021 08:35:31 +0200 Subject: [PATCH 3/6] change comment --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3acae2f8180..a0053f982de 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -513,7 +513,7 @@ if ($search_status <> '') { //$sql.= ' AND c.facture = 0'; // invoice not created $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed } - if ($search_status == -4) // To bill + if ($search_status == -4) // "To validate and in progress" { $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process From 89ffa85290c17d05bcf61e2b45660224c4957108 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 7 Jul 2021 06:40:12 +0000 Subject: [PATCH 4/6] Fixing style errors. --- htdocs/commande/list.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3c4cafd8a95..f8d4fdac1e2 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -514,8 +514,7 @@ if ($search_status <> '') { $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed } - if ($search_status == -4) // "To validate and in progress" - { + if ($search_status == -4) { // "To validate and in progress" $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process } } From 2e44acbc810ed679d8d67d81499b9c07bd3da5b4 Mon Sep 17 00:00:00 2001 From: jpb Date: Thu, 8 Jul 2021 16:43:05 +0200 Subject: [PATCH 5/6] update comment --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3c4cafd8a95..281aedb96c8 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -514,7 +514,7 @@ if ($search_status <> '') { $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed } - if ($search_status == -4) // "To validate and in progress" + if ($search_status == -4) // "validate and in progress" { $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process } From 327481dc78931f171f5735d2b84a5445628eaa16 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 8 Jul 2021 14:47:38 +0000 Subject: [PATCH 6/6] Fixing style errors. --- htdocs/commande/list.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index e704058f9b8..77eedcd3e34 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -515,8 +515,7 @@ if ($search_status <> '') { } - if ($search_status == -4) // "validate and in progress" - { + if ($search_status == -4) { // "validate and in progress" $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process } }