From 847870f29f820f362c51ec84f548c721c020cc90 Mon Sep 17 00:00:00 2001 From: Maximilien Rozniecki Date: Mon, 24 Apr 2023 18:07:44 +0200 Subject: [PATCH] more warning corrected --- htdocs/margin/agentMargins.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index e68576edd81..c209fb1f957 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -347,6 +347,12 @@ if ($result) { } // Show total margin + if (!isset($cumul_achat)) { + $cumul_achat = 0; + } + if (!isset($cumul_vente)) { + $cumul_vente = 0; + } $totalMargin = $cumul_vente - $cumul_achat; $marginRate = ($cumul_achat != 0) ? (100 * $totalMargin / $cumul_achat) : '';