From 46a5d637aa17c74f92cd5a5214330552c4c21d5d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Mar 2010 01:46:18 +0000 Subject: [PATCH] Fix: Error in total --- htdocs/product/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 88c4158617a..f80815a1ed6 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -136,20 +136,24 @@ if ($conf->service->enabled) $statServices.= ''.$langs->trans("ServicesOnSell").''.round($prodser[1][1]).''; $statServices.= ""; } +$total=0; if ($type == '0') { print $statProducts; + $total=round($prodser[0][0])+round($prodser[0][1]); } else if ($type == '1') { print $statServices; + $total=round($prodser[1][0])+round($prodser[1][1]); } else { print $statProducts.$statServices; + $total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[0][0])+round($prodser[0][1]); } print ''.$langs->trans("Total").''; -print round($prodser[1][0])+round($prodser[1][1])+round($prodser[0][0])+round($prodser[0][1]); +print $total; print ''; print '';