[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/08: Task #1043 - BK : met les montants en
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/08: Task #1043 - BK : met les montants en rouge si compte en négatif |
Date: |
Fri, 07 Nov 2014 21:59:22 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit d908b33261960562c2f0557763693a26a0344b43
Author: Dany De Bontridder <address@hidden>
Date: Fri Nov 7 22:53:52 2014 +0100
Task #1043 - BK : met les montants en rouge si compte en négatif
---
include/class_fiche.php | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/class_fiche.php b/include/class_fiche.php
index b331c7f..46bdd02 100644
--- a/include/class_fiche.php
+++ b/include/class_fiche.php
@@ -1520,6 +1520,10 @@ class Fiche
function Summary($p_search="",$p_action="",$p_sql="",$p_amount=false)
{
global $g_user;
+ $bank=new Acc_Parm_Code($this->cn,'BANQUE');
+ $cash=new Acc_Parm_Code($this->cn,'CAISSE');
+ $cc=new Acc_Parm_Code($this->cn,'COMPTE_COURANT');
+
bcscale(4);
$str_dossier=dossier::get();
$p_search=sql_string($p_search);
@@ -1565,8 +1569,9 @@ class Fiche
$r.='<table id="tiers_tb" class="sortable"
style="width:90%;margin-left:5%">
<TR >
- <TH>'._('Quick Code').HtmlInput::infobulle(17).'</TH>
- <th class="sorttable_sorted_reverse">'._('Nom').'<span
id="sorttable_sortrevind"> ▴</span>'.'</th>
+ <TH>'._('Quick Code').HtmlInput::infobulle(17).'</TH>'.
+ '<th>'._('Poste comptable').'</th>'.
+ '<th class="sorttable_sorted_reverse">'._('Nom').'<span
id="sorttable_sortrevind"> ▴</span>'.'</th>
<th>'._('Adresse').'</th>
<th style="text-align:right">'._('Total débit').'</th>
<th style="text-align:right">'._('Total crédit').'</th>
@@ -1589,9 +1594,12 @@ class Fiche
$odd="";
$odd = ($i % 2 == 0 ) ? ' odd ': ' even ';
- if ( $p_action == 'bank' && $amount['debit'] < $amount['credit']
){
+ $accounting=$tiers->strAttribut(ATTR_DEF_ACCOUNT);
+ if ( $p_action == 'bank' && $amount['debit'] < $amount['credit']
){
+ if ( strpos($accounting,$bank->p_value)===0 ||
strpos($accounting,$cash->p_value)===0 || strpos($accounting,$cc->p_value)===0){
//put in red if c>d
$odd.=" notice ";
+ }
}
$odd=' class="'.$odd.'"';
@@ -1600,6 +1608,7 @@ class Fiche
$script,$_REQUEST['ac'],$tiers->id,$str_dossier);
$r.="<TD> $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>";
+ $r.="<TD> $e".$accounting."</TD>";
$r.="<TD>".h($tiers->strAttribut(ATTR_DEF_NAME))."</TD>";
$r.="<TD>".h($tiers->strAttribut(ATTR_DEF_ADRESS).
" ".$tiers->strAttribut(ATTR_DEF_CP).
- [Noalyss-commit] [noalyss] branch master updated (0b85235 -> 58f5512), Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 02/08: Task #1043 - BK : met les montants en rouge si compte en négatif,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 04/08: fix bug, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 05/08: fix cosmetic bug : remove width set by JS, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 06/08: Task #639 - Traduction : anglais translation, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 08/08: Ajout poste comptable, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 01/08: Task #1043 - BK : met les montants en rouge si compte en négatif, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 03/08: fix bug, Dany De Bontridder, 2014/11/07
- [Noalyss-commit] [noalyss] 07/08: Task #639 - Traduction : anglais translation, Dany De Bontridder, 2014/11/07