noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 28/33: Bug #2085: Comptabilité analytique : e


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 28/33: Bug #2085: Comptabilité analytique : erreur dans les balances croisées
Date: Thu, 11 Nov 2021 06:02:51 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 4c56e36dbd0835b537e2064b57a8a1da11cc9e4a
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Oct 29 13:22:14 2021 +0200

    Bug #2085: Comptabilité analytique : erreur dans les balances croisées
---
 html/js/anc_script.js                      |  2 +-
 include/class/anc_balance_double.class.php | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/html/js/anc_script.js b/html/js/anc_script.js
index ea88a61..dfade17 100644
--- a/html/js/anc_script.js
+++ b/html/js/anc_script.js
@@ -48,7 +48,7 @@ function add_row(p_table, p_seq)
     if (max < amount)
     {
         alert_box(content[48]+' '+content[56]+ ' '+max + content[57]+' '+ 
amount);
-        return;
+        
     }
     // For the detail view (modify_op) there is several form and then several 
time the
     // element
diff --git a/include/class/anc_balance_double.class.php 
b/include/class/anc_balance_double.class.php
index feec657..0218840 100644
--- a/include/class/anc_balance_double.class.php
+++ b/include/class/anc_balance_double.class.php
@@ -151,13 +151,15 @@ class Anc_Balance_Double extends Anc_Print
             $r.='<td>'.$row['dc'].'</td>';
             $r.='</tr>';
         }
+        $r.='<tr class="highlight">';
        $r.=td('');
        $r.=td('total');
        $r.=td(nbm($tot_deb),'class="num"');
        $r.=td(nbm($tot_cred),'class="num"');
        $solde=bcsub($tot_cred,$tot_deb);
-       $sign=($tot_cred<$tot_deb)?" - ":" + ";
-       $r.=td($sign.nbm($solde),'class="num" style="border:solid 1px 
blue;font-weight:bold"');
+       $sign=($tot_cred<$tot_deb)?_("Débit"):_("Crédit");
+       $r.=td(nbm($solde),'class="num" style="border:solid 1px 
blue;font-weight:bold"');
+        $r.=td($sign);
        $r.='</tr>';
         $r.='</table>';
 
@@ -460,14 +462,16 @@ class Anc_Balance_Double extends Anc_Print
              pb.po_name as b_po_name,
              sum(a_oa_amount_c) as a_c,
              sum(a_oa_amount_d) as a_d
-             from (select
+             from (select 
                        a.j_id,
              a.po_id as a_po_id,
              b.po_id as b_po_id,
              case when a.oa_debit='t' then a.oa_amount else 0 end as 
a_oa_amount_d,
              case when a.oa_debit='f' then a.oa_amount else 0 end as 
a_oa_amount_c
              from
-             operation_analytique as a join operation_analytique as b on 
(a.oa_row=b.oa_row and a.oa_group=b.oa_group)
+             operation_analytique as a join operation_analytique as b on 
(a.oa_row=b.oa_row 
+                        and a.oa_group=b.oa_group 
+                        and a.j_id = b.j_id)
                join poste_analytique as poa on (a.po_id=poa.po_id)
                join poste_analytique as pob on (b.po_id=pob.po_id)
              where poa.pa_id= $1



reply via email to

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