From 0a67614e7291a80da711f034da097ea648e79a5f Mon Sep 17 00:00:00 2001
From: Maxime Kohlhaas <maxime@atm-consulting.fr>
Date: Thu, 28 Apr 2016 09:10:22 +0200
Subject: [PATCH] Fix wrong qty total in ca by prod/serv report

---
 htdocs/compta/stats/cabyprodserv.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php
index e995b06aa6b..07727b02a81 100644
--- a/htdocs/compta/stats/cabyprodserv.php
+++ b/htdocs/compta/stats/cabyprodserv.php
@@ -177,6 +177,8 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
 
 // SQL request
 $catotal=0;
+$catotal_ht=0;
+$qtytotal=0;
 
 if ($modecompta == 'CREANCES-DETTES')
 {
@@ -386,6 +388,8 @@ if ($modecompta == 'CREANCES-DETTES')
 		// Total
 		print '<tr class="liste_total">';
 		print '<td>'.$langs->trans("Total").'</td>';
+		print '<td align="right">'.price($qtytotal).'</td>';
+		print '<td>&nbsp;</td>';
 		print '<td align="right">'.price($catotal_ht).'</td>';
 		print '<td align="right">'.price($catotal).'</td>';
 		print '<td>&nbsp;</td>';
-- 
GitLab