Browse Source

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

Laurent Destailleur 2 years ago
parent
commit
3278b7bc86
3 changed files with 15 additions and 3 deletions
  1. 1 1
      htdocs/blockedlog/README-fr.md
  2. 1 1
      htdocs/blockedlog/README.md
  3. 13 1
      htdocs/compta/facture/list.php

+ 1 - 1
htdocs/blockedlog/README-fr.md

@@ -4,7 +4,7 @@ LOG INALTERABLE
 ## Fonctionnalité
  
 Ce module trace, en temps réel, certains évènements métiers dans une log inaltérable (que vous ne pouvez pas modifier une fois enregistrés) de type blockchain. 
-Ce module est requis pour la compatibilité avec les exigences légales de certains pays (comme la France avec la loi Fincance 2016 - Norme NF535).
+Ce module est requis pour la compatibilité avec les exigences légales de certains pays (comme la France avec la loi Finance 2016 - Norme NF525).
 
 
 **Les évènements tracés de manière inaltérables sont:**

+ 1 - 1
htdocs/blockedlog/README.md

@@ -4,7 +4,7 @@ BLOCKED LOG
 ## Feature
  
 This module tracks, in real time, some events into a non reversible log (that you can't modify once recorded) into a block chain. 
-This module provides compatibility with requirements of laws of some countries (like France with the law Fincance 2016 - Norme NF535).
+This module provides compatibility with requirements of laws of some countries (like France with the law Finance 2016 - Norme NF525).
 
 
 **The tracked events are:**

+ 13 - 1
htdocs/compta/facture/list.php

@@ -1539,6 +1539,18 @@ if ($resql) {
 		$totalarray['val'] = array();
 		$totalarray['val']['f.total_ht'] = 0;
 		$totalarray['val']['f.total_ttc'] = 0;
+
+		$with_margin_info = false;
+		if (!empty($conf->margin->enabled) && (
+			!empty($arrayfields['total_pa']['checked'])
+			|| !empty($arrayfields['total_margin']['checked'])
+			|| !empty($arrayfields['total_margin_rate']['checked'])
+			|| !empty($arrayfields['total_mark_rate']['checked'])
+			)
+			) {
+			$with_margin_info = true;
+		}
+
 		while ($i < min($num, $limit)) {
 			$obj = $db->fetch_object($resql);
 
@@ -1624,7 +1636,7 @@ if ($resql) {
 			$facturestatic->alreadypaid = $paiement;
 
 			$marginInfo = array();
-			if (!empty($conf->margin->enabled)) {
+			if ($with_margin_info === true) {
 				$facturestatic->fetch_lines();
 				$marginInfo = $formmargin->getMarginInfosArray($facturestatic);
 			}