From f6b902ad365a64c6c9e1b3a229aa7805a668d7bf Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Thu, 3 Sep 2020 09:58:28 +0200 Subject: [PATCH 1/4] Show counts and add links in shipment area --- htdocs/expedition/index.php | 46 +++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 849e2054cd6..2a4e92d28d6 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Tobias Sekan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,7 +85,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= $clause." sc.fk_user = ".$user->id; $clause = " AND "; } -$sql .= $clause." e.fk_statut = 0"; +$sql .= $clause." e.fk_statut = ".Expedition::STATUS_DRAFT; $sql .= " AND e.entity IN (".getEntity('expedition').")"; if ($socid) $sql .= " AND c.fk_soc = ".$socid; @@ -96,7 +97,13 @@ if ($resql) print '
'; print ''; print ''; - print ''; + print ''; + print ''; if ($num) { @@ -156,13 +163,21 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); + + print '
'; + print '
'.$langs->trans("SendingsToValidate").'
'; + print $langs->trans("SendingsToValidate").' '; + print ''; + print ''.$num.''; + print ''; + print '
'; + print ''; + print ''; + print ''; + if ($num) { $i = 0; - print '
'; - print '
'; + print $langs->trans("LastSendings").' '; + print ''; + print ''.$num.''; + print ''; + print '
'; - print ''; - print ''; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -190,6 +205,8 @@ if ($resql) $i++; } print "
'.$langs->trans("LastSendings", $num).'

"; + } else { + print ''.$langs->trans("None").''; } $db->free($resql); } else dol_print_error($db); @@ -214,13 +231,20 @@ if ($resql) $langs->load("orders"); $num = $db->num_rows($resql); + + print '
'; + print ''; + print ''; + print ''; + print ''; + if ($num) { $i = 0; - print '
'; - print '
'.$langs->trans("OrdersToProcess").' '; + print ''; + print ''.$num.''; + print ''; + print '
'; - print ''; - print ''; while ($i < $num && $i < 10) { $obj = $db->fetch_object($resql); @@ -256,6 +280,8 @@ if ($resql) } print "
'.$langs->trans("OrdersToProcess").' '.$num.'

"; + } else { + print ''.$langs->trans("None").''; } } else dol_print_error($db); From a15de8467c07208eca8c479949e7d5ab3fcb0bc7 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Tue, 8 Sep 2020 11:25:21 +0200 Subject: [PATCH 2/4] fix wrong placed close table tag --- htdocs/expedition/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 2a4e92d28d6..eafb787c245 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -234,6 +234,7 @@ if ($resql) print '
'; print ''; + print ''; print ''; } - print "
'.$langs->trans("OrdersToProcess").' '; print ''; @@ -279,10 +280,12 @@ if ($resql) print '

"; } else { print ''.$langs->trans("None").''; } + + print "
"; + } else dol_print_error($db); From d6206b49df011669788e5373d4ceac6e5c56b7eb Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 8 Sep 2020 09:26:39 +0000 Subject: [PATCH 3/4] Fixing style errors. --- htdocs/expedition/index.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index eafb787c245..e2742f078bb 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -279,13 +279,11 @@ if ($resql) print ''; print ''; } - } else { print ''.$langs->trans("None").''; } print "
"; - } else dol_print_error($db); From 069242e7bce0da97bb96be7023ac27970d7e10ef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Sep 2020 19:38:48 +0200 Subject: [PATCH 4/4] Update index.php --- htdocs/expedition/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index e2742f078bb..6f21683cc69 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -204,10 +204,10 @@ if ($resql) print ''; $i++; } - print "
"; } else { print ''.$langs->trans("None").''; } + print "
"; $db->free($resql); } else dol_print_error($db);