From c389a43460238698cef2fa934fbfe1dd40a26d2d Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Thu, 15 Feb 2018 12:14:46 +0100 Subject: [PATCH] New: Add totals on orders supplier list --- htdocs/fourn/commande/list.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 731c26af038..15bd981f001 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2016-2018 Ferran Marcet * * 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 @@ -1150,6 +1150,26 @@ if ($resql) print "\n"; $i++; } + // Show total line + if (isset($totalarray['totalhtfield'])) + { + print ''; + $i=0; + while ($i < $totalarray['nbfield']) + { + $i++; + if ($i == 1) + { + if ($num < $limit) print ''.$langs->trans("Total").''; + else print ''.$langs->trans("Totalforthispage").''; + } + elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).''; + elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).''; + elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).''; + else print ''; + } + print ''; + } print "\n"; print ''; print "\n";