Explorar o código

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

Laurent Destailleur hai 1 ano
pai
achega
4f23141743

+ 3 - 2
htdocs/commande/list_det.php

@@ -10,7 +10,7 @@
  * Copyright (C) 2015       Marcos García           <marcosgdf@gmail.com>
  * Copyright (C) 2015       Jean-François Ferry     <jfefe@aternatik.fr>
  * Copyright (C) 2016-2021  Ferran Marcet           <fmarcet@2byte.es>
- * Copyright (C) 2018       Charlene Benke	        <charlie@patas-monkey.com>
+ * Copyright (C) 2018-2023  Charlene Benke	        <charlene@patas-monkey.com>
  * Copyright (C) 2021-2023 	Anthony Berton			<anthony.berton@bb2a.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -373,7 +373,7 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P
 // llxHeader('',$title,$help_url);
 
 $sql = 'SELECT';
-if ($sall || $search_product_category > 0 || $search_user > 0) {
+if ($sall || $search_product_category_array > 0 || $search_user > 0) {
 	$sql = 'SELECT DISTINCT';
 }
 $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
@@ -1486,6 +1486,7 @@ if ($resql) {
 
 	$totalarray = array();
 	$totalarray['nbfield'] = 0;
+	$subtotalarray['nbfield'] = 0;
 	$totalarray['val']['cdet.total_tva'] = 0;
 	$totalarray['val']['cdet.total_ttc'] = 0;
 	$imaxinloop = ($limit ? min($num, $limit) : $num);

+ 1 - 1
htdocs/core/tpl/list_print_subtotal.tpl.php

@@ -36,6 +36,7 @@ if (isset($totalarray['pos'])) {
 					print '</td>';
 					break;
 			}
+			$subtotalarray['val'][$totalarray['pos'][$j]] = 0;
 		} else {
 			if ($j == 1) {
 				print '<td>'.$langs->trans("SubTotal").'</td>';
@@ -43,7 +44,6 @@ if (isset($totalarray['pos'])) {
 				print '<td></td>';
 			}
 		}
-		$subtotalarray['val'][$totalarray['pos'][$j]] = 0;
 	}
 	print '</tr>';
 }