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 '
';
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 '| ';
+ print $label;
+ print ' | ';
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]="";
content[83]="";
content[84]="";
+content[85]="";
+content[86]="";