phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r4553 - phpcompta/trunk/include
Date: Sun, 4 Dec 2011 06:32:37 +0100 (CET)

Author: danydb
Date: 2011-12-04 06:32:34 +0100 (Sun, 04 Dec 2011)
New Revision: 4553

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/export_histo_csv.php
Log:
date problem with CSV (str_jr_date instead of jr_date)


Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php        2011-12-04 05:22:15 UTC 
(rev 4552)
+++ phpcompta/trunk/include/class_acc_ledger.php        2011-12-04 05:32:34 UTC 
(rev 4553)
@@ -2442,7 +2442,7 @@
              join parm_periode on p_id=jr_tech_per";
 
         if ( ! empty($p_array))            extract($p_array);
-               
+
         $r_jrn=(isset($r_jrn))?$r_jrn:-1;
 
         /* if no variable are set then give them a default
@@ -2452,22 +2452,17 @@
             $amount_min=0;
             $amount_max=0;
 
-            if ( ! isset ($date_start))
-            {
-                $user=new User($this->db);
-                $exercice=$user->get_exercice();
-
-                $per=new Periode($this->db);
-                               
list($per_start,$per_end)=$per->limit_year($exercice);
-                list($date_start,$none)=$per_start->get_date_limit();
-                list($none,$date_end)=$per_end->get_date_limit();
-
-            }
             $desc='';
             $qcode=(isset($qcode))?$qcode:"";
                        if ( isset($qcodesearch_op)) $qcode=$qcodesearch_op;
             $accounting=(isset($accounting))?$accounting:"";
-
+                       $periode=new Periode($this->db);
+                       $user=new User($this->db);
+                       $p_id=$user->get_periode();
+                       if ( $p_id != null )
+                       {
+                               
list($date_start,$date_end)=$periode->get_date_limit($p_id);
+                       }
         }
 
         /* if p_jrn : 0 if means all ledgers, if -1 means all ledger of this

Modified: phpcompta/trunk/include/export_histo_csv.php
===================================================================
--- phpcompta/trunk/include/export_histo_csv.php        2011-12-04 05:22:15 UTC 
(rev 4552)
+++ phpcompta/trunk/include/export_histo_csv.php        2011-12-04 05:32:34 UTC 
(rev 4553)
@@ -50,8 +50,8 @@
   {
     printf('"%s";',$res[$i]['jr_internal']);
     printf('"%s";',$res[$i]['jrn_def_name']);
-    printf('"%s";',$res[$i]['jr_date']);
-    printf('"%s";',$res[$i]['jr_ech']);
+    printf('"%s";',$res[$i]['str_jr_date']);
+    printf('"%s";',$res[$i]['str_jr_ech']);
     printf('"%s";',$res[$i]['jr_pj_number']);
     printf('"%s";',$res[$i]['quick_code']);
     printf('"%s %s";',$res[$i]['name'],$res[$i]['first_name']);




reply via email to

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