noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 08/12: fonctionnalité ajout colonne solde pr


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 08/12: fonctionnalité ajout colonne solde progressif esthétique Solde en plus apparent
Date: Sat, 26 Jul 2014 14:53:52 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit a29f65785fa6cf9920b425f5e40aadda9847c1dc
Author: Dany De Bontridder <address@hidden>
Date:   Sat Jul 26 16:30:59 2014 +0200

    fonctionnalité ajout colonne solde progressif
    esthétique Solde en plus apparent
---
 include/class_anc_grandlivre.php |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/include/class_anc_grandlivre.php b/include/class_anc_grandlivre.php
index 449dcd0..8d55c68 100644
--- a/include/class_anc_grandlivre.php
+++ b/include/class_anc_grandlivre.php
@@ -163,7 +163,7 @@ class Anc_GrandLivre extends Anc_Print
         {
             return 0;
         }
-        $r.= '<table class="result" style="width=100%">';
+        $r.= '<table class="result" style="width:100%">';
         $ix = 0;
         $prev = 'xx';
         $idx = 0;
@@ -178,9 +178,9 @@ class Anc_GrandLivre extends Anc_Print
                 {
                     $r.='<tr>';
                     $tot_solde = bcsub($tot_cred, $tot_deb);
-                    $sign = ($tot_solde > 0) ? 'C' : 'D';
+                    $sign = " ".($tot_solde > 0) ? 'C' : 'D';
                    $r.=td('') . td('') . td('');
-                    $r.=td('') . td('') . td('') . td('') . td('') . 
td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . 
td(nbm($tot_solde) . $sign, ' class="num"');
+                    $r.=td('') . td('') . td('') . td('') . td('') . 
td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . 
td(nbm($tot_solde) . $sign, ' class="num notice"');
                 }
                 $r.='<tr>' . '<td colspan="7" style="width:auto">' . '<h2>' . 
h($row['po_name'] . ' ' . $row['po_description']) . '</td></tr>';
                 $r.= '<tr>' .
@@ -192,8 +192,9 @@ class Anc_GrandLivre extends Anc_Print
                         '<th>' . _('Document') . '</th>' .
                         '<th>' . _('Pièce') . '</th>' .
                         '<th>' . _('Num.interne') . '</th>' .
-                        '<th style="text-align:right">' . _('Debit') . '</th>' 
.
-                        '<th style="text-align:right">' . _('Credit') . 
'</th>' .
+                        '<th style="text-align:right">' . _('Débit') . '</th>' 
.
+                        '<th style="text-align:right">' . _('Crédit') . 
'</th>' .
+                        '<th style="text-align:right">' . _('Prog.') . '</th>' 
.
                         '</tr>';
 
                 $tot_deb = $tot_cred = 0;
@@ -210,6 +211,7 @@ class Anc_GrandLivre extends Anc_Print
             $amount_cred = ($row['oa_debit'] == 'f') ? $row['oa_amount'] : 0;
             $tot_deb = bcadd($tot_deb, $amount_deb);
             $tot_cred = bcadd($tot_cred, $amount_cred);
+            $tot_solde=bcsub($tot_deb,$tot_cred);
 
             /*
              * Checked button
@@ -239,15 +241,15 @@ class Anc_GrandLivre extends Anc_Print
                     td($row['jr_pj_number']) .
                     '<td>' . $detail . '</td>' .
                     '<td class="num">' . nbm($amount_deb) . '</td>' .
-                    '<td class="num">' . nbm($amount_cred)
-                    . '</td>';
+                    '<td class="num">' . nbm($amount_cred). '</td>'.
+                    '<td class="num">' . nbm($tot_solde). '</td>';
             $r.= '</tr>';
         }
         $r.='<tr>';
         $tot_solde = bcsub($tot_cred, $tot_deb);
         $sign = ($tot_solde > 0) ? 'C' : 'D';
        $r.=td('') . td('') . td('');
-        $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' 
class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . 
$sign, ' class="num"');
+        $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' 
class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . 
$sign, '  class="num notice"');
 
         $r.= '</table>';
         return $r;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]