[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 21/34: Task #0002327: Balance : indiqué si le
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 21/34: Task #0002327: Balance : indiqué si le solde est correct débit / crédit |
Date: |
Wed, 17 Jan 2024 12:54:07 -0500 (EST) |
sparkyx pushed a commit to branch devel
in repository noalyss.
commit 014574b18c25edda982111fa4c123b2d408b2982
Author: Dany wm <danydb@noalyss.eu>
AuthorDate: Sun Jan 14 22:32:17 2024 +0100
Task #0002327: Balance : indiqué si le solde est correct débit / crédit
---
include/balance.inc.php | 17 +++++++++++++++--
include/class/acc_balance.class.php | 1 +
include/export/export_balance_pdf.php | 13 ++++++++++++-
include/lib/message_javascript.php | 2 ++
4 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/include/balance.inc.php b/include/balance.inc.php
index 16ff44ea3..3ef72b6ca 100644
--- a/include/balance.inc.php
+++ b/include/balance.inc.php
@@ -437,8 +437,21 @@ if ( isset($_GET['view'] ) )
echo '<TR class="'.$tr.'">';
echo td($view_history);
- echo td(h($r['label']));
-
+ // label + warning if the saldo is incorrect
+ $label=$r['label'];
+ if (in_array($r['type'],array('CHA','ACT','PASINV','PROINV')) &&
$r['sum_deb']<$r['sum_cred'])
+ {
+
+ $label.=" ".Icon_Action::warnbulle(85);
+ }
+ if (in_array($r['type'],array('PRO','PAS','ACTINV','CHAINV')) &&
$r['sum_deb']>$r['sum_cred'])
+ {
+
+ $label.=" ".Icon_Action::warnbulle(86);
+ }
+ print '<td>';
+ print $label;
+ print '</td>';
if ($previous == 1 ) {
echo td(nbm($r['sum_deb_previous']),' class="previous_year"');
echo td(nbm($r['sum_cred_previous']),' class="previous_year" ');
diff --git a/include/class/acc_balance.class.php
b/include/class/acc_balance.class.php
index f079bcf7d..aca291bb0 100644
--- a/include/class/acc_balance.class.php
+++ b/include/class/acc_balance.class.php
@@ -231,6 +231,7 @@ class Acc_Balance
$a['poste']=$r['poste'];
$a['label']=mb_substr($poste->get_lib(),0,40);
+ $a['type']=$poste->get_parameter("pcm_type");
$a['sum_deb']=round($r['sum_deb'],2);
$a['sum_cred']=round($r['sum_cred'],2);
$a['solde_deb']=round(( $a['sum_deb'] >= $a['sum_cred'] )?
$a['sum_deb']- $a['sum_cred']:0,2);
diff --git a/include/export/export_balance_pdf.php
b/include/export/export_balance_pdf.php
index d82bcd8ba..02946d3a4 100644
--- a/include/export/export_balance_pdf.php
+++ b/include/export/export_balance_pdf.php
@@ -212,7 +212,18 @@ if (!empty($array)) {
$fill=$pdf->is_fill($i);
- $pdf->LongLine(30, 6, $value['poste'], 0, 'L', $fill);
+ $label=$value['poste'];
+ if (in_array($r['type'],array('CHA','ACT','PASINV','PROINV')) &&
$value['sum_deb']<$value['sum_cred'])
+ {
+
+ $label.=" ".mb_chr(0x26a0);
+ }
+ if (in_array($r['type'],array('PRO','PAS','ACTINV','CHAINV')) &&
$value['sum_deb']>$value['sum_cred'])
+ {
+
+ $label.=" ".mb_chr(0x26a0);
+ }
+ $pdf->LongLine(30, 6, $label, 0, 'L', $fill);
$pdf->LongLine(60, 6, $value['label'], 0, 'L', $fill);
$summary_tab = $bal->summary_add($summary_tab, $value['poste'],
$value['sum_deb'],
diff --git a/include/lib/message_javascript.php
b/include/lib/message_javascript.php
index aa00f4eaa..1b303d7a2 100644
--- a/include/lib/message_javascript.php
+++ b/include/lib/message_javascript.php
@@ -118,4 +118,6 @@ content[81]="<?php echo htmlspecialchars(_("Recommendé
d'avoir un poste propre"
content[82]="<?php echo htmlspecialchars(_("valeur en % "),ENT_QUOTES)?>";
content[83]="<?php echo htmlspecialchars(_("Données invalides
"),ENT_QUOTES)?>";
content[84]="<?php echo htmlspecialchars(_("En Belgique, l'exercice commence
par un report des comptes de 0 à 5, mais pas en France, ce solde est calculé
depuis le tout premier exercice"),ENT_QUOTES)?>";
+content[85]="<?php echo htmlspecialchars(_("Solde créditeur au lieu de
débiteur"),ENT_QUOTES)?>";
+content[86]="<?php echo htmlspecialchars(_("Solde débiteur au lieu de
créditeur"),ENT_QUOTES)?>";
</script>
- [Noalyss-commit] [noalyss] branch devel updated (ead8d5f23 -> edc0a3f23), dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 02/34: FIX : default to use https, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 07/34: PRINTGL Main Ledger (GL) improve performance and code prepare the SQL , better filter for accounting, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 06/34: Improve DatabaseCore : fetch_all, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 05/34: Improve DBG , add stopwatch : timer_start and timer_show, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 04/34: FIX : when taken from git NOALYSS_VERSION is undefined, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 19/34: Merge branch 'devel-ods' into devel, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 23/34: Bug Fiche Option, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 32/34: DEV - TEST : new file to see local variables, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 21/34: Task #0002327: Balance : indiqué si le solde est correct débit / crédit,
dwm <=
- [Noalyss-commit] [noalyss] 11/34: Task 0002128: Clôture comptabilité française, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 13/34: Acc OD : cosmetic, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 17/34: Get empty upgrade.sql, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 01/34: FIX : when taken from git NOALYSS_VERSION is undefined, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 18/34: Bug #0002322: Impression Suivi, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 08/34: OPTION_CARD : Correct options for FollowUp, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 16/34: Task 2128 : Ouverture et cloture toujours visible, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 20/34: Merge branch 'devel-andromeda' into devel, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 28/34: Task 0002128: Clôture comptabilité française Réécriture op. ouverture et cloture, dwm, 2024/01/17
- [Noalyss-commit] [noalyss] 30/34: Get empty upgrade.sql, dwm, 2024/01/17