[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Analytic improve ANCTAB
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Analytic improve ANCTAB |
Date: |
Mon, 02 Nov 2015 18:54:15 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 99b4a3192dfe2d6031765fa0d0e6ae2f7e314f90
Author: Dany De Bontridder <address@hidden>
Date: Mon Nov 2 19:48:07 2015 +0100
Analytic improve ANCTAB
---
include/class/class_anc_table.php | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/class/class_anc_table.php
b/include/class/class_anc_table.php
index 01ef0fa..ae11930 100644
--- a/include/class/class_anc_table.php
+++ b/include/class/class_anc_table.php
@@ -120,7 +120,7 @@ class Anc_Table extends Anc_Acc_Link
bcscale(2);
if ( $this->check() != 0)
{
- alert('Désolé mais une des dates données n\'est pas valide');
+ alert(_("Date invalide"));
return;
}
@@ -159,10 +159,12 @@ class Anc_Table extends Anc_Acc_Link
{
$tot_col[$x]=$amount;
}
- echo td(nbm($amount),' class="num" ');
+ $side=($amount < 0 ) ? 'D' : 'C';
+ echo td(nbm(abs($amount))." ".$side,' class="num" ');
$tot_row=bcadd($tot_row,$amount);
}
- echo td(nbm($tot_row),' class="num"');
+ $side=($tot_row < 0 ) ? 'D' : 'C';
+ echo td(nbm(abs($tot_row))." ".$side,' class="num"');
$tot_global=bcadd($tot_global,$tot_row);
echo '</tr>';
@@ -172,7 +174,8 @@ class Anc_Table extends Anc_Acc_Link
echo td('Totaux');
for ($i=0;$i<count($this->aheader);$i++)
{
- echo td(nbm($tot_col[$i]),' class="num"');
+ $side=($tot_col[$i]<0)?"D":"C";
+ echo td(nbm(abs($tot_col[$i]))." ".$side,' class="num"');
}
echo td(nbm($tot_global),' class="num input_text notice" ');
echo '</tr>';