[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 22/33: REPORT Put the amount in red if negati
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 22/33: REPORT Put the amount in red if negative |
Date: |
Thu, 18 Jul 2024 12:24:48 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit 891fa1a2a9cedf893506223869df2f92c9390656
Author: Dany wm <danydb@noalyss.eu>
AuthorDate: Thu Jul 4 17:05:35 2024 +0200
REPORT Put the amount in red if negative
---
include/impress_rapport.inc.php | 5 +++--
include/template/dashboard.php | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/impress_rapport.inc.php b/include/impress_rapport.inc.php
index b3a4acfda..fe3bd0cf2 100644
--- a/include/impress_rapport.inc.php
+++ b/include/impress_rapport.inc.php
@@ -322,10 +322,11 @@ function ShowReportResult($p_array)
{
$i++;
$class= ( $i % 2 == 0 )?' class="odd"':' class="even"';
-
+ $style='style="text-align:right;"';
+ if ($op['montant']<0) { $style='style="color:red;text-align:right;"';}
echo "<TR $class>".
"<TD>".h($op['desc'])."</TD>".
- "<TD align=\"right\">".nbm($op['montant'])."</TD>".
+ "<TD $style>".nbm($op['montant'])."</TD>".
"</TR>";
}
echo "</table>";
diff --git a/include/template/dashboard.php b/include/template/dashboard.php
index cd32f25cd..558ccc9b3 100644
--- a/include/template/dashboard.php
+++ b/include/template/dashboard.php
@@ -74,8 +74,10 @@ if ( $report != 0 ) : ?>
$class=($ix%2==0)?' class="even" ':' class="odd" ';
echo '<tr '.$class.'>';
- echo '<td> '.$row['desc'].'</td>'.
- '<td style="text-align:right">'.nbm($row['montant'])."
€</td>";
+ echo '<td> '.$row['desc'].'</td>';
+ $style='style="text-align:right;"';
+ if ($row['montant']<0) {
$style='style="color:red;text-align:right;"';}
+ echo "<td $style>".nbm($row['montant'])."</td>";
echo '</tr>';
}
echo '</table>';
- [Noalyss-commit] [noalyss] branch unstable updated (2fa3bc882 -> 26a3f802d), dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 02/33: Documentation code, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 10/33: PRINTTVA : display tva_code, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 08/33: Merge branch '2362-ccardat' into stable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 04/33: Documentation code, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 09/33: Merge branch 'unstable' into pre-stable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 06/33: PDF : operation detail for a card : add first name, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 22/33: REPORT Put the amount in red if negative,
dwm <=
- [Noalyss-commit] [noalyss] 31/33: Database upgrade, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 18/33: Fix Bug : tva_code not retrieve from search, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 17/33: PHPUNIT Acc_TVA : tva_code must contains at least one letter Acc_Ledger : input_new PDF_Anc_Acc_ListTest:testPdf_Card Fix bug sizIe, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 28/33: VEN - ACH fix default currency, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 32/33: test unit : pdf activity, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 33/33: Merge branch 'pre-stable' into unstable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 29/33: ODS : cosmetic detail operation, not aligned, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 07/33: remove euro symbole, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 16/33: cosmetic : improve appearance, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 19/33: ACH-13 : extourne also analytic, dwm, 2024/07/18