[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/02: Prévision : corrige les couleurs
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/02: Prévision : corrige les couleurs |
Date: |
Fri, 13 Aug 2021 12:44:31 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 7e402e6720924aea95fbae488ebd2dc8736fda3a
Author: Dany wm De Bontridder <danydb@noalyss.eu>
AuthorDate: Fri Aug 13 17:12:46 2021 +0200
Prévision : corrige les couleurs
---
include/template/anticipation-display.php | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/include/template/anticipation-display.php
b/include/template/anticipation-display.php
index 573d9f9..c4cdb79 100644
--- a/include/template/anticipation-display.php
+++ b/include/template/anticipation-display.php
@@ -187,23 +187,26 @@ echo nbm( $diff);
<?php
$diff= bcsub($aReal[$i][$e][$h],$estm[$i][$e][$h]);
$cum=bcadd($diff,$cum);
+$strColorCell="";
if ($cum ==0)
{
- echo '<td style="text-align:right;">';
+ $strColorCell= '<td style="text-align:right;">';
}
-else
+elseif ($cum > 0)
{
- echo '<td style="text-align:right;background-color:green;color:white">';
+ $strColorCell= '<td
style="text-align:right;background-color:green;color:white">';
}
-
+else {
+ $strColorCell= '<td
style="text-align:right;background-color:red;color:white">';
+}
+echo $strColorCell;
echo nbm( $cum);
?>
</td>
<?php endfor;?>
<?php
-
- echo '<td style="text-align:right;background-color:green;color:white">';
+ echo $strColorCell;
echo nbm( $cum);
?>
</td>