From b806b85761ffa13be65ceaf97e5e92f0e414adf5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 29 Mar 2018 11:15:50 +0200 Subject: [PATCH 1/3] Fix field filtert is set twice --- htdocs/comm/action/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 54da96d7be0..c58c34f3d72 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -44,7 +44,7 @@ $month=GETPOST("month",'int'); $day=GETPOST("day",'int'); $pid=GETPOST("projectid",'int',3); $status=GETPOST("status",'alpha'); -$type=GETPOST('type'); +$type=GETPOST('type','alphanohtml'); $optioncss = GETPOST('optioncss','alpha'); // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('actioncode','array')) @@ -358,7 +358,7 @@ if ($resql) //if ($actioncode) $nav.=''; //if ($resourceid) $nav.=''; if ($filter) $nav.=''; - if ($filtert) $nav.=''; + //if ($filtert) $nav.=''; //if ($socid) $nav.=''; if ($showbirthday) $nav.=''; //if ($pid) $nav.=''; From 072b6c02c07f17398b434eec315a8f1f8570fc8f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 29 Mar 2018 13:25:03 +0200 Subject: [PATCH 2/3] FIX Test on mandatory status when closing proposal failed --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 60db23814b3..a71b0eb5304 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -613,7 +613,7 @@ if (empty($reshook)) // Close proposal else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel','alpha')) { - if (! GETPOST('statut','int')) { + if (! (GETPOST('statut','int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); $action = 'statut'; } else { From 188e5d286dcd5b8ec30708eafe31b2409ef6b6bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 29 Mar 2018 13:28:29 +0200 Subject: [PATCH 3/3] Fix statut --- htdocs/install/mysql/migration/repair.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index cdd5bb2b653..51c22c4dcb5 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -344,6 +344,8 @@ update llx_facturedet set product_type = 1 where product_type = 2; --update llx_commandedet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; --update llx_facturedet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; +update llx_propal set fk_statut = 1 where fk_statut = -1; + delete from llx_commande_fournisseur_dispatch where fk_commandefourndet = 0 or fk_commandefourndet IS NULL;