diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 7cd3f61c16d..cac3d3e50e6 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1480,6 +1480,9 @@ if ($resql) { print ''; } print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Détail commande @@ -2100,10 +2103,9 @@ if ($resql) { print ''; } print ''; - } - - if (!$i) { - $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } print "\n"; @@ -2112,7 +2114,7 @@ if ($resql) { $subtotal += $obj->total_ht; $i++; } - + var_dump($totalarray['nbfield']); // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';