phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5068 - phpcompta/tags/rel650/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5068 - phpcompta/tags/rel650/include
Date: Sun, 15 Jul 2012 11:14:28 +0200 (CEST)

Author: danydb
Date: 2012-07-15 11:14:27 +0200 (Sun, 15 Jul 2012)
New Revision: 5068

Modified:
   phpcompta/tags/rel650/include/class_exercice.php
Log:
New function : select exercice with end & start date


Modified: phpcompta/tags/rel650/include/class_exercice.php
===================================================================
--- phpcompta/tags/rel650/include/class_exercice.php    2012-07-10 10:34:55 UTC 
(rev 5067)
+++ phpcompta/tags/rel650/include/class_exercice.php    2012-07-15 09:14:27 UTC 
(rev 5068)
@@ -21,7 +21,7 @@
 // Copyright Author Dany De Bontridder address@hidden
 
 /*!\file
- * \brief about the accountant exercice 
+ * \brief about the accountant exercice
  */
 require_once('class_database.php');
 require_once('class_iselect.php');
@@ -56,4 +56,23 @@
      $iselect->javascript=$js;
      return $iselect;
    }
+   /**
+    *Show a ISelect with the different exercices, display start and end date
+    address@hidden $name of the iselect
+    address@hidden $selected the selected year  (default = '')
+    address@hidden $js javascript (default = '')
+    address@hidden ISelect object
+    */
+   function select_date($name,$selected='',$js='')
+   {
+     $iselect=new ISelect($name);
+     $iselect->value=$this->cn->make_array("select distinct p_exercice,to_char 
(min(p_start),'DD.MM.YY')
+                                                                               
                                                         ||' - '
+                                                                               
                                                         ||to_char 
(max(p_end),'DD.MM.YY')
+                                                                               
        from parm_periode
+                                                                               
        group by p_exercice order by 1");
+     $iselect->selected=$selected;
+     $iselect->javascript=$js;
+     return $iselect;
+   }
 }



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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