[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Task #1224 - BALANCE : les totaux devr
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Task #1224 - BALANCE : les totaux devraient avoir le solde #1224 : solde si utilisation filtre par poste comptable |
Date: |
Wed, 11 Nov 2015 12:53:59 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit dbdaaaf853b3a0bd6e6b2f441cf7b5bd3c90c079
Author: Dany De Bontridder <address@hidden>
Date: Wed Nov 11 13:47:25 2015 +0100
Task #1224 - BALANCE : les totaux devraient avoir le solde
#1224 : solde si utilisation filtre par poste comptable
---
include/balance.inc.php | 3 ++-
include/class/class_acc_balance.php | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/balance.inc.php b/include/balance.inc.php
index f54aa2c..dde3f32 100644
--- a/include/balance.inc.php
+++ b/include/balance.inc.php
@@ -36,7 +36,7 @@ require_once NOALYSS_INCLUDE.'/class/class_exercice.php';
global $g_user;
$gDossier=dossier::id();
$exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice();
-
+bcscale(2);
echo '<div class="content">';
/*
@@ -247,6 +247,7 @@ if ( isset ($_GET['view'] ) )
//-----------------------------------------------------
if ( isset($_GET['view'] ) )
{
+
$bal=new Acc_Balance($cn);
if ( $_GET['p_filter']==1)
{
diff --git a/include/class/class_acc_balance.php
b/include/class/class_acc_balance.php
index f5b6939..1cf3a60 100644
--- a/include/class/class_acc_balance.php
+++ b/include/class/class_acc_balance.php
@@ -229,8 +229,12 @@ class Acc_Balance
}//for i
// Add the saldo
$i+=1;
+ $delta=bcsub($tot_deb,$tot_cred);
+ $side_delta=($delta<0)?"C":"D";
+ $side_delta=($delta==0)?"=":$side_delta;
+
$a['poste']="";
- $a['label']="Totaux ";
+ $a['label']="Totaux ".nbm(abs($delta)).$side_delta;
$a['sum_deb']=$tot_deb;
$a['sum_cred']=$tot_cred;
$a['solde_deb']=$tot_deb_saldo;