phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r613 - in trunk/rapport_avance: doc include


From: phpcompta-dev
Subject: [Phpcompta-dev] r613 - in trunk/rapport_avance: doc include
Date: Wed, 11 Dec 2013 19:10:20 +0100 (CET)

Author: danydb
Date: 2013-12-11 19:10:20 +0100 (Wed, 11 Dec 2013)
New Revision: 613

Modified:
   trunk/rapport_avance/doc/test-listing.odt
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/include/declaration.inc.php
Log:
task #934: Listing : numerotation des documents
Task #934 - Listing : num?\195?\169rotation des documents

Modified: trunk/rapport_avance/doc/test-listing.odt
===================================================================
(Binary files differ)

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
===================================================================
--- trunk/rapport_avance/include/class_rapav_listing_compute.php        
2013-12-11 18:00:16 UTC (rev 612)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php        
2013-12-11 18:10:20 UTC (rev 613)
@@ -258,18 +258,20 @@
         $cn->exec_sql(" delete from rapport_advanced.listing_compute_fiche
             where lf_id not in ($to_keep) and 
lc_id=$1",array($this->data->lc_id));
     }
-    function generate()
+    function generate($p_id)
     {
         global $cn;
         $ofiche=new RAPAV_Listing_Compute_Fiche();
         $r_fiche=$ofiche->seek (" where lc_id = $1",array($this->data->lc_id));
         $nb_fiche=Database::num_row($r_fiche);
-
+        if (isNumber($p_id)==0) {$p_id=0;}
         /* For each card */
         for ($i = 0;$i < $nb_fiche;$i++)
         {
             $fiche=$ofiche->next($r_fiche,$i);
             $fiche->set_listing_compute($this);
+            $fiche->set_number($p_id);
+            $p_id++;
             $fiche->generate_document();
         }
     }
@@ -292,6 +294,8 @@
     function propose_generate()
     {
         echo '<form method="GET" action="do.php" class="noprint" 
style="display:inline">';
+        $num=new IText('numerotation');
+        echo "Numéro de document ".$num->input();
         echo 
HtmlInput::array_to_hidden(array('ac','gDossier','plugin_code','sa'), 
$_REQUEST);
         echo HtmlInput::hidden('lc_id',$this->data->lc_id);
         echo HtmlInput::submit("generate_document", "Génération des 
documents");

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
===================================================================
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php  
2013-12-11 18:00:16 UTC (rev 612)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php  
2013-12-11 18:10:20 UTC (rev 613)
@@ -13,7 +13,13 @@
  */
 class RAPAV_Listing_Compute_Fiche extends RAPAV_Listing_Compute_Fiche_SQL
 {
-
+    var $listing_compute;
+    var $number;
+    
+    function set_number($p_id)
+    {
+        $this->number=$p_id;
+    }
     function set_listing_compute(RAPAV_Listing_Compute &$listing_compute)
     {
         $this->listing_compute=$listing_compute;
@@ -214,6 +220,7 @@
         $array[] = array('code' => 'CEDEX', 'value' => $g_parameter->MY_CP);
         $array[] = array('code' => 'FAX', 'value' => $g_parameter->MY_FAX);
         $array[] = array('code' => 'NOTE', 'value' => 
$this->listing_compute->data->l_description);
+        $array[] = array('code' => 'NUM_PIECE', 'value' => $this->number);
 
         // open the files
         $ifile = fopen($p_dir . '/' . $p_filename, 'r');

Modified: trunk/rapport_avance/include/declaration.inc.php
===================================================================
--- trunk/rapport_avance/include/declaration.inc.php    2013-12-11 18:00:16 UTC 
(rev 612)
+++ trunk/rapport_avance/include/declaration.inc.php    2013-12-11 18:10:20 UTC 
(rev 613)
@@ -91,7 +91,7 @@
 {
     $listing=new RAPAV_Listing_Compute();
     $listing->load($_GET['lc_id']);
-    $listing->generate();
+    $listing->generate($_GET['numerotation']);
     $listing->display(false);
     exit();
 }



---
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]