[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/02: Task #1102 - Solde fournisseur "neutre
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/02: Task #1102 - Solde fournisseur "neutre" dans gestion. Bug #1102 : solde en rouge si anormal, ajout aussi de D ou C |
Date: |
Fri, 15 May 2015 16:16:54 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit eada0101bc6cd1bfae17c3ebf43bc31e21c9e62b
Author: Dany De Bontridder <address@hidden>
Date: Fri May 15 18:07:00 2015 +0200
Task #1102 - Solde fournisseur "neutre" dans gestion.
Bug #1102 : solde en rouge si anormal, ajout aussi de D ou C
---
include/class_fiche.php | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/include/class_fiche.php b/include/class_fiche.php
index 4f50cd8..eec09cd 100644
--- a/include/class_fiche.php
+++ b/include/class_fiche.php
@@ -1601,6 +1601,7 @@ class Fiche
$odd.=" notice ";
}
}
+
$odd=' class="'.$odd.'"';
$r.="<TR $odd>";
@@ -1620,7 +1621,18 @@ class Fiche
$str_solde=nbm($amount['solde']);
$r.='<TD sorttable_customkey="'.$amount['debit'].'" align="right">
'.$str_deb.'</TD>';
$r.='<TD sorttable_customkey="'.$amount['credit'].'"
align="right"> '.$str_cred.'</TD>';
- $r.='<TD sorttable_customkey="'.$amount['solde'].'" align="right">
'.$str_solde."</TD>";
+ $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.='<TD class="'.$red.'"
sorttable_customkey="'.$amount['solde'].'" align="right"> '.$str_solde."$side
</TD>";
$deb=bcadd($deb,$amount['debit']);
$cred=bcadd($cred,$amount['credit']);