diff --git a/include/class_fiche.php b/include/class_fiche.php
index 4f50cd836..eec09cd72 100644
--- a/include/class_fiche.php
+++ b/include/class_fiche.php
@@ -1601,6 +1601,7 @@ class Fiche
$odd.=" notice ";
}
}
+
$odd=' class="'.$odd.'"';
$r.="
";
@@ -1620,7 +1621,18 @@ class Fiche
$str_solde=nbm($amount['solde']);
$r.='| '.$str_deb.' | ';
$r.=' '.$str_cred.' | ';
- $r.=' '.$str_solde." | ";
+ $side=($amount['debit'] > $amount['credit'])?'D':'C';
+ $side=($amount['debit'] == $amount['credit'])?'=':$side;
+ $red="";
+ if ( $p_action == 'customer' && $amount['debit'] < $amount['credit'] ){
+ //put in red if d>c
+ $red=" notice ";
+ }
+ if ( $p_action == 'supplier' && $amount['debit'] > $amount['credit'] ){
+ //put in red if c>d
+ $red=" notice ";
+ }
+ $r.=' '.$str_solde."$side | ";
$deb=bcadd($deb,$amount['debit']);
$cred=bcadd($cred,$amount['credit']);