phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4142 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4142 - phpcompta/trunk/include
Date: Sat, 28 May 2011 04:38:04 +0200 (CEST)

Author: danydb
Date: 2011-05-28 04:38:03 +0200 (Sat, 28 May 2011)
New Revision: 4142

Modified:
   phpcompta/trunk/include/class_acc_account_ledger.php
Log:
Compta 8.2

Modified: phpcompta/trunk/include/class_acc_account_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_account_ledger.php        2011-05-27 
20:09:58 UTC (rev 4141)
+++ phpcompta/trunk/include/class_acc_account_ledger.php        2011-05-28 
02:38:03 UTC (rev 4142)
@@ -127,8 +127,8 @@
        if ( $solded == 1)
          {
            $filter=str_replace('jrn_def_id','jr_def_id',$filter_sql);
-           $bal_sql="with signed_amount as 
-                                               (select case when j_debit='t' 
then j_montant else 0 end as amount_deb,
+           $bal_sql="                                          select 
sum(amount_deb) as s_deb,sum(amount_cred) as s_cred, j_poste from 
+                       (select case when j_debit='t' then j_montant else 0 end 
as amount_deb,
                                                                case when 
j_debit='f' then j_montant else 0 end as amount_cred,
                                                                j_poste 
                                                                from jrnx join 
jrn on (j_grpt = jr_grpt_id)
@@ -136,8 +136,7 @@
                                                                j_poste=$1 and
                                                                $filter and
                                                                ( 
to_date($2,'DD.MM.YYYY') <= j_date and 
-                                  to_date($3,'DD.MM.YYYY') >= j_date  ))
-                                               select sum(amount_deb) as 
s_deb,sum(amount_cred) as s_cred, j_poste from signed_amount
+                                  to_date($3,'DD.MM.YYYY') >= j_date  )) as m
                                                group by j_poste
                                                ";
            $r=$this->db->get_array($bal_sql,array($this->id,$p_from,$p_to));




reply via email to

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