From MAILER-DAEMON Sun Dec 01 15:02:41 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VnDE1-0006k6-4U
	for mharc-phpcompta-dev@gnu.org; Sun, 01 Dec 2013 15:02:41 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  1 Dec 2013 20:51:19 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.122595.1385928159.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r593 - in trunk/rapport_avance: . doc include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Dec 2013 20:02:38 -0000

Author: danydb
Date: 2013-12-01 20:51:18 +0100 (Sun, 01 Dec 2013)
New Revision: 593

Added:
   trunk/rapport_avance/include/class_rapav.php
Modified:
   trunk/rapport_avance/ajax_save_param_detail.php
   trunk/rapport_avance/doc/test_unitaire.bin
   trunk/rapport_avance/include/class_formulaire_param_detail.php
   trunk/rapport_avance/include/class_rapav_declaration.php
Log:
Task #0000927: Formule sur les dates : ?\195?\169ch?\195?\169ance, paieme=
nt ou op?\195?\169ration

Modified: trunk/rapport_avance/ajax_save_param_detail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_save_param_detail.php	2013-11-28 13:47:36 U=
TC (rev 592)
+++ trunk/rapport_avance/ajax_save_param_detail.php	2013-12-01 19:51:18 U=
TC (rev 593)
@@ -43,7 +43,7 @@
         $acc_tva->type_detail =3D 2;
         $acc_tva->tt_id =3D $code_base;
         $acc_tva->jrn_def_id =3D $p_ledger;
-        $acc_tva->date_paid=3D(isset($p_paid))?1:0;
+        $acc_tva->date_paid=3D$p_paid;
         if ($acc_tva->verify() =3D=3D 1)
         {
             $code =3D 'nok';
@@ -71,7 +71,7 @@
         $acc_formula->p_id =3D $p_id;
         $acc_formula->type_detail =3D 1;
         $acc_formula->jrn_def_id =3D $p_ledger;
-        $acc_formula->date_paid=3D(isset($p_paid))?1:0;
+        $acc_formula->date_paid=3D$p_paid;
         if ($acc_formula->verify() =3D=3D 1)
         {
             $code =3D 'nok';
@@ -128,7 +128,7 @@
         $acc_account->type_detail =3D 4;
         $acc_account->type_sum_account =3D $account_sum_type;
         $acc_account->jrn_def_id =3D $p_ledger;
-        $acc_account->date_paid=3D(isset($p_paid))?1:0;
+        $acc_account->date_paid=3D$p_paid;
         if ($acc_account->verify() =3D=3D 1)
         {
             $code =3D 'nok';

Modified: trunk/rapport_avance/doc/test_unitaire.bin
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/doc/test_unitaire.bin	2013-11-28 13:47:36 UTC (r=
ev 592)
+++ trunk/rapport_avance/doc/test_unitaire.bin	2013-12-01 19:51:18 UTC (r=
ev 593)
@@ -1,21 +1,25 @@
 RAPAV;4
 "Test unitaire";"Test des diff=C3=A9rentes fonctionnalit=C3=A9"
-142;F1;Formule;3;10;14;1
-143;F2;"Formule N-1";3;20;14;3
-144;F3;"Formule journal OD uniquement";3;30;14;1
-145;PC1;"Poste comptable code tva tous les journaux";3;40;14;1
-146;PC2;"Poste comptable &code tva  tous les journaux N-1";3;50;14;3
-147;PC3;"Poste comptable code tva  Achat";3;60;14;1
-148;P1;"Poste comptable tous les journaux (6% & 4111)";3;70;14;1
-149;P2;"Poste comptable tous les journaux (6% & 4111) N-1";3;80;14;3
-150;P3;"Poste comptable tous les journaux (6% & 4111) uniqt Achat 2";3;9=
0;14;1
+135;F1;Formule;3;10;12;1
+136;F2;"Formule N-1";3;20;12;3
+137;F3;"Formule journal OD uniquement";3;30;12;1
+138;PC1;"Poste comptable code tva tous les journaux";3;40;12;1
+139;PC2;"Poste comptable &code tva  tous les journaux N-1";3;50;12;3
+140;PC3;"Poste comptable code tva  Achat";3;60;12;1
+141;P1;"Poste comptable tous les journaux (6% & 4111)";3;70;12;1
+142;P2;"Poste comptable tous les journaux (6% & 4111) N-1";3;80;12;3
+143;P3;"Poste comptable tous les journaux (6% & 4111) uniqt Achat 2";3;9=
0;12;1
+144;Date-paiement;"Formule Date - paiement";3;100;12;1
+145;date-echeance;"Formule Date =C3=A9ch=C3=A9ance";3;110;12;1
 RAPAV_DETAIL
-128;142;;;[44%];;;;1;;;;0
-129;143;;;[44%];;;;1;;;;0
-131;144;;;[44%];;;;1;;;;0
-134;147;%;1;;;ACH;1;2;;;;0
-135;146;%;1;;;ACH;1;2;;;;0
-136;145;%;1;;;ACH;1;2;;;;0
-137;148;6%;;;;;;4;4111;1;;0
-138;149;6%;;;;;;4;4111;1;;0
-139;150;6%;;;;;;4;4111;1;;0
+112;135;;;[44%];;;;1;;;;0
+113;136;;;[44%];;;;1;;;;0
+114;137;;;[44%];;;;1;;;;0
+115;138;%;1;;;ACH;1;2;;;;0
+116;139;%;1;;;ACH;1;2;;;;0
+117;140;%;1;;;ACH;1;2;;;;0
+118;141;6%;;;;;;4;4111;1;;0
+119;142;6%;;;;;;4;4111;1;;0
+120;143;6%;;;;;;4;4111;1;;0
+121;144;;;[70%];;;;1;;;;1
+122;145;;;[70%];;;;1;;;;2

Modified: trunk/rapport_avance/include/class_formulaire_param_detail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_formulaire_param_detail.php	2013-1=
1-28 13:47:36 UTC (rev 592)
+++ trunk/rapport_avance/include/class_formulaire_param_detail.php	2013-1=
2-01 19:51:18 UTC (rev 593)
@@ -28,6 +28,7 @@
  */
 require_once 'class_rapport_avance_sql.php';
 require_once 'class_rapav_formulaire.php';
+require_once 'class_rapav.php';
=20
 class Formulaire_Param_Detail extends Formulaire_Param_Detail_SQL
 {
@@ -42,41 +43,6 @@
         require_once 'template/param_detail_new.php';
     }
=20
-    function get_ledger_name()
-    {
-        global $cn;
-        $ledger =3D "";
-        if ($this->jrn_def_id =3D=3D null || $this->jrn_def_id =3D=3D -1=
)
-        {
-            $ledger =3D " tous les journaux";
-        } else
-        {
-            $tledger =3D $cn->get_value('select jrn_def_name from jrn_de=
f where jrn_def_id=3D$1', array($this->jrn_def_id));
-            $ledger.=3D"  le journal " . $tledger;
-        }
-        return $ledger;
-    }
-
-    static function input_ledger()
-    {
-        global $cn;
-        $select =3D new ISelect('p_ledger');
-        $a_ledger =3D $cn->make_array('select jrn_def_id,jrn_def_name fr=
om jrn_def order by 2', 1);
-        $a_ledger[0]['label'] =3D '-- Tous les journaux -- ';
-        $select->value =3D $a_ledger;
-
-        echo '<p> Filtrage par journal ' . $select->input() . '</p>';
-    }
-
-    static function input_date_paiement()
-    {
-        $ck_paid =3D new ICheckBox('p_paid');
-        echo '<p> La date donn=C3=A9e concerne la date de paiement, ce q=
ui limitera la recherche aux journaux VEN et ACH ';
-        echo HtmlInput::infobulle(36);
-        echo $ck_paid->input();
-        echo '</p>';
-    }
-
 }
=20
 class RAPAV_Formula extends Formulaire_Param_Detail
@@ -84,8 +50,8 @@
=20
     function display_row()
     {
-        $ledger =3D $this->get_ledger_name();
-        $paid =3D ( $this->date_paid !=3D 0 ) ? "la date concerne la dat=
e de paiement, la recherche sera limit=C3=A9e au journaux de type ACH & V=
EN" : "";
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);
+        $paid =3D RAPAV::str_date_type($this->date_paid);
         printf("R=C3=A9sultat de la formule %s utilisant $ledger %s", $t=
his->fp_formula, $paid);
     }
=20
@@ -100,8 +66,8 @@
         $account->set_attribute('noquery', 1);
         $account->set_attribute('account', $account->id);
         echo $account->input();
-        Formulaire_Param_Detail::input_date_paiement();
-        Formulaire_Param_Detail::input_ledger();
+        RAPAV::input_date_paiement();
+        RAPAV::input_ledger();
     }
=20
     function verify()
@@ -127,9 +93,9 @@
     function display_row()
     {
         global $cn;
-        $ledger =3D $this->get_ledger_name();
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);;
         $type_total =3D $cn->get_value("select tt_label from rapport_adv=
anced.total_type where tt_id=3D$1", array($this->tt_id));
-        $paid =3D ( $this->date_paid !=3D 0 ) ? "la date concerne la dat=
e de paiement, la recherche sera limit=C3=A9e au journaux de type ACH & V=
EN" : "";
+        $paid =3D RAPAV::str_date_type($this->date_paid);
         printf("Poste comptable %s avec le code tva %s (%s) dans le jour=
nal de type %s [ %s ] $ledger %s", $this->tmp_val, $this->tva_id, $this->=
tva_id, $this->jrn_def_type, $type_total, $paid);
     }
=20
@@ -168,8 +134,8 @@
         echo td($code_base->input());
         echo '</tr>';
         echo '</table>';
-        Formulaire_Param_Detail::input_date_paiement();
-        Formulaire_Param_Detail::input_ledger();
+        RAPAV::input_date_paiement();
+        RAPAV::input_ledger();
     }
=20
     function verify()
@@ -247,8 +213,8 @@
     function display_row()
     {
         global $cn;
-        $ledger =3D $this->get_ledger_name();
-        $paid =3D ( $this->date_paid !=3D 0 ) ? "la date concerne la dat=
e de paiement, la recherche sera limit=C3=A9e au journaux de type ACH & V=
EN" : "";
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);;
+        $paid =3D RAPAV::str_date_type($this->date_paid);
         $total_type_account =3D $cn->get_value('select tt_label from rap=
port_advanced.total_type_account where tt_id=3D$1', array($this->type_sum=
_account));
         printf("Total %s poste comptable %s utilis=C3=A9 avec le poste c=
omptable %s utilisant $ledger %s", $total_type_account, $this->tmp_val, $=
this->with_tmp_val, $paid);
     }
@@ -282,8 +248,8 @@
         echo ' utilis=C3=A9 avec le poste comptable ' . HtmlInput::infob=
ulle(203);
         echo $account_second->input();
         echo '</p>';
-        Formulaire_Param_Detail::input_date_paiement();
-        Formulaire_Param_Detail::input_ledger();
+        RAPAV::input_date_paiement();
+        RAPAV::input_ledger();
     }
=20
     function verify()
@@ -309,7 +275,7 @@
     {
         global $cn;
         $total_type_account =3D $cn->get_value('select tt_label from rap=
port_advanced.total_type_account where tt_id=3D$1', array($this->type_sum=
_account));
-        $ledger =3D $this->get_ledger_name();
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);;
         printf("Total %s poste comptable %s utilis=C3=A9 avec le poste c=
omptable %s rapproch=C3=A9e dans la p=C3=A9riode donn=C3=A9e
 			avec une op=C3=A9ration utilisant le poste comptable %s  utilisant $l=
edger", $total_type_account, $this->tmp_val, $this->with_tmp_val, $this->=
operation_pcm_val);
     }
@@ -354,7 +320,7 @@
         echo $account_third->input();
=20
         echo '</p>';
-        Formulaire_Param_Detail::input_ledger();
+        RAPAV::input_ledger();
     }
=20
     function verify()

Added: trunk/rapport_avance/include/class_rapav.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav.php	                        =
(rev 0)
+++ trunk/rapport_avance/include/class_rapav.php	2013-12-01 19:51:18 UTC =
(rev 593)
@@ -0,0 +1,130 @@
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Prop=
erties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Common function to RAPAV_Listing RAPAV_Formulaire and RAPAV_Declarati=
on
+ *
+ * @author dany
+ */
+class RAPAV
+{
+
+    /**
+     * Return the ledger's name of p_jrn
+     * @param $p_jrn jrn_def::jrn_def_id if -1, it means all the ledger
+     * @return string
+     */
+    static function get_ledger_name($p_jrn)
+    {
+        global $cn;
+        $ledger =3D "";
+        if ($p_jrn =3D=3D null || $p_jrn =3D=3D -1)
+        {
+            $ledger =3D " tous les journaux";
+        } else
+        {
+            $tledger =3D $cn->get_value('select jrn_def_name from jrn_de=
f where jrn_def_id=3D$1', array($p_jrn));
+            $ledger.=3D"  le journal " . $tledger;
+        }
+        return $ledger;
+    }
+    /**
+     * display a choice of ledger
+     * @global cn
+     */
+    static function input_ledger()
+    {
+        global $cn;
+        $select =3D new ISelect('p_ledger');
+        $a_ledger =3D $cn->make_array('select jrn_def_id,jrn_def_name fr=
om jrn_def order by 2', 1);
+        $a_ledger[0]['label'] =3D '-- Tous les journaux -- ';
+        $select->value =3D $a_ledger;
+
+        echo '<p> Filtrage par journal ' . $select->input() . '</p>';
+    }
+    /**
+     * Display a select for the date
+     */
+    static function input_date_paiement()
+    {
+        $s_date =3D new ISelect('p_paid');
+        $s_date->value =3D array();
+        $s_date->value[] =3D array("value" =3D> 0, "label" =3D> 'Date ca=
lendrier');
+        $s_date->value[] =3D array("value" =3D> 1, "label" =3D> 'Date de=
 paiement');
+        $s_date->value[] =3D array("value" =3D> 2, "label" =3D> 'Date d\=
'=C3=A9ch=C3=A9ance');
+        echo '<p> Si la date donn=C3=A9e concerne la date de paiement ou=
 d\'=C3=A9cheance, cela limitera la recherche aux journaux VEN et ACH ';
+        echo HtmlInput::infobulle(36);
+        echo $s_date->input();
+        echo '</p>';
+    }
+    /**
+     * Compute the string to display for date
+     * @param $p_type
+     * @return string
+     * @throws Exception
+     */
+    static function str_date_type($p_type)
+    {
+        switch ($p_type)
+        {
+            case 0:
+                return "";
+                break;
+            case 1:
+                return "la date concerne la date de paiement, la recherc=
he sera limit=C3=A9e au journaux de type ACH & VEN";
+                break;
+            case 2:
+                return "la date concerne la date d'=C3=A9ch=C3=A9ance, l=
a recherche sera limit=C3=A9e au journaux de type ACH & VEN";
+                break;
+        }
+        throw new Exception('str_date_type : type de date inconnu');
+    }
+
+    /**
+     * Compute the SQL for the date
+     *    -  0  given date
+     *    -  1  Date of payment
+     *    -  2  Limit Date=20
+     * @param $p_date integer
+     * @return string
+     * @throws Exception if $p_date not valid
+     */
+    static function get_sql_date($p_date)
+    {
+        switch ($p_date)
+        {
+            case 0:
+                $sql_date =3D "and (jrn1.j_date >=3D to_date($2,'DD.MM.Y=
YYY') and jrn1.j_date <=3D to_date($3,'DD.MM.YYYY'))";
+                break;
+            case 1:
+                $sql_date =3D " and j_id in=20
+                (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
+                    where
+                    coalesce(jr_date_paid,to_date('01.01.1900','DD.MM.YY=
YY')) >=3D to_date($2,'DD.MM.YYYY')
+                    and coalesce(jr_date_paid,to_date('01.01.1900','DD.M=
M.YYYY')) <=3D to_date($3,'DD.MM.YYYY')
+                 )
+                    ";
+                break;
+            case 2:
+                $sql_date =3D " and j_id in=20
+                (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
+                    where
+                    coalesce(jr_ech,to_date('01.01.1900','DD.MM.YYYY')) =
>=3D to_date($2,'DD.MM.YYYY')
+                    and coalesce(jr_ech,to_date('01.01.1900','DD.MM.YYYY=
')) <=3D to_date($3,'DD.MM.YYYY')
+                 )
+                    ";
+                break;
+
+            default:
+                throw new Exception('get_sql_date param=C3=A8tre invalid=
e');
+                break;
+        }
+        return $sql_date;
+    }
+
+}

Modified: trunk/rapport_avance/include/class_rapav_declaration.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_declaration.php	2013-11-28 1=
3:47:36 UTC (rev 592)
+++ trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-01 1=
9:51:18 UTC (rev 593)
@@ -742,10 +742,16 @@
         }
         if ($this->form->date_paid =3D=3D 1)
         {
-            $sql.=3Dsprintf(" and jr_date_paid >=3D to_date('%s','DD.MM.=
YYYY') and jr_date_paid <=3D to_date ('%s','DD.MM.YYYY')", $p_start, $p_e=
nd);
+            $sql.=3Dsprintf(" and j_id in ( select j_id from jrnx join j=
rn on (j_grpt=3Djr_grpt_id) where jr_date_paid >=3D to_date('%s','DD.MM.Y=
YYY') and jr_date_paid <=3D to_date ('%s','DD.MM.YYYY'))", $p_start, $p_e=
nd);
             $p_start =3D '01.01.1900';
             $p_end =3D '01.01.2100';
         }
+        if ($this->form->date_paid =3D=3D 2)
+        {
+            $sql.=3Dsprintf(" and j_id in ( select j_id from jrnx join j=
rn on (j_grpt=3Djr_grpt_id) where jr_ech >=3D to_date('%s','DD.MM.YYYY') =
and jr_ech <=3D to_date ('%s','DD.MM.YYYY'))", $p_start, $p_end);
+            $p_start =3D '01.01.1900';
+            $p_end =3D '01.01.2100';
+        }
         $amount =3D Impress::parse_formula($cn, "", $this->form->fp_form=
ula, $p_start, $p_end, true, 1, $sql);
         return $amount['montant'];
     }
@@ -825,6 +831,8 @@
         {
             $filter_ledger =3D " and j_jrn_def =3D " . sql_string($this-=
>form->jrn_def_id);
         }
+        $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
+/*
         if ($this->form->date_paid =3D=3D 1)
         {
             $sql_date=3D" and j_id in=20
@@ -839,12 +847,12 @@
         else
         {
             $sql_date=3D"and (j_date >=3D to_date($2,'DD.MM.YYYY') and j=
_date <=3D to_date($3,'DD.MM.YYYY'))";
-        }
+        }*/
         if ($this->form->jrn_def_type =3D=3D 'ACH')
         {
=20
             $sql =3D "select coalesce(sum(qp_vat),0) as amount
-						from quant_purchase join jrnx using (j_id)
+						from quant_purchase join jrnx as jrn1 using (j_id)
 						where qp_vat_code=3D$1
 						$sql_date
 						and j_poste::text like ($4) $filter_ledger";
@@ -857,7 +865,7 @@
         if ($this->form->jrn_def_type =3D=3D 'VEN')
         {
             $sql =3D "select coalesce(sum(qs_vat),0) as amount
-						from quant_sold join jrnx using (j_id)
+						from quant_sold join jrnx as jrn1  using (j_id)
 						where qs_vat_code=3D$1=20
 						$sql_date
 						and j_poste::text like ($4)  $filter_ledger";
@@ -890,6 +898,8 @@
         {
             $filter_ledger =3D " and j_jrn_def =3D " . sql_string($this-=
>form->jrn_def_id);
         }
+        $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
+/*
         if ($this->form->date_paid =3D=3D 1)
         {
             $sql_date=3D" and j_id in=20
@@ -904,10 +914,10 @@
         else
         {
             $sql_date=3D"and (j_date >=3D to_date($2,'DD.MM.YYYY') and j=
_date <=3D to_date($3,'DD.MM.YYYY'))";
-        }
+        }*/
         if ($this->form->jrn_def_type =3D=3D 'ACH')
         {
-            $sql =3D "select coalesce(sum(qp_price),0) as amount from qu=
ant_purchase join jrnx using (j_id)
+            $sql =3D "select coalesce(sum(qp_price),0) as amount from qu=
ant_purchase join jrnx as jrn1  using (j_id)
 					where qp_vat_code=3D$1 $sql_date
 					and j_poste::text like ($4) $filter_ledger";
=20
@@ -920,7 +930,7 @@
         if ($this->form->jrn_def_type =3D=3D 'VEN')
         {
             $sql =3D "select coalesce(sum(qs_price),0) as amount from qu=
ant_sold
-					join jrnx using (j_id)
+					join jrnx as jrn1  using (j_id)
 					where qs_vat_code=3D$1 $sql_date
 					and j_poste::text like ($4) $filter_ledger";
             $amount =3D $this->cn->get_value($sql, array($this->form->tv=
a_id,
@@ -998,7 +1008,8 @@
             $filter_ledger =3D " and jrn1.j_jrn_def =3D " . sql_string($=
this->form->jrn_def_id);
         }
        =20
-        if ($this->form->date_paid =3D=3D 1)
+        $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
+        /*if ($this->form->date_paid =3D=3D 1)
         {
             $sql_date=3D" and j_id in=20
                 (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
@@ -1012,7 +1023,7 @@
         else
         {
             $sql_date=3D"and (jrn1.j_date >=3D to_date($3,'DD.MM.YYYY') =
and jrn1.j_date <=3D to_date($4,'DD.MM.YYYY'))";
-        }
+        }*/
         bcscale(2);
         switch ($this->form->type_sum_account)
         {
@@ -1028,17 +1039,17 @@
                                 join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
                                 where
                                 jrn1.j_poste like $1
+                                $sql_date
                                 and
-                                jrn2.j_poste like $2
-                                $sql_date
+                                jrn2.j_poste like $4
                                 $filter_ledger
                                 ) as tv_amount
 							 ";
                 $amount =3D $cn->get_value($sql, array(
                     $this->form->tmp_val,
-                    $this->form->with_tmp_val,
                     $p_start,
-                    $p_end
+                    $p_end,
+                    $this->form->with_tmp_val
                 ));
                 // if C-D is asked then reverse the result
                 if ($this->form->type_sum_account =3D=3D 2)



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


From MAILER-DAEMON Sun Dec 01 15:05:29 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VnDGj-0007pv-2E
	for mharc-phpcompta-dev@gnu.org; Sun, 01 Dec 2013 15:05:29 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  1 Dec 2013 20:54:09 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.122596.1385928328.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r594 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Dec 2013 20:05:27 -0000

Author: danydb
Date: 2013-12-01 20:54:09 +0100 (Sun, 01 Dec 2013)
New Revision: 594

Modified:
   trunk/rapport_avance/include/class_rapav.php
Log:
Task #0000927: Formule sur les dates : ?\195?\169ch?\195?\169ance, paieme=
nt ou op?\195?\169ration

Modified: trunk/rapport_avance/include/class_rapav.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav.php	2013-12-01 19:51:18 UTC =
(rev 593)
+++ trunk/rapport_avance/include/class_rapav.php	2013-12-01 19:54:09 UTC =
(rev 594)
@@ -73,7 +73,7 @@
         switch ($p_type)
         {
             case 0:
-                return "";
+                return "la date concerne la date d'op=C3=A9ration";
                 break;
             case 1:
                 return "la date concerne la date de paiement, la recherc=
he sera limit=C3=A9e au journaux de type ACH & VEN";



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


From MAILER-DAEMON Sun Dec 01 16:04:38 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VnEBy-0000Ma-36
	for mharc-phpcompta-dev@gnu.org; Sun, 01 Dec 2013 16:04:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  1 Dec 2013 21:53:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.122623.1385931877.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5555 - phpcompta/trunk/html/js
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Dec 2013 21:04:36 -0000

Author: danydb
Date: 2013-12-01 21:53:16 +0100 (Sun, 01 Dec 2013)
New Revision: 5555

Modified:
   phpcompta/trunk/html/js/infobulle.js
Log:
Task #0000927: Formule sur les dates : ?\195?\169ch?\195?\169ance, paieme=
nt ou op?\195?\169ration

Modified: phpcompta/trunk/html/js/infobulle.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/infobulle.js	2013-11-29 14:46:54 UTC (rev 555=
4)
+++ phpcompta/trunk/html/js/infobulle.js	2013-12-01 20:53:16 UTC (rev 555=
5)
@@ -63,7 +63,7 @@
 content[33]=3D'le type vaut :<ul>	<li> ME pour Menu</li>	<li> PR pour le=
s impressions </li>	<li> PL pour les plugins</li>	<li> SP pour des valeur=
s sp=C3=A9ciales</li>	</ul>';
 content[34]=3D'Cliquez sur le code AD pour ouvrir le menu dans un nouvel=
 onglet';
 content[35]=3D'Cliquez sur le chemin pour ouvrir le menu';
-content[36]=3D'Ne concerne que les journaux de type ACH & VEN, en pr=C3=A9=
cisant une date ici vous excluez d\'office les autres journaux';
+content[36]=3D'En utilisant les dates d\'=C3=A9ch=C3=A9ance ou de paieme=
nt, seuls les journaux de type ACH et VEN seront utilis=C3=A9s ,vous excl=
uez d\'office les autres journaux';
 function showBulle(p_ctl){
     d=3Ddocument.getElementById('bulle');
     d.innerHTML=3Dcontent[p_ctl];



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


From MAILER-DAEMON Mon Dec 02 20:31:02 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VnepK-0001sr-2H
	for mharc-phpcompta-dev@gnu.org; Mon, 02 Dec 2013 20:31:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 02:19:39 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.124072.1386034261.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5556 - phpcompta/trunk/dev/manage-code/create-file
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 01:31:00 -0000

Author: danydb
Date: 2013-12-03 02:19:38 +0100 (Tue, 03 Dec 2013)
New Revision: 5556

Modified:
   phpcompta/trunk/dev/manage-code/create-file/create_config.py
   phpcompta/trunk/dev/manage-code/create-file/create_phpclass.py
Log:
Fix bug in new create script

Modified: phpcompta/trunk/dev/manage-code/create-file/create_config.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/dev/manage-code/create-file/create_config.py	2013-12-=
01 20:53:16 UTC (rev 5555)
+++ phpcompta/trunk/dev/manage-code/create-file/create_config.py	2013-12-=
03 01:19:38 UTC (rev 5556)
@@ -61,6 +61,7 @@
=20
 file.write(class_name+"\n")
 file.write(schema+"."+table+"\n")
+record.reverse()
 for l in record:
     col_name,col_type,col_default=3Dl
     file.write ("%s\t|%s\t|%s\n"%(col_name,col_type,col_default))

Modified: phpcompta/trunk/dev/manage-code/create-file/create_phpclass.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/dev/manage-code/create-file/create_phpclass.py	2013-1=
2-01 20:53:16 UTC (rev 5555)
+++ phpcompta/trunk/dev/manage-code/create-file/create_phpclass.py	2013-1=
2-03 01:19:38 UTC (rev 5556)
@@ -1,4 +1,4 @@
-  #!/usr/bin/python
+#!/usr/bin/python
=20
=20
 # Command we have to replace
@@ -63,6 +63,7 @@
 */
 class @class_name@ extends Phpcompta_SQL
 {
+	@vars@
   /* example private $variable=3Darray("easy_name"=3D>column_name,"email=
"=3D>"column_name_email","val3"=3D>0); */
   function __construct($p_id=3D-1)
 	{
@@ -83,7 +84,7 @@
 			"@id@" =3D> "auto"
 		);
 		global $cn;
-
+		$this->date_format =3D "DD.MM.YYYY";
 		parent::__construct($cn, $p_id);
 	}
   /**
@@ -133,21 +134,25 @@
         column_array=3D''
         column_type_array=3D''
         sep=3D''
-        for e in line [3:]:
+	var=3D'//------ Attributes-----'+"\n"
+        for e in line [2:]:
             if e.find('|') < 0 :
                 continue
             col_name=3D(e.split('|'))[0].strip()
             col_type=3D(e.split('|'))[1].strip()
             if col_type =3D=3D 'integer' or col_type =3D=3D 'numeric' or=
 col_type=3D=3D'bigint':
 		col_type=3D"numeric"
-	    elif col_type=3D=3D'text' or col_type=3D=3D'character varying':
+	    elif col_type=3D=3D'text' or col_type=3D=3D'character varying' or c=
ol_type=3D=3D'character':
 		col_type=3D"text"
-	    elif col_type=3D=3D'date':
+	    elif col_type=3D=3D'oid':
+		col_type=3D'oid'
+	    elif col_type=3D=3D'date' or col_type=3D=3D'timestamp without timez=
one' or col_type=3D=3D'timestamp with timezone':
 		col_type=3D'date'
 	    else :
 		col_type=3D'set_me'
             column_array+=3Dsep+'"'+col_name+'"=3D>"'+col_name+'"'+"\n"
             column_type_array+=3Dsep+'"'+col_name+'"=3D>"'+col_type+'"'+=
"\n"
+	    var=3Dvar+' var $'+col_name+";\n"
             sep=3D','
         column_array=3D'"'+id+'"=3D>"'+id+'",'+column_array
         i=3D1;sep=3D'';set=3D' set '
@@ -170,6 +175,7 @@
             throw new Exception('DATATYPE "+col_id+" $this->"+col_id+" d=
ate invalide');\n"
       =20
 	sParent=3DsParent.replace('@id@',id)
+	sParent=3DsParent.replace('@vars@',var)
 	sParent=3DsParent.replace('@table@',table)
 	sParent=3DsParent.replace('@class_name@',class_name)
 	sParent=3DsParent.replace('@column_array@',column_array)



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


From MAILER-DAEMON Mon Dec 02 21:39:41 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vnftl-0003To-JG
	for mharc-phpcompta-dev@gnu.org; Mon, 02 Dec 2013 21:39:41 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 03:28:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.124105.1386038379.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r595 - in trunk/rapport_avance: . include sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 02:39:39 -0000

Author: danydb
Date: 2013-12-03 03:28:15 +0100 (Tue, 03 Dec 2013)
New Revision: 595

Added:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/sql/2-add-compute.sql
   trunk/rapport_avance/sql/2-listing_compute.sql
   trunk/rapport_avance/sql/2-listing_compute_detail.sql
   trunk/rapport_avance/sql/2-listing_compute_fiche.sql
   trunk/rapport_avance/sql/2-listing_condition.sql
Modified:
   trunk/rapport_avance/ajax_listing_param_add.php
   trunk/rapport_avance/ajax_save_param_listing.php
   trunk/rapport_avance/include/class_formulaire_param_detail.php
   trunk/rapport_avance/include/class_rapav.php
   trunk/rapport_avance/include/class_rapav_declaration.php
   trunk/rapport_avance/include/class_rapav_listing.php
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/include/class_rapav_listing_param.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/include/declaration.inc.php
   trunk/rapport_avance/rapav_constant.php
Log:
Listing : progress
can compute and save for attribute

Modified: trunk/rapport_avance/ajax_listing_param_add.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_listing_param_add.php	2013-12-01 19:54:09 U=
TC (rev 594)
+++ trunk/rapport_avance/ajax_listing_param_add.php	2013-12-03 02:28:15 U=
TC (rev 595)
@@ -8,7 +8,7 @@
 ob_start();
 echo HtmlInput::title_box("Nouveau param=C3=A8tre", $cin);
 $obj=3Dnew RAPAV_Listing($id);
-$obj->add_parameter();
+$obj->add_parameter($id);
 $response =3D ob_get_contents();
 ob_end_clean();
 $html =3D escape_xml($response);

Modified: trunk/rapport_avance/ajax_save_param_listing.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_save_param_listing.php	2013-12-01 19:54:09 =
UTC (rev 594)
+++ trunk/rapport_avance/ajax_save_param_listing.php	2013-12-03 02:28:15 =
UTC (rev 595)
@@ -109,7 +109,7 @@
         break;
     case 'new_attribute_id':
         ob_start();
-        $attr =3D new RAPAV_Formula_Attribute($formula, $listing_id);
+        $attr =3D new RAPAV_Formula_Attribute($formula);
         $attr->save($_GET);
         $attr->load();
         $lp_id =3D $attr->data->getp("lp_id");
@@ -117,8 +117,8 @@
         $html =3D "";
         echo td($attr->display_code());
         echo td($attr->display_comment());
+        echo td($attr->display());
         echo td($attr->display_order());
-        echo td($attr->display());
         $html.=3Dob_get_contents();
         ob_end_clean();
         $html.=3D'<td>';

Modified: trunk/rapport_avance/include/class_formulaire_param_detail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_formulaire_param_detail.php	2013-1=
2-01 19:54:09 UTC (rev 594)
+++ trunk/rapport_avance/include/class_formulaire_param_detail.php	2013-1=
2-03 02:28:15 UTC (rev 595)
@@ -72,17 +72,10 @@
=20
     function verify()
     {
-        if (Impress::check_formula($this->fp_formula) =3D=3D false)
-        {
-            $this->errcode =3D "Erreur dans votre formule";
-            return 1;
-        }
-        if (trim($this->fp_formula) =3D=3D "")
-        {
-            $this->errcode =3D " Aucune formule trouv=C3=A9e";
-            return 1;
-        }
-        return 0;
+        global $errcode;
+        $ret =3D RAPAV::verify_compute($this->fp_formula);
+        $this->errocode=3D$errcode;
+        return $ret;
     }
=20
 }
@@ -176,30 +169,10 @@
=20
     function verify()
     {
-
-        if (trim($this->fp_formula) =3D=3D "")
-        {
-            $this->errcode =3D " Aucune formule trouv=C3=A9e";
-            return 1;
-        }
-
-        // copy $this->form->fp_formula to a variable
-        $formula =3D $this->fp_formula;
-
-        // remove the valid
-        preg_match_all("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i", $formula,=
 $e);
-        $formula =3D preg_replace("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i"=
, '', $formula);
-        $formula =3D preg_replace('/([0-9]+.{0,1}[0.9]*)*(\+|-|\*|\/)*/'=
, '', $formula);
-        $formula =3D preg_replace('/(\(|\))/', '', $formula);
-        $formula =3D preg_replace('/\s/', '', $formula);
-
-        // if something remains it should be a mistake
-        if ($formula !=3D '')
-        {
-            $this->errcode =3D " Erreur dans la formule " . $formula;
-            return 1;
-        }
-        return 0;
+        global $errcode;
+        $ret =3D RAPAV::verify_compute($this->p_formula);
+        $this->errocode=3D$errcode;
+        return $ret;
     }
=20
 }

Modified: trunk/rapport_avance/include/class_rapav.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav.php	2013-12-01 19:54:09 UTC =
(rev 594)
+++ trunk/rapport_avance/include/class_rapav.php	2013-12-03 02:28:15 UTC =
(rev 595)
@@ -33,6 +33,7 @@
         }
         return $ledger;
     }
+
     /**
      * display a choice of ledger
      * @global cn
@@ -47,6 +48,7 @@
=20
         echo '<p> Filtrage par journal ' . $select->input() . '</p>';
     }
+
     /**
      * Display a select for the date
      */
@@ -54,7 +56,7 @@
     {
         $s_date =3D new ISelect('p_paid');
         $s_date->value =3D array();
-        $s_date->value[] =3D array("value" =3D> 0, "label" =3D> 'Date ca=
lendrier');
+        $s_date->value[] =3D array("value" =3D> 0, "label" =3D> 'Date d\=
'op=C3=A9ration');
         $s_date->value[] =3D array("value" =3D> 1, "label" =3D> 'Date de=
 paiement');
         $s_date->value[] =3D array("value" =3D> 2, "label" =3D> 'Date d\=
'=C3=A9ch=C3=A9ance');
         echo '<p> Si la date donn=C3=A9e concerne la date de paiement ou=
 d\'=C3=A9cheance, cela limitera la recherche aux journaux VEN et ACH ';
@@ -62,6 +64,7 @@
         echo $s_date->input();
         echo '</p>';
     }
+
     /**
      * Compute the string to display for date
      * @param $p_type
@@ -127,4 +130,55 @@
         return $sql_date;
     }
=20
+    /**
+     * @brief check if the formula is valid, return 1 for an error
+     * and set errcode to the error msg
+     * errcode is global variable
+     */
+    static function verify_compute($p_formula)
+    {
+        global $errcode;
+        $errcode =3D "";
+        if (trim($p_formula) =3D=3D "")
+        {
+            $errcode =3D " Aucune formule trouv=C3=A9e";
+            return 1;
+        }
+
+        // copy $this->form->fp_formula to a variable
+        $formula =3D $p_formula;
+
+        // remove the valid
+        preg_match_all("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i", $formula,=
 $e);
+        $formula =3D preg_replace("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i"=
, '', $formula);
+        $formula =3D preg_replace('/([0-9]+.{0,1}[0.9]*)*(\+|-|\*|\/)*/'=
, '', $formula);
+        $formula =3D preg_replace('/(\(|\))/', '', $formula);
+        $formula =3D preg_replace('/\s/', '', $formula);
+
+        // if something remains it should be a mistake
+        if ($formula !=3D '')
+        {
+            $errcode =3D " Erreur dans la formule " . $formula;
+            return 1;
+        }
+        return 0;
+    }
+
+    static function verify_formula($p_formula)
+    {
+        global $errcode;
+        $errcode =3D "";
+        if (Impress::check_formula($p_formula) =3D=3D false)
+        {
+            $errcode =3D "Erreur dans votre formule";
+            return 1;
+        }
+        if (trim($p_formula) =3D=3D "")
+        {
+            $errcode =3D " Aucune formule trouv=C3=A9e";
+            return 1;
+        }
+        return 0;
+    }
+
 }

Modified: trunk/rapport_avance/include/class_rapav_declaration.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-01 1=
9:54:09 UTC (rev 594)
+++ trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-03 0=
2:28:15 UTC (rev 595)
@@ -832,22 +832,7 @@
             $filter_ledger =3D " and j_jrn_def =3D " . sql_string($this-=
>form->jrn_def_id);
         }
         $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
-/*
-        if ($this->form->date_paid =3D=3D 1)
-        {
-            $sql_date=3D" and j_id in=20
-                (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
-                    where
-                    coalesce(jr_date_paid,to_date('01.01.1900','DD.MM.YY=
YY')) >=3D to_date($2,'DD.MM.YYYY')
-                    and coalesce(jr_date_paid,to_date('01.01.1900','DD.M=
M.YYYY')) <=3D to_date($3,'DD.MM.YYYY')
-                 )
-                    ";
-                   =20
-        }
-        else
-        {
-            $sql_date=3D"and (j_date >=3D to_date($2,'DD.MM.YYYY') and j=
_date <=3D to_date($3,'DD.MM.YYYY'))";
-        }*/
+
         if ($this->form->jrn_def_type =3D=3D 'ACH')
         {
=20
@@ -899,22 +884,7 @@
             $filter_ledger =3D " and j_jrn_def =3D " . sql_string($this-=
>form->jrn_def_id);
         }
         $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
-/*
-        if ($this->form->date_paid =3D=3D 1)
-        {
-            $sql_date=3D" and j_id in=20
-                (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
-                    where
-                    coalesce(jr_date_paid,to_date('01.01.1900','DD.MM.YY=
YY')) >=3D to_date($2,'DD.MM.YYYY')
-                    and coalesce(jr_date_paid,to_date('01.01.1900','DD.M=
M.YYYY')) <=3D to_date($3,'DD.MM.YYYY')
-                 )
-                    ";
-                   =20
-        }
-        else
-        {
-            $sql_date=3D"and (j_date >=3D to_date($2,'DD.MM.YYYY') and j=
_date <=3D to_date($3,'DD.MM.YYYY'))";
-        }*/
+
         if ($this->form->jrn_def_type =3D=3D 'ACH')
         {
             $sql =3D "select coalesce(sum(qp_price),0) as amount from qu=
ant_purchase join jrnx as jrn1  using (j_id)
@@ -1009,21 +979,7 @@
         }
        =20
         $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
-        /*if ($this->form->date_paid =3D=3D 1)
-        {
-            $sql_date=3D" and j_id in=20
-                (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
-                    where
-                    coalesce(jr_date_paid,to_date('01.01.1900','DD.MM.YY=
YY')) >=3D to_date($3,'DD.MM.YYYY')
-                    and coalesce(jr_date_paid,to_date('01.01.1900','DD.M=
M.YYYY')) <=3D to_date($4,'DD.MM.YYYY')
-                 )
-                    ";
-                   =20
-        }
-        else
-        {
-            $sql_date=3D"and (jrn1.j_date >=3D to_date($3,'DD.MM.YYYY') =
and jrn1.j_date <=3D to_date($4,'DD.MM.YYYY'))";
-        }*/
+
         bcscale(2);
         switch ($this->form->type_sum_account)
         {

Modified: trunk/rapport_avance/include/class_rapav_listing.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing.php	2013-12-01 19:54=
:09 UTC (rev 594)
+++ trunk/rapport_avance/include/class_rapav_listing.php	2013-12-03 02:28=
:15 UTC (rev 595)
@@ -13,18 +13,26 @@
  */
 require_once 'class_rapport_avance_sql.php';
 require_once 'class_rapav_listing_param.php';
-class Rapav_Listing {
-    private $Data; /*!< RAPAV_Listing_SQL */
-    private $a_detail; /*!< array of RAPAV_Listing_Param corresponding t=
o the listing*/
-    function __construct($p_id =3D -1) {
+
+class Rapav_Listing
+{
+
+    public $Data; /* !< RAPAV_Listing_SQL */
+    public $a_detail; /* !< array of RAPAV_Listing_Param corresponding t=
o the listing */
+
+  =20
+
+    function __construct($p_id =3D -1)
+    {
         $this->Data =3D new RAPAV_Listing_SQL($p_id);
-        $this->a_detail=3Darray();
+        $this->a_detail =3D array();
     }
=20
     /**
      * display a list of the existing list
      */
-    function to_list() {
+    function to_list()
+    {
         $res =3D $this->Data->seek('join fiche_def using (fd_id) order b=
y l_name');
         require 'template/rapav_listing_to_list.php';
     }
@@ -32,7 +40,8 @@
     /**
      * Display a button for adding a new listing
      */
-    static function Button_Add_Listing() {
+    static function Button_Add_Listing()
+    {
         $arg =3D array(
             'gDossier' =3D> Dossier::id(),
             'ac' =3D> $_REQUEST['ac'],
@@ -48,11 +57,12 @@
      * @brief display a form to save a new list
      *=20
      */
-    function form_modify() {
+    function form_modify()
+    {
         global $cn;
         $name =3D new IText('name');
         $description =3D new ITextArea('description');
-        $description->style=3D' style=3D"margin:0px;width:100%" class=3D=
"itextarea"';
+        $description->style =3D ' style=3D"margin:0px;width:100%" class=3D=
"itextarea"';
         $file =3D new IFile('listing_mod');
         $fichedef =3D new ISelect('fiche_def');
         $fichedef->value =3D $cn->make_array('select fd_id,fd_label from=
 fiche_def order by fd_label');
@@ -60,14 +70,16 @@
         /*
          * if $this->l_id <> -1 then modification otherwise add
          */
-        if ($this->Data->l_id <> -1) {
+        if ($this->Data->l_id <> -1)
+        {
             $name->value =3D $this->Data->l_name;
             $description->value =3D $this->Data->l_description;
             $fichedef->selected =3D $this->Data->fd_id;
             $ck =3D new ICheckBox('remove');
             $str_remove =3D " Cochez pour effacer " . $ck->input();
             // If there is a file
-            if ($this->Data->l_filename !=3D "") {
+            if ($this->Data->l_filename !=3D "")
+            {
                 $file =3D new ISpan('listing_mod_id');
                 // Add js for removing=20
                 $arg =3D array(
@@ -91,11 +103,14 @@
      * @param type $p_array
      * @throws Exception
      */
-    function save($p_array) {
+    function save($p_array)
+    {
         global $cn;
-        try {
+        try
+        {
             $cn->start();
-            if (strlen(trim($p_array['name'])) =3D=3D 0) {
+            if (strlen(trim($p_array['name'])) =3D=3D 0)
+            {
                 throw new Exception('Le nom ne peut pas =C3=AAtre vide')=
;
             }
=20
@@ -105,7 +120,8 @@
             $this->Data->save();
             $this->load_file();
             $cn->commit();
-        } catch (Exception $ex) {
+        } catch (Exception $ex)
+        {
             $cn->rollback();
         }
     }
@@ -115,21 +131,26 @@
      * @global type $cn
      * @return int
      */
-    function load_file() {
+    function load_file()
+    {
         global $cn;
         // nothing to save
         if (sizeof($_FILES) =3D=3D 0)
             return;
-        try {
+        try
+        {
             $name =3D $_FILES['listing_mod']['name'];
             $new_name =3D tempnam($_ENV['TMP'], 'fiche_def');
             // check if a file is submitted
-            if (strlen($_FILES['listing_mod']['tmp_name']) !=3D 0) {
+            if (strlen($_FILES['listing_mod']['tmp_name']) !=3D 0)
+            {
                 // upload the file and move it to temp directory
-                if (move_uploaded_file($_FILES['listing_mod']['tmp_name'=
], $new_name)) {
+                if (move_uploaded_file($_FILES['listing_mod']['tmp_name'=
], $new_name))
+                {
                     $oid =3D $cn->lo_import($new_name);
                     // check if the lob is in the database
-                    if ($oid =3D=3D false) {
+                    if ($oid =3D=3D false)
+                    {
                         $cn->rollback();
                         return 1;
                     }
@@ -143,21 +164,25 @@
                 // update rapav
                 $this->Data->update();
             }
-        } catch (Exception $ex) {
+        } catch (Exception $ex)
+        {
             $cn->rollback();
             throw $ex;
         }
     }
-/**
- * @brief remove a document template
- * @global type $cn database connection
- * @return type
- */
-    function remove_modele() {
+
+    /**
+     * @brief remove a document template
+     * @global type $cn database connection
+     * @return type
+     */
+    function remove_modele()
+    {
         global $cn;
         if ($this->Data->l_lob =3D=3D null)
             return;
-        try {
+        try
+        {
             $cn->start();
             $this->Data->cn->lo_unlink($this->Data->l_lob);
             $this->Data->l_filename =3D null;
@@ -166,27 +191,30 @@
             $this->Data->l_mimetype =3D null;
             $this->Data->update();
             $cn->commit();
-        } catch (Exception $e) {
+        } catch (Exception $e)
+        {
             $cn->rollback;
             throw $ex;
-
         }
     }
+
     /**
      * @brief delete a listing + lobs
      * @throws type
      */
     function delete()
     {
-        try {
+        try
+        {
             $this->remove_modele();
-            $this->Data->delete();=20
-        } catch (Exception $e) {
+            $this->Data->delete();
+        } catch (Exception $e)
+        {
             $cn->rollback;
             throw $ex;
-
         }
     }
+
     /**
      * @brief display the parameter of a listing
      * let add or remove detail
@@ -196,9 +224,9 @@
         require_once 'class_rapav_listing_formula.php';
         // Load all listing_parameter
         $this->load_detail();
-       =20
+
         // Button for modifing=20
-        $button=3Dnew IButton('listing_mod_bt_id','Modifie');
+        $button =3D new IButton('listing_mod_bt_id', 'Modifie');
         $arg =3D array(
             'gDossier' =3D> Dossier::id(),
             'ac' =3D> $_REQUEST['ac'],
@@ -207,46 +235,50 @@
             'cin' =3D> 'listing_tb_id',
             'cout' =3D> 'listing_mod_div');
         $json =3D 'listing_modify(' . str_replace('"', "'", json_encode(=
$arg)) . ')';
-        $button->javascript=3D$json;
-       =20
-       =20
+        $button->javascript =3D $json;
+
+
         // Display them avec an anchor to update / delete (javascript)
         include_once 'template/rapav_listing_definition.php';
     }
+
     /**
      * @brief Load the detail of a listing
      * @throws Exception Undefined object
      */
     function load_detail()
     {
-        if ( $this->Data->getp('id') =3D=3D -1)=20
-            throw new Exception ("Undefined objet ".__FILE__.':'.__LINE_=
_);
-        $this->a_detail=3D  RAPAV_Listing_Param::get_listing_detail($thi=
s->Data->getp('id'));
-       =20
+        if ($this->Data->getp('id') =3D=3D -1)
+            throw new Exception("Undefined objet " . __FILE__ . ':' . __=
LINE__);
+        $this->a_detail =3D RAPAV_Listing_Param::get_listing_detail($thi=
s->Data->getp('id'));
     }
+
     /**
      * @brief Display button for adding detail to a list definition, it =
means
      */
-    function button_add_param()=20
+    function button_add_param()
     {
-        $button=3Dnew IButton('detail_add_bt','Ajout','detail_add_bt');
-        $arg=3D  json_encode(array(
-            'cin'=3D>'listing_param_input_div_id',
-            'gDossier'=3D>Dossier::id(),
-            'id'=3D>$this->Data->getp('id'),
-            'tb_id'=3D>'definition_tb_id',
-            'ac'=3D>$_REQUEST['ac'],
-            'pc'=3D>$_REQUEST['plugin_code'])
-            );
-        $arg=3Dstr_replace('"',"'",$arg);
-        $button->javascript=3D'listing_param_add('.$arg.')';
+        $button =3D new IButton('detail_add_bt', 'Ajout', 'detail_add_bt=
');
+        $arg =3D json_encode(array(
+            'cin' =3D> 'listing_param_input_div_id',
+            'gDossier' =3D> Dossier::id(),
+            'id' =3D> $this->Data->getp('id'),
+            'tb_id' =3D> 'definition_tb_id',
+            'ac' =3D> $_REQUEST['ac'],
+            'pc' =3D> $_REQUEST['plugin_code'])
+        );
+        $arg =3D str_replace('"', "'", $arg);
+        $button->javascript =3D 'listing_param_add(' . $arg . ')';
         echo $button->input();
     }
-    function add_parameter()
+
+    function add_parameter($l_id)
     {
-        $param=3Dnew RAPAV_Listing_Param();
+        $param =3D new RAPAV_Listing_Param();
+        $param->Param->l_id=3D$l_id;
         $param->input($this->Data->getp("id"));
     }
+
     /**
      * Return the name of the description of the category of the cards
      *=20
@@ -255,10 +287,12 @@
     function get_categorie_name()
     {
         global $cn;
-        if ($this->Data->getp('id')=3D=3D0) return;
-        $cat=3D$cn->get_value('select fd_label from fiche_def where fd_i=
d=3D$1',array($this->Data->getp('fiche_def_id')));
+        if ($this->Data->getp('id') =3D=3D 0)
+            return;
+        $cat =3D $cn->get_value('select fd_label from fiche_def where fd=
_id=3D$1', array($this->Data->getp('fiche_def_id')));
         return $cat;
     }
+
     /**
      * Return the name of the description of the category of the cards
      *=20
@@ -267,8 +301,11 @@
     function get_categorie_description()
     {
         global $cn;
-        if ($this->Data->getp('id')=3D=3D0) return;
-        $cat=3D$cn->get_value('select fd_description from fiche_def wher=
e fd_id=3D$1',array($this->Data->getp('fiche_def_id')));
+        if ($this->Data->getp('id') =3D=3D 0)
+            return;
+        $cat =3D $cn->get_value('select fd_description from fiche_def wh=
ere fd_id=3D$1', array($this->Data->getp('fiche_def_id')));
         return $cat;
     }
+
+
 }

Added: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	        =
                (rev 0)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
03 02:28:15 UTC (rev 595)
@@ -0,0 +1,126 @@
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Prop=
erties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of class_rapav_listing_compute
+ *
+ * @author dany
+ */
+require_once 'class_rapav_listing.php';
+require_once 'class_rapav_listing_formula.php';
+require_once 'class_rapport_avance_sql.php';
+
+class RAPAV_Listing_Compute
+{
+
+    /**
+     * < Data point to listing_compute
+     */
+    var $data;
+   =20
+     /**
+     * Type of operation
+     *    - 0 all operations
+     *    - 1 only paid operations
+     *    - 2 only UNpaid operations
+     */
+    private $type_operation;
+
+    function __construct()
+    {
+        $this->data =3D new RAPAV_Listing_Compute_SQL();
+    }
+
+    /**
+     * Compute all the values and save them in the table rapav_listing_c=
ompute
+     * @param RAPAV_Listing $rapav_listing
+     * @param type $p_date_start
+     * @param type $p_date_end
+     */
+    function compute(RAPAV_Listing &$rapav_listing, $p_date_start, $p_da=
te_end)
+    {
+        global $cn;
+        // save an object Listing_Compute with the flag to_keep to N
+        $this->data->l_start=3D$p_date_start;
+        $this->data->l_end=3D$p_date_end;
+        $this->data->l_keep=3D'N';
+        $this->data->l_id=3D$rapav_listing->Data->l_id;
+        $this->data->insert();
+       =20
+        // retrieve all the code from $rapav_listing
+        $rapav_listing->load_detail();
+        $a_code =3D $rapav_listing->a_detail;
+
+        // for each code, compute the value must end with the rapav_list=
ing_compute objects
+        $nb =3D count($a_code);
+
+        // ------------------------------------------------------
+        // For each card
+        $fiche_def =3D new Fiche_Def($cn);
+        $fiche_def->id=3D$rapav_listing->Data->getp('fiche_def_id');
+        $a_fiche =3D $fiche_def->get_by_type();
+        $nb_fiche =3D count($a_fiche);
+        for ($e =3D 0; $e < $nb_fiche; $e++)
+        {
+           =20
+            $a_later =3D array();
+            for ($i =3D 0; $i < $nb; $i++)
+            {
+                //Compute if an object either Rapav_Formula_Account, Rap=
av_Formula_Attribute,
+                // Rapav_Formula_Compute or Rapav_Formula_Formula,
+                unset($compute);
+                $compute =3D RAPAV_Listing_Formula::make_object($a_code[=
$i]->Param);
+                $compute->set_fiche($a_fiche[$e]['f_id']);
+               =20
+                if ($compute->sig =3D=3D 'COMP')
+                {
+                    $a_later[] =3D clone $compute;
+                } else
+                {
+                    $compute->set_listing_compute($this->data->lc_id);
+                    $compute->filter_operation($this->type_operation);
+                   =20
+                    if ( $i =3D=3D 0 ) $compute->save_fiche();
+                    //compute
+                    $compute->compute($p_date_start, $p_date_end);
+                    // save computed
+                    $compute->save_computed();
+                }
+            }
+            $nb_later =3D count($a_later);
+
+            /**
+             * for Listing_Formula_compute
+             */
+            for ($i =3D 0; $i < $nb_later; $i++)
+            {
+                $a_later[$i]->set_fiche($a_fiche[$e]['f_id']);
+                $compute->set_listing_compute($this->data->lc_id);
+                 if ( $i =3D=3D 0 )  $a_later[$i]->save_fiche();
+                $a_later[$i]->compute($p_date_start, $p_data_end);
+                $a_later[$i]->save_computed();
+            }
+        }
+    }
+        /**
+     * Filter the operations
+     *    - 0 all operations
+     *    - 1 only paid operations - only VEN & ACH
+     *    - 2 only UNpaid operations - only VEN & ACH
+     * @param $p_type
+     */
+    function filter_operation($p_type)
+    {
+        $this->type_operation =3D $p_type;
+    }
+    function display()
+    {
+       =20
+    }
+
+}

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
01 19:54:09 UTC (rev 594)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 02:28:15 UTC (rev 595)
@@ -12,6 +12,8 @@
  * @author dany
  */
 require_once 'class_impress.php';
+require_once 'class_rapav.php';
+require_once 'class_rapport_avance_sql.php';
=20
 abstract class RAPAV_Listing_Formula
 {
@@ -24,44 +26,15 @@
=20
     function save_computed()
     {
-       =20
+        $this->detail->lf_id=3D$this->fiche->lf_id;
+        $this->detail->lp_id=3D$this->data->lp_id;
+        $this->detail->save();
     }
-
-    function get_ledger_name()
+    function set_listing_compute($param)
     {
-        global $cn;
-        $ledger =3D "";
-        if ($this->data->jrn_def_id =3D=3D null || $this->data->jrn_def_=
id =3D=3D -1)
-        {
-            $ledger =3D " tous les journaux";
-        } else
-        {
-            $tledger =3D $cn->get_value('select jrn_def_name from jrn_de=
f where jrn_def_id=3D$1', array($this->data->jrn_def_id));
-            $ledger.=3D"  le journal " . $tledger;
-        }
-        return $ledger;
+        $this->detail->lc_id=3D$param;
+        $this->fiche->lc_id=3D$param;
     }
-
-    static function input_ledger()
-    {
-        global $cn;
-        $select =3D new ISelect('p_ledger');
-        $a_ledger =3D $cn->make_array('select jrn_def_id,jrn_def_name fr=
om jrn_def order by 2', 1);
-        $a_ledger[0]['label'] =3D '-- Tous les journaux -- ';
-        $select->value =3D $a_ledger;
-
-        echo '<p> Filtrage par journal ' . $select->input() . '</p>';
-    }
-
-    static function input_date_paiement()
-    {
-        $ck_paid =3D new ICheckBox('p_paid');
-        echo '<p> La date donn=C3=A9e concerne la date de paiement, ce q=
ui limitera la recherche aux journaux VEN et ACH ';
-        echo HtmlInput::infobulle(36);
-        echo $ck_paid->input();
-        echo '</p>';
-    }
-
     function set($p_array)
     {
         $this->data->setp("code", $p_array["code_id"]);
@@ -95,7 +68,7 @@
                 break;
=20
             default:
-                throw new Exception('Object ' .var_export( $obj,true) . =
' invalide ');
+                throw new Exception('Object ' . var_export($obj, true) .=
 ' invalide ');
                 break;
         }
         return $ret;
@@ -120,11 +93,27 @@
     {
         $this->data->load();
     }
+
     function set_listing($p_id)
     {
-        $this->data->setp('listing_id',$p_id);
+        $this->data->setp('listing_id', $p_id);
     }
=20
+    function set_fiche($f_id)
+    {
+        $this->fiche->f_id =3D $f_id;
+    }
+
+
+    function save_fiche()
+    {
+        $this->fiche->save();
+    }
+    function filter_operation($param)
+    {
+        $this->type_operation=3D$param;
+    }
+
 }
=20
 ////////////////////////////////////////////////////////////////////////=
///////////////////////////
@@ -143,6 +132,14 @@
     var $data;
=20
     /**
+     * < RAPAV_Listing_Compute_SQL object */
+    var $fiche;
+
+    /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $detail;
+
+    /**
      * categorie id */
     var $cat;
=20
@@ -150,11 +147,11 @@
      * Object signature */
     var $sig;
=20
-    function __construct(RAPAV_Listing_Param_SQL $obj, $p_cat_id =3D 0)
+    function __construct(RAPAV_Listing_Param_SQL $obj)
     {
         global $cn;
         $this->data =3D $obj;
-        if ($p_cat_id =3D=3D 0)
+        if ($this->data->getp('lp_id') > 0)
         {
             $this->cat =3D $cn->get_value('select fd_id=20
                                 from rapport_advanced.listing=20
@@ -164,11 +161,9 @@
             if ($this->cat =3D=3D "")
                 throw new Exception(__FILE__ . ':' . __LINE__ . 'Aucune =
cat=C3=A9gorie d=C3=A9finie');
         }
-        else
-        {
-            $this->cat =3D $p_cat_id;
-        }
         $this->sig =3D 'ATTR';
+        $this->fiche =3D new RAPAV_Listing_Compute_Fiche_SQL();
+        $this->detail =3D new RAPAV_Listing_Compute_Detail_SQL();
     }
=20
     function display()
@@ -180,7 +175,26 @@
=20
     function compute($p_start, $p_end)
     {
-        return 0;
+        global $cn;
+        $value=3D$cn->get_value("select ad_value from fiche_detail "
+                . "where "
+                . "f_id=3D$1 and ad_id=3D$2",array($this->fiche->f_id,
+                    $this->data->getp('attribut_card')));
+        $type=3D$cn->get_value('select ad_type from attr_def where=20
+                ad_id=3D$1',array($this->data->getp('attribut_card')));
+        switch ($type)
+        {
+            case "numeric":
+                $this->detail->ld_value_numeric=3D$value;
+                break;
+            case "date":
+                $this->detail->ld_value_date=3D$value;
+                break;
+            default:
+                $this->detail->ld_value_text=3D$value;
+                break;
+        }
+       =20
     }
=20
     function input()
@@ -192,10 +206,10 @@
                                         from
                                         attr_def as a join jnt_fic_attr =
as j on (a.ad_id=3Dj.ad_id)
                                         where
-                                        fd_id=3D' . $this->cat . ' order=
 by 2');
+                                        fd_id=3D' . $this->data->getp('l=
isting_id') . ' order by 2');
=20
         $select->selected =3D $this->data->getp('attribut_card');
-        return "Attribut =C3=A0 afficher pour chaque fiche ".$select->in=
put();
+        return "Attribut =C3=A0 afficher pour chaque fiche " . $select->=
input();
     }
=20
     function save($p_array)
@@ -213,6 +227,7 @@
         $this->data->save();
     }
=20
+
 }
=20
 ////////////////////////////////////////////////////////////////////////=
///////
@@ -234,21 +249,32 @@
     var $data;
=20
     /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $fiche;
+
+    /**
      * < Object signature=20
      */
     var $sig;
=20
-    function __construct(RAPAV_Listing_Param_SQL $obj,$p_cat_id =3D 0)
+    /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $detail;
+
+    function __construct(RAPAV_Listing_Param_SQL $obj, $p_cat_id =3D 0)
     {
         global $cn;
         $this->data =3D $obj;
         $this->sig =3D 'FORM';
+        $this->fiche =3D new RAPAV_Listing_Compute_Fiche_SQL();
+        $this->detail =3D new RAPAV_Listing_Compute_Detail_SQL();
     }
=20
     function display()
     {
-        $ledger =3D $this->get_ledger_name();
-        $paid =3D ( $this->data->date_paid !=3D 0 ) ? "la date concerne =
la date de paiement, la recherche sera limit=C3=A9e au journaux de type A=
CH & VEN" : "";
+        $ledger =3D RAPAV::get_ledger_name($this->data->jrn_def_id);
+        ;
+        $paid =3D RAPAV::str_date_type($this->data->date_paid);
         $str =3D sprintf("R=C3=A9sultat de la formule %s utilisant $ledg=
er %s", $this->data->fp_formula, $paid);
         return $str;
     }
@@ -269,8 +295,8 @@
         $account->set_attribute('noquery', 1);
         $account->set_attribute('account', "formula_input_id");
         echo $account->input();
-        parent::input_date_paiement();
-        parent::input_ledger();
+        RAPAV::input_date_paiement();
+        RAPAV::input_ledger();
     }
=20
     function save($p_array)
@@ -286,14 +312,7 @@
         parent::set_to_null($a_toclean);
         $this->data->setp('with_card', 'N');
         $this->data->setp('formula', $p_array['p_formula']);
-        if (isset($p_array['p_paid']))
-        {
-            $this->data->setp('date_paid', 1);
-        } else
-        {
-            $this->data->setp('date_paid', null);
-           =20
-        }
+        $this->data->setp('date_paid', $p_array['p_paid']);
         $this->data->setp('jrn_def_id', $p_array['p_ledger']);
         $this->data->setp('formula_type', 'FORM');
         $this->data->save();
@@ -305,20 +324,14 @@
      */
     function verify()
     {
-        if (Impress::check_formula($this->data->fp_formula) =3D=3D false=
)
-        {
-            $this->errcode =3D "Erreur dans votre formule";
-            return 1;
-        }
-        if (trim($this->data->fp_formula) =3D=3D "")
-        {
-            $this->errcode =3D " Aucune formule trouv=C3=A9e";
-            return 1;
-        }
-        return 0;
+        global $errcode;
+        $ret =3D RAPAV::verify_compute($this->data->fp_formula);
+        $this->errocode =3D $errcode;
+        return $ret;
     }
=20
 }
+
 ////////////////////////////////////////////////////////////////////////=
///////
 // RAPAV_Formula_Compute
 ////////////////////////////////////////////////////////////////////////=
///////
@@ -338,15 +351,25 @@
     var $data;
=20
     /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $fiche;
+
+    /**
      * < Object signature=20
      */
     var $sig;
=20
+    /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $detail;
+
     function __construct(RAPAV_Listing_Param_SQL $obj)
     {
         global $cn;
         $this->data =3D $obj;
         $this->sig =3D 'COMP';
+        $this->fiche =3D new RAPAV_Listing_Compute_Fiche_SQL();
+        $this->detail =3D new RAPAV_Listing_Compute_Detail_SQL();
     }
=20
     function display()
@@ -363,7 +386,7 @@
     function input()
     {
         global $cn;
-        $f_id=3D$this->data->getp('listing_id');
+        $f_id =3D $this->data->getp('listing_id');
         $account =3D new IText("form_compute");
         $account->size =3D 50;
         echo $account->input();
@@ -376,11 +399,11 @@
         $this->data->setp('listing_id', $p_array['listing_id']);
=20
         /* Clean everything but keep the lp_id, l_id, ad_id  + common */
-        $a_toclean=3Dexplode (',','operation_pcm_val,with_tmp_val,'
+        $a_toclean =3D explode(',', 'operation_pcm_val,with_tmp_val,'
                 . 'tmp_val,date_paid,jrn_def_id,type_sum_account,type_de=
tail,'
                 . 'tt_id,jrn_def_type,fp_signed,tva_id,lp_with_card,'
                 . 'lp_card_saldo,ad_id');
-       =20
+
         parent::set_to_null($a_toclean);
         $this->data->setp('formula', $p_array['form_compute']);
         $this->data->setp('formula_type', 'COMP');
@@ -393,32 +416,15 @@
      */
     function verify()
     {
-        if (trim($this->data->fp_formula) =3D=3D "")
-        {
-            $this->errcode =3D " Aucune formule trouv=C3=A9e";
-            return 1;
-        }
+        global $errcode;
+        $ret =3D RAPAV::verify_compute($this->data->fp_formula);
+        $this->errocode =3D $errcode;
+        return $ret;
+    }
=20
-        // copy $this->form->fp_formula to a variable
-        $formula =3D $this->data->fp_formula;
=20
-        // remove the valid
-        preg_match_all("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i", $formula,=
 $e);
-        $formula =3D preg_replace("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i"=
, '', $formula);
-        $formula =3D preg_replace('/([0-9]+.{0,1}[0.9]*)*(\+|-|\*|\/)*/'=
, '', $formula);
-        $formula =3D preg_replace('/(\(|\))/', '', $formula);
-        $formula =3D preg_replace('/\s/', '', $formula);
+}
=20
-        // if something remains it should be a mistake
-        if ($formula !=3D '')
-        {
-            $this->errcode =3D " Erreur dans la formule " . $formula;
-            return 1;
-        }
-        return 0;
-    }
-
-}
 ////////////////////////////////////////////////////////////////////////=
///////
 // RAPAV_Formula_Saldo
 ////////////////////////////////////////////////////////////////////////=
///////
@@ -447,21 +453,32 @@
     var $data;
=20
     /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $fiche;
+
+    /**
      * < Object signature=20
      */
     var $sig;
=20
+    /**
+     * < RAPAV_Listing_Detail_SQL object */
+    var $detail;
+
     function __construct(RAPAV_Listing_Param_SQL $obj)
     {
         global $cn;
         $this->data =3D $obj;
         $this->sig =3D 'ACCOUNT';
+        $this->fiche =3D new RAPAV_Listing_Compute_Fiche_SQL();
+        $this->detail =3D new RAPAV_Listing_Compute_Detail_SQL();
     }
=20
     function display()
     {
-        $ledger =3D $this->get_ledger_name();
-        $paid =3D ( $this->data->date_paid !=3D 0 ) ? "la date concerne =
la date de paiement, la recherche sera limit=C3=A9e au journaux de type A=
CH & VEN" : "";
+        $ledger =3D RAPAV::get_ledger_name($this->data->jrn_def_id);
+        ;
+        $paid =3D RAPAV::str_date_type($this->data->date_paid);
         $str =3D sprintf("R=C3=A9sultat de la formule %s utilisant $ledg=
er %s", $this->data->fp_formula, $paid);
         return $str;
     }
@@ -478,21 +495,21 @@
         $account->label =3D _("Recherche poste");
         $account->set_attribute('gDossier', dossier::id());
         $account->set_attribute('account', "formula_acc_input_id");
-        echo "Poste comptable utilis=C3=A9e avec chaque fiche ".$account=
->input();
-        $sel_total_type_row=3Dnew ISelect ('tt_id');
-        $sel_total_type_row->value=3D$cn->make_array('select tt_id,tt_la=
bel from '
+        echo "Poste comptable utilis=C3=A9e avec chaque fiche " . $accou=
nt->input();
+        $sel_total_type_row =3D new ISelect('tt_id');
+        $sel_total_type_row->value =3D $cn->make_array('select tt_id,tt_=
label from '
                 . ' rapport_advanced.total_type_account order by 2');
-       =20
+
         echo '<p>';
-        echo "type de total : ".$sel_total_type_row->input();
+        echo "type de total : " . $sel_total_type_row->input();
         echo '</p>';
-       =20
-        $ck=3Dnew ICheckBox('card_saldo');
+
+        $ck =3D new ICheckBox('card_saldo');
         echo '<p>';
-        echo 'Prendre le total de la fiche '.$ck->input();
+        echo 'Prendre le total de la fiche ' . $ck->input();
         echo '</p>';
-        parent::input_date_paiement();
-        parent::input_ledger();
+        RAPAV::input_date_paiement();
+        RAPAV::input_ledger();
     }
=20
     function save($p_array)
@@ -508,14 +525,7 @@
         parent::set_to_null($a_toclean);
         $this->data->setp('with_card', 'N');
         $this->data->setp('formula', $p_array['p_formula']);
-        if (isset($p_array['p_paid']))
-        {
-            $this->data->setp('date_paid', 1);
-        } else
-        {
-            $this->data->setp('date_paid', null);
-           =20
-        }
+        $this->data->setp('date_paid', $p_array['p_paid']);
         $this->data->setp('jrn_def_id', $p_array['p_ledger']);
         $this->data->setp('formula_type', 'ACCOUNT');
         $this->data->save();

Modified: trunk/rapport_avance/include/class_rapav_listing_param.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_param.php	2013-12-01=
 19:54:09 UTC (rev 594)
+++ trunk/rapport_avance/include/class_rapav_listing_param.php	2013-12-03=
 02:28:15 UTC (rev 595)
@@ -75,15 +75,21 @@
      */
     function input($p_id)
     {
+        global $cn;
         $code=3Dnew IText('code_id');
         $comment=3Dnew IText('comment');
         $order=3Dnew INum('order');
-        $order->value=3D10;
-        $attribute=3Dnew RAPAV_Formula_Attribute($this->Param,$p_id);
+        $order->value=3D$cn->get_value("select coalesce(max(l_order),0)+=
10 from=20
+                    rapport_advanced.listing_param=20
+                    where=20
+                    l_id=3D$1
+                    ",array($this->Param->l_id));
+        $attribute=3Dnew RAPAV_Formula_Attribute($this->Param);
         $formula=3Dnew RAPAV_Formula_Formula($this->Param);
         $compute=3Dnew RAPAV_Formula_Compute($this->Param);
         $account=3Dnew RAPAV_Formula_Account($this->Param);
         $account->set_listing($p_id);
+        $attribute->set_listing($p_id);
         require 'template/listing_param_input.php';
     }
 }

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-01 =
19:54:09 UTC (rev 594)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-03 =
02:28:15 UTC (rev 595)
@@ -27,260 +27,271 @@
  *
  */
 require_once 'class_phpcompta_sql.php';
-class formulaire_param_sql extends phpcompta_sql
+
+class formulaire_param_sql extends Phpcompta_SQL
 {
=20
-	function __construct($p_id=3D-1)
-	{
+    function __construct($p_id =3D -1)
+    {
=20
=20
-		$this->table =3D "rapport_advanced.formulaire_param";
-		$this->primary_key =3D "p_id";
+        $this->table =3D "rapport_advanced.formulaire_param";
+        $this->primary_key =3D "p_id";
=20
-		$this->name =3D array(
-			"p_id" =3D> "p_id",
-			"p_code" =3D> "p_code",
-			"p_libelle" =3D> "p_libelle",
-			"p_type" =3D> "p_type",
-			"p_order" =3D> "p_order",
-			"f_id" =3D> "f_id",
-			"t_id" =3D> "t_id"
-		);
+        $this->name =3D array(
+            "p_id" =3D> "p_id",
+            "p_code" =3D> "p_code",
+            "p_libelle" =3D> "p_libelle",
+            "p_type" =3D> "p_type",
+            "p_order" =3D> "p_order",
+            "f_id" =3D> "f_id",
+            "t_id" =3D> "t_id"
+        );
=20
-		$this->type =3D array(
-			"p_id" =3D> "numeric",
-			"p_code" =3D> "text",
-			"p_libelle" =3D> "text",
-			"p_type" =3D> "numeric",
-			"p_order" =3D> "numeric",
-			"f_id" =3D> "numeric",
-			"t_id" =3D> "numeric"
-		);
+        $this->type =3D array(
+            "p_id" =3D> "numeric",
+            "p_code" =3D> "text",
+            "p_libelle" =3D> "text",
+            "p_type" =3D> "numeric",
+            "p_order" =3D> "numeric",
+            "f_id" =3D> "numeric",
+            "t_id" =3D> "numeric"
+        );
=20
-		$this->default =3D array(
-			"p_id" =3D> "auto"
-		);
-		global $cn;
+        $this->default =3D array(
+            "p_id" =3D> "auto"
+        );
+        global $cn;
=20
-		parent::__construct($cn, $p_id);
-	}
+        parent::__construct($cn, $p_id);
+    }
=20
 }
-class formulaire_sql extends phpcompta_sql
+
+class formulaire_sql extends Phpcompta_SQL
 {
=20
-	function __construct($p_id=3D-1)
-	{
+    function __construct($p_id =3D -1)
+    {
=20
=20
-		$this->table =3D "rapport_advanced.formulaire";
-		$this->primary_key =3D "f_id";
+        $this->table =3D "rapport_advanced.formulaire";
+        $this->primary_key =3D "f_id";
=20
-		$this->name =3D array(
-			"f_id" =3D> "f_id",
-			"f_title" =3D> "f_title",
-			"f_description" =3D> "f_description",
-			"f_lob"=3D>"f_lob",
-			"f_mimetype"=3D>"f_mimetype",
-			"f_filename"=3D>"f_filename",
-			"f_size"=3D>"f_size"
-		);
+        $this->name =3D array(
+            "f_id" =3D> "f_id",
+            "f_title" =3D> "f_title",
+            "f_description" =3D> "f_description",
+            "f_lob" =3D> "f_lob",
+            "f_mimetype" =3D> "f_mimetype",
+            "f_filename" =3D> "f_filename",
+            "f_size" =3D> "f_size"
+        );
=20
-		$this->type =3D array(
-			"f_id" =3D> "numeric",
-			"f_title" =3D> "text",
-			"f_description" =3D> "text",
-			"f_lob"=3D>"oid",
-			"f_mimetype"=3D>"text",
-			"f_filename"=3D>"text",
-			"f_size"=3D>"numeric"
-		);
+        $this->type =3D array(
+            "f_id" =3D> "numeric",
+            "f_title" =3D> "text",
+            "f_description" =3D> "text",
+            "f_lob" =3D> "oid",
+            "f_mimetype" =3D> "text",
+            "f_filename" =3D> "text",
+            "f_size" =3D> "numeric"
+        );
=20
-		$this->default =3D array(
-			"f_id" =3D> "auto"
-		);
-		global $cn;
+        $this->default =3D array(
+            "f_id" =3D> "auto"
+        );
+        global $cn;
=20
-		parent::__construct($cn, $p_id);
-	}
+        parent::__construct($cn, $p_id);
+    }
=20
 }
-class Formulaire_Param_Detail_SQL extends phpcompta_sql
+
+class Formulaire_Param_Detail_SQL extends Phpcompta_SQL
 {
=20
-	function __construct($p_id=3D-1)
-	{
+    function __construct($p_id =3D -1)
+    {
=20
=20
-		$this->table =3D "rapport_advanced.formulaire_param_detail";
-		$this->primary_key =3D "fp_id";
+        $this->table =3D "rapport_advanced.formulaire_param_detail";
+        $this->primary_key =3D "fp_id";
=20
-		$this->name =3D array(
-			"fp_id" =3D> "fp_id",
-			"p_id" =3D> "p_id",
-			"tmp_val" =3D> "tmp_val",
-			"tva_id"=3D>"tva_id",
-			"fp_formula"=3D>"fp_formula",
-			"fp_signed"=3D>"fp_signed",
-			"jrn_def_type"=3D>"jrn_def_type",
-			"tt_id"=3D>"tt_id",
-			"type_detail"=3D>"type_detail",
-			"with_tmp_val"=3D>"with_tmp_val",
-			"type_sum_account"=3D>"type_sum_account",
-			"operation_pcm_val"=3D>"operation_pcm_val",
-                        "jrn_def_id"=3D>"jrn_def_id",
-                        "date_paid"=3D>"date_paid"
-		);
+        $this->name =3D array(
+            "fp_id" =3D> "fp_id",
+            "p_id" =3D> "p_id",
+            "tmp_val" =3D> "tmp_val",
+            "tva_id" =3D> "tva_id",
+            "fp_formula" =3D> "fp_formula",
+            "fp_signed" =3D> "fp_signed",
+            "jrn_def_type" =3D> "jrn_def_type",
+            "tt_id" =3D> "tt_id",
+            "type_detail" =3D> "type_detail",
+            "with_tmp_val" =3D> "with_tmp_val",
+            "type_sum_account" =3D> "type_sum_account",
+            "operation_pcm_val" =3D> "operation_pcm_val",
+            "jrn_def_id" =3D> "jrn_def_id",
+            "date_paid" =3D> "date_paid"
+        );
=20
-		$this->type =3D array(
-			"fp_id" =3D> "numeric",
-			"p_id" =3D> "numeric",
-			"tmp_val" =3D> "text",
-			"tva_id"=3D>"numeric",
-			"fp_formula"=3D>"text",
-			"fp_signed"=3D>"numeric",
-			"jrn_def_type"=3D>"text",
-			"tt_id"=3D>"numeric",
-			"type_detail"=3D>"numeric",
-			"with_tmp_val"=3D>"text",
-			"type_sum_account"=3D>"numeric",
-			"operation_pcm_val"=3D>"text",
-                         "jrn_def_id"=3D>"numeric",
-                         "date_paid"=3D>"numeric"
+        $this->type =3D array(
+            "fp_id" =3D> "numeric",
+            "p_id" =3D> "numeric",
+            "tmp_val" =3D> "text",
+            "tva_id" =3D> "numeric",
+            "fp_formula" =3D> "text",
+            "fp_signed" =3D> "numeric",
+            "jrn_def_type" =3D> "text",
+            "tt_id" =3D> "numeric",
+            "type_detail" =3D> "numeric",
+            "with_tmp_val" =3D> "text",
+            "type_sum_account" =3D> "numeric",
+            "operation_pcm_val" =3D> "text",
+            "jrn_def_id" =3D> "numeric",
+            "date_paid" =3D> "numeric"
+        );
=20
-		);
+        $this->default =3D array(
+            "fp_id" =3D> "auto"
+        );
+        global $cn;
=20
-		$this->default =3D array(
-			"fp_id" =3D> "auto"
-		);
-		global $cn;
+        parent::__construct($cn, $p_id);
+    }
=20
-		parent::__construct($cn, $p_id);
-	}
+}
=20
-}
-class RAPAV_Declaration_SQL extends phpcompta_sql
+class RAPAV_Declaration_SQL extends Phpcompta_SQL
 {
-	function __construct($p_id=3D-1)
-	{
=20
+    function __construct($p_id =3D -1)
+    {
=20
-		$this->table =3D "rapport_advanced.declaration";
-		$this->primary_key =3D "d_id";
=20
-		$this->name =3D array(
-			"d_id"=3D>"d_id",
-			"d_title"=3D>"d_title",
-			"d_description"=3D>'d_description',
-			"d_start"=3D>"d_start",
-			"d_end"=3D>"d_end",
-			"to_keep"=3D>"to_keep",
-			"d_generated"=3D>"d_generated",
-			"d_lob"=3D>"d_lob",
-			"d_filename"=3D>"d_filename",
-			"d_mimetype"=3D>"d_mimetype",
-			"d_size"=3D>"d_size",
-			"f_id"=3D>"f_id",
-			'd_step'=3D>'d_step'
-		);
+        $this->table =3D "rapport_advanced.declaration";
+        $this->primary_key =3D "d_id";
=20
-		$this->type =3D array(
-				"d_id"=3D>"numeric",
-			"d_title"=3D>"text",
-			"d_description"=3D>'text',
-			"d_start"=3D>"date",
-			"d_end"=3D>"date",
-			"to_keep"=3D>"text",
-			"d_generated"=3D>"date",
-			"f_id"=3D>"numeric",
-			"d_lob"=3D>"oid",
-			"d_filename"=3D>"text",
-			"d_mimetype"=3D>"text",
-			"d_size"=3D>"numeric",
-			'd_step'=3D>'numeric'
-		);
+        $this->name =3D array(
+            "d_id" =3D> "d_id",
+            "d_title" =3D> "d_title",
+            "d_description" =3D> 'd_description',
+            "d_start" =3D> "d_start",
+            "d_end" =3D> "d_end",
+            "to_keep" =3D> "to_keep",
+            "d_generated" =3D> "d_generated",
+            "d_lob" =3D> "d_lob",
+            "d_filename" =3D> "d_filename",
+            "d_mimetype" =3D> "d_mimetype",
+            "d_size" =3D> "d_size",
+            "f_id" =3D> "f_id",
+            'd_step' =3D> 'd_step'
+        );
=20
-		$this->default =3D array(
-			"d_id" =3D> "auto",
-			"d_generated"=3D>"auto"
-		);
-		global $cn;
+        $this->type =3D array(
+            "d_id" =3D> "numeric",
+            "d_title" =3D> "text",
+            "d_description" =3D> 'text',
+            "d_start" =3D> "date",
+            "d_end" =3D> "date",
+            "to_keep" =3D> "text",
+            "d_generated" =3D> "date",
+            "f_id" =3D> "numeric",
+            "d_lob" =3D> "oid",
+            "d_filename" =3D> "text",
+            "d_mimetype" =3D> "text",
+            "d_size" =3D> "numeric",
+            'd_step' =3D> 'numeric'
+        );
=20
-		$this->date_format =3D "DD.MM.YYYY";
-		parent::__construct($cn, $p_id);
-	}
+        $this->default =3D array(
+            "d_id" =3D> "auto",
+            "d_generated" =3D> "auto"
+        );
+        global $cn;
=20
+        $this->date_format =3D "DD.MM.YYYY";
+        parent::__construct($cn, $p_id);
+    }
+
 }
-class RAPAV_Declaration_Row_SQL extends phpcompta_sql
+
+class RAPAV_Declaration_Row_SQL extends Phpcompta_SQL
 {
-function __construct($p_id=3D-1)
-	{
=20
+    function __construct($p_id =3D -1)
+    {
=20
-		$this->table =3D "rapport_advanced.declaration_row";
-		$this->primary_key =3D "dr_id";
=20
-		$this->name =3D array(
-			"dr_id"=3D>"dr_id",
-			"d_id"=3D>"d_id",
-			"dr_libelle"=3D>"dr_libelle",
-			"dr_order"=3D>"dr_order",
-			"dr_code"=3D>"dr_code",
-			"dr_amount"=3D>"dr_amount",
-			"dr_type"=3D>"dr_type",
-			"dr_start"=3D>"dr_start",
-			"dr_end"=3D>"dr_end"
-		);
+        $this->table =3D "rapport_advanced.declaration_row";
+        $this->primary_key =3D "dr_id";
=20
-		$this->type =3D array(
-			"dr_id"=3D>"numeric",
-			"d_id"=3D>"numeric",
-			"dr_libelle"=3D>"text",
-			"dr_order"=3D>"text",
-			"dr_code"=3D>"numeric",
-			"dr_amount"=3D>"numeric",
-			"dr_type"=3D>"numeric",
-			"dr_start"=3D>"date",
-			"dr_end"=3D>"date"
-		);
+        $this->name =3D array(
+            "dr_id" =3D> "dr_id",
+            "d_id" =3D> "d_id",
+            "dr_libelle" =3D> "dr_libelle",
+            "dr_order" =3D> "dr_order",
+            "dr_code" =3D> "dr_code",
+            "dr_amount" =3D> "dr_amount",
+            "dr_type" =3D> "dr_type",
+            "dr_start" =3D> "dr_start",
+            "dr_end" =3D> "dr_end"
+        );
=20
-		$this->default =3D array(
-		);
-		global $cn;
-		$this->date_format=3D'DD.MM.YYYY';
-		parent::__construct($cn, $p_id);
-	}
+        $this->type =3D array(
+            "dr_id" =3D> "numeric",
+            "d_id" =3D> "numeric",
+            "dr_libelle" =3D> "text",
+            "dr_order" =3D> "text",
+            "dr_code" =3D> "numeric",
+            "dr_amount" =3D> "numeric",
+            "dr_type" =3D> "numeric",
+            "dr_start" =3D> "date",
+            "dr_end" =3D> "date"
+        );
+
+        $this->default =3D array(
+        );
+        global $cn;
+        $this->date_format =3D 'DD.MM.YYYY';
+        parent::__construct($cn, $p_id);
+    }
+
 }
-class RAPAV_Declaration_Row_Detail_SQL extends phpcompta_sql
+
+class RAPAV_Declaration_Row_Detail_SQL extends Phpcompta_SQL
 {
-	function __construct($p_id=3D-1)
-	{
=20
+    function __construct($p_id =3D -1)
+    {
=20
-		$this->table =3D "rapport_advanced.declaration_row_detail";
-		$this->primary_key =3D "ddr_id";
=20
-		$this->name =3D array(
-			"ddr_id"=3D>"ddr_id",
-			"ddr_amount"=3D>"ddr_amount",
-			"dr_id"=3D>"dr_id"
-		);
+        $this->table =3D "rapport_advanced.declaration_row_detail";
+        $this->primary_key =3D "ddr_id";
=20
-		$this->type =3D array(
-			"ddr_id"=3D>"numeric",
-			"ddr_amount"=3D>"numeric",
-			"dr_id"=3D>"numeric"
-		);
+        $this->name =3D array(
+            "ddr_id" =3D> "ddr_id",
+            "ddr_amount" =3D> "ddr_amount",
+            "dr_id" =3D> "dr_id"
+        );
=20
-		$this->default =3D array(
-			"ddr_id" =3D> "auto"
-		);
-		global $cn;
+        $this->type =3D array(
+            "ddr_id" =3D> "numeric",
+            "ddr_amount" =3D> "numeric",
+            "dr_id" =3D> "numeric"
+        );
=20
-		parent::__construct($cn, $p_id);
-	}
+        $this->default =3D array(
+            "ddr_id" =3D> "auto"
+        );
+        global $cn;
+
+        parent::__construct($cn, $p_id);
+    }
+
 }
-class RAPAV_Listing_SQL extends phpcompta_sql
+
+class RAPAV_Listing_SQL extends Phpcompta_SQL
 {
=20
     function __construct($p_id =3D -1)
@@ -290,7 +301,7 @@
         $this->name =3D array(
             "id" =3D> "l_id",
             "description" =3D> "l_description",
-            "name"=3D>'l_name',
+            "name" =3D> 'l_name',
             "lob" =3D> "l_lob",
             "filename" =3D> "l_filename",
             "mimetype" =3D> "l_mimetype",
@@ -299,10 +310,10 @@
         );
         $this->type =3D array(
             "l_id" =3D> "numeric",
-            "l_name"=3D>'text',
+            "l_name" =3D> 'text',
             "l_description" =3D> "text",
             "l_lob" =3D> "oid",
-            "l_filename" =3D> "text",=20
+            "l_filename" =3D> "text",
             "l_mimetype" =3D> "text",
             "l_size" =3D> "numeric",
             "fd_id" =3D> "numeric"
@@ -317,11 +328,12 @@
=20
 }
=20
-class RAPAV_Listing_Param_SQL extends Phpcompta_Sql
+class RAPAV_Listing_Param_SQL extends Phpcompta_SQL
 {
-/*
- *  operation_pcm_val,with_tmp_val,tmp_val,date_paid,jrn_def_id,type_sum=
_account,type_detail,tt_id,jrn_def_type,fp_signed,fp_formula,tva_id,lp_wi=
th_card,lp_card_saldo,ad_id,l_order,l_card,lp_comment,lp_code,l_id,lp_id
- */
+    /*
+     *  operation_pcm_val,with_tmp_val,tmp_val,date_paid,jrn_def_id,type=
_sum_account,type_detail,tt_id,jrn_def_type,fp_signed,fp_formula,tva_id,l=
p_with_card,lp_card_saldo,ad_id,l_order,l_card,lp_comment,lp_code,l_id,lp=
_id
+     */
+
     function __construct($p_id =3D -1)
     {
=20
@@ -385,5 +397,198 @@
=20
 }
=20
+/**
+ * @brief Manage the table rapport_advanced.listing_compute
+ */
+class RAPAV_Listing_Compute_SQL extends Phpcompta_SQL
+{
=20
+    //------ Attributes-----
+    var $lc_id;
+    var $l_id;
+    var $l_description;
+    var $l_start;
+    var $l_end;
+    var $l_keep;
+    var $l_timestamp;
+
+    /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
+
+    function __construct($p_id =3D -1)
+    {
+
+
+        $this->table =3D "rapport_advanced.listing_compute";
+        $this->primary_key =3D "lc_id";
+
+        $this->name =3D array(
+            "lc_id" =3D> "lc_id"
+            , "l_id" =3D> "l_id"
+            , "description" =3D> "l_description"
+            , "l_start" =3D> "l_start"
+            , "l_end" =3D> "l_end"
+            , "l_keep" =3D> "l_keep"
+            , "l_timestamp" =3D> "l_timestamp"
+        );
+
+        $this->type =3D array(
+            "lc_id" =3D> "lc_id",
+            "l_id" =3D> "numeric"
+            , "l_description" =3D> "text"
+            , "l_start" =3D> "date"
+            , "l_end" =3D> "date"
+            , "l_keep" =3D> "text"
+            , "l_timestamp" =3D> "date"
+        );
+
+        $this->default =3D array(
+            "lc_id" =3D> "auto"
+            , "l_timestamp" =3D> "auto"
+        );
+        global $cn;
+        $this->date_format =3D "DD.MM.YYYY";
+        parent::__construct($cn, $p_id);
+    }
+
+    /**
+     * @brief Add here your own code: verify is always call BEFORE inser=
t or update
+     */
+    public function verify()
+    {
+        parent::verify();
+    }
+
+}
+
+/**
+ * @brief Manage the table rapport_advanced.listing_compute_fiche
+ */
+class RAPAV_Listing_Compute_Fiche_SQL extends Phpcompta_SQL
+{
+
+    //------ Attributes-----
+    var $lf_id;
+    var $f_id;
+    var $lf_lob;
+    var $lf_filename;
+    var $lf_mimetype;
+    var $lc_id;
+
+    /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
+
+    function __construct($p_id =3D -1)
+    {
+
+
+        $this->table =3D "rapport_advanced.listing_compute_fiche";
+        $this->primary_key =3D "lf_id";
+
+        $this->name =3D array(
+            "lf_id" =3D> "lf_id",=20
+            "f_id" =3D> "f_id",
+            "lc_id" =3D> "lc_id"
+            , "lf_lob" =3D> "lf_lob"
+            , "lf_filename" =3D> "lf_filename"
+            , "lf_mimetype" =3D> "lf_mimetype"
+        );
+
+        $this->type =3D array(
+            "lf_id" =3D> "numeric",
+            "lc_id" =3D> "numeric",
+            "f_id" =3D> "numeric"
+            , "lf_lob" =3D> "set_me"
+            , "lf_filename" =3D> "text"
+            , "lf_mimetype" =3D> "text"
+        );
+
+        $this->default =3D array(
+            "lf_id" =3D> "auto"
+        );
+        global $cn;
+        $this->date_format =3D "DD.MM.YYYY";
+        parent::__construct($cn, $p_id);
+    }
+
+    /**
+     * @brief Add here your own code: verify is always call BEFORE inser=
t or update
+     */
+    public function verify()
+    {
+        parent::verify();
+    }
+
+}
+
+/**
+ * @file
+ * @brief Manage the table rapport_advanced.listing_compute_detail
+ *
+ *
+  Example
+  @code
+
+  @endcode
+ */
+require_once('class_phpcompta_sql.php');
+
+/**
+ * @brief Manage the table rapport_advanced.listing_compute_detail
+ */
+class RAPAV_Listing_Compute_Detail_SQL extends Phpcompta_SQL
+{
+
+    //------ Attributes-----
+    var $lc_id;
+    var $ld_value_date;
+    var $ld_value_numeric;
+    var $ld_value_text;
+    var $lp_id;
+    var $lf_id;
+
+    /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
+
+    function __construct($p_id =3D -1)
+    {
+
+
+        $this->table =3D "rapport_advanced.listing_compute_detail";
+        $this->primary_key =3D "ld_id";
+
+        $this->name =3D array(
+            "ld_id" =3D> "ld_id", "lc_id" =3D> "lc_id"
+            , "ld_value_date" =3D> "ld_value_date"
+            , "ld_value_numeric" =3D> "ld_value_numeric"
+            , "ld_value_text" =3D> "ld_value_text"
+            , "lp_id" =3D> "lp_id"
+            , "lf_id" =3D> "lf_id"
+        );
+
+        $this->type =3D array(
+            "ld_id" =3D> "numeric",
+            "lc_id" =3D> "numeric"
+            , "ld_value_date" =3D> "date"
+            , "ld_value_numeric" =3D> "numeric"
+            , "ld_value_text" =3D> "text"
+            , "lp_id" =3D> "numeric"
+            , "lf_id" =3D> "numeric"
+        );
+
+        $this->default =3D array(
+            "ld_id" =3D> "auto"
+        );
+        global $cn;
+        $this->date_format =3D "DD.MM.YYYY";
+        parent::__construct($cn, $p_id);
+    }
+
+    /**
+     * @brief Add here your own code: verify is always call BEFORE inser=
t or update
+     */
+    public function verify()
+    {
+        parent::verify();
+    }
+
+}
+
 ?>

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-01 19:54:09 =
UTC (rev 594)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-03 02:28:15 =
UTC (rev 595)
@@ -26,6 +26,8 @@
  *
  */
 require_once 'class_rapav_declaration.php';
+require_once 'class_rapav_listing.php';
+require_once 'class_rapav_listing_compute.php';
 global $cn;
=20
 /*
@@ -33,118 +35,274 @@
  */
 if (isset($_POST['save']))
 {
-	$decl =3D new Rapav_Declaration();
-	$decl->d_id =3D $_POST['d_id'];
-	$decl->load();
-	$decl->to_keep =3D 'Y';
-	$decl->f_id =3D $_POST['p_form'];
-	$decl->save();
-	if ( $decl->d_step =3D=3D 0 ) {
-		$decl->generate_document();
-	}	else
-	{
-		// get empty lob
-		$decl->d_filename =3D null;
-		$decl->d_size =3D null;
-		$decl->d_mimetype =3D null;
-		$decl->d_lob =3D null;
-		$decl->update();
-	}
-	$decl->display();
-	echo '<p class=3D"notice">'._(' Sauv=C3=A9 ').date('d-m-Y H:i').'</p>';
+    $decl =3D new Rapav_Declaration();
+    $decl->d_id =3D $_POST['d_id'];
+    $decl->load();
+    $decl->to_keep =3D 'Y';
+    $decl->f_id =3D $_POST['p_form'];
+    $decl->save();
+    if ($decl->d_step =3D=3D 0)
+    {
+        $decl->generate_document();
+    } else
+    {
+        // get empty lob
+        $decl->d_filename =3D null;
+        $decl->d_size =3D null;
+        $decl->d_mimetype =3D null;
+        $decl->d_lob =3D null;
+        $decl->update();
+    }
+    $decl->display();
+    echo '<p class=3D"notice">' . _(' Sauv=C3=A9 ') . date('d-m-Y H:i') =
. '</p>';
=20
-	$ref_csv =3D HtmlInput::array_to_string(array('gDossier', 'plugin_code'=
, 'd_id'), $_REQUEST, 'extension.raw.php?');
-	$ref_csv.=3D"&amp;act=3Dexport_decla_csv";
-	echo HtmlInput::button_anchor("Export CSV", $ref_csv, 'export_id');
-	if ( $decl->d_filename !=3D '' && $decl->d_step=3D=3D0) echo $decl->anc=
hor_document();
-	exit();
+    $ref_csv =3D HtmlInput::array_to_string(array('gDossier', 'plugin_co=
de', 'd_id'), $_REQUEST, 'extension.raw.php?');
+    $ref_csv.=3D"&amp;act=3Dexport_decla_csv";
+    echo HtmlInput::button_anchor("Export CSV", $ref_csv, 'export_id');
+    if ($decl->d_filename !=3D '' && $decl->d_step =3D=3D 0)
+        echo $decl->anchor_document();
+    exit();
 }
 /*
  * compute and propose to modify and save
  */
 if (isset($_GET['compute']))
 {
-	$decl =3D new Rapav_Declaration();
-	if (isDate($_GET['p_start']) =3D=3D 0 || isDate($_GET['p_end']) =3D=3D =
0)
-	{
-		alert('Date invalide');
-	}
-	else
-	{
-		$decl->d_description=3D$_GET['p_description'];
-		$decl->compute($_GET['p_form'], $_GET['p_start'], $_GET['p_end'],$_GET=
['p_step']);
-		echo '<form class=3D"print" method=3D"POST">';
-		echo HtmlInput::hidden('p_form', $_GET['p_form']);
-		$decl->display();
-		echo HtmlInput::submit('save', 'Sauver');
-		echo '</form>';
-		exit();
-	}
+    $decl =3D new Rapav_Declaration();
+    if (isDate($_GET['p_start']) =3D=3D 0 || isDate($_GET['p_end']) =3D=3D=
 0)
+    {
+        alert('Date invalide');
+    } else
+    {
+        $decl->d_description =3D $_GET['p_description'];
+        $decl->compute($_GET['p_form'], $_GET['p_start'], $_GET['p_end']=
, $_GET['p_step']);
+        echo '<form class=3D"print" method=3D"POST">';
+        echo HtmlInput::hidden('p_form', $_GET['p_form']);
+        $decl->display();
+        echo HtmlInput::submit('save', 'Sauver');
+        echo '</form>';
+        exit();
+    }
 }
+/*
+ * compute listing
+ */
+if (isset($_GET['compute_listing']))
+{
+    $listing =3D new RAPAV_Listing_Compute();
+    if (isDate($_GET['p_start']) =3D=3D 0 || isDate($_GET['p_end']) =3D=3D=
 0)
+    {
+        alert('Date invalide');
+    } else
+    {
+        $listing->data->setp('description', $_GET['p_description']);
+        $p_listing =3D new Rapav_Listing($_GET['p_listing']);
+        $listing->filter_operation($_GET['p_operation_paid']);
+        $listing->compute($p_listing, $_GET['p_start'], $_GET['p_end']);
+        echo '<form class=3D"print" method=3D"POST">';
+        $listing->display();
+        echo HtmlInput::submit('save_listing', 'Sauver');
+        echo '</form>';
+        exit();
+    }
+}
+/*
+ * For rapport
+ */
 $date_start =3D new IDate('p_start');
 $date_end =3D new IDate('p_end');
 $hidden =3D HtmlInput::array_to_hidden(array('gDossier', 'ac', 'plugin_c=
ode', 'sa'), $_GET);
 $select =3D new ISelect('p_form');
 $select->value =3D $cn->make_array('select f_id,f_title from rapport_adv=
anced.formulaire order by 2');
-$description=3Dnew ITextArea('p_description');
-$description->heigh=3D2;
-$description->width=3D80;
+$description =3D new ITextArea('p_description');
+$description->heigh =3D 2;
+$description->style =3D ' class=3D"itextarea" style=3D"margin:0"';
=20
-$istep=3Dnew ISelect('p_step');
-$istep->value=3Darray(
-		array('label'=3D>'Aucun','value'=3D>0),
-		array('label'=3D>'7 jours','value'=3D>1),
-		array('label'=3D>'14 jours','value'=3D>2),
-		array('label'=3D>'1 mois','value'=3D>3),
-		array('label' =3D> '2 mois', 'value' =3D> 4),
-	array('label' =3D> '3 mois', 'value' =3D> 5)
+$description->width =3D 80;
+
+$istep =3D new ISelect('p_step');
+$istep->value =3D array(
+    array('label' =3D> 'Aucun', 'value' =3D> 0),
+    array('label' =3D> '7 jours', 'value' =3D> 1),
+    array('label' =3D> '14 jours', 'value' =3D> 2),
+    array('label' =3D> '1 mois', 'value' =3D> 3),
+    array('label' =3D> '2 mois', 'value' =3D> 4),
+    array('label' =3D> '3 mois', 'value' =3D> 5)
 );
+/*
+ * For listing
+ */
+$date_start_listing =3D new IDate('p_start');
+$date_end_listing =3D new IDate('p_end');
+$select_listing =3D new ISelect('p_listing');
+$select_listing->value =3D $cn->make_array("select l_id, l_name||' '||co=
alesce(l_description,'') from rapport_advanced.listing order by 2");
+$description_listing =3D new ITextArea('p_description');
+$description_listing->heigh =3D 2;
+$description_listing->style =3D ' class=3D"itextarea" style=3D"margin:0"=
';
+$description_listing->width =3D 80;
+$operation_paid =3D new ISelect('p_operation_paid');
+
+$operation_paid->value =3D array(
+    array('value' =3D> 0, 'label' =3D> 'Toutes les op=C3=A9rations'),
+    array('value' =3D> 1, 'label' =3D> 'Uniquement les op=C3=A9rations p=
ay=C3=A9es'),
+    array('value' =3D> 2, 'label' =3D> 'Uniquement les op=C3=A9rations n=
on pay=C3=A9es')
+);
 ?>
-<form id=3D"declaration_form_id" method=3D"GET" onsubmit=3D"return valid=
ate()">
-	<?php echo  $hidden?>
-	<table>
-		<tr>
-			<td>
-				D=C3=A9claration
-			</td>
-			<td>
-				<?php echo  $select->input()?>
-			</td>
-			</tr>
-			<tr>
-	<td> Description</td><td> <?php echo $description->input()?></td>
-	</tr>
-		<tr>
-			<td>
-				Date de d=C3=A9but
-			</td>
-			<td>
-				<?php echo  $date_start->input()?>
-			</td>
-		</tr>
-		<tr>
-			<td>
-				Date de fin
-			</td>
-			<td>
-				<?php echo  $date_end->input()?>
-			</td>
-		</tr>
-		<tr>
-			<td>
-				Etape de
-			</td>
-			<td>
-				<?php echo  $istep->input()?>
-			</td>
-		</tr>
-	</table>
-	</p>
-	<?php echo  HtmlInput::submit('compute', 'G=C3=A9n=C3=A9rer')?>
-</form>
+<div id=3D"Choix">
+    <h2>Choisissez ce que vous souhaitez g=C3=A9n=C3=A9rer</h2>
+    <table style=3D"border-collapse: collapse;width: 40%">
+        <tr >
+            <td id=3D"rapport_td_id" class=3D"mtitle" style=3D"border-ra=
dius:0">
+                <A class=3D"mtitle" HREF=3D"javascript:void(0)" onclick=3D=
"select_rapport();"> Rapport</A>
+            </td>
+            <td id=3D"listing_td_id" class=3D"mtitle" style=3D"border-ra=
dius:0">
+                <A class=3D"mtitle" HREF=3D"javascript:void(0)"onclick=3D=
"select_listing();"> Listing / Documents</A>
+            </td>
+        </tr>
+    </table>
+</div>
+
+<div id=3D"id_rapport_div" style=3D"display: none">
+    <form id=3D"declaration_form_id" method=3D"GET" onsubmit=3D"return v=
alidate()">
+        <?php echo $hidden ?>
+        <input type=3D"hidden" name=3D"form" value=3D"rapport">
+        <table style=3D"min-width: 40%">
+            <tr>
+                <td>
+                    D=C3=A9claration
+                </td>
+                <td>
+                    <?php echo $select->input() ?>
+                </td>
+            </tr>
+            <tr>
+                <td> Description</td><td> <?php echo $description->input=
() ?></td>
+            </tr>
+            <tr>
+                <td>
+                    Date de d=C3=A9but
+                </td>
+                <td>
+                    <?php echo $date_start->input() ?>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    Date de fin
+                </td>
+                <td>
+                    <?php echo $date_end->input() ?>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    Etape de
+                </td>
+                <td>
+                    <?php echo $istep->input() ?>
+                </td>
+            </tr>
+        </table>
+        </p>
+        <?php echo HtmlInput::submit('compute', 'G=C3=A9n=C3=A9rer') ?>
+    </form>
+</div>
+<div id=3D"id_listing_div" style=3D"display: none">
+    <form method=3D"GET" onsubmit=3D"return validate_listing()">
+        <?php echo $hidden ?>
+        <input type=3D"hidden" name=3D"form" value=3D"rapport">
+
+        <table style=3D"min-width: 40%">
+            <tr>
+                <td>
+                    D=C3=A9claration
+                </td>
+                <td>
+                    <?php echo $select_listing->input() ?>
+                </td>
+            </tr>
+            <tr>
+                <td> Description</td><td> <?php echo $description_listin=
g->input() ?></td>
+            </tr>
+            <tr>
+                <td>
+                    Date de d=C3=A9but
+                </td>
+                <td>
+                    <?php echo $date_start_listing->input() ?>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    Date de fin
+                </td>
+                <td>
+                    <?php echo $date_end_listing->input() ?>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    Op=C3=A9rations
+                </td>
+                <td>
+                    <?php echo $operation_paid->input(); ?>
+                </td>
+            </tr>
+        </table>
+        </p>
+        <?php echo HtmlInput::submit('compute_listing', 'G=C3=A9n=C3=A9r=
er') ?>
+    </form>
+</div>
 <script charset=3D"UTF8" lang=3D"javascript">
-	function validate() {
-		if ( check_date_id('<?php echo  $date_start->id?>') =3D=3D false ) {al=
ert('Date de d=C3=A9but incorrecte');$('<?php echo  $date_start->id?>').s=
tyle.borderColor=3D'red';$('<?php echo  $date_start->id?>').style.borderW=
idth=3D2;return false;}
-		if ( check_date_id('<?php echo  $date_end->id?>') =3D=3D false ) {aler=
t('Date de fin incorrecte');$('<?php echo  $date_end->id?>').style.border=
Color=3D'red';$('<?php echo  $date_end->id?>').style.borderWidth=3D2;retu=
rn false;}
-	}
+    function validate() {
+        if (check_date_id('<?php echo $date_start->id ?>') =3D=3D false)=
 {
+            alert('Date de d=C3=A9but incorrecte');
+            $('<?php echo $date_start->id ?>').style.borderColor =3D 're=
d';
+            $('<?php echo $date_start->id ?>').style.borderWidth =3D 2;
+            return false;
+        }
+        if (check_date_id('<?php echo $date_end->id ?>') =3D=3D false) {
+            alert('Date de fin incorrecte');
+            $('<?php echo $date_end->id ?>').style.borderColor =3D 'red'=
;
+            $('<?php echo $date_end->id ?>').style.borderWidth =3D 2;
+            return false;
+        }
+        return true;
+    }
+    function validate_listing() {
+        /**
+         * @todo to adapt to listing
+         */
+        console.log("in validate_listing");
+        if (check_date_id('<?php echo $date_start_listing->id ?>') =3D=3D=
 false) {
+            alert('Date de d=C3=A9but incorrecte');
+            $('<?php echo $date_start_listing->id ?>').style.borderColor=
 =3D 'red';
+            $('<?php echo $date_start_listing->id ?>').style.borderWidth=
 =3D 2;
+            return false;
+        }
+        if (check_date_id('<?php echo $date_end_listing->id ?>') =3D=3D =
false) {
+            alert('Date de fin incorrecte');
+            $('<?php echo $date_end_listing->id ?>').style.borderColor =3D=
 'red';
+            $('<?php echo $date_end_listing->id ?>').style.borderWidth =3D=
 2;
+            return false;
+        }
+        return true;
+    }
+    function select_rapport() {
+        $('id_rapport_div').show();
+        $('id_listing_div').hide();
+        $('rapport_td_id').addClassName('selectedcell');
+        if ($('listing_td_id').hasClassName('selectedcell')) {
+            $('listing_td_id').removeClassName('selectedcell');
+        }
+    }
+    function select_listing() {
+        $('id_rapport_div').hide();
+        $('id_listing_div').show();
+        $('listing_td_id').addClassName('selectedcell');
+        if ($('rapport_td_id').hasClassName('selectedcell')) {
+            $('rapport_td_id').removeClassName('selectedcell');
+        }
+
+    }
 </script>
\ No newline at end of file

Modified: trunk/rapport_avance/rapav_constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_constant.php	2013-12-01 19:54:09 UTC (rev =
594)
+++ trunk/rapport_avance/rapav_constant.php	2013-12-03 02:28:15 UTC (rev =
595)
@@ -9,7 +9,7 @@
=20
 require_once ('class_database.php');
=20
-global $cn,$rapav_version;
+global $cn,$rapav_version,$errcode;
 $cn=3Dnew Database (dossier::id());
 $rapav_version=3D4;
 ?>

Added: trunk/rapport_avance/sql/2-add-compute.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-add-compute.sql	                        (r=
ev 0)
+++ trunk/rapport_avance/sql/2-add-compute.sql	2013-12-03 02:28:15 UTC (r=
ev 595)
@@ -0,0 +1,6 @@
+-- for computing we need several new tables
+-- TABLES are :
+-- 1. listing_compute
+-- 2. listing_compute_detail
+-- 3. listing_condition
+-- 4. listing_compute_fiche

Added: trunk/rapport_avance/sql/2-listing_compute.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute.sql	                      =
  (rev 0)
+++ trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-03 02:28:15 UT=
C (rev 595)
@@ -0,0 +1,33 @@
+=EF=BB=BF-- Table: rapport_advanced.listing_compute
+
+-- DROP TABLE rapport_advanced.listing_compute;
+
+CREATE TABLE rapport_advanced.listing_compute
+(
+  lc_id bigserial NOT NULL, -- PK
+  l_id bigint, -- FK to listing
+  l_description text, -- Description or note
+  l_start date, -- start data
+  l_end date, -- end_date
+  l_keep character(1) NOT NULL DEFAULT 'N'::bpchar, -- If yes, it is kee=
ped with N it will deleted
+  l_timestamp timestamp without time zone DEFAULT now(),
+  CONSTRAINT listing_compute_pkey PRIMARY KEY (lc_id ),
+  CONSTRAINT listing_fk FOREIGN KEY (l_id)
+      REFERENCES rapport_advanced.listing (l_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITH (
+  OIDS=3DFALSE
+);
+ALTER TABLE rapport_advanced.listing_compute
+  OWNER TO phpcompta;
+COMMENT ON TABLE rapport_advanced.listing_compute
+  IS 'Parent of listing_compute_detail
+';
+COMMENT ON COLUMN rapport_advanced.listing_compute.lc_id IS 'PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_id IS 'FK to listin=
g';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_description IS 'Des=
cription or note';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_start IS 'start dat=
a';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_end IS 'end_date';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_keep IS 'If yes, it=
 is keeped with N it will deleted';
+

Added: trunk/rapport_avance/sql/2-listing_compute_detail.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_detail.sql	               =
         (rev 0)
+++ trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-03 02:2=
8:15 UTC (rev 595)
@@ -0,0 +1,55 @@
+=EF=BB=BF-- Table: rapport_advanced.listing_compute_detail
+
+-- DROP TABLE rapport_advanced.listing_compute_detail;
+
+CREATE TABLE rapport_advanced.listing_compute_detail
+(
+  ld_id bigserial NOT NULL, -- PK
+  lc_id bigint, -- fk to listing_compute
+  ld_value_date date, -- Used when computed value is a date
+  ld_value_numeric numeric(20,4), -- Used when computed value is numeric
+  ld_value_text text, -- Used when computed value is a text
+  lp_id bigint, -- fk to listing_param, used for the condition
+  lf_id bigint, -- FK to listing_compute_fiche
+  CONSTRAINT listing_compute_detail_pkey PRIMARY KEY (ld_id ),
+  CONSTRAINT listing_compute_detail_lc_id_fkey FOREIGN KEY (lc_id)
+      REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT listing_compute_detail_lp_id_fkey FOREIGN KEY (lp_id)
+      REFERENCES rapport_advanced.listing_param (lp_id) MATCH SIMPLE
+      ON UPDATE SET NULL ON DELETE SET NULL
+)
+WITH (
+  OIDS=3DFALSE
+);
+ALTER TABLE rapport_advanced.listing_compute_detail
+  OWNER TO phpcompta;
+COMMENT ON TABLE rapport_advanced.listing_compute_detail
+  IS 'Detail of computing listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_id IS 'PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_id IS 'fk t=
o listing_compute';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_date =
IS 'Used when computed value is a date';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_numer=
ic IS 'Used when computed value is numeric';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_text =
IS 'Used when computed value is a text';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lp_id IS 'fk t=
o listing_param, used for the condition';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lf_id IS 'FK t=
o listing_compute_fiche';
+
+
+-- Index: rapport_advanced.fki_listing_compute_fiche_lf_id2_fk
+
+-- DROP INDEX rapport_advanced.fki_listing_compute_fiche_lf_id2_fk;
+
+CREATE INDEX fki_listing_compute_fiche_lf_id2_fk
+  ON rapport_advanced.listing_compute_detail
+  USING btree
+  (lf_id );
+
+-- Index: rapport_advanced.fki_listing_compute_fiche_lf_id_fk
+
+-- DROP INDEX rapport_advanced.fki_listing_compute_fiche_lf_id_fk;
+
+CREATE INDEX fki_listing_compute_fiche_lf_id_fk
+  ON rapport_advanced.listing_compute_detail
+  USING btree
+  (lf_id );
+

Added: trunk/rapport_avance/sql/2-listing_compute_fiche.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_fiche.sql	                =
        (rev 0)
+++ trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-03 02:28=
:15 UTC (rev 595)
@@ -0,0 +1,31 @@
+=EF=BB=BF-- Table: rapport_advanced.listing_compute_fiche
+
+-- DROP TABLE rapport_advanced.listing_compute_fiche;
+
+CREATE TABLE rapport_advanced.listing_compute_fiche
+(
+  lf_id serial NOT NULL, -- PK
+  f_id bigint NOT NULL, -- FK to fiche
+  lf_lob oid, -- Generated file if any
+  lf_filename text, -- Name of the generated file. It should be based on=
 the name of the template + unique id
+  lf_mimetype text, -- Same mimetype as in table listing
+  CONSTRAINT listing_compute_fiche_pkey PRIMARY KEY (lf_id ),
+  CONSTRAINT listing_compute_fiche_f_id_fkey FOREIGN KEY (f_id)
+      REFERENCES fiche (f_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITH (
+  OIDS=3DFALSE
+);
+ALTER TABLE rapport_advanced.listing_compute_fiche
+  OWNER TO phpcompta;
+COMMENT ON TABLE rapport_advanced.listing_compute_fiche
+  IS 'Content :
+card
+document to generate';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_id IS 'PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.f_id IS 'FK to =
fiche';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_lob IS 'Gene=
rated file if any';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_filename IS =
'Name of the generated file. It should be based on the name of the templa=
te + unique id';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_mimetype IS =
'Same mimetype as in table listing';
+

Added: trunk/rapport_avance/sql/2-listing_condition.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_condition.sql	                    =
    (rev 0)
+++ trunk/rapport_avance/sql/2-listing_condition.sql	2013-12-03 02:28:15 =
UTC (rev 595)
@@ -0,0 +1,18 @@
+=EF=BB=BF-- Table: rapport_advanced.listing_condition
+
+-- DROP TABLE rapport_advanced.listing_condition;
+
+CREATE TABLE rapport_advanced.listing_condition
+(
+  lc_id bigserial NOT NULL, -- PK
+  CONSTRAINT listing_condition_pkey PRIMARY KEY (lc_id )
+)
+WITH (
+  OIDS=3DFALSE
+);
+ALTER TABLE rapport_advanced.listing_condition
+  OWNER TO phpcompta;
+COMMENT ON TABLE rapport_advanced.listing_condition
+  IS 'Content condition for a generation';
+COMMENT ON COLUMN rapport_advanced.listing_condition.lc_id IS 'PK';
+



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


From MAILER-DAEMON Mon Dec 02 23:36:35 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vnhit-0002k1-BA
	for mharc-phpcompta-dev@gnu.org; Mon, 02 Dec 2013 23:36:35 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 05:25:09 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.124152.1386045393.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r596 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 04:36:33 -0000

Author: danydb
Date: 2013-12-03 05:25:08 +0100 (Tue, 03 Dec 2013)
New Revision: 596

Modified:
   trunk/rapport_avance/include/class_rapav_declaration.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_formula.php
Log:
Compute, Formula and account , computing and saving

Modified: trunk/rapport_avance/include/class_rapav_declaration.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-03 0=
2:28:15 UTC (rev 595)
+++ trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-03 0=
4:25:08 UTC (rev 596)
@@ -1021,19 +1021,19 @@
                                 join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
                                 where
                                 jrn1.j_poste like $1
+                                $sql_date
                                 and
-                                jrn2.j_poste like $2
+                                jrn2.j_poste like $4
                                 and
                                 jrn1.j_debit=3D't'
-                                $sql_date
                                 $filter_ledger
                                 ) as tv_amount
 							 ";
                 $amount =3D $cn->get_value($sql, array(
                     $this->form->tmp_val,
-                    $this->form->with_tmp_val,
                     $p_start,
-                    $p_end
+                    $p_end,
+                    $this->form->with_tmp_val
                 ));
                 break;
             // Only CREDIT
@@ -1046,19 +1046,19 @@
                                 join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
                                 where
                                 jrn1.j_poste like $1
+                                $sql_date
                                 and
                                 jrn2.j_poste like $2
                                 and
                                 jrn1.j_debit=3D'f'
-                                $sql_date
                                 $filter_ledger
                                 ) as tv_amount
 							 ";
                 $amount =3D $cn->get_value($sql, array(
                     $this->form->tmp_val,
+                    $p_start,
+                    $p_end,
                     $this->form->with_tmp_val,
-                    $p_start,
-                    $p_end
                 ));
                 break;
=20

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
03 02:28:15 UTC (rev 595)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
03 04:25:08 UTC (rev 596)
@@ -22,8 +22,8 @@
      * < Data point to listing_compute
      */
     var $data;
-   =20
-     /**
+
+    /**
      * Type of operation
      *    - 0 all operations
      *    - 1 only paid operations
@@ -46,12 +46,12 @@
     {
         global $cn;
         // save an object Listing_Compute with the flag to_keep to N
-        $this->data->l_start=3D$p_date_start;
-        $this->data->l_end=3D$p_date_end;
-        $this->data->l_keep=3D'N';
-        $this->data->l_id=3D$rapav_listing->Data->l_id;
+        $this->data->l_start =3D $p_date_start;
+        $this->data->l_end =3D $p_date_end;
+        $this->data->l_keep =3D 'N';
+        $this->data->l_id =3D $rapav_listing->Data->l_id;
         $this->data->insert();
-       =20
+
         // retrieve all the code from $rapav_listing
         $rapav_listing->load_detail();
         $a_code =3D $rapav_listing->a_detail;
@@ -62,12 +62,12 @@
         // ------------------------------------------------------
         // For each card
         $fiche_def =3D new Fiche_Def($cn);
-        $fiche_def->id=3D$rapav_listing->Data->getp('fiche_def_id');
+        $fiche_def->id =3D $rapav_listing->Data->getp('fiche_def_id');
         $a_fiche =3D $fiche_def->get_by_type();
         $nb_fiche =3D count($a_fiche);
         for ($e =3D 0; $e < $nb_fiche; $e++)
         {
-           =20
+
             $a_later =3D array();
             for ($i =3D 0; $i < $nb; $i++)
             {
@@ -76,7 +76,7 @@
                 unset($compute);
                 $compute =3D RAPAV_Listing_Formula::make_object($a_code[=
$i]->Param);
                 $compute->set_fiche($a_fiche[$e]['f_id']);
-               =20
+
                 if ($compute->sig =3D=3D 'COMP')
                 {
                     $a_later[] =3D clone $compute;
@@ -84,8 +84,16 @@
                 {
                     $compute->set_listing_compute($this->data->lc_id);
                     $compute->filter_operation($this->type_operation);
-                   =20
-                    if ( $i =3D=3D 0 ) $compute->save_fiche();
+
+                    if ($i =3D=3D 0)
+                    {
+                        $compute->save_fiche();
+                        $fiche =3D $compute->fiche;
+                    }=20
+                    else
+                    {
+                        $compute->fiche=3D$fiche;
+                    }
                     //compute
                     $compute->compute($p_date_start, $p_date_end);
                     // save computed
@@ -101,13 +109,22 @@
             {
                 $a_later[$i]->set_fiche($a_fiche[$e]['f_id']);
                 $compute->set_listing_compute($this->data->lc_id);
-                 if ( $i =3D=3D 0 )  $a_later[$i]->save_fiche();
-                $a_later[$i]->compute($p_date_start, $p_data_end);
+                if ($i =3D=3D 0)
+                {
+                    $a_later[$i]->save_fiche();
+                    $fiche=3D$a_later[$i]->fiche;
+                }
+                else
+                {
+                    $a_later[$i]=3D$fiche;
+                }
+                $a_later[$i]->compute($p_date_start, $p_date_end);
                 $a_later[$i]->save_computed();
             }
         }
     }
-        /**
+
+    /**
      * Filter the operations
      *    - 0 all operations
      *    - 1 only paid operations - only VEN & ACH
@@ -118,6 +135,7 @@
     {
         $this->type_operation =3D $p_type;
     }
+
     function display()
     {
        =20

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 02:28:15 UTC (rev 595)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 04:25:08 UTC (rev 596)
@@ -26,15 +26,17 @@
=20
     function save_computed()
     {
-        $this->detail->lf_id=3D$this->fiche->lf_id;
-        $this->detail->lp_id=3D$this->data->lp_id;
+        $this->detail->lf_id =3D $this->fiche->lf_id;
+        $this->detail->lp_id =3D $this->data->lp_id;
         $this->detail->save();
     }
+
     function set_listing_compute($param)
     {
-        $this->detail->lc_id=3D$param;
-        $this->fiche->lc_id=3D$param;
+        $this->detail->lc_id =3D $param;
+        $this->fiche->lc_id =3D $param;
     }
+
     function set($p_array)
     {
         $this->data->setp("code", $p_array["code_id"]);
@@ -104,14 +106,14 @@
         $this->fiche->f_id =3D $f_id;
     }
=20
-
     function save_fiche()
     {
         $this->fiche->save();
     }
+
     function filter_operation($param)
     {
-        $this->type_operation=3D$param;
+        $this->type_operation =3D $param;
     }
=20
 }
@@ -176,25 +178,24 @@
     function compute($p_start, $p_end)
     {
         global $cn;
-        $value=3D$cn->get_value("select ad_value from fiche_detail "
+        $value =3D $cn->get_value("select ad_value from fiche_detail "
                 . "where "
-                . "f_id=3D$1 and ad_id=3D$2",array($this->fiche->f_id,
-                    $this->data->getp('attribut_card')));
-        $type=3D$cn->get_value('select ad_type from attr_def where=20
-                ad_id=3D$1',array($this->data->getp('attribut_card')));
+                . "f_id=3D$1 and ad_id=3D$2", array($this->fiche->f_id,
+            $this->data->getp('attribut_card')));
+        $type =3D $cn->get_value('select ad_type from attr_def where=20
+                ad_id=3D$1', array($this->data->getp('attribut_card')));
         switch ($type)
         {
             case "numeric":
-                $this->detail->ld_value_numeric=3D$value;
+                $this->detail->ld_value_numeric =3D $value;
                 break;
             case "date":
-                $this->detail->ld_value_date=3D$value;
+                $this->detail->ld_value_date =3D $value;
                 break;
             default:
-                $this->detail->ld_value_text=3D$value;
+                $this->detail->ld_value_text =3D $value;
                 break;
         }
-       =20
     }
=20
     function input()
@@ -227,7 +228,6 @@
         $this->data->save();
     }
=20
-
 }
=20
 ////////////////////////////////////////////////////////////////////////=
///////
@@ -281,7 +281,27 @@
=20
     function compute($p_start, $p_end)
     {
-        return 0;
+        global $cn;
+        $sql =3D "";
+        if ($this->data->jrn_def_id !=3D null)
+        {
+            $sql =3D ' and j_jrn_def =3D' . $this->data->jrn_def_id;
+        }
+        if ($this->data->date_paid =3D=3D 1)
+        {
+            $sql.=3Dsprintf(" and j_id in ( select j_id from jrnx join j=
rn on (j_grpt=3Djr_grpt_id) where jr_date_paid >=3D to_date('%s','DD.MM.Y=
YYY') and jr_date_paid <=3D to_date ('%s','DD.MM.YYYY'))", $p_start, $p_e=
nd);
+            $p_start =3D '01.01.1900';
+            $p_end =3D '01.01.2100';
+        }
+        if ($this->data->date_paid =3D=3D 2)
+        {
+            $sql.=3Dsprintf(" and j_id in ( select j_id from jrnx join j=
rn on (j_grpt=3Djr_grpt_id) where jr_ech >=3D to_date('%s','DD.MM.YYYY') =
and jr_ech <=3D to_date ('%s','DD.MM.YYYY'))", $p_start, $p_end);
+            $p_start =3D '01.01.1900';
+            $p_end =3D '01.01.2100';
+        }
+
+        $amount =3D Impress::parse_formula($cn, "", $this->data->fp_form=
ula, $p_start, $p_end, true, 1, $sql);
+        $this->detail->ld_value_numeric =3D $amount['montant'];
     }
=20
     function input()
@@ -325,8 +345,8 @@
     function verify()
     {
         global $errcode;
-        $ret =3D RAPAV::verify_compute($this->data->fp_formula);
-        $this->errocode =3D $errcode;
+        $ret =3D RAPAV::verify_formula($this->data->fp_formula);
+        $this->errcode =3D $errcode;
         return $ret;
     }
=20
@@ -380,7 +400,30 @@
=20
     function compute($p_start, $p_end)
     {
-        return 0;
+        global $cn;
+        $amount =3D 0;
+        bcscale(2);
+
+        // copy $this->form->fp_formula to a variable
+        $formula =3D $this->data->fp_formula;
+
+        // split the string from  into smaller piece
+        preg_match_all("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i", $formula,=
 $e);
+        $tmp =3D $e[0];
+
+        foreach ($tmp as $piece)
+        {
+            // Find the code in the database
+            $search =3D str_replace('[', '', $piece);
+            $search =3D str_replace(']', '', $search);
+            $value =3D $cn->get_value('select coalesce(sum(ld_value_nume=
ric),0) as value
+				from rapport_advanced.listing_compute_detail where lc_id=3D$1 and lp=
_id in (select lp_id from=20
+                                rapport_advanced.listing_param where lp_=
code=3D$2)', array($this->detail->lc_id, $search));
+            $formula =3D str_replace($piece, $value, $formula);
+        }
+        eval('$amount =3D ' . $formula . ';');
+        //
+        $this->detail->ld_value_numeric=3D $amount;
     }
=20
     function input()
@@ -418,11 +461,10 @@
     {
         global $errcode;
         $ret =3D RAPAV::verify_compute($this->data->fp_formula);
-        $this->errocode =3D $errcode;
+        $this->errcode =3D $errcode;
         return $ret;
     }
=20
-
 }
=20
 ////////////////////////////////////////////////////////////////////////=
///////
@@ -485,7 +527,108 @@
=20
     function compute($p_start, $p_end)
     {
-        return 0;
+        global $cn;
+        $filter_ledger =3D "";
+        if ($this->data->jrn_def_id !=3D "")
+        {
+            $filter_ledger =3D " and jrn1.j_jrn_def =3D " . sql_string($=
this->data->jrn_def_id);
+        }
+
+        $sql_date =3D RAPAV::get_sql_date($this->data->date_paid);
+        $card_saldo =3D ($this->data->lp_card_saldo =3D=3D 0) ? "jrn1" :=
 "jrn2";
+        bcscale(2);
+        switch ($this->data->type_sum_account)
+        {
+            // Saldo
+            case 1:
+            case 2:
+                // Compute D-C
+                $sql =3D "
+                        select sum(jrnx_amount)
+                        from (
+                                select distinct $card_saldo.j_id,case wh=
en $card_saldo.j_debit =3D 't' then $card_saldo.j_montant else $card_sald=
o.j_montant*(-1) end as jrnx_amount
+                                from jrnx as jrn1
+                                join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
+                                where
+                                jrn1.j_poste like $1
+                                $sql_date
+                                and
+                                jrn2.f_id =3D $4
+                                $filter_ledger
+                                   =20
+                                ) as tv_amount
+							 ";
+                $amount =3D $cn->get_value($sql, array(
+                    $this->data->fp_formula,
+                    $p_start,
+                    $p_end,
+                    $this->fiche->f_id
+                ));
+                // if C-D is asked then reverse the result
+                if ($this->data->type_sum_account =3D=3D 2)
+                    $amount =3D bcmul($amount, -1);
+                break;
+            // Only DEBIT
+            case 3:
+                $sql =3D "
+                        select sum(jrnx_amount)
+                        from (
+                                select distinct $card_saldo.j_id,$card_s=
aldo.j_montant as jrnx_amount
+                                from jrnx as jrn1
+                                join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
+                                where
+                                jrn1.j_poste like $1
+                                $sql_date
+                                and
+                                jrn2.f_id =3D $4
+                                and
+                                $card_saldo.j_debit=3D't'
+                                $filter_ledger
+                                ) as tv_amount
+							 ";
+                $amount =3D $cn->get_value($sql, array(
+                    $this->data->fp_formula,
+                    $p_start,
+                    $p_end,
+                    $this->fiche->f_id
+                ));
+                break;
+            // Only CREDIT
+            case 4:
+                $sql =3D "
+                        select sum(jrnx_amount)
+                        from (
+                                select distinct $card_saldo.j_id,jrn1.j_=
montant as jrnx_amount
+                                from jrnx as jrn1
+                                join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
+                                where
+                                jrn1.j_poste like $1
+                                $sql_date
+                                and
+                                jrn2.f_id =3D $4
+                                and
+                                $card_saldo.j_debit=3D'f'
+                                $filter_ledger
+                                ) as tv_amount
+							 ";
+                $amount =3D $cn->get_value($sql, array(
+                    $this->data->fp_formula,
+                    $p_start,
+                    $p_end,
+                    $this->fiche->f_id
+                ));
+                break;
+
+            default:
+                if (DEBUG)
+                    var_dump($this);
+                die(__FILE__ . ":" . __LINE__ . " UNKNOW SUM TYPE");
+                break;
+        }
+        /*
+         * 4 possibilities with type_sum_account
+         */
+        $this->detail->ld_value_numeric =3D $amount;
     }
=20
     function input()
@@ -528,6 +671,8 @@
         $this->data->setp('date_paid', $p_array['p_paid']);
         $this->data->setp('jrn_def_id', $p_array['p_ledger']);
         $this->data->setp('formula_type', 'ACCOUNT');
+        $this->data->setp('sum_signed', $p_array['tt_id']);
+        $this->data->lp_card_saldo =3D (isset($p_array['card_saldo'])) ?=
 1 : 0;
         $this->data->save();
     }
=20



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


From MAILER-DAEMON Mon Dec 02 23:46:08 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vnhs8-0004z7-10
	for mharc-phpcompta-dev@gnu.org; Mon, 02 Dec 2013 23:46:08 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 05:34:45 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.124157.1386045967.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r597 - in trunk/rapport_avance/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 04:46:06 -0000

Author: danydb
Date: 2013-12-03 05:34:45 +0100 (Tue, 03 Dec 2013)
New Revision: 597

Modified:
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/include/template/rapav_listing_definition.php
Log:
cosmetic

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 04:25:08 UTC (rev 596)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 04:34:45 UTC (rev 597)
@@ -519,9 +519,14 @@
     function display()
     {
         $ledger =3D RAPAV::get_ledger_name($this->data->jrn_def_id);
-        ;
         $paid =3D RAPAV::str_date_type($this->data->date_paid);
-        $str =3D sprintf("R=C3=A9sultat de la formule %s utilisant $ledg=
er %s", $this->data->fp_formula, $paid);
+        $a_sum=3Dexplode(',','invalid,D=C3=A9bit,Cr=C3=A9dit,D=C3=A9bit-=
Cr=C3=A9dit,Cr=C3=A9dit-D=C3=A9bit');
+        $sumof=3D($this->data->lp_card_saldo=3D=3D0)?" du poste comptabl=
e":"de la fiche";
+        $str =3D sprintf("%s %s %s utilisant $ledger %s",=20
+                $a_sum[$this->data->type_sum_account],
+                $sumof,
+                $this->data->fp_formula,=20
+                $paid);
         return $str;
     }
=20

Modified: trunk/rapport_avance/include/template/rapav_listing_definition.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/rapav_listing_definition.php	20=
13-12-03 04:25:08 UTC (rev 596)
+++ trunk/rapport_avance/include/template/rapav_listing_definition.php	20=
13-12-03 04:34:45 UTC (rev 597)
@@ -37,8 +37,9 @@
 <?php
 $nb =3D count($this->a_detail);
 for ($i =3D 0; $i < $nb; $i++):
+    $class=3D($i%2=3D=3D0)?' class=3D"even"':'class=3D"odd"';
     ?>
-        <tr id=3D"tr_<?php echo $this->a_detail[$i]->Param->getp('lp_id'=
) ?>">
+        <tr id=3D"tr_<?php echo $this->a_detail[$i]->Param->getp('lp_id'=
) ?>" <?php echo $class?>>
             <td>
     <?php echo $this->a_detail[$i]->Param->getp('code'); ?>
             </td>



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


From MAILER-DAEMON Tue Dec 03 07:42:54 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VnpJV-0003G0-VV
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Dec 2013 07:42:53 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 13:31:31 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.124595.1386074573.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5557 - in phpcompta/tags/rel670: html include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 12:42:53 -0000

Author: danydb
Date: 2013-12-03 13:31:31 +0100 (Tue, 03 Dec 2013)
New Revision: 5557

Modified:
   phpcompta/tags/rel670/html/
   phpcompta/tags/rel670/include/class_acc_account_ledger.php
   phpcompta/tags/rel670/include/class_fiche.php
Log:
cosmetic : Increase margin=20


Property changes on: phpcompta/tags/rel670/html
___________________________________________________________________
Name: svn:ignore
   - *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp

   + *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp
..htaccess.kate-swp


Modified: phpcompta/tags/rel670/include/class_acc_account_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_acc_account_ledger.php	2013-12-03=
 01:19:38 UTC (rev 5556)
+++ phpcompta/tags/rel670/include/class_acc_account_ledger.php	2013-12-03=
 12:31:31 UTC (rev 5557)
@@ -333,9 +333,9 @@
=20
         echo '<h2 class=3D"title">'.$this->id." ".$this->name.'</h2>';
         if ( $from_div =3D=3D 0)
-			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;width:100%;border-spacing:0px 5px\">";
+			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;margin:1%;width:98%;;border-spacing:0px 5px\">";
 		else
-			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;width:100%;border-spacing:0px 2px\">";
+			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;margin:1%;width:98%;;border-spacing:0px 2px\">";
         echo '<tbody>';
         echo "<TR>".
         "<TH style=3D\"text-align:left\"> Date</TH>".

Modified: phpcompta/tags/rel670/include/class_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_fiche.php	2013-12-03 01:19:38 UTC=
 (rev 5556)
+++ phpcompta/tags/rel670/include/class_fiche.php	2013-12-03 12:31:31 UTC=
 (rev 5557)
@@ -1269,11 +1269,11 @@
         $rep=3D"";
 	if ( $from_div=3D=3D1)
 	  {
-	    echo "<TABLE class=3D\"resultfooter\" style=3D\"width:100%;border-c=
ollapse:separate;border-spacing:0px 5px\">";
+	    echo "<TABLE class=3D\"resultfooter\" style=3D\"margin:1%;width:98%=
;;border-collapse:separate;border-spacing:0px 5px\">";
 	  }
 	else
 	  {
-	    echo "<TABLE id=3D\"tb" . $from_div . "\"class=3D\"result\" style=3D=
\"width:100%;border-collapse:separate;border-spacing:0px 2px\">";
+	    echo "<TABLE id=3D\"tb" . $from_div . "\"class=3D\"result\" style=3D=
\"margin:1%;width:98%;border-collapse:separate;border-spacing:0px 2px\">"=
;
 		}
         echo '<tbody>';
         echo "<TR>".



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


From MAILER-DAEMON Tue Dec 03 10:23:39 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vnrp5-0007Gh-Kv
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Dec 2013 10:23:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 16:12:13 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.124719.1386084216.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5558 - in phpcompta/trunk: . html include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 15:23:35 -0000

Author: danydb
Date: 2013-12-03 16:12:13 +0100 (Tue, 03 Dec 2013)
New Revision: 5558

Modified:
   phpcompta/trunk/
   phpcompta/trunk/html/
   phpcompta/trunk/include/class_acc_account_ledger.php
   phpcompta/trunk/include/class_fiche.php
Log:
Merged revisions 5557 via svnmerge from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel670

........
  r5557 | danydb | 2013-12-03 13:31:31 +0100 (mar., 03 d?\195?\169c. 2013=
) | 1 line
 =20
  cosmetic : Increase margin=20
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel670:1-5539,5541-5553
   + /phpcompta/tags/rel670:1-5539,5541-5557


Property changes on: phpcompta/trunk/html
___________________________________________________________________
Name: svn:ignore
   - *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp

   + *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp
..htaccess.kate-swp


Modified: phpcompta/trunk/include/class_acc_account_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_account_ledger.php	2013-12-03 12:31=
:31 UTC (rev 5557)
+++ phpcompta/trunk/include/class_acc_account_ledger.php	2013-12-03 15:12=
:13 UTC (rev 5558)
@@ -333,9 +333,9 @@
=20
         echo '<h2 class=3D"title">'.$this->id." ".$this->name.'</h2>';
         if ( $from_div =3D=3D 0)
-			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;width:100%;border-spacing:0px 5px\">";
+			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;margin:1%;width:98%;;border-spacing:0px 5px\">";
 		else
-			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;width:100%;border-spacing:0px 2px\">";
+			echo "<TABLE class=3D\"resultfooter\" style=3D\"border-collapse:separ=
ate;margin:1%;width:98%;;border-spacing:0px 2px\">";
         echo '<tbody>';
         echo "<TR>".
         "<TH style=3D\"text-align:left\"> Date</TH>".

Modified: phpcompta/trunk/include/class_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_fiche.php	2013-12-03 12:31:31 UTC (rev =
5557)
+++ phpcompta/trunk/include/class_fiche.php	2013-12-03 15:12:13 UTC (rev =
5558)
@@ -1269,11 +1269,11 @@
         $rep=3D"";
 	if ( $from_div=3D=3D1)
 	  {
-	    echo "<TABLE class=3D\"resultfooter\" style=3D\"width:100%;border-c=
ollapse:separate;border-spacing:0px 5px\">";
+	    echo "<TABLE class=3D\"resultfooter\" style=3D\"margin:1%;width:98%=
;;border-collapse:separate;border-spacing:0px 5px\">";
 	  }
 	else
 	  {
-	    echo "<TABLE id=3D\"tb" . $from_div . "\"class=3D\"result\" style=3D=
\"width:100%;border-collapse:separate;border-spacing:0px 2px\">";
+	    echo "<TABLE id=3D\"tb" . $from_div . "\"class=3D\"result\" style=3D=
\"margin:1%;width:98%;border-collapse:separate;border-spacing:0px 2px\">"=
;
 		}
         echo '<tbody>';
         echo "<TR>".



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


From MAILER-DAEMON Tue Dec 03 15:51:13 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vnww5-0003q4-Aa
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Dec 2013 15:51:13 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 21:39:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.125117.1386103872.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r598 - trunk/rapport_avance/sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 20:51:12 -0000

Author: danydb
Date: 2013-12-03 21:39:47 +0100 (Tue, 03 Dec 2013)
New Revision: 598

Modified:
   trunk/rapport_avance/sql/
   trunk/rapport_avance/sql/2-listing_compute.sql
   trunk/rapport_avance/sql/2-listing_compute_detail.sql
   trunk/rapport_avance/sql/2-listing_compute_fiche.sql
Log:
backup tables


Property changes on: trunk/rapport_avance/sql
___________________________________________________________________
Name: svn:ignore
   + .2-listing_compute.sql.kate-swp
.2-listing_compute_detail.sql.kate-swp
.2-listing_compute_fiche.sql.kate-swp


Modified: trunk/rapport_avance/sql/2-listing_compute.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-03 04:34:45 UT=
C (rev 597)
+++ trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-03 20:39:47 UT=
C (rev 598)
@@ -31,3 +31,14 @@
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_end IS 'end_date';
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_keep IS 'If yes, it=
 is keeped with N it will deleted';
=20
+
+-- Trigger: listing_compute_trg on rapport_advanced.listing_compute
+
+-- DROP TRIGGER listing_compute_trg ON rapport_advanced.listing_compute;
+
+CREATE TRIGGER listing_compute_trg
+  BEFORE INSERT OR UPDATE
+  ON rapport_advanced.listing_compute
+  FOR EACH ROW
+  EXECUTE PROCEDURE rapport_advanced.listing_compute_trg();
+

Modified: trunk/rapport_avance/sql/2-listing_compute_detail.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-03 04:3=
4:45 UTC (rev 597)
+++ trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-03 20:3=
9:47 UTC (rev 598)
@@ -53,3 +53,5 @@
   USING btree
   (lf_id );
=20
+--
+--

Modified: trunk/rapport_avance/sql/2-listing_compute_fiche.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-03 04:34=
:45 UTC (rev 597)
+++ trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-03 20:39=
:47 UTC (rev 598)
@@ -9,7 +9,11 @@
   lf_lob oid, -- Generated file if any
   lf_filename text, -- Name of the generated file. It should be based on=
 the name of the template + unique id
   lf_mimetype text, -- Same mimetype as in table listing
+  lc_id bigint,
   CONSTRAINT listing_compute_fiche_pkey PRIMARY KEY (lf_id ),
+  CONSTRAINT fk_listing_compute_lc_id FOREIGN KEY (lc_id)
+      REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
   CONSTRAINT listing_compute_fiche_f_id_fkey FOREIGN KEY (f_id)
       REFERENCES fiche (f_id) MATCH SIMPLE
       ON UPDATE CASCADE ON DELETE CASCADE



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


From MAILER-DAEMON Tue Dec 03 15:51:36 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VnwwS-0003t7-41
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Dec 2013 15:51:36 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 21:40:13 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.125118.1386103895.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r599 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 20:51:34 -0000

Author: danydb
Date: 2013-12-03 21:40:13 +0100 (Tue, 03 Dec 2013)
New Revision: 599

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_formula.php
Log:
Fix some bugs

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
03 20:39:47 UTC (rev 598)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
03 20:40:13 UTC (rev 599)
@@ -67,7 +67,14 @@
         $nb_fiche =3D count($a_fiche);
         for ($e =3D 0; $e < $nb_fiche; $e++)
         {
-
+            /*
+             * save a listing_compute_fiche
+             */
+            $fiche=3Dnew RAPAV_Listing_Compute_Fiche_SQL();
+            $fiche->f_id=3D$a_fiche[$e]['f_id'];
+            $this->lc_id =3D $this->data->lc_id;
+            $fiche->insert();
+           =20
             $a_later =3D array();
             for ($i =3D 0; $i < $nb; $i++)
             {
@@ -75,8 +82,8 @@
                 // Rapav_Formula_Compute or Rapav_Formula_Formula,
                 unset($compute);
                 $compute =3D RAPAV_Listing_Formula::make_object($a_code[=
$i]->Param);
-                $compute->set_fiche($a_fiche[$e]['f_id']);
-
+                $compute->fiche=3D$fiche;
+               =20
                 if ($compute->sig =3D=3D 'COMP')
                 {
                     $a_later[] =3D clone $compute;
@@ -84,16 +91,8 @@
                 {
                     $compute->set_listing_compute($this->data->lc_id);
                     $compute->filter_operation($this->type_operation);
-
-                    if ($i =3D=3D 0)
-                    {
-                        $compute->save_fiche();
-                        $fiche =3D $compute->fiche;
-                    }=20
-                    else
-                    {
-                        $compute->fiche=3D$fiche;
-                    }
+                   =20
+                   =20
                     //compute
                     $compute->compute($p_date_start, $p_date_end);
                     // save computed
@@ -107,17 +106,7 @@
              */
             for ($i =3D 0; $i < $nb_later; $i++)
             {
-                $a_later[$i]->set_fiche($a_fiche[$e]['f_id']);
                 $compute->set_listing_compute($this->data->lc_id);
-                if ($i =3D=3D 0)
-                {
-                    $a_later[$i]->save_fiche();
-                    $fiche=3D$a_later[$i]->fiche;
-                }
-                else
-                {
-                    $a_later[$i]=3D$fiche;
-                }
                 $a_later[$i]->compute($p_date_start, $p_date_end);
                 $a_later[$i]->save_computed();
             }

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 20:39:47 UTC (rev 598)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 20:40:13 UTC (rev 599)
@@ -417,8 +417,15 @@
             $search =3D str_replace('[', '', $piece);
             $search =3D str_replace(']', '', $search);
             $value =3D $cn->get_value('select coalesce(sum(ld_value_nume=
ric),0) as value
-				from rapport_advanced.listing_compute_detail where lc_id=3D$1 and lp=
_id in (select lp_id from=20
-                                rapport_advanced.listing_param where lp_=
code=3D$2)', array($this->detail->lc_id, $search));
+				from=20
+                                    rapport_advanced.listing_compute_det=
ail as ld
+                                    join rapport_advanced.listing_comput=
e_fiche as lf on (ld.lf_id=3Dlf.lf_id)=20
+                                    join rapport_advanced.listing_param =
 as lp on (ld.lp_id=3Dlp.lp_id)=20
+                                where=20
+                                ld.lc_id=3D$1=20
+                                and lp.lp_code=3D$2
+                                and lf.f_id =3D $3
+                                ', array($this->detail->lc_id, $search,$=
this->fiche->f_id));
             $formula =3D str_replace($piece, $value, $formula);
         }
         eval('$amount =3D ' . $formula . ';');



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


From MAILER-DAEMON Tue Dec 03 16:44:28 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vnxlc-0007eS-2V
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Dec 2013 16:44:28 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Dec 2013 22:33:05 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.125151.1386107067.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5559 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Dec 2013 21:44:27 -0000

Author: danydb
Date: 2013-12-03 22:33:05 +0100 (Tue, 03 Dec 2013)
New Revision: 5559

Modified:
   phpcompta/trunk/include/class_database.php
Log:
Optimize code

Modified: phpcompta/trunk/include/class_database.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_database.php	2013-12-03 15:12:13 UTC (r=
ev 5558)
+++ phpcompta/trunk/include/class_database.php	2013-12-03 21:33:05 UTC (r=
ev 5559)
@@ -498,8 +498,9 @@
     function get_value($p_sql,$p_array=3Dnull)
     {
         $this->ret=3D$this->exec_sql($p_sql,$p_array);
-        if ( pg_NumRows($this->ret) =3D=3D 0 ) return "";
-        if ( pg_NumRows($this->ret) > 1 )
+        $r=3D pg_NumRows($this->ret);
+        if ( $r =3D=3D 0 ) return "";
+        if ( $r > 1 )
 	  {
 	    $array=3Dpg_fetch_all($this->ret);
 	    throw new Exception( "Attention $p_sql retourne ".pg_NumRows($this-=
>ret)."  valeurs ".



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


From MAILER-DAEMON Wed Dec 04 19:42:10 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoN17-0003CH-VO
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Dec 2013 19:42:09 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 01:30:41 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126135.1386204128.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5560 - in phpcompta/tags/rel670: html html/admin
	include include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 00:42:08 -0000

Author: danydb
Date: 2013-12-05 01:30:40 +0100 (Thu, 05 Dec 2013)
New Revision: 5560

Modified:
   phpcompta/tags/rel670/html/
   phpcompta/tags/rel670/html/admin/setup.php
   phpcompta/tags/rel670/include/
   phpcompta/tags/rel670/include/function_javascript.php
   phpcompta/tags/rel670/include/template/dashboard.php
   phpcompta/tags/rel670/include/template/module.php
Log:
fix small bug utf-8 instead of utf8 for javascript


Property changes on: phpcompta/tags/rel670/html
___________________________________________________________________
Name: svn:ignore
   - *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp
..htaccess.kate-swp

   + *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp
..htaccess.kate-swp
.directory


Modified: phpcompta/tags/rel670/html/admin/setup.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/admin/setup.php	2013-12-03 21:33:05 UTC (r=
ev 5559)
+++ phpcompta/tags/rel670/html/admin/setup.php	2013-12-05 00:30:40 UTC (r=
ev 5560)
@@ -6,8 +6,8 @@
 <LINK REL=3D"stylesheet" type=3D"text/css" href=3D"../style.css" media=3D=
"screen">
 <link rel=3D"icon" type=3D"image/ico" href=3D"../favicon.ico" />
  <META http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF8"=
>
- <script type=3D"text/javascript" charset=3D"utf8" language=3D"javascrip=
t" src=3D"../js/prototype.js"></script>
- <script type=3D"text/javascript" charset=3D"utf8" language=3D"javascrip=
t" src=3D"../js/infobulle.js"></script>
+ <script type=3D"text/javascript" charset=3D"<div>utf-8</div>" language=3D=
"javascript" src=3D"../js/prototype.js"></script>
+ <script type=3D"text/javascript" charset=3D"utf-8" language=3D"javascri=
pt" src=3D"../js/infobulle.js"></script>
 </head>
 <body>
 <p align=3D"center">
@@ -43,7 +43,7 @@
 ?>
 <DIV id=3D"bulle" class=3D"infobulle"></DIV>
         <script type=3D"text/javascript" language=3D"javascript"  src=3D=
"../js/infobulle.js"> </script>
-		 <script type=3D"text/javascript" charset=3D"utf8" language=3D"javascr=
ipt" src=3D"setup.js"></script>
+		 <script type=3D"text/javascript" charset=3D"utf-8" language=3D"javasc=
ript" src=3D"setup.js"></script>
=20
 <?php
=20


Property changes on: phpcompta/tags/rel670/include
___________________________________________________________________
Name: svn:ignore
   - .constant.php.swp
.action.inc.php.swp

   + .constant.php.swp
.action.inc.php.swp
.directory


Modified: phpcompta/tags/rel670/include/function_javascript.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/function_javascript.php	2013-12-03 21:3=
3:05 UTC (rev 5559)
+++ phpcompta/tags/rel670/include/function_javascript.php	2013-12-05 00:3=
0:40 UTC (rev 5560)
@@ -21,7 +21,7 @@
=20
     if ( !  file_exists('js/'.$p_string))
         alert("Erreur js/$p_string n existe pas");
-    $script=3D'<script type=3D"text/javascript" charset=3D"utf8" languag=
e=3D"javascript" src=3D"js/'.$p_string.'"></script>';
+    $script=3D'<script type=3D"text/javascript" charset=3D"utf-8" langua=
ge=3D"javascript" src=3D"js/'.$p_string.'"></script>';
     // debug
=20
     return $script;
@@ -34,7 +34,7 @@
  */
 function create_script($p_string)
 {
-    $script=3D'<script type=3D"text/javascript" charset=3D"utf8" languag=
e=3D"javascript">'.$p_string.' </script>';
+    $script=3D'<script type=3D"text/javascript" charset=3D"utf-8" langua=
ge=3D"javascript">'.$p_string.' </script>';
     return $script;
=20
 }

Modified: phpcompta/tags/rel670/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/dashboard.php	2013-12-03 21:33=
:05 UTC (rev 5559)
+++ phpcompta/tags/rel670/include/template/dashboard.php	2013-12-05 00:30=
:40 UTC (rev 5560)
@@ -318,7 +318,7 @@
=20
=20
 <div id=3D"add_todo_list" >
-	<script charset=3D"utf8" type=3D"text/javascript" language=3D"javascrip=
t">
+	<script charset=3D"utf-8" type=3D"text/javascript" language=3D"javascri=
pt">
 		new Draggable($('add_todo_list'),{});
 	</script>
 <form method=3D"post">

Modified: phpcompta/tags/rel670/include/template/module.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/module.php	2013-12-03 21:33:05=
 UTC (rev 5559)
+++ phpcompta/tags/rel670/include/template/module.php	2013-12-05 00:30:40=
 UTC (rev 5560)
@@ -36,7 +36,7 @@
 			?>
=20
 	</form>
-	<script charset=3D"utf8" language=3D"javascript">
+	<script charset=3D"utf-8" language=3D"javascript">
=20
 		try {
 			new Ajax.Autocompleter("ac","ac_choices","direct.php?gDossier=3D<?php=
 echo $gDossier?>",



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


From MAILER-DAEMON Wed Dec 04 20:26:21 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoNhs-00054I-Vl
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Dec 2013 20:26:20 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 02:14:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126163.1386206779.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5562 - in phpcompta/tags/rel670: include
	include/template sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 01:26:19 -0000

Author: danydb
Date: 2013-12-05 02:14:55 +0100 (Thu, 05 Dec 2013)
New Revision: 5562

Modified:
   phpcompta/tags/rel670/include/class_acc_ledger.php
   phpcompta/tags/rel670/include/class_jrn_def_sql.php
   phpcompta/tags/rel670/include/template/param_jrn.php
   phpcompta/tags/rel670/sql/upgrade.sql
Log:
typo
Task #929 - Ajout d'une description pour les journaux

Modified: phpcompta/tags/rel670/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_acc_ledger.php	2013-12-05 01:13:5=
7 UTC (rev 5561)
+++ phpcompta/tags/rel670/include/class_acc_ledger.php	2013-12-05 01:14:5=
5 UTC (rev 5562)
@@ -3317,6 +3317,10 @@
=20
 		$min_row =3D new INum("min_row",$this->jrn_deb_max_line);
 		$min_row->prec=3D0;
+               =20
+                $description=3Dnew ITextarea('p_description');
+                $description->value=3D$this->jrn_def_description;
+                $str_description=3D$description->input();
=20
 		/* Load the card */
 		$card =3D $this->get_fiche_def();
@@ -3413,6 +3417,7 @@
 		$this->jrn_def_pj_pref =3D $jrn_def_pj_pref;
 		$this->jrn_def_fiche_deb =3D (isset($FICHEDEB)) ? join($FICHEDEB, ',')=
 : "";
 		$this->jrn_deb_max_line=3D($min_row<1)?1:$min_row;
+		$this->jrn_def_description=3D$p_description;
 		switch ($this->jrn_def_type)
 		{
 			case 'ACH':
@@ -3509,6 +3514,9 @@
 		$pj_seq =3D '';
 		$last_seq =3D 0;
 		$new =3D 1;
+                $description=3Dnew ITextarea('p_description');
+                $description->value=3D"";
+                $str_description=3D$description->input();
 		/* bank card */
 		$qcode_bank =3D '';
 		/* Numbering (only FIN) */
@@ -3541,7 +3549,7 @@
 		$this->jrn_def_fiche_deb =3D (isset($FICHEDEB)) ? join($FICHEDEB, ',')=
 : "";
 		$this->jrn_deb_max_line=3D$min_row;
 		$this->jrn_def_code =3D sprintf("%s%02d", trim(substr($this->jrn_def_t=
ype, 0, 1)), Acc_Ledger::next_number($this->db, $this->jrn_def_type));
-
+                $this->jrn_def_description=3D$p_description;
 		switch ($this->jrn_def_type)
 		{
 			case 'ACH':

Modified: phpcompta/tags/rel670/include/class_jrn_def_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_jrn_def_sql.php	2013-12-05 01:13:=
57 UTC (rev 5561)
+++ phpcompta/tags/rel670/include/class_jrn_def_sql.php	2013-12-05 01:14:=
55 UTC (rev 5562)
@@ -36,6 +36,7 @@
 		, "jrn_def_pj_pref" =3D> "jrn_def_pj_pref"
 		, "jrn_def_bank" =3D> "jrn_def_bank"
 		, "jrn_def_num_op" =3D> "jrn_def_num_op"
+		, "jrn_def_description" =3D> "jrn_def_description"
 	);
=20
 	function __construct(& $p_cn, $p_id=3D-1)
@@ -193,6 +194,7 @@
 ,jrn_def_pj_pref
 ,jrn_def_bank
 ,jrn_def_num_op
+,jrn_def_description
 ) values ($1
 ,$2
 ,$3
@@ -207,6 +209,7 @@
 ,$12
 ,$13
 ,$14
+,$15
 ) returning jrn_def_id";
=20
 			$this->jrn_def_id =3D $this->db->get_value(
@@ -224,6 +227,7 @@
 				, $this->jrn_def_pj_pref
 				, $this->jrn_def_bank
 				, $this->jrn_def_num_op
+				, strip_tags($this->jrn_def_description)
 					)
 			);
 		}
@@ -243,7 +247,8 @@
 ,jrn_def_pj_pref
 ,jrn_def_bank
 ,jrn_def_num_op
-,jrn_def_id) values ($1
+,jrn_def_id
+,jrn_def_description) values ($1
 ,$2
 ,$3
 ,$4
@@ -258,6 +263,7 @@
 ,$13
 ,$14
 ,$15
+,$16
 ) returning jrn_def_id";
=20
 			$this->jrn_def_id =3D $this->db->get_value(
@@ -275,7 +281,8 @@
 				, $this->jrn_def_pj_pref
 				, $this->jrn_def_bank
 				, $this->jrn_def_num_op
-				, $this->jrn_def_id)
+				, $this->jrn_def_id
+                                , strip_tags($this->jrn_def_description)=
)
 			);
 		}
 	}
@@ -299,7 +306,8 @@
 ,jrn_def_pj_pref =3D $12
 ,jrn_def_bank =3D $13
 ,jrn_def_num_op =3D $14
- where jrn_def_id=3D $15";
+,jrn_def_description =3D $15
+ where jrn_def_id=3D $16";
 		$res =3D $this->db->exec_sql(
 				$sql, array($this->jrn_def_name
 			, $this->jrn_def_class_deb
@@ -315,6 +323,7 @@
 			, $this->jrn_def_pj_pref
 			, $this->jrn_def_bank
 			, $this->jrn_def_num_op
+			, strip_tags($this->jrn_def_description)
 			, $this->jrn_def_id)
 		);
 	}
@@ -340,6 +349,7 @@
 ,jrn_def_pj_pref
 ,jrn_def_bank
 ,jrn_def_num_op
+,jrn_def_description
  from public.jrn_def where jrn_def_id=3D$1";
 		/* please adapt */
 		$res =3D $this->db->get_array(

Modified: phpcompta/tags/rel670/include/template/param_jrn.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/param_jrn.php	2013-12-05 01:13=
:57 UTC (rev 5561)
+++ phpcompta/tags/rel670/include/template/param_jrn.php	2013-12-05 01:14=
:55 UTC (rev 5562)
@@ -116,6 +116,14 @@
 </TD>
 </tr>
 <?php endif; ?>
+<tr>
+    <td>
+    <?php echo _('Description') ?>
+    </TD>
+    <td>
+     <?php echo $str_description; ?>  =20
+    </td>
+</tr>   =20
 </TABLE>
     <?php
     /////////////////// ACH //////////////////////////////////

Modified: phpcompta/tags/rel670/sql/upgrade.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/sql/upgrade.sql	2013-12-05 01:13:57 UTC (rev 55=
61)
+++ phpcompta/tags/rel670/sql/upgrade.sql	2013-12-05 01:14:55 UTC (rev 55=
62)
@@ -0,0 +1,17 @@
+alter table jrn_def add jrn_def_description text;
+
+CREATE OR REPLACE FUNCTION comptaproc.t_jrn_def_description()
+ RETURNS trigger
+ LANGUAGE plpgsql
+AS $function$
+    declare
+        str varchar(200);
+    BEGIN
+        str :=3D substr(NEW.jrn_def_description,1,200);
+        NEW.jrn_def_description :=3D str;
+
+        RETURN NEW;
+    END;
+$function$
+;
+create  trigger jrn_def_description_ins_upd before insert or update on j=
rn_def for each row execute procedure comptaproc.t_jrn_def_description();
\ No newline at end of file



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


From MAILER-DAEMON Wed Dec 04 21:19:43 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoOXX-0000ka-OT
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Dec 2013 21:19:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 02:13:57 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126183.1386209983.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5561 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 02:19:42 -0000

Author: danydb
Date: 2013-12-05 02:13:57 +0100 (Thu, 05 Dec 2013)
New Revision: 5561

Modified:
   phpcompta/tags/rel670/include/history_operation.inc.php
Log:
typo

Modified: phpcompta/tags/rel670/include/history_operation.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/history_operation.inc.php	2013-12-05 00=
:30:40 UTC (rev 5560)
+++ phpcompta/tags/rel670/include/history_operation.inc.php	2013-12-05 01=
:13:57 UTC (rev 5561)
@@ -94,7 +94,7 @@
=20
=20
 $msg=3D"";
-/* by default we should the default period */
+/* by default we should use the default period */
 if (!isset($p_array['date_start']))
 {
 	$period =3D $g_user->get_periode();
@@ -102,11 +102,11 @@
 	list($date_start, $date_end) =3D $per->get_date_limit();
 	$p_array['date_start'] =3D $date_start;
 	$p_array['date_end'] =3D $date_end;
-	$msg=3D'<h2 class=3D"info2">'."Periode ".$date_start." au ".$date_end.'=
</h2>';
+	$msg=3D'<h2 class=3D"info2">'."P=C3=A9riode ".$date_start." au ".$date_=
end.'</h2>';
 }
 else
 {
-	$msg=3D'<h2 class=3D"info2">'."Periode ".$_GET['date_start']." au ".$_G=
ET['date_end'].'</h2>';
+	$msg=3D'<h2 class=3D"info2">'."P=C3=A9riode ".$_GET['date_start']." au =
".$_GET['date_end'].'</h2>';
=20
 }
 /*  compute the sql stmt */



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


From MAILER-DAEMON Thu Dec 05 00:48:58 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoRo2-000427-Su
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Dec 2013 00:48:58 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 06:37:26 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126280.1386222537.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5563 - in phpcompta/tags/rel670: html html/js
	include include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 05:48:57 -0000

Author: danydb
Date: 2013-12-05 06:37:23 +0100 (Thu, 05 Dec 2013)
New Revision: 5563

Modified:
   phpcompta/tags/rel670/html/ajax_misc.php
   phpcompta/tags/rel670/html/js/scripts.js
   phpcompta/tags/rel670/html/style.css
   phpcompta/tags/rel670/include/class_acc_ledger.php
   phpcompta/tags/rel670/include/class_html_input.php
   phpcompta/tags/rel670/include/search.inc.php
   phpcompta/tags/rel670/include/template/ledger_search.php
Log:
task #928 : ajax pour remplacer les journaux
Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche est=
 clipp?\195?\169

Modified: phpcompta/tags/rel670/html/ajax_misc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/ajax_misc.php	2013-12-05 01:14:55 UTC (rev=
 5562)
+++ phpcompta/tags/rel670/html/ajax_misc.php	2013-12-05 05:37:23 UTC (rev=
 5563)
@@ -618,6 +618,8 @@
         case 'calendar_zoom':
             require_once 'ajax_calendar_zoom.php';
             break;
+        case 'ledger_show':
+            require_once 'ajax_ledger_show.php';
 	default:
 		var_dump($_GET);
 }

Modified: phpcompta/tags/rel670/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/scripts.js	2013-12-05 01:14:55 UTC (rev=
 5562)
+++ phpcompta/tags/rel670/html/js/scripts.js	2013-12-05 05:37:23 UTC (rev=
 5563)
@@ -14,7 +14,7 @@
  *   You should have received a copy of the GNU General Public License
  *   along with PhpCompta; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-130=
7  USA
-*/
+ */
 /* $Revision$ */
=20
 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
@@ -23,65 +23,65 @@
  * \brief javascript script, always added to every page
  *
  */
-var ask_reload=3D0;
-var tag_choose=3D'';
+var ask_reload =3D 0;
+var tag_choose =3D '';
=20
 /**
-* callback function when we just need to update a hidden div with an inf=
o
-* message
-*/
-function infodiv(req,json)
+ * callback function when we just need to update a hidden div with an in=
fo
+ * message
+ */
+function infodiv(req, json)
 {
     try
     {
         remove_waiting_box();
-        var answer=3Dreq.responseXML;
-        var a=3Danswer.getElementsByTagName('ctl');
-        var html=3Danswer.getElementsByTagName('code');
-        if ( a.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var a =3D answer.getElementsByTagName('ctl');
+        var html =3D answer.getElementsByTagName('code');
+        if (a.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var name_ctl=3Da[0].firstChild.nodeValue;
-        var code_html=3DgetNodeText(html[0]);
+        var name_ctl =3D a[0].firstChild.nodeValue;
+        var code_html =3D getNodeText(html[0]);
=20
-        code_html=3Dunescape_xml(code_html);
-        g(name_ctl+"info").innerHTML=3Dcode_html;
+        code_html =3D unescape_xml(code_html);
+        g(name_ctl + "info").innerHTML =3D code_html;
     }
     catch (e)
     {
-        alert("success_box"+e.message);
+        alert("success_box" + e.message);
     }
     try
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("answer_box Impossible executer script de la reponse\n"+e.=
message);
+        alert("answer_box Impossible executer script de la reponse\n" + =
e.message);
     }
=20
 }
 /**
-*@brief delete a row from a table (tb) the input button send the this
-as second parameter
-*/
-function deleteRow(tb,obj)
+ *@brief delete a row from a table (tb) the input button send the this
+ as second parameter
+ */
+function deleteRow(tb, obj)
 {
     if (confirm('Confirmez effacement'))
     {
-        var td=3Dobj.parentNode;
-        var tr=3Dtd.parentNode;
-        var lidx=3Dtr.rowIndex;
+        var td =3D obj.parentNode;
+        var tr =3D td.parentNode;
+        var lidx =3D tr.rowIndex;
         g(tb).deleteRow(lidx);
     }
 }
-function deleteRowRec(tb,obj)
+function deleteRowRec(tb, obj)
 {
-    var td=3Dobj.parentNode;
-    var tr=3Dtd.parentNode;
-    var lidx=3Dtr.rowIndex;
+    var td =3D obj.parentNode;
+    var tr =3D td.parentNode;
+    var lidx =3D tr.rowIndex;
     g(tb).deleteRow(lidx);
 }
 /*!\brief remove trailing and heading space
@@ -104,7 +104,7 @@
     {
         return this.document.getElementById(ID);
     }
-    else   if (document.all)
+    else if (document.all)
     {
         return document.all[ID];
     }
@@ -118,21 +118,21 @@
  */
 function enable_type_periode()
 {
-    if ( g('type_periode').value =3D=3D 1 )
+    if (g('type_periode').value =3D=3D 1)
     {
-        g('from_periode').disabled=3Dtrue;
-        g('to_periode').disabled=3Dtrue;
-        g('from_date').disabled=3Dfalse;
-        g('to_date').disabled=3Dfalse;
-        g('p_step').disabled=3Dtrue;
+        g('from_periode').disabled =3D true;
+        g('to_periode').disabled =3D true;
+        g('from_date').disabled =3D false;
+        g('to_date').disabled =3D false;
+        g('p_step').disabled =3D true;
     }
     else
     {
-        g('from_periode').disabled=3Dfalse;
-        g('to_periode').disabled=3Dfalse;
-        g('from_date').disabled=3Dtrue;
-        g('to_date').disabled=3Dtrue;
-        g('p_step').disabled=3Dfalse;
+        g('from_periode').disabled =3D false;
+        g('to_periode').disabled =3D false;
+        g('from_date').disabled =3D true;
+        g('to_date').disabled =3D true;
+        g('p_step').disabled =3D false;
     }
 }
=20
@@ -158,35 +158,35 @@
     }
     try
     {
-        var str=3D'';
-        var e=3D0;
+        var str =3D '';
+        var e =3D 0;
         for (i in obj)
         {
-            if (e !=3D 0 )
+            if (e !=3D 0)
             {
-                str+=3D'&';
+                str +=3D '&';
             }
             else
             {
-                e=3D1;
+                e =3D 1;
             }
-            str+=3Di;
-            str+=3D'=3D'+encodeURI(obj[i]);
+            str +=3D i;
+            str +=3D '=3D' + encodeURI(obj[i]);
         }
         return str;
     }
-    catch(e)
+    catch (e)
     {
-        alert('encodeParameter '+e.message);
+        alert('encodeParameter ' + e.message);
     }
 }
 function  hide(p_param)
 {
-    g(p_param).style.display=3D'none';
+    g(p_param).style.display =3D 'none';
 }
 function show(p_param)
 {
-    g(p_param).style.display=3D'block';
+    g(p_param).style.display =3D 'block';
 }
=20
 /**
@@ -194,7 +194,7 @@
  *@param Field id of  the control
  *@param selectIt : the value selected in case of Field is a object sele=
ct, numeric
  */
-function SetFocus(Field,SelectIt)
+function SetFocus(Field, SelectIt)
 {
     var elem =3D g(Field);
     if (elem)
@@ -204,95 +204,95 @@
     return true;
 }
 /**
-* @brief set a DOM id with a value in the parent window (the caller),
+ * @brief set a DOM id with a value in the parent window (the caller),
  @param p_ctl is the name of the control
  @param p_value is the value to set in
-@param p_add if we don't replace the current value but we add something
-*/
-function set_inparent(p_ctl,p_value,p_add)
+ @param p_add if we don't replace the current value but we add something
+ */
+function set_inparent(p_ctl, p_value, p_add)
 {
-    self.opener.set_value(p_ctl,p_value,p_add);
+    self.opener.set_value(p_ctl, p_value, p_add);
 }
=20
 /**
-* @brief set a DOM id with a value, it will consider if it the attribute
-	value or innerHTML has be used
+ * @brief set a DOM id with a value, it will consider if it the attribut=
e
+ value or innerHTML has be used
  @param p_ctl is the name of the control
  @param p_value is the value to set in
-@param p_add if we don't replace the current value but we add something
-*/
-function set_value(p_ctl,p_value,p_add)
+ @param p_add if we don't replace the current value but we add something
+ */
+function set_value(p_ctl, p_value, p_add)
 {
-    if ( g(p_ctl))
+    if (g(p_ctl))
     {
-        var g_ctrl=3Dg(p_ctl);
-        if ( p_add !=3D undefined && p_add=3D=3D1 )
+        var g_ctrl =3D g(p_ctl);
+        if (p_add !=3D undefined && p_add =3D=3D 1)
         {
-            if ( g_ctrl.value )
+            if (g_ctrl.value)
             {
-                p_value=3Dg_ctrl.value+','+p_value;
+                p_value =3D g_ctrl.value + ',' + p_value;
             }
         }
-        if ( g_ctrl.tagName=3D=3D'INPUT' )
+        if (g_ctrl.tagName =3D=3D 'INPUT')
         {
-            g(p_ctl).value=3Dp_value;
+            g(p_ctl).value =3D p_value;
         }
-        if ( g_ctrl.tagName=3D=3D'SPAN' )
+        if (g_ctrl.tagName =3D=3D 'SPAN')
         {
-            g(p_ctl).innerHTML=3Dp_value;
+            g(p_ctl).innerHTML =3D p_value;
         }
-        if ( g_ctrl.tagName=3D=3D'SELECT' )
+        if (g_ctrl.tagName =3D=3D 'SELECT')
         {
-            g(p_ctl).value=3Dp_value;
+            g(p_ctl).value =3D p_value;
         }
     }
 }
 /**
-*@brief format the number change comma to point
-*@param HTML obj
-*/
-function format_number(obj,p_prec)
+ *@brief format the number change comma to point
+ *@param HTML obj
+ */
+function format_number(obj, p_prec)
 {
-	var precision=3D2;
-	if ( p_prec =3D=3D undefined)
-		{
-			precision=3D2;
-		} else {
-			precision=3Dp_prec;
-		}
-    var value=3Dobj.value;
-    value=3Dvalue.replace(/,/,'.');
-    value=3DparseFloat(value);
-    if (  isNaN(value) )
+    var precision =3D 2;
+    if (p_prec =3D=3D undefined)
     {
-        value=3D0;
+        precision =3D 2;
+    } else {
+        precision =3D p_prec;
     }
-	var arrondi=3DMath.pow(10,precision);
+    var value =3D obj.value;
+    value =3D value.replace(/,/, '.');
+    value =3D parseFloat(value);
+    if (isNaN(value))
+    {
+        value =3D 0;
+    }
+    var arrondi =3D Math.pow(10, precision);
=20
-	value=3DMath.round(value*arrondi)/arrondi;
+    value =3D Math.round(value * arrondi) / arrondi;
=20
-    $(obj).value=3Dvalue;
+    $(obj).value =3D value;
 }
 /**
  *@brief check if the object is hidden or show and perform the opposite,
  * show the hidden obj or hide the shown one
  *@param name of the object
-*/
-function toggleHideShow(p_obj,p_button)
+ */
+function toggleHideShow(p_obj, p_button)
 {
-    var stat=3Dg(p_obj).style.display;
-    var str=3Dg(p_button).value;
-    if ( stat =3D=3D 'none' )
+    var stat =3D g(p_obj).style.display;
+    var str =3D g(p_button).value;
+    if (stat =3D=3D 'none')
     {
         show(p_obj);
-        str=3Dstr.replace(/Afficher/,'Cacher');
-        g(p_button).value=3Dstr;
+        str =3D str.replace(/Afficher/, 'Cacher');
+        g(p_button).value =3D str;
     }
     else
     {
         hide(p_obj);
-        str=3Dstr.replace(/Cacher/,'Afficher');
-        g(p_button).value=3Dstr;
+        str =3D str.replace(/Cacher/, 'Afficher');
+        g(p_button).value =3D str;
     }
 }
 /**
@@ -302,7 +302,7 @@
  */
 function popup_recherche(p_dossier)
 {
-    var w=3Dwindow.open("recherche.php?gDossier=3D"+p_dossier+"&ac=3DSEA=
RCH",'','statusbar=3Dno,scrollbars=3Dyes,toolbar=3Dno');
+    var w =3D window.open("recherche.php?gDossier=3D" + p_dossier + "&ac=
=3DSEARCH", '', 'statusbar=3Dno,scrollbars=3Dyes,toolbar=3Dno');
     w.focus();
 }
 /**
@@ -311,11 +311,11 @@
  */
 function unescape_xml(code_html)
 {
-    code_html=3Dcode_html.replace(/\&lt;/,'<');
-    code_html=3Dcode_html.replace(/\&gt;/,'>');
-    code_html=3Dcode_html.replace(/\&quot;/,'"');
-    code_html=3Dcode_html.replace(/\&apos;/,"'");
-    code_html=3Dcode_html.replace(/\&amp;/,'&');
+    code_html =3D code_html.replace(/\&lt;/, '<');
+    code_html =3D code_html.replace(/\&gt;/, '>');
+    code_html =3D code_html.replace(/\&quot;/, '"');
+    code_html =3D code_html.replace(/\&apos;/, "'");
+    code_html =3D code_html.replace(/\&amp;/, '&');
     return code_html;
 }
 /**
@@ -323,15 +323,17 @@
  * to get the different parts thanks textContent
  *@param xmlNode a node (result of var data =3D =3Danswer.getElementsByT=
agName('code'))
  *@return all the content of the XML node
-*/
+ */
 function getNodeText(xmlNode)
 {
-    if(!xmlNode) return '';
-    if(typeof(xmlNode.textContent) !=3D "undefined")
+    if (!xmlNode)
+        return '';
+    if (typeof (xmlNode.textContent) !=3D "undefined")
     {
         return xmlNode.textContent;
     }
-    if ( xmlNode.firstChild && xmlNode.firstChild.nodeValue )     return=
 xmlNode.firstChild.nodeValue;
+    if (xmlNode.firstChild && xmlNode.firstChild.nodeValue)
+        return xmlNode.firstChild.nodeValue;
     return "";
 }
 /**
@@ -340,36 +342,36 @@
  */
 function change_month(obj)
 {
-    var queryString=3D"gDossier=3D"+obj.gDossier+"&op=3Dcal"+"&per=3D"+o=
bj.value;
+    var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Dcal" + "&p=
er=3D" + obj.value;
     var action =3D new Ajax.Request(
-                 "ajax_misc.php" , {method:'get', parameters:queryString=
,onFailure:ajax_misc_failure,onSuccess:success_misc}
-                 );
+            "ajax_misc.php", {method: 'get', parameters: queryString, on=
Failure: ajax_misc_failure, onSuccess: success_misc}
+    );
=20
 }
 /**
-*@brief basic answer to ajax on success, it will fill the DOMID code wit=
h
-* the code. In that case, you need to create the object before the Ajax.=
Request
-*The difference with success box is that
-*@see add_div removeDiv success_box is that the width and height are not=
 changed ajax_misc.php
-*@parameter code is the ID of the object containing the html (div, butto=
n...)
-*@parameter value is the html code, with it you fill the ctl element
-*/
+ *@brief basic answer to ajax on success, it will fill the DOMID code wi=
th
+ * the code. In that case, you need to create the object before the Ajax=
.Request
+ *The difference with success box is that
+ *@see add_div removeDiv success_box is that the width and height are no=
t changed ajax_misc.php
+ *@parameter code is the ID of the object containing the html (div, butt=
on...)
+ *@parameter value is the html code, with it you fill the ctl element
+ */
=20
 function success_misc(req)
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var html=3Danswer.getElementsByTagName('code');
-        if ( html.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var html =3D answer.getElementsByTagName('code');
+        if (html.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var nodeXml=3Dhtml[0];
-        var code_html=3DgetNodeText(nodeXml);
-        code_html=3Dunescape_xml(code_html);
-        $("user_cal").innerHTML=3Dcode_html;
+        var nodeXml =3D html[0];
+        var code_html =3D getNodeText(nodeXml);
+        code_html =3D unescape_xml(code_html);
+        $("user_cal").innerHTML =3D code_html;
     }
     catch (e)
     {
@@ -379,9 +381,9 @@
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("Impossible executer script de la reponse\n"+e.message);
+        alert("Impossible executer script de la reponse\n" + e.message);
     }
=20
=20
@@ -400,60 +402,60 @@
 /**
  *@brief remove a document_modele
  */
-function cat_doc_remove(p_dt_id,p_dossier)
+function cat_doc_remove(p_dt_id, p_dossier)
 {
-    var queryString=3D"gDossier=3D"+p_dossier+"&op=3Drem_cat_doc"+"&dt_i=
d=3D"+p_dt_id;
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Drem_cat_doc" =
+ "&dt_id=3D" + p_dt_id;
     var action =3D new Ajax.Request(
-                 "ajax_misc.php" , {method:'get', parameters:queryString=
,onFailure:ajax_misc_failure,onSuccess:success_cat_doc_remove}
-                 );
+            "ajax_misc.php", {method: 'get', parameters: queryString, on=
Failure: ajax_misc_failure, onSuccess: success_cat_doc_remove}
+    );
 }
 /**
  *@brief change a document_modele
  */
-function cat_doc_change(p_dt_id,p_dossier)
+function cat_doc_change(p_dt_id, p_dossier)
 {
-    var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dmod_cat_doc"+"&dt_i=
d=3D"+p_dt_id;
-    var nTop=3Dcalcy(posY);
-    var nLeft=3D"200px";
-    var str_style=3D"top:"+nTop+"px;left:"+nLeft+";width:50em;height:aut=
o";
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dmod_cat_doc" =
+ "&dt_id=3D" + p_dt_id;
+    var nTop =3D calcy(posY);
+    var nLeft =3D "200px";
+    var str_style =3D "top:" + nTop + "px;left:" + nLeft + ";width:50em;=
height:auto";
=20
     removeDiv('change_doc_div');
     waiting_box();
     var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-					  remove_waiting_box();
-					  add_div({id:'change_doc_div',style:str_style,cssclass:'inner_box'=
,drag:"1"});
-					  $('change_doc_div').innerHTML=3Dreq.responseText;
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    add_div({id: 'change_doc_div', style: str_style, css=
class: 'inner_box', drag: "1"});
+                    $('change_doc_div').innerHTML =3D req.responseText;
=20
-				      }
-				  }
-				  );
+                }
+            }
+    );
 }
=20
 function success_cat_doc_remove(req)
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var html=3Danswer.getElementsByTagName('dtid');
-        if ( html.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var html =3D answer.getElementsByTagName('dtid');
+        if (html.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        nodeXML=3Dhtml[0];
-        row_id=3DgetNodeText(nodeXML);
-        if ( row_id =3D=3D 'nok')
+        nodeXML =3D html[0];
+        row_id =3D getNodeText(nodeXML);
+        if (row_id =3D=3D 'nok')
         {
             alert('Error');
             return;
         }
-        $('row'+row_id).style.textDecoration=3D"line-through";
-        $('X'+row_id).style.display=3D'none';
+        $('row' + row_id).style.textDecoration =3D "line-through";
+        $('X' + row_id).style.display =3D 'none';
     }
     catch (e)
     {
@@ -468,34 +470,34 @@
 {
     try
     {
-	if ( $('tva_select')) {
-	    removeDiv('tva_select');
-	}
+        if ($('tva_select')) {
+            removeDiv('tva_select');
+        }
=20
=20
-	var nTop=3DposY-50;
-	var nLeft=3D"35%";
-	var str_style=3D"top:"+nTop+";left:"+nLeft+";width:55em;height:auto";
+        var nTop =3D posY - 50;
+        var nLeft =3D "35%";
+        var str_style =3D "top:" + nTop + ";left:" + nLeft + ";width:55e=
m;height:auto";
=20
-	var popup=3D{'id': 'tva_select','cssclass':'inner_box','style':str_styl=
e,'html':loading(),'drag':true};
-	add_div(popup);
-        var queryString=3D"gDossier=3D"+obj.gDossier+"&op=3Ddsp_tva"+"&c=
tl=3D"+obj.ctl+'&popup=3D'+'tva_select';
-        if ( obj.jcode )
-            queryString+=3D'&code=3D'+obj.jcode;
+        var popup =3D {'id': 'tva_select', 'cssclass': 'inner_box', 'sty=
le': str_style, 'html': loading(), 'drag': true};
+        add_div(popup);
+        var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Ddsp_tv=
a" + "&ctl=3D" + obj.ctl + '&popup=3D' + 'tva_select';
+        if (obj.jcode)
+            queryString +=3D '&code=3D' + obj.jcode;
         if (obj.compute)
-            queryString+=3D'&compute=3D'+obj.compute;
+            queryString +=3D '&compute=3D' + obj.compute;
         var action =3D new Ajax.Request(
-                         "ajax_misc.php" ,
-                 {method:'get',
-                   parameters:queryString,
-                   onFailure:ajax_misc_failure,
-                   onSuccess:success_popup_select_tva
-                 }
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_popup_select_tva
+                }
         );
     }
     catch (e)
     {
-        alert("popup_select_tva "+e.message);
+        alert("popup_select_tva " + e.message);
     }
 }
 /**
@@ -505,24 +507,24 @@
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var popup=3Danswer.getElementsByTagName('popup');
-        if ( popup.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var popup =3D answer.getElementsByTagName('popup');
+        if (popup.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var html=3Danswer.getElementsByTagName('code');
+        var html =3D answer.getElementsByTagName('code');
=20
-        var name_ctl=3Dpopup[0].firstChild.nodeValue;
-        var nodeXml=3Dhtml[0];
-        var code_html=3DgetNodeText(nodeXml);
-        code_html=3Dunescape_xml(code_html);
-        $(name_ctl).innerHTML=3Dcode_html;
+        var name_ctl =3D popup[0].firstChild.nodeValue;
+        var nodeXml =3D html[0];
+        var code_html =3D getNodeText(nodeXml);
+        code_html =3D unescape_xml(code_html);
+        $(name_ctl).innerHTML =3D code_html;
     }
     catch (e)
     {
-        alert("success_popup_select_tva "+e.message);
+        alert("success_popup_select_tva " + e.message);
     }
=20
 }
@@ -535,21 +537,21 @@
 {
     try
     {
-        var queryString=3D"gDossier=3D"+obj.gDossier+"&op=3Dlabel_tva"+"=
&id=3D"+obj.value;
-        if ( obj.jcode )
-            queryString+=3D'&code=3D'+obj.jcode;
+        var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Dlabel_=
tva" + "&id=3D" + obj.value;
+        if (obj.jcode)
+            queryString +=3D '&code=3D' + obj.jcode;
         var action =3D new Ajax.Request(
-                         "ajax_misc.php" ,
-                 {method:'get',
-                   parameters:queryString,
-                   onFailure:ajax_misc_failure,
-                   onSuccess:success_set_tva_label
-                         }
-                     );
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_set_tva_label
+                }
+        );
     }
     catch (e)
     {
-        alert("set_tva_label "+e.message);
+        alert("set_tva_label " + e.message);
     }
 }
 /**
@@ -559,23 +561,23 @@
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var code=3Danswer.getElementsByTagName('code');
-        var value=3Danswer.getElementsByTagName('value');
+        var answer =3D req.responseXML;
+        var code =3D answer.getElementsByTagName('code');
+        var value =3D answer.getElementsByTagName('value');
=20
-        if ( code.length =3D=3D 0 )
+        if (code.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
=20
-        var label_code=3Dcode[0].firstChild.nodeValue;
-        var label_value=3Dvalue[0].firstChild.nodeValue;
-        set_value(label_code,label_value);
+        var label_code =3D code[0].firstChild.nodeValue;
+        var label_value =3D value[0].firstChild.nodeValue;
+        set_value(label_code, label_value);
     }
     catch (e)
     {
-        alert("success_set_tva_label "+e.message);
+        alert("success_set_tva_label " + e.message);
     }
=20
 }
@@ -586,8 +588,8 @@
  */
 function set_wait(name)
 {
-    var content=3Dname+"_content";
-    $(content).innerHTML=3D 'Un instant...<image src=3D"image/loading.gi=
f" border=3D"0" alt=3D"Chargement...">';
+    var content =3D name + "_content";
+    $(content).innerHTML =3D 'Un instant...<image src=3D"image/loading.g=
if" border=3D"0" alt=3D"Chargement...">';
 }
 /**
  *@brief add dynamically a object for AJAX
@@ -603,51 +605,53 @@
 {
     try
     {
-        var top=3Ddocument;
-       =20
-        if ( ! $(obj.id) )  { var elt=3Dtop.createElement('div');}
+        var top =3D document;
+
+        if (!$(obj.id)) {
+            var elt =3D top.createElement('div');
+        }
         else {
-            var elt=3D$(obj.id);
+            var elt =3D $(obj.id);
         }
-        if (obj.id )
+        if (obj.id)
         {
-            elt.setAttribute('id',obj.id);
+            elt.setAttribute('id', obj.id);
         }
         if (obj.style)
         {
             if (elt.style.setAttribute)
             { /* IE7 bug */
-                elt.style.setAttribute('cssText',obj.style);
+                elt.style.setAttribute('cssText', obj.style);
             }
             else
             { /* good Browser */
-                elt.setAttribute('style',obj.style);
+                elt.setAttribute('style', obj.style);
             }
         }
-        if (obj.cssclass )
+        if (obj.cssclass)
         {
-            elt.setAttribute('class',obj.cssclass);/* FF */
-            elt.setAttribute('className',obj.cssclass); /* IE */
+            elt.setAttribute('class', obj.cssclass);/* FF */
+            elt.setAttribute('className', obj.cssclass); /* IE */
         }
         if (obj.html)
         {
-            elt.innerHTML=3Dobj.html;
+            elt.innerHTML =3D obj.html;
         }
=20
-        var bottom_div=3Ddocument.body;
+        var bottom_div =3D document.body;
         bottom_div.appendChild(elt);
-        if ( obj.drag )
+        if (obj.drag)
         {
-new Draggable(obj.id,{starteffect:function()
-                                  {
-                      new Effect.Highlight(obj.id,{scroll:window,queue:'=
end'});
-                                  }}
-                         );
+            new Draggable(obj.id, {starteffect: function()
+                {
+                    new Effect.Highlight(obj.id, {scroll: window, queue:=
 'end'});
+                }}
+            );
         }
     }
     catch (e)
     {
-        alert("add_div "+e.message);
+        alert("add_div " + e.message);
     }
 }
 /**
@@ -656,17 +660,17 @@
  */
 function removeDiv(elt)
 {
-    if (g(elt) )
+    if (g(elt))
     {
         document.body.removeChild(g(elt));
     }
-	// if reloaded if asked the window will be reloaded when
-	// the box is closed
-	if ( ask_reload =3D=3D 1)
-	{
-		// avoid POST window.location =3D window.location.href;
-		window.location.reload();
-	}
+    // if reloaded if asked the window will be reloaded when
+    // the box is closed
+    if (ask_reload =3D=3D 1)
+    {
+        // avoid POST window.location =3D window.location.href;
+        window.location.reload();
+    }
 }
 /**
  *show a box while loading
@@ -675,46 +679,46 @@
  */
 function waiting_box()
 {
-	obj=3D{
-		id:'wait_box',html:loading()
-		};
-        var y=3Dcalcy(posY);
-	obj.style=3Dfixed_position(posX,y)+";width:200px";
-	if ($('wait_box')){
-		removeDiv('wait_box');
-		}
-	add_div(obj);
-	$('info_div').innerHTML=3D"Un instant";
-	$('info_div').style.display=3D"block";
+    obj =3D {
+        id: 'wait_box', html: loading()
+    };
+    var y =3D calcy(posY);
+    obj.style =3D fixed_position(posX, y) + ";width:200px";
+    if ($('wait_box')) {
+        removeDiv('wait_box');
+    }
+    add_div(obj);
+    $('info_div').innerHTML =3D "Un instant";
+    $('info_div').style.display =3D "block";
=20
 }
 /**
-*@brief call add_div to add a DIV and after call the ajax
-* the queryString, the callback for function for success and error manag=
ement
-* the method is always GET
-*@param obj, the mandatory attributes are
-*  - obj.qs querystring
-*  - obj.js_success callback function in javascript for handling the xml=
 answer
-*  - obj.js_error callback function for error
-*  - obj.callback the php file to call
-*  - obj.fixed optional let you determine the position, otherwise works =
like IPopup
-*@see add_div IBox
-*/
+ *@brief call add_div to add a DIV and after call the ajax
+ * the queryString, the callback for function for success and error mana=
gement
+ * the method is always GET
+ *@param obj, the mandatory attributes are
+ *  - obj.qs querystring
+ *  - obj.js_success callback function in javascript for handling the xm=
l answer
+ *  - obj.js_error callback function for error
+ *  - obj.callback the php file to call
+ *  - obj.fixed optional let you determine the position, otherwise works=
 like IPopup
+ *@see add_div IBox
+ */
 function show_box(obj)
 {
-    add_div(obj) ;
-    if ( ! obj.fixed )
+    add_div(obj);
+    if (!obj.fixed)
     {
-        var sx=3D0;
-        if ( window.scrollY)
+        var sx =3D 0;
+        if (window.scrollY)
         {
-            sx=3Dwindow.scrollY+40;
+            sx =3D window.scrollY + 40;
         }
         else
         {
-            sx=3Ddocument.body.scrollTop+40;
+            sx =3D document.body.scrollTop + 40;
         }
-        g(obj.id).style.top=3Dsx;
+        g(obj.id).style.top =3D sx;
         show(obj.id);
     }
     else
@@ -722,14 +726,14 @@
         show(obj.id);
     }
=20
-    var action=3Dnew Ajax.Request (
-                   obj.callback,
-                   {
-                   method:'GET',
-                   parameters:obj.qs,
-                   onFailure:eval(obj.js_error),
-                   onSuccess:eval(obj.js_success)
-                   });
+    var action =3D new Ajax.Request(
+            obj.callback,
+            {
+                method: 'GET',
+                parameters: obj.qs,
+                onFailure: eval(obj.js_error),
+                onSuccess: eval(obj.js_success)
+            });
 }
 /**
  *@brief receive answer from ajax and just display it into the IBox
@@ -737,109 +741,193 @@
  * code is the HTML to put in it
  *@see fill_box
  */
-function success_box(req,json)
+function success_box(req, json)
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var a=3Danswer.getElementsByTagName('ctl');
-        var html=3Danswer.getElementsByTagName('code');
-        if ( a.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var a =3D answer.getElementsByTagName('ctl');
+        var html =3D answer.getElementsByTagName('code');
+        if (a.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var name_ctl=3Da[0].firstChild.nodeValue;
-        var code_html=3DgetNodeText(html[0]);
+        var name_ctl =3D a[0].firstChild.nodeValue;
+        var code_html =3D getNodeText(html[0]);
=20
-        code_html=3Dunescape_xml(code_html);
-        g(name_ctl).innerHTML=3Dcode_html;
-        g(name_ctl).style.height=3D'auto';
+        code_html =3D unescape_xml(code_html);
+        g(name_ctl).innerHTML =3D code_html;
+        g(name_ctl).style.height =3D 'auto';
=20
-        if(name_ctl !=3D 'popup')
-            g(name_ctl).style.width=3D'60%';
+        if (name_ctl !=3D 'popup')
+            g(name_ctl).style.width =3D '60%';
         else
-            g(name_ctl).style.width=3D'auto';
+            g(name_ctl).style.width =3D 'auto';
     }
     catch (e)
     {
-        alert("success_box"+e.message);
+        alert("success_box" + e.message);
     }
     try
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("answer_box Impossible executer script de la reponse\n"+e.=
message);
+        alert("answer_box Impossible executer script de la reponse\n" + =
e.message);
     }
 }
=20
-function error_box ()
+function error_box()
 {
     alert('IBOX : error_box ajax not implemented');
 }
 /**
-* show the ledger choice
-*/
-function show_ledger_choice()
+ * show the ledger choice
+ */
+function show_ledger_choice(json_obj)
 {
-   if ($('div_jrn')) g('div_jrn').style.visibility=3D'visible';
-   if ($('div_jrnsearch_op')) $('div_jrnsearch_op').style.display=3D'blo=
ck';
+    try
+    {
+        waiting_box();
+        var i =3D 0;
+        var query =3D "gDossier=3D" + json_obj.dossier + '&type=3D' + js=
on_obj.type + '&div=3D' + json_obj.div + '&op=3Dledger_show';
+        query =3D query + '&nbjrn=3D' + $( json_obj.div+'nb_jrn').value;
+        query =3D query + '&all_type=3D' + json_obj.all_type;
+        for (i =3D 0; i < $( json_obj.div+'nb_jrn').value; i++) {
+            query =3D query + "&r_jrn[]=3D" + $( json_obj.div+'r_jrn[' +=
 i + ']').value;
+        }
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: query,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, json) {
+                        try {
+                            var obj =3D {
+                                id: json_obj.div + 'jrn_search',
+                                cssclass: 'inner_box',
+                                style: ';position:absolute;width:60%;z-i=
ndex:20;margin-left:20%',
+                                drag: 1
+                            };
+                            var y=3Dcalcy(posY);
+                            if (json_obj.div !=3D '')obj.cssclass=3D"";
+                            console.log(y);
+                            obj.style=3D"top:"+y+obj.style;
+                            add_div(obj);
+
+
+                            var answer =3D req.responseXML;
+                            var a =3D answer.getElementsByTagName('ctl')=
;
+                            var html =3D answer.getElementsByTagName('co=
de');
+                            if (a.length =3D=3D 0) {
+                                var rec =3D req.responseText;
+                                alert('erreur :' + rec);
+                            }
+                            var name_ctl =3D a[0].firstChild.nodeValue;
+                            var code_html =3D getNodeText(html[0]);
+
+                            code_html =3D unescape_xml(code_html);
+                            remove_waiting_box();
+                            g(obj.id).innerHTML =3D code_html;
+
+                        }
+                        catch (e) {
+                            alert("show_ledger_callback" + e.message);
+                        }
+                        try {
+                            code_html.evalScripts();
+                        }
+                        catch (e) {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
+
+                    }
+
+                }
+        );
+    } catch (e) {
+        console.log(e.message);
+    }
 }
 /**
-* hide the ledger choice
-*/
-function hide_ledger_choice()
+ * hide the ledger choice
+ */
+function hide_ledger_choice(p_frm_search)
 {
-    if ($('div_jrn')) g('div_jrn').style.visibility=3D'hidden';
-	if ($('div_jrnsearch_op')) $('div_jrnsearch_op').style.display=3D'none'=
;
+    try
+    {
+        var nb =3D $(p_frm_search).nb_jrn.value;
+        var div =3D $(p_frm_search).div.value;
+        var i =3D 0;
+        var str =3D "";
+        var name =3D "";
+        var n_name =3D "";
+        var sel=3D0;
+        for (i =3D 0; i < nb; i++) {
+            n_name =3D div + "r_jrn[" + sel+"]";
+            name =3D div + "r_jrn" + i;
+            if ($(name).checked) {
+                str +=3D '<input type=3D"hidden" id=3D"' + n_name + '" n=
ame=3D"' + n_name + '" value=3D"' + $(name).value + '">';
+                sel++;
+            }
+        }
+        str +=3D '<input type=3D"hidden" name=3D"'+div+'nb_jrn" id=3D"'+=
div+'nb_jrn" value=3D"' + sel + '">';
+        $('ledger_id'+div).innerHTML =3D str;
+        removeDiv(div+'jrn_search');
+        return false;
+    } catch (e) {
+        console.log(e.message);
+        return false;
+    }
+
 }
 /**
-* show the cat of ledger choice
-*/
+ * show the cat of ledger choice
+ */
 function show_cat_choice()
 {
-    g('div_cat').style.visibility=3D'visible';
+    g('div_cat').style.visibility =3D 'visible';
 }
 /**
-* hide the cat of ledger choice
-*/
+ * hide the cat of ledger choice
+ */
 function hide_cat_choice()
 {
-    g('div_cat').style.visibility=3D'hidden';
+    g('div_cat').style.visibility =3D 'hidden';
 }
 /**
-* add a row for the forecast item
-*/
+ * add a row for the forecast item
+ */
 function for_add_row(tableid)
 {
-    style=3D'class=3D"input_text"';
-    var mytable=3Dg(tableid).tBodies[0];
-    var nNumberRow=3Dmytable.rows.length;
-    var oRow=3Dmytable.insertRow(nNumberRow);
-    var rowToCopy=3Dmytable.rows[1];
-    var nNumberCell=3DrowToCopy.cells.length;
-    var nb=3Dg("nbrow");
+    style =3D 'class=3D"input_text"';
+    var mytable =3D g(tableid).tBodies[0];
+    var nNumberRow =3D mytable.rows.length;
+    var oRow =3D mytable.insertRow(nNumberRow);
+    var rowToCopy =3D mytable.rows[1];
+    var nNumberCell =3D rowToCopy.cells.length;
+    var nb =3D g("nbrow");
     var oNewRow =3D mytable.insertRow(nNumberRow);
-    for ( var e=3D0;e < nNumberCell;e++)
+    for (var e =3D 0; e < nNumberCell; e++)
     {
-        var newCell=3DoRow.insertCell(e);
-        var tt=3DrowToCopy.cells[e].innerHTML;
-        new_tt=3Dtt.replace(/an_cat0/g,"an_cat"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_cat_acc0/g,"an_cat_acc"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_qc0/g,"an_qc"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_label0/g,"an_label"+nb.value);
-        new_tt=3Dnew_tt.replace(/month0/g,"month"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_cat_amount0/g,"an_cat_amount"+nb.val=
ue);
-        new_tt=3Dnew_tt.replace(/an_deb0/g,"an_deb"+nb.value);
-        newCell.innerHTML=3Dnew_tt;
+        var newCell =3D oRow.insertCell(e);
+        var tt =3D rowToCopy.cells[e].innerHTML;
+        new_tt =3D tt.replace(/an_cat0/g, "an_cat" + nb.value);
+        new_tt =3D new_tt.replace(/an_cat_acc0/g, "an_cat_acc" + nb.valu=
e);
+        new_tt =3D new_tt.replace(/an_qc0/g, "an_qc" + nb.value);
+        new_tt =3D new_tt.replace(/an_label0/g, "an_label" + nb.value);
+        new_tt =3D new_tt.replace(/month0/g, "month" + nb.value);
+        new_tt =3D new_tt.replace(/an_cat_amount0/g, "an_cat_amount" + n=
b.value);
+        new_tt =3D new_tt.replace(/an_deb0/g, "an_deb" + nb.value);
+        newCell.innerHTML =3D new_tt;
         new_tt.evalScripts();
     }
-    $("an_cat_acc"+nb.value).value=3D"";
-    $("an_qc"+nb.value).value=3D"";
-    $("an_label"+nb.value).value=3D"";
-    $("an_cat_amount"+nb.value).value=3D"0";
+    $("an_cat_acc" + nb.value).value =3D "";
+    $("an_qc" + nb.value).value =3D "";
+    $("an_label" + nb.value).value =3D "";
+    $("an_cat_amount" + nb.value).value =3D "0";
     nb.value++;
 }
 /**
@@ -848,19 +936,19 @@
  */
 function toggle_checkbox(form_id)
 {
-    var form=3Dg(form_id);
-    for (var i=3D0;i<form.length;i++)
+    var form =3D g(form_id);
+    for (var i =3D 0; i < form.length; i++)
     {
-        var e=3Dform.elements[i];
-        if ( e.type=3D=3D'checkbox')
+        var e =3D form.elements[i];
+        if (e.type =3D=3D 'checkbox')
         {
-            if ( e.checked=3D=3Dtrue)
+            if (e.checked =3D=3D true)
             {
-                e.checked=3Dfalse;
+                e.checked =3D false;
             }
             else
             {
-                e.checked=3Dtrue;
+                e.checked =3D true;
             }
         }
     }
@@ -871,13 +959,13 @@
  */
 function select_checkbox(form_id)
 {
-    var form=3D$(form_id);
-    for (var i=3D0;i<form.length;i++)
+    var form =3D $(form_id);
+    for (var i =3D 0; i < form.length; i++)
     {
-        var e=3Dform.elements[i];
-        if ( e.type=3D=3D'checkbox')
+        var e =3D form.elements[i];
+        if (e.type =3D=3D 'checkbox')
         {
-            e.checked=3Dtrue;
+            e.checked =3D true;
         }
     }
 }
@@ -887,84 +975,85 @@
  */
 function unselect_checkbox(form_id)
 {
-    var form=3D$(form_id);
-    for (var i=3D0;i<form.length;i++)
+    var form =3D $(form_id);
+    for (var i =3D 0; i < form.length; i++)
     {
-        var e=3Dform.elements[i];
-        if ( e.type=3D=3D'checkbox')
+        var e =3D form.elements[i];
+        if (e.type =3D=3D 'checkbox')
         {
-            e.checked=3Dfalse;
+            e.checked =3D false;
         }
     }
 }
 /**
-* show the calculator
-*/
+ * show the calculator
+ */
 function show_calc()
 {
-    if ( g('calc1'))
+    if (g('calc1'))
     {
-        this.document.getElementById('inp').value=3D"";
+        this.document.getElementById('inp').value =3D "";
         this.document.getElementById('inp').focus();
         return;
     }
-    var sid=3D'calc1';
-    var shtml=3D'';
-	shtml+=3D'<div style=3D"float:right;height:10px;display:block;margin-to=
p:2px;margin-right:2px">	<a onclick=3D"removeDiv(\'calc1\');" href=3D"jav=
ascript:void(0)" id=3D"close_div">Fermer</a></div>';
-	shtml+=3D'<div>   <h2 class=3D"info">Calculatrice</h2></div>';
-    shtml+=3D'<form name=3D"calc_line"  method=3D"GET" onSubmit=3D"cal()=
;return false;" >Calculatrice simplifi=C3=A9e: =C3=A9crivez simplement le=
s op=C3=A9rations que vous voulez puis la touche retour. exemple : 1+2+3*=
(1/5) <input class=3D"input_text" type=3D"text" size=3D"30" id=3D"inp" na=
me=3D"calculator"> <input type=3D"button" value=3D"Efface tout" class=3D"=
button" onClick=3D"Clean();return false;" > <input type=3D"button" class=3D=
"button" value=3D"Fermer" onClick=3D"removeDiv(\'calc1\')" >';
-    shtml+=3D'</form><span id=3D"result">  </span><br><span id=3D"sub_to=
tal">  Taper une formule (ex 20*5.1) puis enter  </span><br><span id=3D"l=
isting"> </span>';
+    var sid =3D 'calc1';
+    var shtml =3D '';
+    shtml +=3D '<div style=3D"float:right;height:10px;display:block;marg=
in-top:2px;margin-right:2px">	<a onclick=3D"removeDiv(\'calc1\');" href=3D=
"javascript:void(0)" id=3D"close_div">Fermer</a></div>';
+    shtml +=3D '<div>   <h2 class=3D"info">Calculatrice</h2></div>';
+    shtml +=3D '<form name=3D"calc_line"  method=3D"GET" onSubmit=3D"cal=
();return false;" >Calculatrice simplifi=C3=A9e: =C3=A9crivez simplement =
les op=C3=A9rations que vous voulez puis la touche retour. exemple : 1+2+=
3*(1/5) <input class=3D"input_text" type=3D"text" size=3D"30" id=3D"inp" =
name=3D"calculator"> <input type=3D"button" value=3D"Efface tout" class=3D=
"button" onClick=3D"Clean();return false;" > <input type=3D"button" class=
=3D"button" value=3D"Fermer" onClick=3D"removeDiv(\'calc1\')" >';
+    shtml +=3D '</form><span id=3D"result">  </span><br><span id=3D"sub_=
total">  Taper une formule (ex 20*5.1) puis enter  </span><br><span id=3D=
"listing"> </span>';
=20
-var obj=3D{id:sid,html:shtml,
-	 drag:true,style:''
-        };
+    var obj =3D {id: sid, html: shtml,
+        drag: true, style: ''
+    };
     add_div(obj);
     this.document.getElementById('inp').focus();
 }
-function display_periode(p_dossier,p_id)
+function display_periode(p_dossier, p_id)
 {
=20
-     try
+    try
     {
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dinput_per"+"&p_=
id=3D"+p_id;
-	var popup=3D{'id': 'mod_periode','cssclass':'inner_box','html':loading(=
),'style':'width:30em','drag':true};
-	if ( ! $('mod_periode') ) {
-	    add_div(popup);
-	}
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dinput_per=
" + "&p_id=3D" + p_id;
+        var popup =3D {'id': 'mod_periode', 'cssclass': 'inner_box', 'ht=
ml': loading(), 'style': 'width:30em', 'drag': true};
+        if (!$('mod_periode')) {
+            add_div(popup);
+        }
         var action =3D new Ajax.Request(
-            "ajax_misc.php" ,
-            {method:'get',
-              parameters:queryString,
-              onFailure:ajax_misc_failure,
-              onSuccess:success_display_periode
-            }
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_display_periode
+                }
         );
-	$('mod_periode').style.top=3DposY-70;
-	$('mod_periode').style.left=3DposX-70;
-   }
+        $('mod_periode').style.top =3D posY - 70;
+        $('mod_periode').style.left =3D posX - 70;
+    }
     catch (e)
     {
-        alert("display_periode "+e.message);
+        alert("display_periode " + e.message);
     }
=20
 }
 function success_display_periode(req)
-{try
+{
+    try
     {
=20
-        var answer=3Dreq.responseXML;
-        var html=3Danswer.getElementsByTagName('data');
+        var answer =3D req.responseXML;
+        var html =3D answer.getElementsByTagName('data');
=20
-        if ( html.length =3D=3D 0 )
+        if (html.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
=20
-        var code_html=3DgetNodeText(html[0]);
-        code_html=3Dunescape_xml(code_html);
+        var code_html =3D getNodeText(html[0]);
+        code_html =3D unescape_xml(code_html);
=20
-        $('mod_periode').innerHTML=3Dcode_html;
+        $('mod_periode').innerHTML =3D code_html;
     }
     catch (e)
     {
@@ -974,110 +1063,116 @@
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("success_display_periode Impossible executer script de la =
reponse\n"+e.message);
+        alert("success_display_periode Impossible executer script de la =
reponse\n" + e.message);
     }
=20
 }
 function save_periode(obj)
 {
-     try
+    try
     {
-        var queryString=3D$(obj).serialize()+"&op=3Dsave_per";
+        var queryString =3D $(obj).serialize() + "&op=3Dsave_per";
=20
         var action =3D new Ajax.Request(
-            "ajax_misc.php" ,
-            {method:'post',
-              parameters:queryString,
-              onFailure:ajax_misc_failure,
-              onSuccess:success_display_periode
-            }
+                "ajax_misc.php",
+                {method: 'post',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_display_periode
+                }
         );
=20
     }
     catch (e)
     {
-        alert("display_periode "+e.message);
+        alert("display_periode " + e.message);
     }
=20
     return false;
 }
 /**
-*@brief basic answer to ajax on success, it will fill the ctl with
-* the code. In that case, you need to create the object before the Ajax.=
Request
-*The difference with success box is that
-*@see add_div removeDiv success_box is that the width and height are not=
 changed
-*@parameter ctl is the ID of the object containing the html (div, button=
...)
-*@parameter code is the html code, with it you fill the ctl element
-*/
+ *@brief basic answer to ajax on success, it will fill the ctl with
+ * the code. In that case, you need to create the object before the Ajax=
.Request
+ *The difference with success box is that
+ *@see add_div removeDiv success_box is that the width and height are no=
t changed
+ *@parameter ctl is the ID of the object containing the html (div, butto=
n...)
+ *@parameter code is the html code, with it you fill the ctl element
+ */
 function fill_box(req)
 {
-    try{
+    try {
=20
-	remove_waiting_box();
+        remove_waiting_box();
=20
-	var answer=3Dreq.responseXML;
-	var a=3Danswer.getElementsByTagName('ctl');
-	var html=3Danswer.getElementsByTagName('code');
-	if ( a.length =3D=3D 0 ) {var rec=3Dreq.responseText;alert ('erreur :'+=
rec);}
-	var name_ctl=3Da[0].firstChild.nodeValue;
-	var code_html=3DgetNodeText(html[0]); // Firefox ne prend que les 4096 =
car.
-	code_html=3Dunescape_xml(code_html);
-	$(name_ctl).innerHTML=3Dcode_html;
+        var answer =3D req.responseXML;
+        var a =3D answer.getElementsByTagName('ctl');
+        var html =3D answer.getElementsByTagName('code');
+        if (a.length =3D=3D 0) {
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
+        }
+        var name_ctl =3D a[0].firstChild.nodeValue;
+        var code_html =3D getNodeText(html[0]); // Firefox ne prend que =
les 4096 car.
+        code_html =3D unescape_xml(code_html);
+        $(name_ctl).innerHTML =3D code_html;
     }
     catch (e) {
-	alert(e.message);}
-    try{
-	code_html.evalScripts();}
-    catch(e){
-	alert("Impossible executer script de la reponse\n"+e.message);}
+        alert(e.message);
+    }
+    try {
+        code_html.evalScripts();
+    }
+    catch (e) {
+        alert("Impossible executer script de la reponse\n" + e.message);
+    }
=20
=20
 }
 /**
-*display a popin to  let you modified a predefined operation
-*@param dossier_id
-*@param od_id from table op_predef
-*/
-function mod_predf_op(dossier_id,od_id)
+ *display a popin to  let you modified a predefined operation
+ *@param dossier_id
+ *@param od_id from table op_predef
+ */
+function mod_predf_op(dossier_id, od_id)
 {
-    var target=3D"mod_predf_op";
-	removeDiv(target);
-    var sx=3D'20%';
-    var sy=3D'20%';
-    var str_style=3D"top:"+sx+";left:"+sy+'width:60%;';
+    var target =3D "mod_predf_op";
+    removeDiv(target);
+    var sx =3D '20%';
+    var sy =3D '20%';
+    var str_style =3D "top:" + sx + ";left:" + sy + 'width:60%;';
=20
-    var div=3D{id:target, cssclass:'inner_box',style:str_style,html:load=
ing(),drag:1};
+    var div =3D {id: target, cssclass: 'inner_box', style: str_style, ht=
ml: loading(), drag: 1};
=20
     add_div(div);
=20
-    var qs=3D"gDossier=3D"+dossier_id+'&op=3Dmod_predf&id=3D'+od_id;
+    var qs =3D "gDossier=3D" + dossier_id + '&op=3Dmod_predf&id=3D' + od=
_id;
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:fill_box
-				  }
-				);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: fill_box
+            }
+    );
=20
 }
=20
 function save_predf_op(obj)
 {
     waiting_box();
-    var querystring=3D$(obj).serialize()+'&op=3Dsave_predf';
+    var querystring =3D $(obj).serialize() + '&op=3Dsave_predf';
     // Create a ajax request to get all the person
-    var action =3D new Ajax.Request ('ajax_misc.php',
-				   {
-				       method:			 'post',
-				       parameters:			 querystring,
-				       onFailure:			 null,
-				       onSuccess:			refresh_window
-				   }
-                                  );
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'post',
+                parameters: querystring,
+                onFailure: null,
+                onSuccess: refresh_window
+            }
+    );
=20
     return false;
 }
@@ -1085,72 +1180,78 @@
  *ctl_concern is the widget to update
  *amount_id is either a html obj. or an amount
  */
-function search_reconcile(dossier,ctl_concern,amount_id,ledger)
+function search_reconcile(dossier, ctl_concern, amount_id, ledger)
 {
-	var dossier=3Dg('gDossier').value;
-	if ( amount_id =3D=3D undefined )
-		{amount_id=3D0;}
-	else if ($(amount_id))
-		{
-			if ($(amount_id).value)
-			{amount_id=3D$(amount_id).value;}
-			else if
-			($(amount_id).innerHTML) {amount_id=3D$(amount_id).innerHTML;}
-		}
+    var dossier =3D g('gDossier').value;
+    if (amount_id =3D=3D undefined)
+    {
+        amount_id =3D 0;
+    }
+    else if ($(amount_id))
+    {
+        if ($(amount_id).value)
+        {
+            amount_id =3D $(amount_id).value;
+        }
+        else if
+                ($(amount_id).innerHTML) {
+            amount_id =3D $(amount_id).innerHTML;
+        }
+    }
=20
-	var target=3D"search_op";
-	removeDiv(target);
-	var str_style=3Dfixed_position(77, 99);
-        str_style+=3D";width:92%;overflow:auto;";
+    var target =3D "search_op";
+    removeDiv(target);
+    var str_style =3D fixed_position(77, 99);
+    str_style +=3D ";width:92%;overflow:auto;";
=20
-    var div=3D{id:target, cssclass:'inner_box',style:str_style,html:load=
ing(),drag:1};
+    var div =3D {id: target, cssclass: 'inner_box', style: str_style, ht=
ml: loading(), drag: 1};
=20
     add_div(div);
-	var target=3D{gDossier:dossier,
-				ctlc:ctl_concern,
-				op:'search_op',
-				ctl:target,
-				ac:'JSSEARCH',
-				amount_id:amount_id,
-				ledger:ledger};
+    var target =3D {gDossier: dossier,
+        ctlc: ctl_concern,
+        op: 'search_op',
+        ctl: target,
+        ac: 'JSSEARCH',
+        amount_id: amount_id,
+        ledger: ledger};
=20
-    var qs=3DencodeJSON(target);
+    var qs =3D encodeJSON(target);
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function (req){
-						  remove_waiting_box();
-						  $('search_op').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-					  }
-				  }
-				);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    $('search_op').innerHTML =3D req.responseText;
+                    req.responseText.evalScripts();
+                }
+            }
+    );
 }
 /**
  * search in a popin obj if the object form
  */
 function search_operation(obj)
 {
-    try{
-	var dossier=3Dg('gDossier').value;
-	waiting_box();
-	var target=3D"search_op";
-        var qs=3DForm.serialize('search_form_ajx')+"&op=3Dsearch_op&ctl=3D=
search_op";
-        var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-        {
-            method:'get',
-            parameters:qs,
-            onFailure:null,
-            onSuccess:function (req){
-                remove_waiting_box();
-                $('search_op').innerHTML=3Dreq.responseText;
-                req.responseText.evalScripts();
-            }
-        }
-    );
+    try {
+        var dossier =3D g('gDossier').value;
+        waiting_box();
+        var target =3D "search_op";
+        var qs =3D Form.serialize('search_form_ajx') + "&op=3Dsearch_op&=
ctl=3Dsearch_op";
+        var action =3D new Ajax.Request('ajax_misc.php',
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: null,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        $('search_op').innerHTML =3D req.responseText;
+                        req.responseText.evalScripts();
+                    }
+                }
+        );
     } catch (e)
     {
         remove_waiting_box();
@@ -1159,75 +1260,78 @@
 }
=20
 function set_reconcile(obj)
- {
+{
=20
-	 try
-	{
-		var ctlc=3Dobj.elements['ctlc'];
+    try
+    {
+        var ctlc =3D obj.elements['ctlc'];
=20
-		for (var e=3D0;e<obj.elements.length;e++)
-		{
+        for (var e =3D 0; e < obj.elements.length; e++)
+        {
=20
-			var elmt=3Dobj.elements[e];
-			if ( elmt.type =3D=3D "checkbox")
-			{
-				if (elmt.checked=3D=3Dtrue )
-				{
-					var str_name=3Delmt.name;
-					var nValue=3Dstr_name.replace("jr_concerned","");
-					if ( $(ctlc.value).value !=3D '') {$(ctlc.value).value+=3D',';}
-					$(ctlc.value).value+=3DnValue;
-				}
-			}
-		}
-		removeDiv('search_op');
-	}
-	catch(e)
-	{
-		alert(e.message)
-	}
- }
+            var elmt =3D obj.elements[e];
+            if (elmt.type =3D=3D "checkbox")
+            {
+                if (elmt.checked =3D=3D true)
+                {
+                    var str_name =3D elmt.name;
+                    var nValue =3D str_name.replace("jr_concerned", "");
+                    if ($(ctlc.value).value !=3D '') {
+                        $(ctlc.value).value +=3D ',';
+                    }
+                    $(ctlc.value).value +=3D nValue;
+                }
+            }
+        }
+        removeDiv('search_op');
+    }
+    catch (e)
+    {
+        alert(e.message)
+    }
+}
 function remove_waiting_box()
 {
-			removeDiv('wait_box');
-			$('info_div').innerHTML=3D"";
-			$('info_div').style.display=3D"none";
+    removeDiv('wait_box');
+    $('info_div').innerHTML =3D "";
+    $('info_div').style.display =3D "none";
 }
-function get_profile_detail(gDossier,profile_id)
+function get_profile_detail(gDossier, profile_id)
 {
-	waiting_box();
-	var qs=3D"op=3Ddisplay_profile&gDossier=3D"+gDossier+"&p_id=3D"+profile=
_id+"&ctl=3Ddetail_profile";
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  remove_waiting_box();
-						  $('detail_profile').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-						  $('detail_profile').show();
-						  if ( profile_id !=3D "-1" ) profile_show('profile_gen_div');
-					  }
-				  }
-				);
+    waiting_box();
+    var qs =3D "op=3Ddisplay_profile&gDossier=3D" + gDossier + "&p_id=3D=
" + profile_id + "&ctl=3Ddetail_profile";
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    $('detail_profile').innerHTML =3D req.responseText;
+                    req.responseText.evalScripts();
+                    $('detail_profile').show();
+                    if (profile_id !=3D "-1")
+                        profile_show('profile_gen_div');
+                }
+            }
+    );
 }
 function get_profile_detail_success(xml)
 {
-	remove_waiting_box();
+    remove_waiting_box();
=20
 }
 /**
  * @brief compute the string to position a div in a fixed way
  * @return string
  */
-function fixed_position(p_sx,p_sy)
+function fixed_position(p_sx, p_sy)
 {
-	var sx=3Dp_sx;
-	var sy=3Dcalcy(p_sy);
+    var sx =3D p_sx;
+    var sy =3D calcy(p_sy);
=20
-    var str_style=3D"top:"+sy+";left:"+sx+";position:absolute";
-	return str_style;
+    var str_style =3D "top:" + sy + ";left:" + sx + ";position:absolute"=
;
+    return str_style;
=20
 }
 /**
@@ -1236,176 +1340,184 @@
  */
 function calcy(p_sy)
 {
-	var sy=3Dp_sy;
-	if ( window.scrollY)
-        {
-            sy=3Dwindow.scrollY+p_sy;
-        }
-        else
-        {
-            sy=3Ddocument.body.scrollTop+p_sy;
-        }
-	return sy;
+    var sy =3D p_sy;
+    if (window.scrollY)
+    {
+        sy =3D window.scrollY + p_sy;
+    }
+    else
+    {
+        sy =3D document.body.scrollTop + p_sy;
+    }
+    return sy;
=20
 }
-function mod_menu(gdossier,pm_id)
+function mod_menu(gdossier, pm_id)
 {
-	waiting_box();
-	removeDiv('divdm'+pm_id);
-	var qs=3D"op=3Ddet_menu&gDossier=3D"+gdossier+"&pm_id=3D"+pm_id+"&ctl=3D=
divdm"+pm_id;
-	var pos=3Dfixed_position(250,150);
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  add_div({id:"divdm"+pm_id,drag:1,cssclass:"inner_box",style:pos=
});
-							  $('divdm'+pm_id).innerHTML=3Dreq.responseText;
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+    waiting_box();
+    removeDiv('divdm' + pm_id);
+    var qs =3D "op=3Ddet_menu&gDossier=3D" + gdossier + "&pm_id=3D" + pm=
_id + "&ctl=3Ddivdm" + pm_id;
+    var pos =3D fixed_position(250, 150);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        add_div({id: "divdm" + pm_id, drag: 1, cssclass:=
 "inner_box", style: pos});
+                        $('divdm' + pm_id).innerHTML =3D req.responseTex=
t;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
 function add_menu(obj)
 {
-	var pdossier=3Dobj.dossier;
-	var p_id=3Dobj.p_id;
-	var p_type=3Dobj.type;
-	waiting_box();
-	removeDiv('divdm'+p_id);
-	var qs=3D"op=3Dadd_menu&gDossier=3D"+pdossier+"&p_id=3D"+p_id+"&ctl=3Dd=
ivdm"+p_id+"&type=3D"+p_type;
-	var pos=3Dfixed_position(250,150);
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  add_div({id:"divdm"+p_id,drag:1,cssclass:"inner_box",style:pos}=
);
-							  $('divdm'+p_id).innerHTML=3Dreq.responseText;
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+    var pdossier =3D obj.dossier;
+    var p_id =3D obj.p_id;
+    var p_type =3D obj.type;
+    waiting_box();
+    removeDiv('divdm' + p_id);
+    var qs =3D "op=3Dadd_menu&gDossier=3D" + pdossier + "&p_id=3D" + p_i=
d + "&ctl=3Ddivdm" + p_id + "&type=3D" + p_type;
+    var pos =3D fixed_position(250, 150);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        add_div({id: "divdm" + p_id, drag: 1, cssclass: =
"inner_box", style: pos});
+                        $('divdm' + p_id).innerHTML =3D req.responseText=
;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
 function add_plugin(p_dossier)
 {
-	waiting_box();
-	removeDiv('divplugin');
-	var qs=3D"op=3Dadd_plugin&gDossier=3D"+p_dossier+"&ctl=3Ddivplugin";
+    waiting_box();
+    removeDiv('divplugin');
+    var qs =3D "op=3Dadd_plugin&gDossier=3D" + p_dossier + "&ctl=3Ddivpl=
ugin";
=20
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  var pos=3Dfixed_position(250,150)+";width:30%";
-							add_div({id:"divplugin",drag:1,cssclass:"inner_box",style:pos});
-							  $('divplugin').innerHTML=3Dreq.responseText;
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({id: "divplugin", drag: 1, cssclass: "in=
ner_box", style: pos});
+                        $('divplugin').innerHTML =3D req.responseText;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
-function mod_plugin(p_dossier,me_code)
+function mod_plugin(p_dossier, me_code)
 {
-	waiting_box();
-	removeDiv('divplugin');
-	var qs=3D"op=3Dmod_plugin&gDossier=3D"+p_dossier+"&ctl=3Ddivplugin&me_c=
ode=3D"+me_code;
+    waiting_box();
+    removeDiv('divplugin');
+    var qs =3D "op=3Dmod_plugin&gDossier=3D" + p_dossier + "&ctl=3Ddivpl=
ugin&me_code=3D" + me_code;
=20
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  var pos=3Dfixed_position(250,150)+";width:30%";
-							  add_div({id:"divplugin",drag:1,cssclass:"inner_box",style:pos})=
;
-							  $('divplugin').innerHTML=3Dreq.responseText;
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({id: "divplugin", drag: 1, cssclass: "in=
ner_box", style: pos});
+                        $('divplugin').innerHTML =3D req.responseText;
=20
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
 function create_menu(p_dossier)
 {
     waiting_box();
     removeDiv('divmenu');
-    var qs=3D"op=3Dcreate_menu&gDossier=3D"+p_dossier+"&ctl=3Ddivmenu";
+    var qs =3D "op=3Dcreate_menu&gDossier=3D" + p_dossier + "&ctl=3Ddivm=
enu";
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-    {
-        method:'get',
-        parameters:qs,
-        onFailure:null,
-        onSuccess:function(req){
-            try{
-                remove_waiting_box();
-                var pos=3Dfixed_position(250,150)+";width:30%";
-                add_div({
-                    id:"divmenu",
-                    drag:1,
-                    cssclass:"inner_box",
-                    style:pos
-                });
-                $('divmenu').innerHTML=3Dreq.responseText;
-            } catch(e){
-                alert(e.message);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({
+                            id: "divmenu",
+                            drag: 1,
+                            cssclass: "inner_box",
+                            style: pos
+                        });
+                        $('divmenu').innerHTML =3D req.responseText;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
             }
-        }
-    }
     );
 }
-function modify_menu(p_dossier,me_code)
+function modify_menu(p_dossier, me_code)
 {
     waiting_box();
     removeDiv('divmenu');
-    var qs=3D"op=3Dmodify_menu&gDossier=3D"+p_dossier+"&ctl=3Ddivmenu&me=
_code=3D"+me_code;
+    var qs =3D "op=3Dmodify_menu&gDossier=3D" + p_dossier + "&ctl=3Ddivm=
enu&me_code=3D" + me_code;
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-    {
-        method:'get',
-        parameters:qs,
-        onFailure:null,
-        onSuccess:function(req){
-            try{
-                remove_waiting_box();
-                var pos=3Dfixed_position(250,150)+";width:30%";
-                add_div({
-                    id:"divmenu",
-                    drag:1,
-                    cssclass:"inner_box",
-                    style:pos
-                });
-                $('divmenu').innerHTML=3Dreq.responseText;
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({
+                            id: "divmenu",
+                            drag: 1,
+                            cssclass: "inner_box",
+                            style: pos
+                        });
+                        $('divmenu').innerHTML =3D req.responseText;
=20
-            } catch(e){
-                alert(e.message);
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
             }
-        }
-    }
     );
 }
 function get_properties(obj)
 {
-    var a_array=3D[];
-    var s_type=3D"["+typeof obj+"]";
+    var a_array =3D [];
+    var s_type =3D "[" + typeof obj + "]";
     for (var m in obj)
     {
-	a_array.push(m);
+        a_array.push(m);
     }
-    alert(s_type+a_array.join(","));
+    alert(s_type + a_array.join(","));
 }
 /**
  * @brief add a line in the form for the report
@@ -1413,243 +1525,253 @@
  */
 function rapport_add_row(p_dossier)
 {
-    style=3D'style=3D"border: 1px solid blue;"';
-    var table=3D$("rap1");
-    var line=3Dtable.rows.length;
+    style =3D 'style=3D"border: 1px solid blue;"';
+    var table =3D $("rap1");
+    var line =3D table.rows.length;
=20
-    var row=3Dtable.insertRow(line);
+    var row =3D table.insertRow(line);
     // left cell
     var cellPos =3D row.insertCell(0);
-    cellPos.innerHTML=3D'<input type=3D"text" '+style+' size=3D"3" id=3D=
"pos'+line+'" name=3D"pos'+line+'" value=3D"'+line+'">';
+    cellPos.innerHTML =3D '<input type=3D"text" ' + style + ' size=3D"3"=
 id=3D"pos' + line + '" name=3D"pos' + line + '" value=3D"' + line + '">'=
;
=20
     // right cell
     var cellName =3D row.insertCell(1);
-    cellName.innerHTML=3D'<input type=3D"text" '+style+' size=3D"40" id=3D=
"text'+line+'" name=3D"text'+line+'">';
+    cellName.innerHTML =3D '<input type=3D"text" ' + style + ' size=3D"4=
0" id=3D"text' + line + '" name=3D"text' + line + '">';
=20
     // button + formula
     var cellbutton =3D row.insertCell(2);
-    var but_html=3Dtable.rows[1].cells[2].innerHTML;
-    but_html=3Dbut_html.replace(/form0/g,"form"+line);
-    cellbutton.innerHTML=3Dbut_html;
+    var but_html =3D table.rows[1].cells[2].innerHTML;
+    but_html =3D but_html.replace(/form0/g, "form" + line);
+    cellbutton.innerHTML =3D but_html;
     but_html.evalScripts();
=20
-    g('form'+line).value=3D'';
+    g('form' + line).value =3D '';
 }
 /**
  * Search an action in an inner box
  */
-function search_action(dossier,ctl_concern)
+function search_action(dossier, ctl_concern)
 {
-	try
-	{
-	var dossier=3Dg('gDossier').value;
+    try
+    {
+        var dossier =3D g('gDossier').value;
=20
-	var target=3D"search_action_div";
-	removeDiv(target);
-	var str_style=3Dfixed_position(77, 99);
-        str_style+=3D";width:80%";
+        var target =3D "search_action_div";
+        removeDiv(target);
+        var str_style =3D fixed_position(77, 99);
+        str_style +=3D ";width:80%";
=20
-    var div=3D{id:target, cssclass:'inner_box',style:str_style,html:load=
ing(),drag:1};
+        var div =3D {id: target, cssclass: 'inner_box', style: str_style=
, html: loading(), drag: 1};
=20
-    add_div(div);
-	var target=3D{gDossier:dossier,
-				ctlc:ctl_concern,
-				op:'search_action',
-				ctl:target
-				};
+        add_div(div);
+        var target =3D {gDossier: dossier,
+            ctlc: ctl_concern,
+            op: 'search_action',
+            ctl: target
+        };
=20
-    var qs=3DencodeJSON(target);
+        var qs =3D encodeJSON(target);
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function (req){
-						  try {
-						  remove_waiting_box();
-						  $('search_action_div').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-						  }catch( e){alert(e.message);}
-					  }
-				  }
-				);
-	}catch( e){alert(e.message);}
+        var action =3D new Ajax.Request('ajax_misc.php',
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: null,
+                    onSuccess: function(req) {
+                        try {
+                            remove_waiting_box();
+                            $('search_action_div').innerHTML =3D req.res=
ponseText;
+                            req.responseText.evalScripts();
+                        } catch (e) {
+                            alert(e.message);
+                        }
+                    }
+                }
+        );
+    } catch (e) {
+        alert(e.message);
+    }
 }
=20
 function result_search_action(obj)
 {
-     try
+    try
     {
-        var queryString=3D$(obj).serialize()+"&op=3Dsearch_action";
+        var queryString =3D $(obj).serialize() + "&op=3Dsearch_action";
         var action =3D new Ajax.Request(
-            "ajax_misc.php" ,
-            {method:'get',
-              parameters:queryString,
-              onFailure:ajax_misc_failure,
-              onSuccess:function (req){
-						  try {
-						  remove_waiting_box();
-						  $('search_action_div').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-						  }catch( e){alert(e.message);}
-					  }
-            }
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        try {
+                            remove_waiting_box();
+                            $('search_action_div').innerHTML =3D req.res=
ponseText;
+                            req.responseText.evalScripts();
+                        } catch (e) {
+                            alert(e.message);
+                        }
+                    }
+                }
         )
=20
     }
     catch (e)
     {
-        alert("display_periode "+e.message);
+        alert("display_periode " + e.message);
     }
=20
     return false;
 }
=20
 function set_action_related(p_obj)
- {
+{
=20
-	 try
-	{
-		var obj=3D$(p_obj);
-		var ctlc=3Dobj.elements['ctlc'];
+    try
+    {
+        var obj =3D $(p_obj);
+        var ctlc =3D obj.elements['ctlc'];
=20
-		for (var e=3D0;e<obj.elements.length;e++)
-		{
+        for (var e =3D 0; e < obj.elements.length; e++)
+        {
=20
-			var elmt=3Dobj.elements[e];
-			if ( elmt.type =3D=3D "checkbox")
-			{
-				if (elmt.checked=3D=3Dtrue )
-				{
-					var str_name=3Delmt.name;
-						var nValue=3Delmt.value;
-						if ( $(ctlc.value).value !=3D '') {$(ctlc.value).value+=3D',';}
-						$(ctlc.value).value+=3DnValue;
-				}
-			}
-		}
-		removeDiv('search_action_div');
-		return false;
-	}
-	catch(e)
-	{
-		alert(e.message);
-		return false;
-	}
- }
- /**
+            var elmt =3D obj.elements[e];
+            if (elmt.type =3D=3D "checkbox")
+            {
+                if (elmt.checked =3D=3D true)
+                {
+                    var str_name =3D elmt.name;
+                    var nValue =3D elmt.value;
+                    if ($(ctlc.value).value !=3D '') {
+                        $(ctlc.value).value +=3D ',';
+                    }
+                    $(ctlc.value).value +=3D nValue;
+                }
+            }
+        }
+        removeDiv('search_action_div');
+        return false;
+    }
+    catch (e)
+    {
+        alert(e.message);
+        return false;
+    }
+}
+/**
  *@brief change a document_modele
  */
-function stock_repo_change(p_dossier,r_id)
+function stock_repo_change(p_dossier, r_id)
 {
-    var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dmod_stock_repo"+"&r=
_id=3D"+r_id;
-    var nTop=3Dcalcy(posY);
-    var nLeft=3D"200px";
-    var str_style=3D"top:"+nTop+"px;left:"+nLeft+";width:50em;height:aut=
o";
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dmod_stock_rep=
o" + "&r_id=3D" + r_id;
+    var nTop =3D calcy(posY);
+    var nLeft =3D "200px";
+    var str_style =3D "top:" + nTop + "px;left:" + nLeft + ";width:50em;=
height:auto";
=20
     removeDiv('change_stock_repo_div');
     waiting_box();
     var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-					  remove_waiting_box();
-					  add_div({id:'change_stock_repo_div',style:str_style,cssclass:'inn=
er_box',drag:"1"});
-					  $('change_stock_repo_div').innerHTML=3Dreq.responseText;
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    add_div({id: 'change_stock_repo_div', style: str_sty=
le, cssclass: 'inner_box', drag: "1"});
+                    $('change_stock_repo_div').innerHTML =3D req.respons=
eText;
=20
-				      }
-				  }
-				  );
+                }
+            }
+    );
 }
-function stock_inv_detail(p_dossier,p_id)
+function stock_inv_detail(p_dossier, p_id)
 {
-	var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dview_mod_stock"+"&c_id=
=3D"+p_id+"&ctl=3Dview_mod_stock_div";
-    var nTop=3Dcalcy(posY);
-    var nLeft=3D"200px";
-    var str_style=3D"top:"+nTop+"px;left:"+nLeft+";width:75%;";
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dview_mod_stoc=
k" + "&c_id=3D" + p_id + "&ctl=3Dview_mod_stock_div";
+    var nTop =3D calcy(posY);
+    var nLeft =3D "200px";
+    var str_style =3D "top:" + nTop + "px;left:" + nLeft + ";width:75%;"=
;
=20
     removeDiv('view_mod_stock_div');
     waiting_box();
     var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-					  remove_waiting_box();
-					  add_div({id:'view_mod_stock_div',style:str_style,cssclass:'inner_=
box',drag:"1"});
-					  $('view_mod_stock_div').innerHTML=3Dreq.responseText;
-					  req.responseText.evalScripts();
-				      }
-				  }
-				  );
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    add_div({id: 'view_mod_stock_div', style: str_style,=
 cssclass: 'inner_box', drag: "1"});
+                    $('view_mod_stock_div').innerHTML =3D req.responseTe=
xt;
+                    req.responseText.evalScripts();
+                }
+            }
+    );
 }
 function show_fin_chdate(obj_id)
 {
-	try
-	{
-		var ch=3D$(obj_id).options[$(obj_id).selectedIndex].value;
-		if (ch =3D=3D 2 ) {
-			$('chdate_ext').hide();
-			$('thdate').show();
-		}
-		if (ch =3D=3D 1 ) {
-			$('chdate_ext').show();
-			$('thdate').hide();
-		}
-		var nb=3D$('nb_item').value;
-		for (i=3D0;i<nb;i++) {
-			if ( $('tdchdate'+i)) {
-				if (ch =3D=3D 2) {
-					$('tdchdate'+i).show();
-				}
-				if (ch =3D=3D 1 ) {
-					$('tdchdate'+i).hide();
+    try
+    {
+        var ch =3D $(obj_id).options[$(obj_id).selectedIndex].value;
+        if (ch =3D=3D 2) {
+            $('chdate_ext').hide();
+            $('thdate').show();
+        }
+        if (ch =3D=3D 1) {
+            $('chdate_ext').show();
+            $('thdate').hide();
+        }
+        var nb =3D $('nb_item').value;
+        for (i =3D 0; i < nb; i++) {
+            if ($('tdchdate' + i)) {
+                if (ch =3D=3D 2) {
+                    $('tdchdate' + i).show();
+                }
+                if (ch =3D=3D 1) {
+                    $('tdchdate' + i).hide();
=20
-				}
-			}
-		}
-	}catch (e) {
-		alert(e.message);
-	}
+                }
+            }
+        }
+    } catch (e) {
+        alert(e.message);
+    }
 }
 /**
  * tab menu for the profile parameter
  */
 function profile_show(p_div)
 {
-	try{
-		var div=3D['profile_gen_div','profile_menu_div','profile_print_div','p=
rofile_gestion_div','profile_repo_div'];
-		for (var r =3D0;r<div.length;r++ ) {$(div[r]).hide();}
-		$(p_div).show();
-	} catch(e)
-	{
-		alert(e.message)
-	}
+    try {
+        var div =3D ['profile_gen_div', 'profile_menu_div', 'profile_pri=
nt_div', 'profile_gestion_div', 'profile_repo_div'];
+        for (var r =3D 0; r < div.length; r++) {
+            $(div[r]).hide();
+        }
+        $(p_div).show();
+    } catch (e)
+    {
+        alert(e.message)
+    }
 }
-function detail_category_show(p_div,p_dossier,p_id)
+function detail_category_show(p_div, p_dossier, p_id)
 {
-	$(p_div).show();
-	waiting_box();
-	$('detail_category_div').innerHTML=3D"";
-	var queryString=3D"gDossier=3D"+p_dossier+"&id=3D"+p_id+"&op=3Dfddetail=
";
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-						$('list_cat_div').hide();
-						$('detail_category_div').innerHTML=3Dreq.responseText;
-						$('detail_category_div').show();
-						req.responseText.evalScripts();
-				      }
-				  }
-				  );
+    $(p_div).show();
+    waiting_box();
+    $('detail_category_div').innerHTML =3D "";
+    var queryString =3D "gDossier=3D" + p_dossier + "&id=3D" + p_id + "&=
op=3Dfddetail";
+    var action =3D new Ajax.Request(
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    $('list_cat_div').hide();
+                    $('detail_category_div').innerHTML =3D req.responseT=
ext;
+                    $('detail_category_div').show();
+                    req.responseText.evalScripts();
+                }
+            }
+    );
 }
 /**
  * @brief check if the parameter is a valid a valid date or not, returns=
 true if it is valid otherwise
@@ -1659,19 +1781,19 @@
 function check_date(p_str_date)
 {
     var format =3D /^\d{2}\.\d{2}\.\d{4}$/;
-    if(!format.test(p_str_date)){
-	return false;
+    if (!format.test(p_str_date)) {
+        return false;
     }
-    else{
-	var date_temp =3D p_str_date.split('.');
-        var nMonth=3DparseFloat(date_temp[1])-1;
-	var ma_date =3D new Date(date_temp[2], nMonth, date_temp[0]);
-	if(ma_date.getFullYear()=3D=3Ddate_temp[2] && ma_date.getMonth()=3D=3Dn=
Month && ma_date.getDate()=3D=3Ddate_temp[0]){
-	    return true;
-	}
-	else{
-	    return false;
-	}
+    else {
+        var date_temp =3D p_str_date.split('.');
+        var nMonth =3D parseFloat(date_temp[1]) - 1;
+        var ma_date =3D new Date(date_temp[2], nMonth, date_temp[0]);
+        if (ma_date.getFullYear() =3D=3D date_temp[2] && ma_date.getMont=
h() =3D=3D nMonth && ma_date.getDate() =3D=3D date_temp[0]) {
+            return true;
+        }
+        else {
+            return false;
+        }
     }
=20
 }
@@ -1683,8 +1805,8 @@
  */
 function check_date_id(p_id_date)
 {
-	var str_date=3D$(p_id_date).value;
-	return check_date(str_date);
+    var str_date =3D $(p_id_date).value;
+    return check_date(str_date);
 }
 /**
  *
@@ -1692,46 +1814,46 @@
  * @param dossier is the folder
  * @param modify : show the modify button values : 0 for no 1 for yes
  */
-function view_action(ag_id,dossier,modify)
+function view_action(ag_id, dossier, modify)
 {
-	waiting_box();
-	layer++;
-	id =3D 'action' + layer;
+    waiting_box();
+    layer++;
+    id =3D 'action' + layer;
=20
-	querystring =3D 'gDossier=3D' + dossier + '&op=3Dvw_action&ag_id=3D' + =
ag_id + '&div=3D' + id+'&mod=3D'+modify;
-	var action =3D new Ajax.Request(
-			"ajax_misc.php",
-			{
-				method: 'get',
-				parameters: querystring,
-				onFailure: error_box,
-				onSuccess: function(req) {
-					try {
-						remove_waiting_box();
-                                                var answer=3Dreq.respons=
eXML;
-                                                var html=3Danswer.getEle=
mentsByTagName('code');
-                                                if ( html.length =3D=3D =
0 )
-                                                {
-                                                    var rec=3Dreq.respon=
seText;
-                                                    alert ('erreur :'+re=
c);
-                                                }
-                                                var code_html=3DgetNodeT=
ext(html[0]);
-                                                code_html=3Dunescape_xml=
(code_html);
-						var pos =3D fixed_position(0, 50) + ";width:90%;left:5%;";
-						add_div({
-							id: id,
-							drag: 1,
-							cssclass: "inner_box",
-							style: pos
-						});
-						$(id).innerHTML =3D code_html;
-						compute_all_ledger();
-					} catch (e) {
-						alert('view_action'+e.message);
-					}
-				}
-			}
-	);
+    querystring =3D 'gDossier=3D' + dossier + '&op=3Dvw_action&ag_id=3D'=
 + ag_id + '&div=3D' + id + '&mod=3D' + modify;
+    var action =3D new Ajax.Request(
+            "ajax_misc.php",
+            {
+                method: 'get',
+                parameters: querystring,
+                onFailure: error_box,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D req.responseText;
+                            alert('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        var pos =3D fixed_position(0, 50) + ";width:90%;=
left:5%;";
+                        add_div({
+                            id: id,
+                            drag: 1,
+                            cssclass: "inner_box",
+                            style: pos
+                        });
+                        $(id).innerHTML =3D code_html;
+                        compute_all_ledger();
+                    } catch (e) {
+                        alert('view_action' + e.message);
+                    }
+                }
+            }
+    );
 }
 /**
  * @brief filter quickly a table
@@ -1742,42 +1864,44 @@
  * @returns nothing
  * @see HtmlInput::filter_table
  */
-function filter_table(phrase, _id, colnr,start_row) {
-	$('info_div').innerHTML=3D"Un instant";
-	$('info_div').style.display=3D"block";
-	var words =3D $(phrase).value.toLowerCase();
-	var table =3D document.getElementById(_id);
+function filter_table(phrase, _id, colnr, start_row) {
+    $('info_div').innerHTML =3D "Un instant";
+    $('info_div').style.display =3D "block";
+    var words =3D $(phrase).value.toLowerCase();
+    var table =3D document.getElementById(_id);
=20
-	// if colnr contains a comma then check several columns
-	var aCol =3D new Array();
-	if (colnr.indexOf(',') >=3D 0) {
-		aCol =3D colnr.split(',');
-	} else {
-		aCol[0] =3D colnr;
-	}
-	var ele;
+    // if colnr contains a comma then check several columns
+    var aCol =3D new Array();
+    if (colnr.indexOf(',') >=3D 0) {
+        aCol =3D colnr.split(',');
+    } else {
+        aCol[0] =3D colnr;
+    }
+    var ele;
=20
-	for (var r =3D start_row; r < table.rows.length; r++) {
-		var found=3D0;
-		for (var col =3D0;col < aCol.length;col++)
-		{
-			var idx=3DaCol[col];
-			if (table.rows[r].cells[idx])
-				 {
-					ele =3D table.rows[r].cells[idx].innerHTML.replace(/<[^>]+>/g, "");
-						//var displayStyle =3D 'none';
-					if (ele.toLowerCase().indexOf(words) >=3D 0){ found=3D1; }
-				 }
+    for (var r =3D start_row; r < table.rows.length; r++) {
+        var found =3D 0;
+        for (var col =3D 0; col < aCol.length; col++)
+        {
+            var idx =3D aCol[col];
+            if (table.rows[r].cells[idx])
+            {
+                ele =3D table.rows[r].cells[idx].innerHTML.replace(/<[^>=
]+>/g, "");
+                //var displayStyle =3D 'none';
+                if (ele.toLowerCase().indexOf(words) >=3D 0) {
+                    found =3D 1;
+                }
+            }
=20
-		}
-		if (found =3D=3D 1 ){
-			table.rows[r].style.display =3D '';
-		} else {
-			table.rows[r].style.display =3D 'none';
-		}
-		$('info_div').style.display=3D"none";
-		$('info_div').innerHTML=3D"";
-	}
+        }
+        if (found =3D=3D 1) {
+            table.rows[r].style.display =3D '';
+        } else {
+            table.rows[r].style.display =3D 'none';
+        }
+        $('info_div').style.display =3D "none";
+        $('info_div').innerHTML =3D "";
+    }
 }
 /**
  * @brief
@@ -1785,31 +1909,31 @@
  */
 function display_task(p_id)
 {
-	new Draggable(p_id,{starteffect:function()
-                                  {
-			new Effect.Highlight(obj.id,{scroll:window,queue:'end'});
-                           }}
-                         );
-    $(p_id).style.top=3DposY;
-    $(p_id).style.left=3DposX;
-	$(p_id).style.display=3D'block';
+    new Draggable(p_id, {starteffect: function()
+        {
+            new Effect.Highlight(obj.id, {scroll: window, queue: 'end'})=
;
+        }}
+    );
+    $(p_id).style.top =3D posY;
+    $(p_id).style.left =3D posX;
+    $(p_id).style.display =3D 'block';
=20
 }
 /**
  * @brief
  * Set a message in the info
  */
-function info_message (p_message)
+function info_message(p_message)
 {
-		$('info_div').innerHTML=3Dp_message;
-		$('info_div').style.display=3D"block";
+    $('info_div').innerHTML =3D p_message;
+    $('info_div').style.display =3D "block";
 }
 /**
  * @brief hide the info box
  */
 function info_hide()
 {
-		$('info_div').style.display=3D"none";
+    $('info_div').style.display =3D "none";
 }
 /**
  * Show the navigator in a internal window
@@ -1819,33 +1943,33 @@
     try {
         waiting_box();
         removeDiv('navi_div')
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dnavigator";
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                add_div({id:'navi_div',s=
tyle:'top:2em;left:2em;width:90%',cssclass:'inner_box'});
-						$('navi_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                    sorttable.makeSortab=
le($("navi_tb"));
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dnavigator=
";
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        add_div({id: 'navi_div', style: 'top:2em;left:2e=
m;width:90%', cssclass: 'inner_box'});
+                        $('navi_div').innerHTML =3D req.responseText;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                            sorttable.makeSortable($("navi_tb"));
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief Display an internal windows to set the user's preference
@@ -1855,32 +1979,32 @@
     try {
         waiting_box();
         removeDiv('preference_div')
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dpreference";
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                add_div({id:'preference_=
div',drag:1});
-						$('preference_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dpreferenc=
e";
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        add_div({id: 'preference_div', drag: 1});
+                        $('preference_div').innerHTML =3D req.responseTe=
xt;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief Display user's bookmark
@@ -1890,34 +2014,34 @@
     try {
         waiting_box();
         removeDiv('bookmark_div');
-        var param=3Dwindow.location.search;
-        param=3Dparam.gsub('?','');
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dbookmark&"+para=
m;
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                add_div({id:'bookmark_di=
v',cssclass:'inner_box',drag:1});
-						$('bookmark_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var param =3D window.location.search;
+        param =3D param.gsub('?', '');
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dbookmark&=
" + param;
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        add_div({id: 'bookmark_div', cssclass: 'inner_bo=
x', drag: 1});
+                        $('bookmark_div').innerHTML =3D req.responseText=
;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief save the bookmark
@@ -1925,33 +2049,33 @@
 function save_bookmark() {
     try {
         waiting_box();
-        var queryString=3D"op=3Dbookmark&"+$("bookmark_frm").serialize()=
;
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                // removeDiv('bookmark_d=
iv');
-                                                //=20
-						$('bookmark_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "op=3Dbookmark&" + $("bookmark_frm").seriali=
ze();
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        // removeDiv('bookmark_div');
+                        //=20
+                        $('bookmark_div').innerHTML =3D req.responseText=
;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief remove selected bookmark
@@ -1959,31 +2083,31 @@
 function remove_bookmark() {
     try {
         waiting_box();
-        var queryString=3D"op=3Dbookmark&"+$("bookmark_del_frm").seriali=
ze();
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-						$('bookmark_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "op=3Dbookmark&" + $("bookmark_del_frm").ser=
ialize();
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        $('bookmark_div').innerHTML =3D req.responseText=
;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
-   =20
+
 }
 /**
  *@brief display the error message into the div error_content_div (inclu=
ded into error_div)
@@ -1992,47 +2116,47 @@
  */
 function error_message(message)
 {
-    $('error_content_div').innerHTML=3Dmessage;
-    $('error_div').style.visibility=3D'visible';
+    $('error_content_div').innerHTML =3D message;
+    $('error_div').style.visibility =3D 'visible';
 }
 /**
  * @brief show the detail of a tag and propose to save it
  */
-function show_tag(p_dossier,p_ac,p_tag_id,p_post)
+function show_tag(p_dossier, p_ac, p_tag_id, p_post)
 {
     try {
         waiting_box();
-        var queryString=3D"op=3Dtag_detail&tag=3D"+p_tag_id+"&gDossier=3D=
"+p_dossier+"&ac=3D"+p_ac+'&form=3D'+p_post;
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						var answer=3Dreq.responseXML;
-                                                var html=3Danswer.getEle=
mentsByTagName('code');
-                                                if ( html.length =3D=3D =
0 )
-                                                {
-                                                    var rec=3Dreq.respon=
seText;
-                                                    alert ('erreur :'+re=
c);
-                                                }
-                                                var code_html=3DgetNodeT=
ext(html[0]);
-                                                code_html=3Dunescape_xml=
(code_html);
-						remove_waiting_box();
-                                                add_div({id:'tag_div',cs=
sclass:'inner_box',drag:1});
-						$('tag_div').innerHTML=3Dcode_html;
-                                                try
-                                                {
-                                                    code_html.evalScript=
s();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "op=3Dtag_detail&tag=3D" + p_tag_id + "&gDos=
sier=3D" + p_dossier + "&ac=3D" + p_ac + '&form=3D' + p_post;
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D req.responseText;
+                            alert('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        add_div({id: 'tag_div', cssclass: 'inner_box', d=
rag: 1});
+                        $('tag_div').innerHTML =3D code_html;
+                        try
+                        {
+                            code_html.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2045,25 +2169,25 @@
 {
     try {
         waiting_box();
-        var queryString=3D"op=3Dtag_save&"+$("tag_detail_frm").serialize=
();
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get',=20
-                                      parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req,j){
-                                              remove_waiting_box();
-                                              removeDiv('tag_div');
-				      }
-				  }
-				  );
+        var queryString =3D "op=3Dtag_save&" + $("tag_detail_frm").seria=
lize();
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        remove_waiting_box();
+                        removeDiv('tag_div');
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
         return false;
     }
-   return false;
-   =20
+    return false;
+
 }
 /**
  * Show a list of tag which can be added to the current followup documen=
t
@@ -2071,34 +2195,34 @@
  * @param {type} ag_id
  * @returns {undefined}
  */
-function action_tag_select(p_dossier,ag_id)
+function action_tag_select(p_dossier, ag_id)
 {
     try {
         waiting_box();
-        var queryString=3D"ag_id=3D"+ag_id+"&op=3Dtag_list&gDossier=3D"+=
p_dossier;
+        var queryString =3D "ag_id=3D" + ag_id + "&op=3Dtag_list&gDossie=
r=3D" + p_dossier;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    add_div({id:'tag_div=
',style:'width:40%;',cssclass:'inner_box',drag:1});
-                                                    $('tag_div').style.t=
op=3DposY-70;
-                                                    $('tag_div').style.l=
eft=3DposX-70;
-                                                    remove_waiting_box()=
;
-                                                    $('tag_div').innerHT=
ML=3Dcode_html;
-                                          }
-                                      }
-                                      );
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        add_div({id: 'tag_div', style: 'width:40%;', css=
class: 'inner_box', drag: 1});
+                        $('tag_div').style.top =3D posY - 70;
+                        $('tag_div').style.left =3D posX - 70;
+                        remove_waiting_box();
+                        $('tag_div').innerHTML =3D code_html;
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2109,32 +2233,32 @@
  * @param {type} ag_id
  * @returns {undefined}
  */
-function action_tag_add(p_dossier,ag_id,t_id)
+function action_tag_add(p_dossier, ag_id, t_id)
 {
     try {
         waiting_box();
-        var queryString=3D"t_id=3D"+t_id+"&ag_id=3D"+ag_id+"&op=3Dtag_ad=
d&gDossier=3D"+p_dossier;
+        var queryString =3D "t_id=3D" + t_id + "&ag_id=3D" + ag_id + "&o=
p=3Dtag_add&gDossier=3D" + p_dossier;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    $('action_tag_td').i=
nnerHTML=3Dcode_html;
-                                                    removeDiv('tag_div')=
;
-                                          }
-                                      }
-                                      );
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        $('action_tag_td').innerHTML =3D code_html;
+                        removeDiv('tag_div');
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2145,33 +2269,34 @@
  * @param {type} ag_id
  * @returns {undefined}
  */
-function action_tag_remove(p_dossier,ag_id,t_id)
+function action_tag_remove(p_dossier, ag_id, t_id)
 {
-    if ( confirm ('Enlevez ce tags ?')=3D=3D false ) return;
+    if (confirm('Enlevez ce tags ?') =3D=3D false)
+        return;
     try {
         waiting_box();
-        var queryString=3D"t_id=3D"+t_id+"&ag_id=3D"+ag_id+"&op=3Dtag_re=
move&gDossier=3D"+p_dossier;
+        var queryString =3D "t_id=3D" + t_id + "&ag_id=3D" + ag_id + "&o=
p=3Dtag_remove&gDossier=3D" + p_dossier;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    $('action_tag_td').i=
nnerHTML=3Dcode_html;
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        $('action_tag_td').innerHTML =3D code_html;
=20
-                                          }
-                                      }
-                                      );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2184,36 +2309,36 @@
  * @param {type} p_dossier
  * @returns {undefined}
  */
-function search_display_tag(p_dossier,p_prefix)
+function search_display_tag(p_dossier, p_prefix)
 {
     try {
         waiting_box();
-        var queryString=3D"op=3Dsearch_display_tag&gDossier=3D"+p_dossie=
r+"&pref=3D"+p_prefix;
+        var queryString =3D "op=3Dsearch_display_tag&gDossier=3D" + p_do=
ssier + "&pref=3D" + p_prefix;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    add_div({id:p_prefix=
+'tag_div',style:'width:40%',cssclass:'inner_box',drag:1});
-                                                    $(p_prefix+'tag_div'=
).style.top=3DposY-80;
-                                                    $(p_prefix+'tag_div'=
).style.left=3DposX-200;
-                                                    remove_waiting_box()=
;
-                                                    $(p_prefix+'tag_div'=
).innerHTML=3Dcode_html;
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        add_div({id: p_prefix + 'tag_div', style: 'width=
:40%', cssclass: 'inner_box', drag: 1});
+                        $(p_prefix + 'tag_div').style.top =3D posY - 80;
+                        $(p_prefix + 'tag_div').style.left =3D posX - 20=
0;
+                        remove_waiting_box();
+                        $(p_prefix + 'tag_div').innerHTML =3D code_html;
=20
-                                          }
-                                      }
-                                      );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2224,81 +2349,83 @@
  * @param {type} p_dossier
  * @param {type} p_tag_id
  */
-function search_add_tag(p_dossier,p_tag_id,p_prefix)
+function search_add_tag(p_dossier, p_tag_id, p_prefix)
 {
     try {
-        var clear_button=3D0;
-        if (  tag_choose =3D=3D '' && p_prefix=3D=3D'search') {
-            tag_choose=3D$(p_prefix+'tag_choose_td').innerHTML ;
-            clear_button=3D1;
+        var clear_button =3D 0;
+        if (tag_choose =3D=3D '' && p_prefix =3D=3D 'search') {
+            tag_choose =3D $(p_prefix + 'tag_choose_td').innerHTML;
+            clear_button =3D 1;
         }
         waiting_box();
-        var queryString=3D"op=3Dsearch_add_tag&gDossier=3D"+p_dossier+"&=
id=3D"+p_tag_id+"&clear=3D"+clear_button+'&pref=3D'+p_prefix;
+        var queryString =3D "op=3Dsearch_add_tag&gDossier=3D" + p_dossie=
r + "&id=3D" + p_tag_id + "&clear=3D" + clear_button + '&pref=3D' + p_pre=
fix;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('html');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    $(p_prefix+'tag_choo=
se_td').innerHTML=3D$(p_prefix+'tag_choose_td').innerHTML+code_html;
-                                                    removeDiv(p_prefix+'=
tag_div');
-                                          }
-                                      }
-                                      );
-    }catch (e) {
-         error_message(e.getMessage);
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('html')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        $(p_prefix + 'tag_choose_td').innerHTML =3D $(p_=
prefix + 'tag_choose_td').innerHTML + code_html;
+                        removeDiv(p_prefix + 'tag_div');
+                    }
+                }
+        );
+    } catch (e) {
+        error_message(e.getMessage);
     }
 }
 /**
  * Clear the tags in the cell tag_choose_td of the search screen
  * @returns {undefined}
  */
-function search_clear_tag(p_dossier,p_prefix)
+function search_clear_tag(p_dossier, p_prefix)
 {
-    if ( p_prefix !=3D'search') {
-        $(p_prefix+'tag_choose_td').innerHTML=3D"";
+    if (p_prefix !=3D 'search') {
+        $(p_prefix + 'tag_choose_td').innerHTML =3D "";
         return;
     }
     try {
-        var queryString=3D"op=3Dsearch_clear_tag&gDossier=3D"+p_dossier+=
"&pref=3D"+p_prefix;
+        var queryString =3D "op=3Dsearch_clear_tag&gDossier=3D" + p_doss=
ier + "&pref=3D" + p_prefix;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('html');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    $(p_prefix+'tag_choo=
se_td').innerHTML=3Dcode_html;
-                                                    tag_choose=3D"";
-                                          }
-                                      }
-                                      );
-    }catch (e) {
-         error_message(e.getMessage);
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('html')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        $(p_prefix + 'tag_choose_td').innerHTML =3D code=
_html;
+                        tag_choose =3D "";
+                    }
+                }
+        );
+    } catch (e) {
+        error_message(e.getMessage);
     }
 }
 function action_show_checkbox()
 {
-    var a=3Ddocument.getElementsByName('ag_id_td');
-    for (var i=3D0;i<a.length;i++) {    a[i].style.display=3D'block';   =
 }
+    var a =3D document.getElementsByName('ag_id_td');
+    for (var i =3D 0; i < a.length; i++) {
+        a[i].style.display =3D 'block';
+    }
 }
 /**
  *=20
@@ -2312,81 +2439,85 @@
 function calendar_zoom(obj)
 {
     try {
-       =20
-        var query=3D"";
-        query=3D"op=3Dcalendar_zoom&gDossier=3D"+obj.gDossier+"&in=3D"+$=
(obj.invalue).value+'&out=3D'+obj.outdiv;
+
+        var query =3D "";
+        query =3D "op=3Dcalendar_zoom&gDossier=3D" + obj.gDossier + "&in=
=3D" + $(obj.invalue).value + '&out=3D' + obj.outdiv;
         waiting_box();
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                    var answer=3Dreq.res=
ponseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('html');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                   =20
-                                                    // if the target doe=
sn't exist=20
-                                                    // then create it
-                                                    if ( obj.outdiv =3D=3D=
 undefined ) {
-                                                        obj.outdiv=3D'ca=
lendar_zoom_div';
-                                                    }
-                                                    if (   $(obj.outdiv)=
 =3D=3D undefined) {
-                                                        var str_style=3D=
fixed_position(0,20);
-                                                        add_div({id:obj.=
outdiv,style:'margin-left:3%;width:94%;height:94%;'+str_style,cssclass:"i=
nner_box",drag:1});
-                                                    }
-                                                    remove_waiting_box()=
;
-                                                    $(obj.outdiv).innerH=
TML=3Dcode_html;
-                                                    $(obj.outdiv).show()=
;
-                                          }
-                                      }
-                                      );
-    }catch (e) {
-         error_message('calendar_zoom '+e.getMessage);
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: query,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('html')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+
+                        // if the target doesn't exist=20
+                        // then create it
+                        if (obj.outdiv =3D=3D undefined) {
+                            obj.outdiv =3D 'calendar_zoom_div';
+                        }
+                        if ($(obj.outdiv) =3D=3D undefined) {
+                            var str_style =3D fixed_position(0, 20);
+                            add_div({id: obj.outdiv, style: 'margin-left=
:3%;width:94%;height:94%;' + str_style, cssclass: "inner_box", drag: 1});
+                        }
+                        remove_waiting_box();
+                        $(obj.outdiv).innerHTML =3D code_html;
+                        $(obj.outdiv).show();
+                    }
+                }
+        );
+    } catch (e) {
+        error_message('calendar_zoom ' + e.getMessage);
     }
- =20
-   =20
+
+
 }
 /**
  * @brief add a line in the form for the stock
  */
 function stock_add_row()
 {
-	try{
-    style=3D'class=3D"input_text"';
-    var mytable=3Dg("stock_tb").tBodies[0];
-    var ofirstRow=3Dmytable.rows[1];
-    var line=3Dmytable.rows.length;
-    var nCell=3Dmytable.rows[1].cells.length;
-    var row=3Dmytable.insertRow(line);
-    var nb=3Dg("row");
-    for (var e=3D0;e<nCell;e++)
-    {
-        var newCell=3Drow.insertCell(e);
-        if (mytable.rows[1].cells[e].hasClassName('num') ) { newCell.add=
ClassName("num");}
-       =20
-        var tt=3DofirstRow.cells[e].innerHTML;
-        var new_tt=3Dtt.replace(/sg_code0/g,"sg_code"+nb.value);
-        new_tt=3Dnew_tt.replace(/sg_quantity0/g,"sg_quantity"+nb.value);
-        new_tt=3Dnew_tt.replace(/label0/g,"label"+nb.value);
-        newCell.innerHTML=3Dnew_tt;
-        new_tt.evalScripts();
-    }
+    try {
+        style =3D 'class=3D"input_text"';
+        var mytable =3D g("stock_tb").tBodies[0];
+        var ofirstRow =3D mytable.rows[1];
+        var line =3D mytable.rows.length;
+        var nCell =3D mytable.rows[1].cells.length;
+        var row =3D mytable.insertRow(line);
+        var nb =3D g("row");
+        for (var e =3D 0; e < nCell; e++)
+        {
+            var newCell =3D row.insertCell(e);
+            if (mytable.rows[1].cells[e].hasClassName('num')) {
+                newCell.addClassName("num");
+            }
=20
-    g("sg_code"+nb.value).innerHTML=3D'&nbsp;';
-    g("sg_code"+nb.value).value=3D'';
-    g("label"+nb.value).innerHTML=3D'';
-    g("sg_quantity"+nb.value).value=3D'0';
+            var tt =3D ofirstRow.cells[e].innerHTML;
+            var new_tt =3D tt.replace(/sg_code0/g, "sg_code" + nb.value)=
;
+            new_tt =3D new_tt.replace(/sg_quantity0/g, "sg_quantity" + n=
b.value);
+            new_tt =3D new_tt.replace(/label0/g, "label" + nb.value);
+            newCell.innerHTML =3D new_tt;
+            new_tt.evalScripts();
+        }
=20
-    nb.value++;
+        g("sg_code" + nb.value).innerHTML =3D '&nbsp;';
+        g("sg_code" + nb.value).value =3D '';
+        g("label" + nb.value).innerHTML =3D '';
+        g("sg_quantity" + nb.value).value =3D '0';
=20
-    new_tt.evalScripts();
-	} catch(e) {alert(e.message);}
+        nb.value++;
=20
+        new_tt.evalScripts();
+    } catch (e) {
+        alert(e.message);
+    }
+
 }
\ No newline at end of file

Modified: phpcompta/tags/rel670/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/style.css	2013-12-05 01:14:55 UTC (rev 556=
2)
+++ phpcompta/tags/rel670/html/style.css	2013-12-05 05:37:23 UTC (rev 556=
3)
@@ -962,16 +962,6 @@
=20
=20
 }
-div#div_jrn{
-    position:absolute;
-    border:1px solid black;
-    top:15%;left:100;
-    visibility:hidden;
-    z-index:2;
-    width:50em;
-    background-color:#EDF3FF;
-
-}
 div#div_cat{
     position:absolute;
     border:1px solid black;
@@ -1079,9 +1069,7 @@
     text-align:center;
 }
 div#div_jrnsearch_op{
-
     border:1px solid black;
-    display:none;
     width:50em;
     background-color:#EDF3FF;
     position:absolute;

Modified: phpcompta/tags/rel670/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_acc_ledger.php	2013-12-05 01:14:5=
5 UTC (rev 5562)
+++ phpcompta/tags/rel670/include/class_acc_ledger.php	2013-12-05 05:37:2=
3 UTC (rev 5563)
@@ -2421,13 +2421,31 @@
=20
 	function search_form($p_type, $all_type_ledger =3D 1, $div =3D "")
 	{
-		global $g_user;
-		$r =3D '';
-		/* security : filter ledger on user */
-		$filter_ledger =3D $g_user->get_ledger($p_type, 3);
-
-		$selected =3D (isset($_REQUEST['r_jrn' . $div])) ? $_REQUEST['r_jrn' .=
 $div] : null;
-		$f_ledger =3D HtmlInput::select_ledger($filter_ledger, $selected, $div=
);
+            global $g_user;
+            $r=3D"";
+                $bledger_param=3D  json_encode(array(
+                    'dossier'=3D>$_REQUEST['gDossier'],
+                    'type'=3D>$p_type,
+                    'all_type'=3D>$all_type_ledger,
+                    'div'=3D>$div
+                    ));
+               =20
+                $bledger_param=3D  str_replace('"', "'", $bledger_param)=
;
+                $bledger=3Dnew ISmallButton('l');
+                $bledger->label=3D"choix des journaux";
+                $bledger->javascript=3D" show_ledger_choice($bledger_par=
am)";
+                $f_ledger=3D$bledger->input();
+                $hid_jrn=3D"";
+                if ( isset ($_REQUEST[$div.'nb_jrn']) ){
+                    for ($i=3D0;$i < $_REQUEST[$div.'nb_jrn'];$i++) {
+                        if ( isset ($_REQUEST[$div."r_jrn"][$i]))
+                            $hid_jrn.=3DHtmlInput::hidden($div.'r_jrn['.=
$i.']',$_REQUEST[$div."r_jrn"][$i]);
+                    }
+                    $hid_jrn.=3DHtmlInput::hidden($div.'nb_jrn',$_REQUES=
T[$div.'nb_jrn']);
+                } else {
+                    $hid_jrn=3DHtmlInput::hidden($div.'nb_jrn',0);
+                }
+		// $f_ledger =3D HtmlInput::select_ledger($filter_ledger, $selected, $=
div);
                 /* Compute date for exercice */
                 $period =3D $g_user->get_periode();
                 $per =3D new Periode($this->db, $period);
@@ -2618,7 +2636,13 @@
 		if (!empty($p_array))
 			extract($p_array);
=20
-		$r_jrn =3D (isset($r_jrn)) ? $r_jrn : -1;
+                if (isset($op) )=20
+                    $r_jrn =3D (isset(${$op."r_jrn"})) ? ${$op."r_jrn"} =
: -1;
+                else
+                {
+                    $r_jrn =3D (isset($r_jrn)) ? $r_jrn : -1;
+                   =20
+                }
=20
 		/* if no variable are set then give them a default
 		 * value */
@@ -2678,12 +2702,13 @@
 			$aLedger =3D $g_user->get_ledger($p_action, 3);
 			$fil_ledger =3D '';
 			$sp =3D '';
-			for ($i =3D 0; $i < count($aLedger); $i++)
+			for ($i =3D 0; $i < count($r_jrn); $i++)
 			{
-				if (isset($r_jrn[$i]))
+                                if (isset($r_jrn[$i]) )
 				{
-					$fil_ledger.=3D$sp . $aLedger[$i]['jrn_def_id'];
-					$sp =3D ',';
+                                    $a=3D$r_jrn[$i];
+  				    $fil_ledger.=3D$sp . $a;
+                                    $sp =3D ',';
 				}
 			}
 			$fil_ledger =3D ' jrn_def_id in (' . $fil_ledger . ')';

Modified: phpcompta/tags/rel670/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_html_input.php	2013-12-05 01:14:5=
5 UTC (rev 5562)
+++ phpcompta/tags/rel670/include/class_html_input.php	2013-12-05 05:37:2=
3 UTC (rev 5563)
@@ -301,29 +301,32 @@
      * return the html code to create an hidden div and a button
      * to show this DIV. This contains all the available ledgers
      * for the user in READ or RW
-     *@param $p_array is an array obtains thanks User::get_ledger
      *@param $selected is an array of checkbox
+     *@param $div div suffix
      *@note the choosen ledger are stored in the array r_jrn (_GET)
      */
-    static function select_ledger($p_array,$p_selected,$div=3D'')
+    static function select_ledger($p_type,$p_selected,$div=3D'')
     {
+        global $g_user;
+	$r =3D '';
+	/* security : filter ledger on user */
+	$p_array =3D $g_user->get_ledger($p_type, 3);
+       =20
         ob_start();
-        $ledger=3Dnew ISmallButton('l');
-        $ledger->label=3D"choix des journaux";
-        $ledger->javascript=3D" show_ledger_choice()";
-        echo $ledger->input();
+       =20
=20
         /* create a hidden div for the ledger */
         echo '<div id=3D"div_jrn'.$div.'" >';
-        echo '<h2 class=3D"info">Choix des journaux</h2>';
-
+        echo HtmlInput::title_box("Journaux", $div."jrn_search");
+        echo '<form method=3D"GET" id=3D"'.$div.'search_frm" onsubmit=3D=
"return hide_ledger_choice(\''.$div.'search_frm\')">';
+        echo HtmlInput::hidden('nb_jrn', count($p_array));
         echo '<ul>';
         for ($e=3D0;$e<count($p_array);$e++)
         {
             $row=3D$p_array[$e];
-            $r=3Dnew ICheckBox('r_jrn['.$e.']',$row['jrn_def_id']);
+            $r=3Dnew ICheckBox($div.'r_jrn'.$e,$row['jrn_def_id']);
             $idx=3D$row['jrn_def_id'];
-            if ( $p_selected !=3D null && isset($p_selected[$e]))
+            if ( $p_selected !=3D null &&  in_array($row['jrn_def_id'],$=
p_selected))
             {
                 $r->selected=3Dtrue;
             }
@@ -331,11 +334,9 @@
=20
         }
         echo '</ul>';
-        $hide=3Dnew IButton('l');
-        $hide->label=3D"Valider";
-        $hide->javascript=3D" hide_ledger_choice() ";
-        echo $hide->input();
-
+        echo HtmlInput::hidden('div',$div);
+        echo HtmlInput::submit('save','Valider');
+        echo '</form>';
         echo '</div>';
         $ret=3Dob_get_contents();
         ob_end_clean();

Modified: phpcompta/tags/rel670/include/search.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/search.inc.php	2013-12-05 01:14:55 UTC =
(rev 5562)
+++ phpcompta/tags/rel670/include/search.inc.php	2013-12-05 05:37:23 UTC =
(rev 5563)
@@ -126,9 +126,9 @@
 	echo HtmlInput::submit("upd_rec","Mettre =C3=A0 jour");
     if (! $inside )echo $bar;
=20
-    if (isset($_GET['r_jrn'])) {
-      foreach ($_GET['r_jrn'] as $k=3D>$v)
-		echo HtmlInput::hidden('r_jrn['.$k.']',$v);
+    if (isset($_GET[$op.'r_jrn'])) {
+      foreach ($_GET[$op.'r_jrn'] as $k=3D>$v)
+		echo HtmlInput::hidden($op.'r_jrn['.$k.']',$v);
     }
     echo '</form>';
 }

Modified: phpcompta/tags/rel670/include/template/ledger_search.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/ledger_search.php	2013-12-05 0=
1:14:55 UTC (rev 5562)
+++ phpcompta/tags/rel670/include/template/ledger_search.php	2013-12-05 0=
5:37:23 UTC (rev 5563)
@@ -6,6 +6,11 @@
 </td>
 <td>
    <?php echo $f_ledger; ?>
+    <span id=3D"ledger_id<?php echo $div;?>">
+        <?php
+        echo $hid_jrn;
+        ?>
+    </span>
 </td>
 </tr>
=20



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


From MAILER-DAEMON Thu Dec 05 01:34:42 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoSWI-0007J8-Hn
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Dec 2013 01:34:42 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 07:23:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126309.1386225280.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5564 - in phpcompta/tags/rel670: html html/js
	include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 06:34:39 -0000

Author: danydb
Date: 2013-12-05 07:23:14 +0100 (Thu, 05 Dec 2013)
New Revision: 5564

Modified:
   phpcompta/tags/rel670/html/ajax_misc.php
   phpcompta/tags/rel670/html/js/acc_ledger.js
   phpcompta/tags/rel670/html/style.css
   phpcompta/tags/rel670/include/class_html_input.php
   phpcompta/tags/rel670/include/class_user.php
   phpcompta/tags/rel670/include/compta_ach.inc.php
   phpcompta/tags/rel670/include/compta_fin.inc.php
   phpcompta/tags/rel670/include/compta_ven.inc.php
   phpcompta/tags/rel670/include/operation_ods_new.inc.php
Log:
Task #929 : Ajout d'une description pour les journaux

Description pour les journaux visibles dans lors encodages=20
Task #929 - Ajout d'une description pour les journaux

Modified: phpcompta/tags/rel670/html/ajax_misc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/ajax_misc.php	2013-12-05 05:37:23 UTC (rev=
 5563)
+++ phpcompta/tags/rel670/html/ajax_misc.php	2013-12-05 06:23:14 UTC (rev=
 5564)
@@ -620,6 +620,18 @@
             break;
         case 'ledger_show':
             require_once 'ajax_ledger_show.php';
+        case 'ledger_description':
+            $ajrn=3D$cn->get_array('select jrn_def_name,jrn_def_descript=
ion from jrn_def where jrn_def_id=3D$1',array($l));
+            if ( count($ajrn)=3D=3D1)
+            {
+               =20
+                echo '<h2 id=3D"jrn_name">'.$ajrn[0]['jrn_def_name'].'</=
h2>';
+                if ( trim($ajrn[0]['jrn_def_description']) !=3D "") {
+                    echo '<p style=3D"border:1px solid blue;margin-top:0=
">'.$ajrn[0]['jrn_def_description'].'</p>';
+                }
+            }
+            exit();
+            break;
 	default:
 		var_dump($_GET);
 }

Modified: phpcompta/tags/rel670/html/js/acc_ledger.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/acc_ledger.js	2013-12-05 05:37:23 UTC (=
rev 5563)
+++ phpcompta/tags/rel670/html/js/acc_ledger.js	2013-12-05 06:23:14 UTC (=
rev 5564)
@@ -92,7 +92,21 @@
  */
 function update_name()
 {
-	$('jrn_name').innerHTML=3D$('p_jrn').options[$('p_jrn').selectedIndex].=
innerHTML;
+    var jrn_id=3D$('p_jrn').value;
+    var dossier=3Dg("gDossier").value;
+    var querystring=3D'gDossier=3D'+dossier+'&l=3D'+jrn_id+"&op=3Dledger=
_description";
+    var action=3Dnew Ajax.Request(
+                   "ajax_misc.php",
+                   {
+                   method:'get',
+                   parameters:querystring,
+                   onFailure:error_get_pj,
+                   onSuccess:function (req){
+                       $('jrn_name_div').innerHTML=3Dreq.responseText;
+                   }
+                   }
+               );
+   =20
 }
 /**
  * @brief update the field predef

Modified: phpcompta/tags/rel670/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/style.css	2013-12-05 05:37:23 UTC (rev 556=
3)
+++ phpcompta/tags/rel670/html/style.css	2013-12-05 06:23:14 UTC (rev 556=
4)
@@ -1009,7 +1009,6 @@
     color:blue;
     font-size:2.74em;
     margin-right:30%;
-    float: right;
 }
 tr.footer{
     font-size:0.87em;
@@ -1026,8 +1025,8 @@
 {
     float: right;
     margin-right:150;
+    width:50%;
=20
-
 }
 #predef_form {
     margin-left:20%;

Modified: phpcompta/tags/rel670/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_html_input.php	2013-12-05 05:37:2=
3 UTC (rev 5563)
+++ phpcompta/tags/rel670/include/class_html_input.php	2013-12-05 06:23:1=
4 UTC (rev 5564)
@@ -320,7 +320,14 @@
         echo HtmlInput::title_box("Journaux", $div."jrn_search");
         echo '<form method=3D"GET" id=3D"'.$div.'search_frm" onsubmit=3D=
"return hide_ledger_choice(\''.$div.'search_frm\')">';
         echo HtmlInput::hidden('nb_jrn', count($p_array));
-        echo '<ul>';
+        echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2'=
, 1);
+        echo '<table class=3D"result" id=3D"'.$div.'tb_jrn">';
+        echo '<tr>';
+        echo th('Nom');
+        echo th('Description');
+        echo th('Type');
+        echo '</tr>';
+       =20
         for ($e=3D0;$e<count($p_array);$e++)
         {
             $row=3D$p_array[$e];
@@ -330,10 +337,15 @@
             {
                 $r->selected=3Dtrue;
             }
-            echo '<li style=3D"list-style-type: none;">'.$r->input().$ro=
w['jrn_def_name'].'('.$row['jrn_def_type'].')</li>';
+            $class=3D($e%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
+            echo '<tr '.$class.'>';
+            echo '<td >'.$r->input().$row['jrn_def_name'].'</td>';
+            echo '<td >'.$row['jrn_def_description'].'</td>';
+            echo '<td >'.$row['jrn_def_type'].'</td>';
+            echo '</tr>';
=20
         }
-        echo '</ul>';
+        echo '</table>';
         echo HtmlInput::hidden('div',$div);
         echo HtmlInput::submit('save','Valider');
         echo '</form>';

Modified: phpcompta/tags/rel670/include/class_user.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_user.php	2013-12-05 05:37:23 UTC =
(rev 5563)
+++ phpcompta/tags/rel670/include/class_user.php	2013-12-05 06:23:14 UTC =
(rev 5564)
@@ -302,7 +302,7 @@
=20
 			$sql =3D "select jrn_def_id,jrn_def_type,
                  jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_t=
ype_id,jrn_desc,uj_priv,
-                 jrn_deb_max_line,jrn_cred_max_line
+                 jrn_deb_max_line,jrn_cred_max_line,jrn_def_description
                  from jrn_def join jrn_type on jrn_def_type=3Djrn_type_i=
d
                  join user_sec_jrn on uj_jrn_id=3Djrn_def_id
                  where
@@ -314,7 +314,7 @@
 		{
 			$sql_type =3D ($p_type =3D=3D 'ALL') ? '' : "where jrn_def_type=3Dupp=
er('" . sql_string($p_type) . "')";
 			$sql =3D "select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_d=
eb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line,
-                 jrn_type_id,jrn_desc,'W' as uj_priv
+                 jrn_type_id,jrn_desc,'W' as uj_priv,jrn_def_description
                  from jrn_def join jrn_type on jrn_def_type=3Djrn_type_i=
d
                  $sql_type
                  order by jrn_Def_name";

Modified: phpcompta/tags/rel670/include/compta_ach.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/compta_ach.inc.php	2013-12-05 05:37:23 =
UTC (rev 5563)
+++ phpcompta/tags/rel670/include/compta_ach.inc.php	2013-12-05 06:23:14 =
UTC (rev 5564)
@@ -227,7 +227,7 @@
=20
 if (!isset($_POST['e_date']) && $g_parameter->MY_DATE_SUGGEST=3D=3D'Y')
 	echo create_script(" get_last_date()");
-
+echo create_script(" update_name()");
 echo '</div>';
=20
=20

Modified: phpcompta/tags/rel670/include/compta_fin.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/compta_fin.inc.php	2013-12-05 05:37:23 =
UTC (rev 5563)
+++ phpcompta/tags/rel670/include/compta_fin.inc.php	2013-12-05 06:23:14 =
UTC (rev 5564)
@@ -150,5 +150,5 @@
 }else {
 	echo create_script(" ajax_saldo('first_sold');");
 }
-
+echo create_script(" update_name()");
 exit();
\ No newline at end of file

Modified: phpcompta/tags/rel670/include/compta_ven.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/compta_ven.inc.php	2013-12-05 05:37:23 =
UTC (rev 5563)
+++ phpcompta/tags/rel670/include/compta_ven.inc.php	2013-12-05 06:23:14 =
UTC (rev 5564)
@@ -236,6 +236,6 @@
 	{
 		echo create_script(" get_last_date()");
 	}
-=09
+echo create_script(" update_name()");=09
 exit();
 ?>

Modified: phpcompta/tags/rel670/include/operation_ods_new.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/operation_ods_new.inc.php	2013-12-05 05=
:37:23 UTC (rev 5563)
+++ phpcompta/tags/rel670/include/operation_ods_new.inc.php	2013-12-05 06=
:23:14 UTC (rev 5564)
@@ -107,6 +107,7 @@
 echo '</form>';
=20
 echo "<script>checkTotalDirect();</script>";
+echo create_script(" update_name()");
=20
 if ($g_parameter->MY_DATE_SUGGEST=3D=3D'Y')
 {



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


From MAILER-DAEMON Thu Dec 05 02:02:34 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoSxG-0006E9-FK
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Dec 2013 02:02:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 07:51:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126349.1386226953.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5565 - in phpcompta/tags/rel670: html/js include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 07:02:32 -0000

Author: danydb
Date: 2013-12-05 07:51:08 +0100 (Thu, 05 Dec 2013)
New Revision: 5565

Modified:
   phpcompta/tags/rel670/html/js/scripts.js
   phpcompta/tags/rel670/include/class_acc_ledger.php
Log:
Task #929 : Ajout d'une description pour les journaux

nettoyage code

Modified: phpcompta/tags/rel670/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/scripts.js	2013-12-05 06:23:14 UTC (rev=
 5564)
+++ phpcompta/tags/rel670/html/js/scripts.js	2013-12-05 06:51:08 UTC (rev=
 5565)
@@ -813,7 +813,6 @@
                             };
                             var y=3Dcalcy(posY);
                             if (json_obj.div !=3D '')obj.cssclass=3D"";
-                            console.log(y);
                             obj.style=3D"top:"+y+obj.style;
                             add_div(obj);
=20
@@ -848,7 +847,7 @@
                 }
         );
     } catch (e) {
-        console.log(e.message);
+        alert('show_ledger_choice'+e.message);
     }
 }
 /**
@@ -878,7 +877,7 @@
         removeDiv(div+'jrn_search');
         return false;
     } catch (e) {
-        console.log(e.message);
+        alert('hide_ledger_choice'+e.message);
         return false;
     }
=20

Modified: phpcompta/tags/rel670/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_acc_ledger.php	2013-12-05 06:23:1=
4 UTC (rev 5564)
+++ phpcompta/tags/rel670/include/class_acc_ledger.php	2013-12-05 06:51:0=
8 UTC (rev 5565)
@@ -2445,7 +2445,6 @@
                 } else {
                     $hid_jrn=3DHtmlInput::hidden($div.'nb_jrn',0);
                 }
-		// $f_ledger =3D HtmlInput::select_ledger($filter_ledger, $selected, $=
div);
                 /* Compute date for exercice */
                 $period =3D $g_user->get_periode();
                 $per =3D new Periode($this->db, $period);



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


From MAILER-DAEMON Thu Dec 05 02:06:35 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoT19-000775-DE
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Dec 2013 02:06:35 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Dec 2013 07:55:11 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.126350.1386227194.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5566 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Dec 2013 07:06:34 -0000

Author: danydb
Date: 2013-12-05 07:55:11 +0100 (Thu, 05 Dec 2013)
New Revision: 5566

Added:
   phpcompta/tags/rel670/include/ajax_ledger_show.php
Log:
Task #929 : Ajout d'une description pour les journaux

ajout fichier

Added: phpcompta/tags/rel670/include/ajax_ledger_show.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/ajax_ledger_show.php	                  =
      (rev 0)
+++ phpcompta/tags/rel670/include/ajax_ledger_show.php	2013-12-05 06:55:1=
1 UTC (rev 5566)
@@ -0,0 +1,32 @@
+<?php
+/**
+ * @brief
+ * Show a div for selecting ledger
+ * return a html code for creating a window
+ * parameter=20
+ *   - type=20
+ *   - div
+ *   - nbjrn
+ *   - r_jrn[]
+ */
+// require_once '.php';
+require_once 'class_acc_ledger.php';
+require_once 'class_html_input.php';
+if ( ! isset ($r_jrn)) { $r_jrn=3Dnull;}
+$ctl=3D'div_jrn'.$div;
+ob_start();
+echo HtmlInput::select_ledger($type,$r_jrn, $div);
+
+$response =3D ob_get_clean();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl>$ctl</ctl>
+<code>$html</code>
+</data>
+EOF;
+exit();
+?>   =20
\ No newline at end of file



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


From MAILER-DAEMON Fri Dec 06 05:49:36 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VosyV-0004jf-V4
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 05:49:35 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 11:38:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127447.1386326974.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5567 - phpcompta/tags/rel670/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 10:49:34 -0000

Author: danydb
Date: 2013-12-06 11:38:07 +0100 (Fri, 06 Dec 2013)
New Revision: 5567

Modified:
   phpcompta/tags/rel670/include/template/detail-action.php
Log:
Task #941 Tag non disponible pour nouveau suivi
Si nouveau document, on ne peut plus ajouter de tag
Task #914 - Tag non disponible pour nouveau suivi

Modified: phpcompta/tags/rel670/include/template/detail-action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/detail-action.php	2013-12-05 0=
6:55:11 UTC (rev 5566)
+++ phpcompta/tags/rel670/include/template/detail-action.php	2013-12-06 1=
0:38:07 UTC (rev 5567)
@@ -125,6 +125,7 @@
             <td>
               <?php echo $str_ag_dest;?>
           </tr>
+<?php if ($this->ag_id > 0 ): ?>
           <tr>
             <TD>
                 Dossier / tags
@@ -136,6 +137,7 @@
                 ?>
             </td>
           </TR>
+<?php endif; ?>         =20
         </table>
=20
 </div>



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


From MAILER-DAEMON Fri Dec 06 05:52:40 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vot1U-00052e-Oa
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 05:52:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 11:41:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127452.1386327160.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5568 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 10:52:40 -0000

Author: danydb
Date: 2013-12-06 11:41:15 +0100 (Fri, 06 Dec 2013)
New Revision: 5568

Modified:
   phpcompta/tags/rel670/include/compta_fin_saldo.inc.php
Log:
Task #924 FSALDO : les lignes paires et impaires n'ont pas la m?\195?\170=
me taille de police
Task #924 - FSALDO : les lignes paires et impaires n'ont pas la m?\195?\1=
70me taille de police

Modified: phpcompta/tags/rel670/include/compta_fin_saldo.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/compta_fin_saldo.inc.php	2013-12-06 10:=
38:07 UTC (rev 5567)
+++ phpcompta/tags/rel670/include/compta_fin_saldo.inc.php	2013-12-06 10:=
41:15 UTC (rev 5568)
@@ -73,7 +73,7 @@
             if ( $idx%2 !=3D 0 )
                 $odd=3D"odd";
             else
-                $odd=3D"";
+                $odd=3D"even";
=20
             $idx++;
             echo "<tr class=3D\"$odd\">";



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


From MAILER-DAEMON Fri Dec 06 06:18:43 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VotQh-0007FF-AT
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 06:18:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 12:07:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127483.1386328722.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5569 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 11:18:41 -0000

Author: danydb
Date: 2013-12-06 12:07:16 +0100 (Fri, 06 Dec 2013)
New Revision: 5569

Modified:
   phpcompta/tags/rel670/include/compta_fin_rec.inc.php
Log:
FREC : tri incorrect

Modified: phpcompta/tags/rel670/include/compta_fin_rec.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/compta_fin_rec.inc.php	2013-12-06 10:41=
:15 UTC (rev 5568)
+++ phpcompta/tags/rel670/include/compta_fin_rec.inc.php	2013-12-06 11:07=
:16 UTC (rev 5569)
@@ -151,7 +151,7 @@
 	$r.=3Dtd($row['jr_comment']);
 	$r.=3Dtd($js);
 	$amount=3D$cn->get_value('select qf_amount from quant_fin where jr_id=3D=
$1', array($row['jr_id']));
-	$r.=3D'<td class=3D"num" class=3D"sorttable_numeric" sortable_customeke=
y=3D"'.$amount.'" style=3D"text-align:right">'.nbm ($amount).'</td>';
+	$r.=3D'<td class=3D"num" class=3D"sorttable_numeric" sorttable_customke=
y=3D"'.$amount.'" style=3D"text-align:right">'.nbm ($amount).'</td>';
=20
 	$diff=3Dbcadd($diff,$amount);
 	$tot_not_reconcilied+=3D$row['jr_montant'];



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


From MAILER-DAEMON Fri Dec 06 06:19:02 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VotR0-0007Mv-Ge
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 06:19:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 12:07:37 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127486.1386328742.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5570 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 11:19:01 -0000

Author: danydb
Date: 2013-12-06 12:07:37 +0100 (Fri, 06 Dec 2013)
New Revision: 5570

Modified:
   phpcompta/tags/rel670/include/ac_common.php
Log:
ajout d'un 3i?\195?\168me param?\195?\168tre pour TH : raw

Modified: phpcompta/tags/rel670/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/ac_common.php	2013-12-06 11:07:16 UTC (=
rev 5569)
+++ phpcompta/tags/rel670/include/ac_common.php	2013-12-06 11:07:37 UTC (=
rev 5570)
@@ -53,9 +53,9 @@
     return '<b>' . htmlspecialchars($p_string) . '</b>';
 }
=20
-function th($p_string, $p_extra=3D'')
+function th($p_string, $p_extra=3D'',$raw=3D'')
 {
-    return '<th  ' . $p_extra . '>' . htmlspecialchars($p_string) . '</t=
h>';
+    return '<th  ' . $p_extra . '>' . htmlspecialchars($p_string).$raw .=
 '</th>';
 }
=20
 function h2info($p_string)



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


From MAILER-DAEMON Fri Dec 06 06:32:04 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Votdc-0005hB-LR
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 06:32:04 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 12:20:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127495.1386329524.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5571 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 11:32:03 -0000

Author: danydb
Date: 2013-12-06 12:20:37 +0100 (Fri, 06 Dec 2013)
New Revision: 5571

Modified:
   phpcompta/tags/rel670/include/class_fiche.php
   phpcompta/tags/rel670/include/compta_fin_saldo.inc.php
Log:
task #925 - FSALDO  : ajouter les totaux
Task #925 - FSALDO  : ajouter les totaux

Modified: phpcompta/tags/rel670/include/class_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_fiche.php	2013-12-06 11:07:37 UTC=
 (rev 5570)
+++ phpcompta/tags/rel670/include/class_fiche.php	2013-12-06 11:20:37 UTC=
 (rev 5571)
@@ -73,7 +73,8 @@
     {
         global $g_user;
       $sql_ledger=3D$g_user->get_ledger_sql('FIN',3);
-      $avail=3D$this->cn->get_array("select jrn_def_id,jrn_def_bank from=
 jrn_def where jrn_def_type=3D'FIN' and $sql_ledger
+      $avail=3D$this->cn->get_array("select jrn_def_id,jrn_def_name,"
+              . "jrn_def_bank,jrn_def_description from jrn_def where jrn=
_def_type=3D'FIN' and $sql_ledger
                             order by jrn_def_name");
=20
       if ( count($avail) =3D=3D 0 )
@@ -82,6 +83,8 @@
       for ($i=3D0;$i<count($avail);$i++)
         {
             $t=3Dnew Fiche($this->cn,$avail[$i]['jrn_def_bank']);
+            $t->ledger_name=3D$avail[$i]['jrn_def_name'];
+            $t->ledger_description=3D$avail[$i]['jrn_def_description'];
             $t->getAttribut();
             $all[$i]=3D$t;
=20

Modified: phpcompta/tags/rel670/include/compta_fin_saldo.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/compta_fin_saldo.inc.php	2013-12-06 11:=
07:37 UTC (rev 5570)
+++ phpcompta/tags/rel670/include/compta_fin_saldo.inc.php	2013-12-06 11:=
20:37 UTC (rev 5571)
@@ -36,16 +36,23 @@
=20
     echo '<div class=3D"content">';
     echo dossier::hidden();
-    echo '<table style=3D"margin-left:10%;width:60%" class=3D"result">';
-    echo tr(th('Quick Code').th('Compte en banque',' style=3D"text-align=
:left"').th('solde op=C3=A9ration',' style=3D"text-align:right"')
-	    .th('solde extrait/relev=C3=A9',' style=3D"text-align:right"')
-	    .th('diff=C3=A9rence',' style=3D"text-align:right"'));
+    echo _('Filtre :').HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3'=
, '1');
+    echo '<table class=3D"sortable"  style=3D"margin-left:10%;width:60%"=
 class=3D"result" id=3D"fin_saldo_tb">';
+    echo tr(th('Quick Code',' class=3D" sorttable_sorted_reverse"',HtmlI=
nput::infobulle(17).'<span id=3D"sorttable_sortrevind">&nbsp;&blacktriang=
le;</span>')
+            .th('Compte en banque',' style=3D"text-align:left"')
+            .th('Journal',' style=3D"text-align:center"')
+            .th('Description',' style=3D"text-align:center"')
+            .th('solde op=C3=A9ration',' style=3D"text-align:right" clas=
s=3D"sorttable_numeric"')
+	    .th('solde extrait/relev=C3=A9',' style=3D"text-align:right" class=3D=
"sorttable_numeric"')
+	    .th('diff=C3=A9rence',' style=3D"text-align:right" class=3D"sorttab=
le_numeric"')
+            );
     // Filter the saldo
     //  on the current year
     $filter_year=3D"  j_tech_per in (select p_id from parm_periode where=
  p_exercice=3D'".$g_user->get_exercice()."')";
     // for highligting tje line
     $idx=3D0;
     bcscale(2);
+    $tot_extrait=3D0;$tot_diff=3D0;$tot_operation=3D0;
     // for each account
     for ( $i =3D 0; $i < count($array);$i++)
     {
@@ -86,18 +93,35 @@
             echo "<TD >".
             $array[$i]->strAttribut(ATTR_DEF_NAME).
             "</TD>".
-            "<TD align=3D\"right\">".
+             td(h($array[$i]->ledger_name)).
+             td(h($array[$i]->ledger_description)).
+            '<TD class=3D"sorttable_numeric" sorttable_customkey=3D"'.$s=
olde.'"  style=3D"text-align:right">'.
 	      nbm($solde).
             "</TD>".
-            "<TD align=3D\"right\">".
+            '<TD class=3D"sorttable_numeric" sorttable_customkey=3D"'.$s=
aldo_rec.'"  style=3D"text-align:right">'.
 	      nbm($saldo_rec).
             "</TD>".
-            "<TD align=3D\"right\">".
+            '<TD class=3D"sorttable_numeric" sorttable_customkey=3D"'.$d=
iff.'"  style=3D"text-align:right">'.
 	      nbm($diff).
             "</TD>".
             "</TR>";
+            $tot_extrait=3Dbcadd($tot_extrait,$solde);
+            $tot_operation=3Dbcadd($tot_operation,$saldo_rec);
+            $tot_diff=3Dbcadd($tot_diff,$diff);
         }
     }// for
+    echo '<tfoot>';
+    echo '<tr>';
+    echo td('');
+    echo td('');
+    echo td('');
+    echo td(' TOTAUX ','style=3D"font-weight:bold"');
+    echo td(nbm($tot_extrait),'style=3D"font-weight:bold" class=3D"num"'=
);
+    echo td(nbm($tot_operation),' style=3D"font-weight:bold" class=3D"nu=
m"');
+    echo td(nbm($tot_diff),' style=3D"font-weight:bold" class=3D"num"');
+    echo '</tr>';
+   =20
+    echo '</tfoot>';
     echo "</table>";
     echo "</div>";
     exit();



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


From MAILER-DAEMON Fri Dec 06 06:44:10 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VotpK-00019y-29
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 06:44:10 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 12:32:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127506.1386330249.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5572 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 11:44:09 -0000

Author: danydb
Date: 2013-12-06 12:32:43 +0100 (Fri, 06 Dec 2013)
New Revision: 5572

Modified:
   phpcompta/tags/rel670/include/class_acc_ledger_purchase.php
   phpcompta/tags/rel670/include/class_acc_ledger_sold.php
Log:
task #930 - Quantit?\195?\169 n?\195?\169gative et impact sur les stocks
Task #930 - Quantit?\195?\169 n?\195?\169gative et impact sur les stocks

Modified: phpcompta/tags/rel670/include/class_acc_ledger_purchase.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_acc_ledger_purchase.php	2013-12-0=
6 11:20:37 UTC (rev 5571)
+++ phpcompta/tags/rel670/include/class_acc_ledger_purchase.php	2013-12-0=
6 11:32:43 UTC (rev 5572)
@@ -474,7 +474,10 @@
                 // always save quantity but in withStock we can find
                 // what card need a stock management
                 if ( $g_parameter->MY_STOCK=3D'Y'&& isset ($repo))
-                    Stock_Goods::insert_goods($this->db,array('j_id'=3D>=
$j_id,'goods'=3D>${'e_march'.$i},'quant'=3D>$nNeg*${'e_quant'.$i},'dir'=3D=
>'d','repo'=3D>$repo)) ;
+                {
+                    $dir=3D(${'e_quant'.$i} < 0 ) ? 'c':'d';
+                    Stock_Goods::insert_goods($this->db,array('j_id'=3D>=
$j_id,'goods'=3D>${'e_march'.$i},'quant'=3D>$nNeg*${'e_quant'.$i},'dir'=3D=
>$dir,'repo'=3D>$repo)) ;
+                }
=20
                 if ( $g_parameter->MY_ANALYTIC !=3D "nu" )
                 {

Modified: phpcompta/tags/rel670/include/class_acc_ledger_sold.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_acc_ledger_sold.php	2013-12-06 11=
:20:37 UTC (rev 5571)
+++ phpcompta/tags/rel670/include/class_acc_ledger_sold.php	2013-12-06 11=
:32:43 UTC (rev 5572)
@@ -333,7 +333,10 @@
                 // always save quantity but in withStock we can find
                 // what card need a stock management
                 if ($g_parameter->MY_STOCK =3D 'Y' && isset($repo))
-                    Stock_Goods::insert_goods($this->db, array('j_id' =3D=
> $j_id, 'goods' =3D> ${'e_march' . $i}, 'quant' =3D> $nNeg * ${'e_quant'=
 . $i}, 'dir' =3D> 'c', 'repo' =3D> $repo));
+                {
+                    $dir=3D(${'e_quant'.$i} < 0 ) ? 'd':'c';
+                    Stock_Goods::insert_goods($this->db, array('j_id' =3D=
> $j_id, 'goods' =3D> ${'e_march' . $i}, 'quant' =3D> $nNeg * ${'e_quant'=
 . $i}, 'dir' =3D> $dir, 'repo' =3D> $repo));
+                }
=20
=20
                 if ($g_parameter->MY_ANALYTIC !=3D "nu") {



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


From MAILER-DAEMON Fri Dec 06 07:12:32 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VouGm-0003PS-Eb
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 07:12:32 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 13:01:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127543.1386331951.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5573 - in phpcompta/tags/rel670/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 12:12:31 -0000

Author: danydb
Date: 2013-12-06 13:01:05 +0100 (Fri, 06 Dec 2013)
New Revision: 5573

Modified:
   phpcompta/tags/rel670/include/fiche.inc.php
   phpcompta/tags/rel670/include/template/result_cat_card_summary.php
Log:
task #926 : CARD : balance et balance non sold?\195?\169e
Task #926 - CARD : balance et balance non sold?\195?\169e

Modified: phpcompta/tags/rel670/include/fiche.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/fiche.inc.php	2013-12-06 11:32:43 UTC (=
rev 5572)
+++ phpcompta/tags/rel670/include/fiche.inc.php	2013-12-06 12:01:05 UTC (=
rev 5573)
@@ -309,7 +309,9 @@
 				continue;
 		}
 		echo '<h2>' . $cn->get_value("select fd_label from fiche_def where fd_=
id=3D$1", array($afiche[$e]['fd_id'])) . '</h2>';
-		echo '<table class=3D"result" style=3D"width:80%;margin-left:10%">';
+                $id=3D"table_".$afiche[$e]."_id";
+                echo _('Filtre rapide:').HtmlInput::filter_table($id, '0=
,1,2', '1');=20
+		echo '<table class=3D"sortable" id=3D"'.$id.'" class=3D"result" style=3D=
"width:80%;margin-left:10%">';
 		echo tr(
 				th('Quick Code') .
 				th('Libell=C3=A9') .
@@ -341,15 +343,16 @@
 					td(HtmlInput::history_card($oCard->id, $oCard->strAttribut(ATTR_DEF=
_QUICKCODE))) .
 					td($oCard->strAttribut(ATTR_DEF_NAME)) .
 					td($oCard->strAttribut(ATTR_DEF_ACCOUNT)).
-					td(nbm($solde['debit']), 'style=3D"text-align:right"') .
-					td(nbm($solde['credit']), 'style=3D"text-align:right"') .
-					td(nbm(abs($solde['solde'])), 'style=3D"text-align:right"') .
+					td(nbm($solde['debit']), 'class=3D"sorttable_numeric" sorttable_cus=
tomkey=3D"'.$solde['debit'].'" style=3D"text-align:right"') .
+					td(nbm($solde['credit']), 'class=3D"sorttable_numeric" sorttable_cu=
stomkey=3D"'.$solde['debit'].'" style=3D"text-align:right"') .
+					td(nbm(abs($solde['solde'])), 'class=3D"sorttable_numeric" sorttabl=
e_customkey=3D"'.$solde['solde'].'" style=3D"text-align:right"') .
 					td((($solde['debit'] < $solde['credit']) ? 'CRED' : 'DEB'), 'style=3D=
"text-align:right"'), $class
 			);
=20
=20
=20
 		}
+                echo '<tfoot>';
                 echo tr(
                                 td('').
                                 td(_('Totaux')).
@@ -358,6 +361,7 @@
                                 td(nbm($sum_cred), 'style=3D"text-align:=
right"').
                                 td(nbm(abs($sum_solde)), 'style=3D"text-=
align:right"').
                                 td((($sum_deb < $sum_cred) ? 'CRED' : 'D=
EB'), 'style=3D"text-align:right"'),"");
+                echo '</tfoot>';
 		echo '</table>';
 	}
 	if ( $allcard =3D=3D 0 ) echo $str_add_card;

Modified: phpcompta/tags/rel670/include/template/result_cat_card_summary.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/result_cat_card_summary.php	20=
13-12-06 11:32:43 UTC (rev 5572)
+++ phpcompta/tags/rel670/include/template/result_cat_card_summary.php	20=
13-12-06 12:01:05 UTC (rev 5573)
@@ -2,7 +2,7 @@
 Filtre rapide :   =20
     <?php
     $col=3D"";$sp=3D"";
-    for ($e=3D0;$e<count($aHeading);$e++) {$col.=3D$e.$sp; $sp=3D",";}
+    for ($e=3D0;$e<count($aHeading);$e++) {$col.=3D$sp.$e; $sp=3D",";}
     echo HtmlInput::filter_table("fiche_tb_id", $col, '1');=20
     ?>
 <table id=3D"fiche_tb_id" class=3D"sortable">



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


From MAILER-DAEMON Fri Dec 06 08:49:37 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vovmj-0000jZ-1n
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 08:49:37 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 14:38:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127607.1386337775.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5574 - in phpcompta/tags/rel670: html html/js
	include include/template sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 13:49:35 -0000

Author: danydb
Date: 2013-12-06 14:38:08 +0100 (Fri, 06 Dec 2013)
New Revision: 5574

Modified:
   phpcompta/tags/rel670/html/js/gestion.js
   phpcompta/tags/rel670/html/js/scripts.js
   phpcompta/tags/rel670/html/show_document.php
   phpcompta/tags/rel670/include/class_document.php
   phpcompta/tags/rel670/include/class_follow_up.php
   phpcompta/tags/rel670/include/template/detail-action.php
   phpcompta/tags/rel670/sql/upgrade.sql
Log:
task #0000919: FOLLOW : description des fichiers joints
Task #919 - FOLLOW : description des fichiers joints

Modified: phpcompta/tags/rel670/html/js/gestion.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/gestion.js	2013-12-06 12:01:05 UTC (rev=
 5573)
+++ phpcompta/tags/rel670/html/js/gestion.js	2013-12-06 13:38:08 UTC (rev=
 5574)
@@ -33,7 +33,7 @@
 */
 function remove_document(p_dossier,p_id)
 {
-	queryString=3D"gDossier=3D"+p_dossier+"&a=3Drm&d_id=3D"+p_id;
+	var queryString=3D"gDossier=3D"+p_dossier+"&a=3Drm&d_id=3D"+p_id;
 	var action=3Dnew Ajax.Request (
 		"show_document.php",
 		{
@@ -47,6 +47,32 @@
=20
 }
 /**
+ *@brief update the description of an attached document of an action
+ *@param dossier
+ *@param dt_id id of the document (pk document:d_id)
+*/
+function update_document(p_dossier,p_id)
+{
+	var queryString=3D"gDossier=3D"+p_dossier+"&a=3Dupd_doc&d_id=3D"+p_id;
+        queryString+=3D"&value=3D"+$('input_desc_txt'+p_id).value;
+	var action=3Dnew Ajax.Request (
+		"show_document.php",
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:errorRemoveDoc,
+			onSuccess:function(req){
+                                $('input_desc'+p_id).hide();
+                                $('print_desc'+p_id).innerHTML=3D$('inpu=
t_desc_txt'+p_id).value+'<a class=3D"mtitle" style=3D"color:orange" id=3D=
"desc'+p_id+' onclick=3D"javascript:show_description('+p_id+'">Modifier</=
a>';
+                                $('print_desc'+p_id).show();
+                        }
+		}
+
+		);
+    return false;
+}
+
+/**
  *@brief remove the concerned operation of an action
  *@param dossier
  *@param p_id id pk action_comment_operation

Modified: phpcompta/tags/rel670/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/scripts.js	2013-12-06 12:01:05 UTC (rev=
 5573)
+++ phpcompta/tags/rel670/html/js/scripts.js	2013-12-06 13:38:08 UTC (rev=
 5574)
@@ -2519,4 +2519,10 @@
         alert(e.message);
     }
=20
+}
+function show_description(p_id)
+{
+    $('print_desc'+p_id).hide();
+    $('input_desc'+p_id).show();
+   =20
 }
\ No newline at end of file

Modified: phpcompta/tags/rel670/html/show_document.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/show_document.php	2013-12-06 12:01:05 UTC =
(rev 5573)
+++ phpcompta/tags/rel670/html/show_document.php	2013-12-06 13:38:08 UTC =
(rev 5574)
@@ -61,6 +61,19 @@
 	header("Content-type: text/html; charset: utf8", true);
 	print $json;
 }
+/* update the description of the document */
+if ( $action =3D=3D "upd_doc")=20
+{
+    	if ($g_user->check_action(VIEWDOC) =3D=3D 1)
+	{
+            $doc =3D new Document($cn, $_REQUEST['d_id']);
+            $doc->get();
+            if ( $g_user->can_write_action($doc->ag_id))
+		// retrieve the document
+		$doc->update_description(strip_tags ($_REQUEST['value']));
+	}
+
+}
 /* remove the operation from action_gestion_operation */
 if ($action =3D=3D 'rmop')
 {

Modified: phpcompta/tags/rel670/include/class_document.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_document.php	2013-12-06 12:01:05 =
UTC (rev 5573)
+++ phpcompta/tags/rel670/include/class_document.php	2013-12-06 13:38:08 =
UTC (rev 5574)
@@ -38,6 +38,7 @@
     var $d_mimetype;  /*!< $d_mimetype  */
     var $d_filename;  /*!< $d_filename */
     var $d_lob;       /*!< $d_lob the oid of the lob */
+    var $d_description;       /*!< Description of the file*/
     var $d_number;    /*!< $d_number number of the document */
     var $md_id;       /*!< $md_id document's template */
     /* Constructor
@@ -370,10 +371,10 @@
                 $this->d_lob=3D$oid;
                 $this->d_filename=3D$_FILES['file_upload']['name'][$i];
                 $this->d_mimetype=3D$_FILES['file_upload']['type'][$i];
-
+                $this->d_description=3D  strip_tags($_POST['input_desc']=
[$i]);
                 // insert into  the table
-                $sql=3D"insert into document (ag_id, d_lob,d_filename,d_=
mimetype,d_number) values ($1,$2,$3,$4,5)";
-                $this->db->exec_sql($sql,array($p_ag_id,$this->d_lob,$th=
is->d_filename,$this->d_mimetype));
+                $sql=3D"insert into document (ag_id, d_lob,d_filename,d_=
mimetype,d_number,d_description) values ($1,$2,$3,$4,$5,$6)";
+                $this->db->exec_sql($sql,array($p_ag_id,$this->d_lob,$th=
is->d_filename,$this->d_mimetype,1,$this->d_description));
             }
         } /* end for */
         $this->db->commit();
@@ -439,7 +440,7 @@
     function get_all($ag_id)
     {
         $res=3D$this->db->get_array('select d_id, ag_id, d_lob, d_number=
, d_filename,'.
-                                  ' d_mimetype from document where ag_id=
=3D$1',array($ag_id));
+                                  ' d_mimetype,d_description from docume=
nt where ag_id=3D$1',array($ag_id));
         $a=3Darray();
         for ($i=3D0;$i<sizeof($res); $i++ )
         {
@@ -450,6 +451,7 @@
             $doc->d_number=3D$res[$i]['d_number'];
             $doc->d_filename=3D$res[$i]['d_filename'];
             $doc->d_mimetype=3D$res[$i]['d_mimetype'];
+            $doc->d_description=3D$row['d_description'];
             $a[$i]=3Dclone $doc;
         }
         return $a;
@@ -469,6 +471,7 @@
         $this->d_filename=3D$row['d_filename'];
         $this->d_lob=3D$row['d_lob'];
         $this->d_number=3D$row['d_number'];
+        $this->d_description=3D$row['d_description'];
=20
     }
     /*!
@@ -1231,5 +1234,10 @@
         // if ad_id is not type select get value
         return $ad_value;
     }
+    function update_description ($p_desc)
+    {
+        $this->db->exec_sql('update document set d_description =3D $1 wh=
ere d_id=3D$2',
+                array($p_desc,$this->d_id));
+    }
=20
 }

Modified: phpcompta/tags/rel670/include/class_follow_up.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_follow_up.php	2013-12-06 12:01:05=
 UTC (rev 5573)
+++ phpcompta/tags/rel670/include/class_follow_up.php	2013-12-06 13:38:08=
 UTC (rev 5574)
@@ -379,7 +379,7 @@
 		$upload->name =3D "file_upload[]";
 		$upload->readOnly=3D$readonly;
 		$upload->value =3D "";
-		$aAttachedFile =3D $this->db->get_array('select d_id,d_filename,d_mime=
type,' .
+		$aAttachedFile =3D $this->db->get_array('select d_id,d_filename,d_desc=
ription,d_mimetype,' .
 				'\'show_document.php?' .
 				Dossier::get() . '&d_id=3D\'||d_id as link' .
 				' from document where ag_id=3D$1', array($this->ag_id));

Modified: phpcompta/tags/rel670/include/template/detail-action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/detail-action.php	2013-12-06 1=
2:01:05 UTC (rev 5573)
+++ phpcompta/tags/rel670/include/template/detail-action.php	2013-12-06 1=
3:38:08 UTC (rev 5574)
@@ -383,8 +383,31 @@
 for ($i=3D0;$i<sizeof($aAttachedFile);$i++) :
   ?>
=20
-	  <li> <A class=3D"print" style=3D"display:inline" id=3D"<?php echo "do=
c".$aAttachedFile[$i]['d_id'];?>" href=3D"<?php echo $aAttachedFile[$i]['=
link']?>"><?php echo $aAttachedFile[$i]['d_filename'];?>
-    </A>
+      <li> <A class=3D"print" style=3D"display:inline" id=3D"<?php echo =
"doc".$aAttachedFile[$i]['d_id'];?>" href=3D"<?php echo $aAttachedFile[$i=
]['link']?>">
+          <?php echo $aAttachedFile[$i]['d_filename'];?>         </a>
+
+             =20
+                  <br/>
+        <label>Description</label>
+        <span id=3D"print_desc<?php echo $aAttachedFile[$i]['d_id'];?>">=
 <?php echo h($aAttachedFile[$i]['d_description'])?>
+       <?php if ($p_view !=3D 'READ') : ?>=20
+        <?php=20
+            $js=3Dsprintf("javascript:show_description('%s')",$aAttached=
File[$i]['d_id']);
+        ?>
+        <a class=3D"mtitle" style=3D"color:orange" id=3D"<?php echo 'des=
c'.$aAttachedFile[$i]['d_id'];?>" onclick=3D"<?php echo $js?>">Modifier</=
a>   =20
+       =20
+        </span>
+        <span class=3D"noprint" id=3D"input_desc<?php echo $aAttachedFil=
e[$i]['d_id'];?>" style=3D"display:none" >
+              <input type=3D"input" class=3D"input_text" id=3D"input_des=
c_txt<?php echo $aAttachedFile[$i]['d_id'];?>" value=3D"<?php echo h($aAt=
tachedFile[$i]['d_description'])?>">
+              <?php=20
+              $js=3Dsprintf("update_document('%s','%s')",dossier::id(),$=
aAttachedFile[$i]['d_id']);
+              echo HtmlInput::button('save_desc'.$aAttachedFile[$i]['d_i=
d'], 'Sauve', 'onclick=3D"'.$js.'"','smallbutton');
+              ?>
+        </span>
+        <?php else: ?>
+        </span>
+        <?php endif;?>
+              <br/>
 <?php $rmDoc=3Dsprintf("javascript:if ( confirm('"._('Voulez-vous efface=
r le document')." %s')=3D=3Dtrue ) {remove_document('%s','%s');}",
 	$aAttachedFile[$i]['d_filename'],
 	dossier::id(),
@@ -402,7 +425,7 @@
 try {
 	docAdded=3Ddocument.getElementById('add_file');
 	new_element=3Ddocument.createElement('li');
-	new_element.innerHTML=3D'<input class=3D"inp" type=3D"file" value=3D"" =
name=3D"file_upload[]"/>';
+	new_element.innerHTML=3D'<input class=3D"inp" type=3D"file" value=3D"" =
name=3D"file_upload[]"/><br><label>Description</label><input type=3D"inpu=
t" class=3D"input_text" name=3D"input_desc[]" >';
 	docAdded.appendChild(new_element);
 }
 catch(exception) { alert('<?php echo j(_('Je ne peux pas ajouter de fich=
ier'))?>'); alert(exception.message);}
@@ -415,6 +438,9 @@
       <li>
         <?php echo $upload->input();
         ?>
+          <br/>
+        <label>Description</label>
+        <input type=3D"input" class=3D"input_text" name=3D"input_desc[]"=
 >
       </li>
     </ol>
   <span   >

Modified: phpcompta/tags/rel670/sql/upgrade.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/sql/upgrade.sql	2013-12-06 12:01:05 UTC (rev 55=
73)
+++ phpcompta/tags/rel670/sql/upgrade.sql	2013-12-06 13:38:08 UTC (rev 55=
74)
@@ -1,17 +0,0 @@
-alter table jrn_def add jrn_def_description text;
-
-CREATE OR REPLACE FUNCTION comptaproc.t_jrn_def_description()
- RETURNS trigger
- LANGUAGE plpgsql
-AS $function$
-    declare
-        str varchar(200);
-    BEGIN
-        str :=3D substr(NEW.jrn_def_description,1,200);
-        NEW.jrn_def_description :=3D str;
-
-        RETURN NEW;
-    END;
-$function$
-;
-create  trigger jrn_def_description_ins_upd before insert or update on j=
rn_def for each row execute procedure comptaproc.t_jrn_def_description();
\ No newline at end of file



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


From MAILER-DAEMON Fri Dec 06 08:52:13 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VovpF-0001RP-H0
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 08:52:13 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 14:40:42 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127610.1386337932.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5575 - in phpcompta/tags/rel670:
	html/admin/sql/patch include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 13:52:12 -0000

Author: danydb
Date: 2013-12-06 14:40:41 +0100 (Fri, 06 Dec 2013)
New Revision: 5575

Added:
   phpcompta/tags/rel670/html/admin/sql/patch/upgrade109.sql
Modified:
   phpcompta/tags/rel670/include/constant.php
Log:
Release

Added: phpcompta/tags/rel670/html/admin/sql/patch/upgrade109.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/admin/sql/patch/upgrade109.sql	           =
             (rev 0)
+++ phpcompta/tags/rel670/html/admin/sql/patch/upgrade109.sql	2013-12-06 =
13:40:41 UTC (rev 5575)
@@ -0,0 +1,32 @@
+begin;
+
+alter table jrn_def add jrn_def_description text;
+
+CREATE OR REPLACE FUNCTION comptaproc.t_jrn_def_description()
+ RETURNS trigger
+AS $function$
+    declare
+        str varchar(200);
+    BEGIN
+        str :=3D substr(NEW.jrn_def_description,1,200);
+        NEW.jrn_def_description :=3D str;
+
+        RETURN NEW;
+    END;
+$function$
+ LANGUAGE plpgsql
+;
+create  trigger jrn_def_description_ins_upd before insert or update on j=
rn_def for each row execute procedure comptaproc.t_jrn_def_description();
+
+update jrn_def set jrn_def_description=3D'Concerne tous les achats, fact=
ures re=C3=A7ues, notes de cr=C3=A9dit re=C3=A7ues et notes de frais' whe=
re jrn_def_id=3D3;
+update jrn_def set jrn_def_description=3D'Concerne tous les mouvements f=
inanciers (comptes en banque, caisses, visa...)' where jrn_def_id=3D1;
+update jrn_def set jrn_def_description=3D'Concerne toutes les op=C3=A9ra=
tions comme les amortissements, les comptes TVA, ...' where jrn_def_id=3D=
4;
+update jrn_def set jrn_def_description=3D'Concerne toutes les ventes, no=
tes de cr=C3=A9dit envoy=C3=A9es' where jrn_def_id=3D2;
+
+alter table document add d_description text;
+
+update document set d_description =3D d_filename;
+
+update version set val=3D110;
+
+commit;
\ No newline at end of file

Modified: phpcompta/tags/rel670/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/constant.php	2013-12-06 13:38:08 UTC (r=
ev 5574)
+++ phpcompta/tags/rel670/include/constant.php	2013-12-06 13:40:41 UTC (r=
ev 5575)
@@ -71,7 +71,7 @@
 define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/plugin_last_versio=
n.txt');
=20
=20
-define ("DBVERSION",109);
+define ("DBVERSION",110);
 define ("MONO_DATABASE",25);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');



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


From MAILER-DAEMON Fri Dec 06 09:53:08 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VowmC-0006wo-Q2
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 09:53:08 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 15:41:27 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127654.1386341588.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5576 - in phpcompta/trunk: . html html/admin
	html/admin/sql/patch html/js include include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 14:53:07 -0000

Author: danydb
Date: 2013-12-06 15:41:27 +0100 (Fri, 06 Dec 2013)
New Revision: 5576

Added:
   phpcompta/trunk/html/admin/sql/patch/upgrade109.sql
   phpcompta/trunk/include/ajax_ledger_show.php
Modified:
   phpcompta/trunk/
   phpcompta/trunk/html/
   phpcompta/trunk/html/admin/setup.php
   phpcompta/trunk/html/ajax_misc.php
   phpcompta/trunk/html/js/acc_ledger.js
   phpcompta/trunk/html/js/gestion.js
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/html/show_document.php
   phpcompta/trunk/html/style.css
   phpcompta/trunk/include/
   phpcompta/trunk/include/ac_common.php
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_acc_ledger_purchase.php
   phpcompta/trunk/include/class_acc_ledger_sold.php
   phpcompta/trunk/include/class_document.php
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_follow_up.php
   phpcompta/trunk/include/class_html_input.php
   phpcompta/trunk/include/class_jrn_def_sql.php
   phpcompta/trunk/include/class_user.php
   phpcompta/trunk/include/compta_ach.inc.php
   phpcompta/trunk/include/compta_fin.inc.php
   phpcompta/trunk/include/compta_fin_rec.inc.php
   phpcompta/trunk/include/compta_fin_saldo.inc.php
   phpcompta/trunk/include/compta_ven.inc.php
   phpcompta/trunk/include/constant.php
   phpcompta/trunk/include/fiche.inc.php
   phpcompta/trunk/include/function_javascript.php
   phpcompta/trunk/include/history_operation.inc.php
   phpcompta/trunk/include/operation_ods_new.inc.php
   phpcompta/trunk/include/search.inc.php
   phpcompta/trunk/include/template/dashboard.php
   phpcompta/trunk/include/template/detail-action.php
   phpcompta/trunk/include/template/ledger_search.php
   phpcompta/trunk/include/template/module.php
   phpcompta/trunk/include/template/param_jrn.php
   phpcompta/trunk/include/template/result_cat_card_summary.php
Log:
Merged revisions 5560-5575 via svnmerge from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel670

........
  r5560 | danydb | 2013-12-05 01:30:40 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 1 line
 =20
  fix small bug utf-8 instead of utf8 for javascript
........
  r5561 | danydb | 2013-12-05 02:13:57 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 1 line
 =20
  typo
........
  r5562 | danydb | 2013-12-05 02:14:55 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 2 lines
 =20
  Task #929 - Ajout d'une description pour les journaux
........
  r5563 | danydb | 2013-12-05 06:37:23 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 2 lines
 =20
  task #928 : ajax pour remplacer les journaux
  Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche e=
st clipp?\195?\169
........
  r5564 | danydb | 2013-12-05 07:23:14 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 4 lines
 =20
  Task #929 : Ajout d'une description pour les journaux
 =20
  Description pour les journaux visibles dans lors encodages=20
  Task #929 - Ajout d'une description pour les journaux
........
  r5565 | danydb | 2013-12-05 07:51:08 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 3 lines
 =20
  Task #929 : Ajout d'une description pour les journaux
 =20
  nettoyage code
........
  r5566 | danydb | 2013-12-05 07:55:11 +0100 (jeu., 05 d?\195?\169c. 2013=
) | 3 lines
 =20
  Task #929 : Ajout d'une description pour les journaux
 =20
  ajout fichier
........
  r5567 | danydb | 2013-12-06 11:38:07 +0100 (ven., 06 d?\195?\169c. 2013=
) | 3 lines
 =20
  Task #941 Tag non disponible pour nouveau suivi
  Si nouveau document, on ne peut plus ajouter de tag
  Task #914 - Tag non disponible pour nouveau suivi
........
  r5568 | danydb | 2013-12-06 11:41:15 +0100 (ven., 06 d?\195?\169c. 2013=
) | 2 lines
 =20
  Task #924 FSALDO : les lignes paires et impaires n'ont pas la m?\195?\1=
70me taille de police
  Task #924 - FSALDO : les lignes paires et impaires n'ont pas la m?\195?=
\170me taille de police
........
  r5569 | danydb | 2013-12-06 12:07:16 +0100 (ven., 06 d?\195?\169c. 2013=
) | 1 line
 =20
  FREC : tri incorrect
........
  r5570 | danydb | 2013-12-06 12:07:37 +0100 (ven., 06 d?\195?\169c. 2013=
) | 1 line
 =20
  ajout d'un 3i?\195?\168me param?\195?\168tre pour TH : raw
........
  r5571 | danydb | 2013-12-06 12:20:37 +0100 (ven., 06 d?\195?\169c. 2013=
) | 2 lines
 =20
  task #925 - FSALDO  : ajouter les totaux
  Task #925 - FSALDO  : ajouter les totaux
........
  r5572 | danydb | 2013-12-06 12:32:43 +0100 (ven., 06 d?\195?\169c. 2013=
) | 2 lines
 =20
  task #930 - Quantit?\195?\169 n?\195?\169gative et impact sur les stock=
s
  Task #930 - Quantit?\195?\169 n?\195?\169gative et impact sur les stock=
s
........
  r5573 | danydb | 2013-12-06 13:01:05 +0100 (ven., 06 d?\195?\169c. 2013=
) | 2 lines
 =20
  task #926 : CARD : balance et balance non sold?\195?\169e
  Task #926 - CARD : balance et balance non sold?\195?\169e
........
  r5574 | danydb | 2013-12-06 14:38:08 +0100 (ven., 06 d?\195?\169c. 2013=
) | 2 lines
 =20
  task #0000919: FOLLOW : description des fichiers joints
  Task #919 - FOLLOW : description des fichiers joints
........
  r5575 | danydb | 2013-12-06 14:40:41 +0100 (ven., 06 d?\195?\169c. 2013=
) | 1 line
 =20
  Release
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel670:1-5539,5541-5557
   + /phpcompta/tags/rel670:1-5539,5541-5575


Property changes on: phpcompta/trunk/html
___________________________________________________________________
Name: svn:ignore
   - *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp
..htaccess.kate-swp

   + *.log
ajax
.user_login.php.swp
.~lock.a.csv#
.~lock.a.ods#
.a.csv.swp
.direct.php.swp
.style-light.css.swp
.a.swp
.htaccess.swp
.b.php.swp
.style.css.swp
.last.txt.swp
.export.php.swp
..htaccess.kate-swp
.directory


Modified: phpcompta/trunk/html/admin/setup.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/setup.php	2013-12-06 13:40:41 UTC (rev 557=
5)
+++ phpcompta/trunk/html/admin/setup.php	2013-12-06 14:41:27 UTC (rev 557=
6)
@@ -6,8 +6,8 @@
 <LINK REL=3D"stylesheet" type=3D"text/css" href=3D"../style.css" media=3D=
"screen">
 <link rel=3D"icon" type=3D"image/ico" href=3D"../favicon.ico" />
  <META http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF8"=
>
- <script type=3D"text/javascript" charset=3D"utf8" language=3D"javascrip=
t" src=3D"../js/prototype.js"></script>
- <script type=3D"text/javascript" charset=3D"utf8" language=3D"javascrip=
t" src=3D"../js/infobulle.js"></script>
+ <script type=3D"text/javascript" charset=3D"<div>utf-8</div>" language=3D=
"javascript" src=3D"../js/prototype.js"></script>
+ <script type=3D"text/javascript" charset=3D"utf-8" language=3D"javascri=
pt" src=3D"../js/infobulle.js"></script>
 </head>
 <body>
 <p align=3D"center">
@@ -43,7 +43,7 @@
 ?>
 <DIV id=3D"bulle" class=3D"infobulle"></DIV>
         <script type=3D"text/javascript" language=3D"javascript"  src=3D=
"../js/infobulle.js"> </script>
-		 <script type=3D"text/javascript" charset=3D"utf8" language=3D"javascr=
ipt" src=3D"setup.js"></script>
+		 <script type=3D"text/javascript" charset=3D"utf-8" language=3D"javasc=
ript" src=3D"setup.js"></script>
=20
 <?php
=20

Copied: phpcompta/trunk/html/admin/sql/patch/upgrade109.sql (from rev 557=
5, phpcompta/tags/rel670/html/admin/sql/patch/upgrade109.sql)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/sql/patch/upgrade109.sql	                 =
       (rev 0)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade109.sql	2013-12-06 14:41:=
27 UTC (rev 5576)
@@ -0,0 +1,32 @@
+begin;
+
+alter table jrn_def add jrn_def_description text;
+
+CREATE OR REPLACE FUNCTION comptaproc.t_jrn_def_description()
+ RETURNS trigger
+AS $function$
+    declare
+        str varchar(200);
+    BEGIN
+        str :=3D substr(NEW.jrn_def_description,1,200);
+        NEW.jrn_def_description :=3D str;
+
+        RETURN NEW;
+    END;
+$function$
+ LANGUAGE plpgsql
+;
+create  trigger jrn_def_description_ins_upd before insert or update on j=
rn_def for each row execute procedure comptaproc.t_jrn_def_description();
+
+update jrn_def set jrn_def_description=3D'Concerne tous les achats, fact=
ures re=C3=A7ues, notes de cr=C3=A9dit re=C3=A7ues et notes de frais' whe=
re jrn_def_id=3D3;
+update jrn_def set jrn_def_description=3D'Concerne tous les mouvements f=
inanciers (comptes en banque, caisses, visa...)' where jrn_def_id=3D1;
+update jrn_def set jrn_def_description=3D'Concerne toutes les op=C3=A9ra=
tions comme les amortissements, les comptes TVA, ...' where jrn_def_id=3D=
4;
+update jrn_def set jrn_def_description=3D'Concerne toutes les ventes, no=
tes de cr=C3=A9dit envoy=C3=A9es' where jrn_def_id=3D2;
+
+alter table document add d_description text;
+
+update document set d_description =3D d_filename;
+
+update version set val=3D110;
+
+commit;
\ No newline at end of file

Modified: phpcompta/trunk/html/ajax_misc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/ajax_misc.php	2013-12-06 13:40:41 UTC (rev 5575)
+++ phpcompta/trunk/html/ajax_misc.php	2013-12-06 14:41:27 UTC (rev 5576)
@@ -618,6 +618,20 @@
         case 'calendar_zoom':
             require_once 'ajax_calendar_zoom.php';
             break;
+        case 'ledger_show':
+            require_once 'ajax_ledger_show.php';
+        case 'ledger_description':
+            $ajrn=3D$cn->get_array('select jrn_def_name,jrn_def_descript=
ion from jrn_def where jrn_def_id=3D$1',array($l));
+            if ( count($ajrn)=3D=3D1)
+            {
+               =20
+                echo '<h2 id=3D"jrn_name">'.$ajrn[0]['jrn_def_name'].'</=
h2>';
+                if ( trim($ajrn[0]['jrn_def_description']) !=3D "") {
+                    echo '<p style=3D"border:1px solid blue;margin-top:0=
">'.$ajrn[0]['jrn_def_description'].'</p>';
+                }
+            }
+            exit();
+            break;
 	default:
 		var_dump($_GET);
 }

Modified: phpcompta/trunk/html/js/acc_ledger.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/acc_ledger.js	2013-12-06 13:40:41 UTC (rev 55=
75)
+++ phpcompta/trunk/html/js/acc_ledger.js	2013-12-06 14:41:27 UTC (rev 55=
76)
@@ -92,7 +92,21 @@
  */
 function update_name()
 {
-	$('jrn_name').innerHTML=3D$('p_jrn').options[$('p_jrn').selectedIndex].=
innerHTML;
+    var jrn_id=3D$('p_jrn').value;
+    var dossier=3Dg("gDossier").value;
+    var querystring=3D'gDossier=3D'+dossier+'&l=3D'+jrn_id+"&op=3Dledger=
_description";
+    var action=3Dnew Ajax.Request(
+                   "ajax_misc.php",
+                   {
+                   method:'get',
+                   parameters:querystring,
+                   onFailure:error_get_pj,
+                   onSuccess:function (req){
+                       $('jrn_name_div').innerHTML=3Dreq.responseText;
+                   }
+                   }
+               );
+   =20
 }
 /**
  * @brief update the field predef

Modified: phpcompta/trunk/html/js/gestion.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/gestion.js	2013-12-06 13:40:41 UTC (rev 5575)
+++ phpcompta/trunk/html/js/gestion.js	2013-12-06 14:41:27 UTC (rev 5576)
@@ -33,7 +33,7 @@
 */
 function remove_document(p_dossier,p_id)
 {
-	queryString=3D"gDossier=3D"+p_dossier+"&a=3Drm&d_id=3D"+p_id;
+	var queryString=3D"gDossier=3D"+p_dossier+"&a=3Drm&d_id=3D"+p_id;
 	var action=3Dnew Ajax.Request (
 		"show_document.php",
 		{
@@ -47,6 +47,32 @@
=20
 }
 /**
+ *@brief update the description of an attached document of an action
+ *@param dossier
+ *@param dt_id id of the document (pk document:d_id)
+*/
+function update_document(p_dossier,p_id)
+{
+	var queryString=3D"gDossier=3D"+p_dossier+"&a=3Dupd_doc&d_id=3D"+p_id;
+        queryString+=3D"&value=3D"+$('input_desc_txt'+p_id).value;
+	var action=3Dnew Ajax.Request (
+		"show_document.php",
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:errorRemoveDoc,
+			onSuccess:function(req){
+                                $('input_desc'+p_id).hide();
+                                $('print_desc'+p_id).innerHTML=3D$('inpu=
t_desc_txt'+p_id).value+'<a class=3D"mtitle" style=3D"color:orange" id=3D=
"desc'+p_id+' onclick=3D"javascript:show_description('+p_id+'">Modifier</=
a>';
+                                $('print_desc'+p_id).show();
+                        }
+		}
+
+		);
+    return false;
+}
+
+/**
  *@brief remove the concerned operation of an action
  *@param dossier
  *@param p_id id pk action_comment_operation

Modified: phpcompta/trunk/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/scripts.js	2013-12-06 13:40:41 UTC (rev 5575)
+++ phpcompta/trunk/html/js/scripts.js	2013-12-06 14:41:27 UTC (rev 5576)
@@ -14,7 +14,7 @@
  *   You should have received a copy of the GNU General Public License
  *   along with PhpCompta; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-130=
7  USA
-*/
+ */
 /* $Revision$ */
=20
 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
@@ -23,65 +23,65 @@
  * \brief javascript script, always added to every page
  *
  */
-var ask_reload=3D0;
-var tag_choose=3D'';
+var ask_reload =3D 0;
+var tag_choose =3D '';
=20
 /**
-* callback function when we just need to update a hidden div with an inf=
o
-* message
-*/
-function infodiv(req,json)
+ * callback function when we just need to update a hidden div with an in=
fo
+ * message
+ */
+function infodiv(req, json)
 {
     try
     {
         remove_waiting_box();
-        var answer=3Dreq.responseXML;
-        var a=3Danswer.getElementsByTagName('ctl');
-        var html=3Danswer.getElementsByTagName('code');
-        if ( a.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var a =3D answer.getElementsByTagName('ctl');
+        var html =3D answer.getElementsByTagName('code');
+        if (a.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var name_ctl=3Da[0].firstChild.nodeValue;
-        var code_html=3DgetNodeText(html[0]);
+        var name_ctl =3D a[0].firstChild.nodeValue;
+        var code_html =3D getNodeText(html[0]);
=20
-        code_html=3Dunescape_xml(code_html);
-        g(name_ctl+"info").innerHTML=3Dcode_html;
+        code_html =3D unescape_xml(code_html);
+        g(name_ctl + "info").innerHTML =3D code_html;
     }
     catch (e)
     {
-        alert("success_box"+e.message);
+        alert("success_box" + e.message);
     }
     try
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("answer_box Impossible executer script de la reponse\n"+e.=
message);
+        alert("answer_box Impossible executer script de la reponse\n" + =
e.message);
     }
=20
 }
 /**
-*@brief delete a row from a table (tb) the input button send the this
-as second parameter
-*/
-function deleteRow(tb,obj)
+ *@brief delete a row from a table (tb) the input button send the this
+ as second parameter
+ */
+function deleteRow(tb, obj)
 {
     if (confirm('Confirmez effacement'))
     {
-        var td=3Dobj.parentNode;
-        var tr=3Dtd.parentNode;
-        var lidx=3Dtr.rowIndex;
+        var td =3D obj.parentNode;
+        var tr =3D td.parentNode;
+        var lidx =3D tr.rowIndex;
         g(tb).deleteRow(lidx);
     }
 }
-function deleteRowRec(tb,obj)
+function deleteRowRec(tb, obj)
 {
-    var td=3Dobj.parentNode;
-    var tr=3Dtd.parentNode;
-    var lidx=3Dtr.rowIndex;
+    var td =3D obj.parentNode;
+    var tr =3D td.parentNode;
+    var lidx =3D tr.rowIndex;
     g(tb).deleteRow(lidx);
 }
 /*!\brief remove trailing and heading space
@@ -104,7 +104,7 @@
     {
         return this.document.getElementById(ID);
     }
-    else   if (document.all)
+    else if (document.all)
     {
         return document.all[ID];
     }
@@ -118,21 +118,21 @@
  */
 function enable_type_periode()
 {
-    if ( g('type_periode').value =3D=3D 1 )
+    if (g('type_periode').value =3D=3D 1)
     {
-        g('from_periode').disabled=3Dtrue;
-        g('to_periode').disabled=3Dtrue;
-        g('from_date').disabled=3Dfalse;
-        g('to_date').disabled=3Dfalse;
-        g('p_step').disabled=3Dtrue;
+        g('from_periode').disabled =3D true;
+        g('to_periode').disabled =3D true;
+        g('from_date').disabled =3D false;
+        g('to_date').disabled =3D false;
+        g('p_step').disabled =3D true;
     }
     else
     {
-        g('from_periode').disabled=3Dfalse;
-        g('to_periode').disabled=3Dfalse;
-        g('from_date').disabled=3Dtrue;
-        g('to_date').disabled=3Dtrue;
-        g('p_step').disabled=3Dfalse;
+        g('from_periode').disabled =3D false;
+        g('to_periode').disabled =3D false;
+        g('from_date').disabled =3D true;
+        g('to_date').disabled =3D true;
+        g('p_step').disabled =3D false;
     }
 }
=20
@@ -158,35 +158,35 @@
     }
     try
     {
-        var str=3D'';
-        var e=3D0;
+        var str =3D '';
+        var e =3D 0;
         for (i in obj)
         {
-            if (e !=3D 0 )
+            if (e !=3D 0)
             {
-                str+=3D'&';
+                str +=3D '&';
             }
             else
             {
-                e=3D1;
+                e =3D 1;
             }
-            str+=3Di;
-            str+=3D'=3D'+encodeURI(obj[i]);
+            str +=3D i;
+            str +=3D '=3D' + encodeURI(obj[i]);
         }
         return str;
     }
-    catch(e)
+    catch (e)
     {
-        alert('encodeParameter '+e.message);
+        alert('encodeParameter ' + e.message);
     }
 }
 function  hide(p_param)
 {
-    g(p_param).style.display=3D'none';
+    g(p_param).style.display =3D 'none';
 }
 function show(p_param)
 {
-    g(p_param).style.display=3D'block';
+    g(p_param).style.display =3D 'block';
 }
=20
 /**
@@ -194,7 +194,7 @@
  *@param Field id of  the control
  *@param selectIt : the value selected in case of Field is a object sele=
ct, numeric
  */
-function SetFocus(Field,SelectIt)
+function SetFocus(Field, SelectIt)
 {
     var elem =3D g(Field);
     if (elem)
@@ -204,95 +204,95 @@
     return true;
 }
 /**
-* @brief set a DOM id with a value in the parent window (the caller),
+ * @brief set a DOM id with a value in the parent window (the caller),
  @param p_ctl is the name of the control
  @param p_value is the value to set in
-@param p_add if we don't replace the current value but we add something
-*/
-function set_inparent(p_ctl,p_value,p_add)
+ @param p_add if we don't replace the current value but we add something
+ */
+function set_inparent(p_ctl, p_value, p_add)
 {
-    self.opener.set_value(p_ctl,p_value,p_add);
+    self.opener.set_value(p_ctl, p_value, p_add);
 }
=20
 /**
-* @brief set a DOM id with a value, it will consider if it the attribute
-	value or innerHTML has be used
+ * @brief set a DOM id with a value, it will consider if it the attribut=
e
+ value or innerHTML has be used
  @param p_ctl is the name of the control
  @param p_value is the value to set in
-@param p_add if we don't replace the current value but we add something
-*/
-function set_value(p_ctl,p_value,p_add)
+ @param p_add if we don't replace the current value but we add something
+ */
+function set_value(p_ctl, p_value, p_add)
 {
-    if ( g(p_ctl))
+    if (g(p_ctl))
     {
-        var g_ctrl=3Dg(p_ctl);
-        if ( p_add !=3D undefined && p_add=3D=3D1 )
+        var g_ctrl =3D g(p_ctl);
+        if (p_add !=3D undefined && p_add =3D=3D 1)
         {
-            if ( g_ctrl.value )
+            if (g_ctrl.value)
             {
-                p_value=3Dg_ctrl.value+','+p_value;
+                p_value =3D g_ctrl.value + ',' + p_value;
             }
         }
-        if ( g_ctrl.tagName=3D=3D'INPUT' )
+        if (g_ctrl.tagName =3D=3D 'INPUT')
         {
-            g(p_ctl).value=3Dp_value;
+            g(p_ctl).value =3D p_value;
         }
-        if ( g_ctrl.tagName=3D=3D'SPAN' )
+        if (g_ctrl.tagName =3D=3D 'SPAN')
         {
-            g(p_ctl).innerHTML=3Dp_value;
+            g(p_ctl).innerHTML =3D p_value;
         }
-        if ( g_ctrl.tagName=3D=3D'SELECT' )
+        if (g_ctrl.tagName =3D=3D 'SELECT')
         {
-            g(p_ctl).value=3Dp_value;
+            g(p_ctl).value =3D p_value;
         }
     }
 }
 /**
-*@brief format the number change comma to point
-*@param HTML obj
-*/
-function format_number(obj,p_prec)
+ *@brief format the number change comma to point
+ *@param HTML obj
+ */
+function format_number(obj, p_prec)
 {
-	var precision=3D2;
-	if ( p_prec =3D=3D undefined)
-		{
-			precision=3D2;
-		} else {
-			precision=3Dp_prec;
-		}
-    var value=3Dobj.value;
-    value=3Dvalue.replace(/,/,'.');
-    value=3DparseFloat(value);
-    if (  isNaN(value) )
+    var precision =3D 2;
+    if (p_prec =3D=3D undefined)
     {
-        value=3D0;
+        precision =3D 2;
+    } else {
+        precision =3D p_prec;
     }
-	var arrondi=3DMath.pow(10,precision);
+    var value =3D obj.value;
+    value =3D value.replace(/,/, '.');
+    value =3D parseFloat(value);
+    if (isNaN(value))
+    {
+        value =3D 0;
+    }
+    var arrondi =3D Math.pow(10, precision);
=20
-	value=3DMath.round(value*arrondi)/arrondi;
+    value =3D Math.round(value * arrondi) / arrondi;
=20
-    $(obj).value=3Dvalue;
+    $(obj).value =3D value;
 }
 /**
  *@brief check if the object is hidden or show and perform the opposite,
  * show the hidden obj or hide the shown one
  *@param name of the object
-*/
-function toggleHideShow(p_obj,p_button)
+ */
+function toggleHideShow(p_obj, p_button)
 {
-    var stat=3Dg(p_obj).style.display;
-    var str=3Dg(p_button).value;
-    if ( stat =3D=3D 'none' )
+    var stat =3D g(p_obj).style.display;
+    var str =3D g(p_button).value;
+    if (stat =3D=3D 'none')
     {
         show(p_obj);
-        str=3Dstr.replace(/Afficher/,'Cacher');
-        g(p_button).value=3Dstr;
+        str =3D str.replace(/Afficher/, 'Cacher');
+        g(p_button).value =3D str;
     }
     else
     {
         hide(p_obj);
-        str=3Dstr.replace(/Cacher/,'Afficher');
-        g(p_button).value=3Dstr;
+        str =3D str.replace(/Cacher/, 'Afficher');
+        g(p_button).value =3D str;
     }
 }
 /**
@@ -302,7 +302,7 @@
  */
 function popup_recherche(p_dossier)
 {
-    var w=3Dwindow.open("recherche.php?gDossier=3D"+p_dossier+"&ac=3DSEA=
RCH",'','statusbar=3Dno,scrollbars=3Dyes,toolbar=3Dno');
+    var w =3D window.open("recherche.php?gDossier=3D" + p_dossier + "&ac=
=3DSEARCH", '', 'statusbar=3Dno,scrollbars=3Dyes,toolbar=3Dno');
     w.focus();
 }
 /**
@@ -311,11 +311,11 @@
  */
 function unescape_xml(code_html)
 {
-    code_html=3Dcode_html.replace(/\&lt;/,'<');
-    code_html=3Dcode_html.replace(/\&gt;/,'>');
-    code_html=3Dcode_html.replace(/\&quot;/,'"');
-    code_html=3Dcode_html.replace(/\&apos;/,"'");
-    code_html=3Dcode_html.replace(/\&amp;/,'&');
+    code_html =3D code_html.replace(/\&lt;/, '<');
+    code_html =3D code_html.replace(/\&gt;/, '>');
+    code_html =3D code_html.replace(/\&quot;/, '"');
+    code_html =3D code_html.replace(/\&apos;/, "'");
+    code_html =3D code_html.replace(/\&amp;/, '&');
     return code_html;
 }
 /**
@@ -323,15 +323,17 @@
  * to get the different parts thanks textContent
  *@param xmlNode a node (result of var data =3D =3Danswer.getElementsByT=
agName('code'))
  *@return all the content of the XML node
-*/
+ */
 function getNodeText(xmlNode)
 {
-    if(!xmlNode) return '';
-    if(typeof(xmlNode.textContent) !=3D "undefined")
+    if (!xmlNode)
+        return '';
+    if (typeof (xmlNode.textContent) !=3D "undefined")
     {
         return xmlNode.textContent;
     }
-    if ( xmlNode.firstChild && xmlNode.firstChild.nodeValue )     return=
 xmlNode.firstChild.nodeValue;
+    if (xmlNode.firstChild && xmlNode.firstChild.nodeValue)
+        return xmlNode.firstChild.nodeValue;
     return "";
 }
 /**
@@ -340,36 +342,36 @@
  */
 function change_month(obj)
 {
-    var queryString=3D"gDossier=3D"+obj.gDossier+"&op=3Dcal"+"&per=3D"+o=
bj.value;
+    var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Dcal" + "&p=
er=3D" + obj.value;
     var action =3D new Ajax.Request(
-                 "ajax_misc.php" , {method:'get', parameters:queryString=
,onFailure:ajax_misc_failure,onSuccess:success_misc}
-                 );
+            "ajax_misc.php", {method: 'get', parameters: queryString, on=
Failure: ajax_misc_failure, onSuccess: success_misc}
+    );
=20
 }
 /**
-*@brief basic answer to ajax on success, it will fill the DOMID code wit=
h
-* the code. In that case, you need to create the object before the Ajax.=
Request
-*The difference with success box is that
-*@see add_div removeDiv success_box is that the width and height are not=
 changed ajax_misc.php
-*@parameter code is the ID of the object containing the html (div, butto=
n...)
-*@parameter value is the html code, with it you fill the ctl element
-*/
+ *@brief basic answer to ajax on success, it will fill the DOMID code wi=
th
+ * the code. In that case, you need to create the object before the Ajax=
.Request
+ *The difference with success box is that
+ *@see add_div removeDiv success_box is that the width and height are no=
t changed ajax_misc.php
+ *@parameter code is the ID of the object containing the html (div, butt=
on...)
+ *@parameter value is the html code, with it you fill the ctl element
+ */
=20
 function success_misc(req)
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var html=3Danswer.getElementsByTagName('code');
-        if ( html.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var html =3D answer.getElementsByTagName('code');
+        if (html.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var nodeXml=3Dhtml[0];
-        var code_html=3DgetNodeText(nodeXml);
-        code_html=3Dunescape_xml(code_html);
-        $("user_cal").innerHTML=3Dcode_html;
+        var nodeXml =3D html[0];
+        var code_html =3D getNodeText(nodeXml);
+        code_html =3D unescape_xml(code_html);
+        $("user_cal").innerHTML =3D code_html;
     }
     catch (e)
     {
@@ -379,9 +381,9 @@
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("Impossible executer script de la reponse\n"+e.message);
+        alert("Impossible executer script de la reponse\n" + e.message);
     }
=20
=20
@@ -400,60 +402,60 @@
 /**
  *@brief remove a document_modele
  */
-function cat_doc_remove(p_dt_id,p_dossier)
+function cat_doc_remove(p_dt_id, p_dossier)
 {
-    var queryString=3D"gDossier=3D"+p_dossier+"&op=3Drem_cat_doc"+"&dt_i=
d=3D"+p_dt_id;
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Drem_cat_doc" =
+ "&dt_id=3D" + p_dt_id;
     var action =3D new Ajax.Request(
-                 "ajax_misc.php" , {method:'get', parameters:queryString=
,onFailure:ajax_misc_failure,onSuccess:success_cat_doc_remove}
-                 );
+            "ajax_misc.php", {method: 'get', parameters: queryString, on=
Failure: ajax_misc_failure, onSuccess: success_cat_doc_remove}
+    );
 }
 /**
  *@brief change a document_modele
  */
-function cat_doc_change(p_dt_id,p_dossier)
+function cat_doc_change(p_dt_id, p_dossier)
 {
-    var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dmod_cat_doc"+"&dt_i=
d=3D"+p_dt_id;
-    var nTop=3Dcalcy(posY);
-    var nLeft=3D"200px";
-    var str_style=3D"top:"+nTop+"px;left:"+nLeft+";width:50em;height:aut=
o";
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dmod_cat_doc" =
+ "&dt_id=3D" + p_dt_id;
+    var nTop =3D calcy(posY);
+    var nLeft =3D "200px";
+    var str_style =3D "top:" + nTop + "px;left:" + nLeft + ";width:50em;=
height:auto";
=20
     removeDiv('change_doc_div');
     waiting_box();
     var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-					  remove_waiting_box();
-					  add_div({id:'change_doc_div',style:str_style,cssclass:'inner_box'=
,drag:"1"});
-					  $('change_doc_div').innerHTML=3Dreq.responseText;
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    add_div({id: 'change_doc_div', style: str_style, css=
class: 'inner_box', drag: "1"});
+                    $('change_doc_div').innerHTML =3D req.responseText;
=20
-				      }
-				  }
-				  );
+                }
+            }
+    );
 }
=20
 function success_cat_doc_remove(req)
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var html=3Danswer.getElementsByTagName('dtid');
-        if ( html.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var html =3D answer.getElementsByTagName('dtid');
+        if (html.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        nodeXML=3Dhtml[0];
-        row_id=3DgetNodeText(nodeXML);
-        if ( row_id =3D=3D 'nok')
+        nodeXML =3D html[0];
+        row_id =3D getNodeText(nodeXML);
+        if (row_id =3D=3D 'nok')
         {
             alert('Error');
             return;
         }
-        $('row'+row_id).style.textDecoration=3D"line-through";
-        $('X'+row_id).style.display=3D'none';
+        $('row' + row_id).style.textDecoration =3D "line-through";
+        $('X' + row_id).style.display =3D 'none';
     }
     catch (e)
     {
@@ -468,34 +470,34 @@
 {
     try
     {
-	if ( $('tva_select')) {
-	    removeDiv('tva_select');
-	}
+        if ($('tva_select')) {
+            removeDiv('tva_select');
+        }
=20
=20
-	var nTop=3DposY-50;
-	var nLeft=3D"35%";
-	var str_style=3D"top:"+nTop+";left:"+nLeft+";width:55em;height:auto";
+        var nTop =3D posY - 50;
+        var nLeft =3D "35%";
+        var str_style =3D "top:" + nTop + ";left:" + nLeft + ";width:55e=
m;height:auto";
=20
-	var popup=3D{'id': 'tva_select','cssclass':'inner_box','style':str_styl=
e,'html':loading(),'drag':true};
-	add_div(popup);
-        var queryString=3D"gDossier=3D"+obj.gDossier+"&op=3Ddsp_tva"+"&c=
tl=3D"+obj.ctl+'&popup=3D'+'tva_select';
-        if ( obj.jcode )
-            queryString+=3D'&code=3D'+obj.jcode;
+        var popup =3D {'id': 'tva_select', 'cssclass': 'inner_box', 'sty=
le': str_style, 'html': loading(), 'drag': true};
+        add_div(popup);
+        var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Ddsp_tv=
a" + "&ctl=3D" + obj.ctl + '&popup=3D' + 'tva_select';
+        if (obj.jcode)
+            queryString +=3D '&code=3D' + obj.jcode;
         if (obj.compute)
-            queryString+=3D'&compute=3D'+obj.compute;
+            queryString +=3D '&compute=3D' + obj.compute;
         var action =3D new Ajax.Request(
-                         "ajax_misc.php" ,
-                 {method:'get',
-                   parameters:queryString,
-                   onFailure:ajax_misc_failure,
-                   onSuccess:success_popup_select_tva
-                 }
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_popup_select_tva
+                }
         );
     }
     catch (e)
     {
-        alert("popup_select_tva "+e.message);
+        alert("popup_select_tva " + e.message);
     }
 }
 /**
@@ -505,24 +507,24 @@
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var popup=3Danswer.getElementsByTagName('popup');
-        if ( popup.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var popup =3D answer.getElementsByTagName('popup');
+        if (popup.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var html=3Danswer.getElementsByTagName('code');
+        var html =3D answer.getElementsByTagName('code');
=20
-        var name_ctl=3Dpopup[0].firstChild.nodeValue;
-        var nodeXml=3Dhtml[0];
-        var code_html=3DgetNodeText(nodeXml);
-        code_html=3Dunescape_xml(code_html);
-        $(name_ctl).innerHTML=3Dcode_html;
+        var name_ctl =3D popup[0].firstChild.nodeValue;
+        var nodeXml =3D html[0];
+        var code_html =3D getNodeText(nodeXml);
+        code_html =3D unescape_xml(code_html);
+        $(name_ctl).innerHTML =3D code_html;
     }
     catch (e)
     {
-        alert("success_popup_select_tva "+e.message);
+        alert("success_popup_select_tva " + e.message);
     }
=20
 }
@@ -535,21 +537,21 @@
 {
     try
     {
-        var queryString=3D"gDossier=3D"+obj.gDossier+"&op=3Dlabel_tva"+"=
&id=3D"+obj.value;
-        if ( obj.jcode )
-            queryString+=3D'&code=3D'+obj.jcode;
+        var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Dlabel_=
tva" + "&id=3D" + obj.value;
+        if (obj.jcode)
+            queryString +=3D '&code=3D' + obj.jcode;
         var action =3D new Ajax.Request(
-                         "ajax_misc.php" ,
-                 {method:'get',
-                   parameters:queryString,
-                   onFailure:ajax_misc_failure,
-                   onSuccess:success_set_tva_label
-                         }
-                     );
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_set_tva_label
+                }
+        );
     }
     catch (e)
     {
-        alert("set_tva_label "+e.message);
+        alert("set_tva_label " + e.message);
     }
 }
 /**
@@ -559,23 +561,23 @@
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var code=3Danswer.getElementsByTagName('code');
-        var value=3Danswer.getElementsByTagName('value');
+        var answer =3D req.responseXML;
+        var code =3D answer.getElementsByTagName('code');
+        var value =3D answer.getElementsByTagName('value');
=20
-        if ( code.length =3D=3D 0 )
+        if (code.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
=20
-        var label_code=3Dcode[0].firstChild.nodeValue;
-        var label_value=3Dvalue[0].firstChild.nodeValue;
-        set_value(label_code,label_value);
+        var label_code =3D code[0].firstChild.nodeValue;
+        var label_value =3D value[0].firstChild.nodeValue;
+        set_value(label_code, label_value);
     }
     catch (e)
     {
-        alert("success_set_tva_label "+e.message);
+        alert("success_set_tva_label " + e.message);
     }
=20
 }
@@ -586,8 +588,8 @@
  */
 function set_wait(name)
 {
-    var content=3Dname+"_content";
-    $(content).innerHTML=3D 'Un instant...<image src=3D"image/loading.gi=
f" border=3D"0" alt=3D"Chargement...">';
+    var content =3D name + "_content";
+    $(content).innerHTML =3D 'Un instant...<image src=3D"image/loading.g=
if" border=3D"0" alt=3D"Chargement...">';
 }
 /**
  *@brief add dynamically a object for AJAX
@@ -603,51 +605,53 @@
 {
     try
     {
-        var top=3Ddocument;
-       =20
-        if ( ! $(obj.id) )  { var elt=3Dtop.createElement('div');}
+        var top =3D document;
+
+        if (!$(obj.id)) {
+            var elt =3D top.createElement('div');
+        }
         else {
-            var elt=3D$(obj.id);
+            var elt =3D $(obj.id);
         }
-        if (obj.id )
+        if (obj.id)
         {
-            elt.setAttribute('id',obj.id);
+            elt.setAttribute('id', obj.id);
         }
         if (obj.style)
         {
             if (elt.style.setAttribute)
             { /* IE7 bug */
-                elt.style.setAttribute('cssText',obj.style);
+                elt.style.setAttribute('cssText', obj.style);
             }
             else
             { /* good Browser */
-                elt.setAttribute('style',obj.style);
+                elt.setAttribute('style', obj.style);
             }
         }
-        if (obj.cssclass )
+        if (obj.cssclass)
         {
-            elt.setAttribute('class',obj.cssclass);/* FF */
-            elt.setAttribute('className',obj.cssclass); /* IE */
+            elt.setAttribute('class', obj.cssclass);/* FF */
+            elt.setAttribute('className', obj.cssclass); /* IE */
         }
         if (obj.html)
         {
-            elt.innerHTML=3Dobj.html;
+            elt.innerHTML =3D obj.html;
         }
=20
-        var bottom_div=3Ddocument.body;
+        var bottom_div =3D document.body;
         bottom_div.appendChild(elt);
-        if ( obj.drag )
+        if (obj.drag)
         {
-new Draggable(obj.id,{starteffect:function()
-                                  {
-                      new Effect.Highlight(obj.id,{scroll:window,queue:'=
end'});
-                                  }}
-                         );
+            new Draggable(obj.id, {starteffect: function()
+                {
+                    new Effect.Highlight(obj.id, {scroll: window, queue:=
 'end'});
+                }}
+            );
         }
     }
     catch (e)
     {
-        alert("add_div "+e.message);
+        alert("add_div " + e.message);
     }
 }
 /**
@@ -656,17 +660,17 @@
  */
 function removeDiv(elt)
 {
-    if (g(elt) )
+    if (g(elt))
     {
         document.body.removeChild(g(elt));
     }
-	// if reloaded if asked the window will be reloaded when
-	// the box is closed
-	if ( ask_reload =3D=3D 1)
-	{
-		// avoid POST window.location =3D window.location.href;
-		window.location.reload();
-	}
+    // if reloaded if asked the window will be reloaded when
+    // the box is closed
+    if (ask_reload =3D=3D 1)
+    {
+        // avoid POST window.location =3D window.location.href;
+        window.location.reload();
+    }
 }
 /**
  *show a box while loading
@@ -675,46 +679,46 @@
  */
 function waiting_box()
 {
-	obj=3D{
-		id:'wait_box',html:loading()
-		};
-        var y=3Dcalcy(posY);
-	obj.style=3Dfixed_position(posX,y)+";width:200px";
-	if ($('wait_box')){
-		removeDiv('wait_box');
-		}
-	add_div(obj);
-	$('info_div').innerHTML=3D"Un instant";
-	$('info_div').style.display=3D"block";
+    obj =3D {
+        id: 'wait_box', html: loading()
+    };
+    var y =3D calcy(posY);
+    obj.style =3D fixed_position(posX, y) + ";width:200px";
+    if ($('wait_box')) {
+        removeDiv('wait_box');
+    }
+    add_div(obj);
+    $('info_div').innerHTML =3D "Un instant";
+    $('info_div').style.display =3D "block";
=20
 }
 /**
-*@brief call add_div to add a DIV and after call the ajax
-* the queryString, the callback for function for success and error manag=
ement
-* the method is always GET
-*@param obj, the mandatory attributes are
-*  - obj.qs querystring
-*  - obj.js_success callback function in javascript for handling the xml=
 answer
-*  - obj.js_error callback function for error
-*  - obj.callback the php file to call
-*  - obj.fixed optional let you determine the position, otherwise works =
like IPopup
-*@see add_div IBox
-*/
+ *@brief call add_div to add a DIV and after call the ajax
+ * the queryString, the callback for function for success and error mana=
gement
+ * the method is always GET
+ *@param obj, the mandatory attributes are
+ *  - obj.qs querystring
+ *  - obj.js_success callback function in javascript for handling the xm=
l answer
+ *  - obj.js_error callback function for error
+ *  - obj.callback the php file to call
+ *  - obj.fixed optional let you determine the position, otherwise works=
 like IPopup
+ *@see add_div IBox
+ */
 function show_box(obj)
 {
-    add_div(obj) ;
-    if ( ! obj.fixed )
+    add_div(obj);
+    if (!obj.fixed)
     {
-        var sx=3D0;
-        if ( window.scrollY)
+        var sx =3D 0;
+        if (window.scrollY)
         {
-            sx=3Dwindow.scrollY+40;
+            sx =3D window.scrollY + 40;
         }
         else
         {
-            sx=3Ddocument.body.scrollTop+40;
+            sx =3D document.body.scrollTop + 40;
         }
-        g(obj.id).style.top=3Dsx;
+        g(obj.id).style.top =3D sx;
         show(obj.id);
     }
     else
@@ -722,14 +726,14 @@
         show(obj.id);
     }
=20
-    var action=3Dnew Ajax.Request (
-                   obj.callback,
-                   {
-                   method:'GET',
-                   parameters:obj.qs,
-                   onFailure:eval(obj.js_error),
-                   onSuccess:eval(obj.js_success)
-                   });
+    var action =3D new Ajax.Request(
+            obj.callback,
+            {
+                method: 'GET',
+                parameters: obj.qs,
+                onFailure: eval(obj.js_error),
+                onSuccess: eval(obj.js_success)
+            });
 }
 /**
  *@brief receive answer from ajax and just display it into the IBox
@@ -737,109 +741,192 @@
  * code is the HTML to put in it
  *@see fill_box
  */
-function success_box(req,json)
+function success_box(req, json)
 {
     try
     {
-        var answer=3Dreq.responseXML;
-        var a=3Danswer.getElementsByTagName('ctl');
-        var html=3Danswer.getElementsByTagName('code');
-        if ( a.length =3D=3D 0 )
+        var answer =3D req.responseXML;
+        var a =3D answer.getElementsByTagName('ctl');
+        var html =3D answer.getElementsByTagName('code');
+        if (a.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
-        var name_ctl=3Da[0].firstChild.nodeValue;
-        var code_html=3DgetNodeText(html[0]);
+        var name_ctl =3D a[0].firstChild.nodeValue;
+        var code_html =3D getNodeText(html[0]);
=20
-        code_html=3Dunescape_xml(code_html);
-        g(name_ctl).innerHTML=3Dcode_html;
-        g(name_ctl).style.height=3D'auto';
+        code_html =3D unescape_xml(code_html);
+        g(name_ctl).innerHTML =3D code_html;
+        g(name_ctl).style.height =3D 'auto';
=20
-        if(name_ctl !=3D 'popup')
-            g(name_ctl).style.width=3D'60%';
+        if (name_ctl !=3D 'popup')
+            g(name_ctl).style.width =3D '60%';
         else
-            g(name_ctl).style.width=3D'auto';
+            g(name_ctl).style.width =3D 'auto';
     }
     catch (e)
     {
-        alert("success_box"+e.message);
+        alert("success_box" + e.message);
     }
     try
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("answer_box Impossible executer script de la reponse\n"+e.=
message);
+        alert("answer_box Impossible executer script de la reponse\n" + =
e.message);
     }
 }
=20
-function error_box ()
+function error_box()
 {
     alert('IBOX : error_box ajax not implemented');
 }
 /**
-* show the ledger choice
-*/
-function show_ledger_choice()
+ * show the ledger choice
+ */
+function show_ledger_choice(json_obj)
 {
-   if ($('div_jrn')) g('div_jrn').style.visibility=3D'visible';
-   if ($('div_jrnsearch_op')) $('div_jrnsearch_op').style.display=3D'blo=
ck';
+    try
+    {
+        waiting_box();
+        var i =3D 0;
+        var query =3D "gDossier=3D" + json_obj.dossier + '&type=3D' + js=
on_obj.type + '&div=3D' + json_obj.div + '&op=3Dledger_show';
+        query =3D query + '&nbjrn=3D' + $( json_obj.div+'nb_jrn').value;
+        query =3D query + '&all_type=3D' + json_obj.all_type;
+        for (i =3D 0; i < $( json_obj.div+'nb_jrn').value; i++) {
+            query =3D query + "&r_jrn[]=3D" + $( json_obj.div+'r_jrn[' +=
 i + ']').value;
+        }
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: query,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, json) {
+                        try {
+                            var obj =3D {
+                                id: json_obj.div + 'jrn_search',
+                                cssclass: 'inner_box',
+                                style: ';position:absolute;width:60%;z-i=
ndex:20;margin-left:20%',
+                                drag: 1
+                            };
+                            var y=3Dcalcy(posY);
+                            if (json_obj.div !=3D '')obj.cssclass=3D"";
+                            obj.style=3D"top:"+y+obj.style;
+                            add_div(obj);
+
+
+                            var answer =3D req.responseXML;
+                            var a =3D answer.getElementsByTagName('ctl')=
;
+                            var html =3D answer.getElementsByTagName('co=
de');
+                            if (a.length =3D=3D 0) {
+                                var rec =3D req.responseText;
+                                alert('erreur :' + rec);
+                            }
+                            var name_ctl =3D a[0].firstChild.nodeValue;
+                            var code_html =3D getNodeText(html[0]);
+
+                            code_html =3D unescape_xml(code_html);
+                            remove_waiting_box();
+                            g(obj.id).innerHTML =3D code_html;
+
+                        }
+                        catch (e) {
+                            alert("show_ledger_callback" + e.message);
+                        }
+                        try {
+                            code_html.evalScripts();
+                        }
+                        catch (e) {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
+
+                    }
+
+                }
+        );
+    } catch (e) {
+        alert('show_ledger_choice'+e.message);
+    }
 }
 /**
-* hide the ledger choice
-*/
-function hide_ledger_choice()
+ * hide the ledger choice
+ */
+function hide_ledger_choice(p_frm_search)
 {
-    if ($('div_jrn')) g('div_jrn').style.visibility=3D'hidden';
-	if ($('div_jrnsearch_op')) $('div_jrnsearch_op').style.display=3D'none'=
;
+    try
+    {
+        var nb =3D $(p_frm_search).nb_jrn.value;
+        var div =3D $(p_frm_search).div.value;
+        var i =3D 0;
+        var str =3D "";
+        var name =3D "";
+        var n_name =3D "";
+        var sel=3D0;
+        for (i =3D 0; i < nb; i++) {
+            n_name =3D div + "r_jrn[" + sel+"]";
+            name =3D div + "r_jrn" + i;
+            if ($(name).checked) {
+                str +=3D '<input type=3D"hidden" id=3D"' + n_name + '" n=
ame=3D"' + n_name + '" value=3D"' + $(name).value + '">';
+                sel++;
+            }
+        }
+        str +=3D '<input type=3D"hidden" name=3D"'+div+'nb_jrn" id=3D"'+=
div+'nb_jrn" value=3D"' + sel + '">';
+        $('ledger_id'+div).innerHTML =3D str;
+        removeDiv(div+'jrn_search');
+        return false;
+    } catch (e) {
+        alert('hide_ledger_choice'+e.message);
+        return false;
+    }
+
 }
 /**
-* show the cat of ledger choice
-*/
+ * show the cat of ledger choice
+ */
 function show_cat_choice()
 {
-    g('div_cat').style.visibility=3D'visible';
+    g('div_cat').style.visibility =3D 'visible';
 }
 /**
-* hide the cat of ledger choice
-*/
+ * hide the cat of ledger choice
+ */
 function hide_cat_choice()
 {
-    g('div_cat').style.visibility=3D'hidden';
+    g('div_cat').style.visibility =3D 'hidden';
 }
 /**
-* add a row for the forecast item
-*/
+ * add a row for the forecast item
+ */
 function for_add_row(tableid)
 {
-    style=3D'class=3D"input_text"';
-    var mytable=3Dg(tableid).tBodies[0];
-    var nNumberRow=3Dmytable.rows.length;
-    var oRow=3Dmytable.insertRow(nNumberRow);
-    var rowToCopy=3Dmytable.rows[1];
-    var nNumberCell=3DrowToCopy.cells.length;
-    var nb=3Dg("nbrow");
+    style =3D 'class=3D"input_text"';
+    var mytable =3D g(tableid).tBodies[0];
+    var nNumberRow =3D mytable.rows.length;
+    var oRow =3D mytable.insertRow(nNumberRow);
+    var rowToCopy =3D mytable.rows[1];
+    var nNumberCell =3D rowToCopy.cells.length;
+    var nb =3D g("nbrow");
     var oNewRow =3D mytable.insertRow(nNumberRow);
-    for ( var e=3D0;e < nNumberCell;e++)
+    for (var e =3D 0; e < nNumberCell; e++)
     {
-        var newCell=3DoRow.insertCell(e);
-        var tt=3DrowToCopy.cells[e].innerHTML;
-        new_tt=3Dtt.replace(/an_cat0/g,"an_cat"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_cat_acc0/g,"an_cat_acc"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_qc0/g,"an_qc"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_label0/g,"an_label"+nb.value);
-        new_tt=3Dnew_tt.replace(/month0/g,"month"+nb.value);
-        new_tt=3Dnew_tt.replace(/an_cat_amount0/g,"an_cat_amount"+nb.val=
ue);
-        new_tt=3Dnew_tt.replace(/an_deb0/g,"an_deb"+nb.value);
-        newCell.innerHTML=3Dnew_tt;
+        var newCell =3D oRow.insertCell(e);
+        var tt =3D rowToCopy.cells[e].innerHTML;
+        new_tt =3D tt.replace(/an_cat0/g, "an_cat" + nb.value);
+        new_tt =3D new_tt.replace(/an_cat_acc0/g, "an_cat_acc" + nb.valu=
e);
+        new_tt =3D new_tt.replace(/an_qc0/g, "an_qc" + nb.value);
+        new_tt =3D new_tt.replace(/an_label0/g, "an_label" + nb.value);
+        new_tt =3D new_tt.replace(/month0/g, "month" + nb.value);
+        new_tt =3D new_tt.replace(/an_cat_amount0/g, "an_cat_amount" + n=
b.value);
+        new_tt =3D new_tt.replace(/an_deb0/g, "an_deb" + nb.value);
+        newCell.innerHTML =3D new_tt;
         new_tt.evalScripts();
     }
-    $("an_cat_acc"+nb.value).value=3D"";
-    $("an_qc"+nb.value).value=3D"";
-    $("an_label"+nb.value).value=3D"";
-    $("an_cat_amount"+nb.value).value=3D"0";
+    $("an_cat_acc" + nb.value).value =3D "";
+    $("an_qc" + nb.value).value =3D "";
+    $("an_label" + nb.value).value =3D "";
+    $("an_cat_amount" + nb.value).value =3D "0";
     nb.value++;
 }
 /**
@@ -848,19 +935,19 @@
  */
 function toggle_checkbox(form_id)
 {
-    var form=3Dg(form_id);
-    for (var i=3D0;i<form.length;i++)
+    var form =3D g(form_id);
+    for (var i =3D 0; i < form.length; i++)
     {
-        var e=3Dform.elements[i];
-        if ( e.type=3D=3D'checkbox')
+        var e =3D form.elements[i];
+        if (e.type =3D=3D 'checkbox')
         {
-            if ( e.checked=3D=3Dtrue)
+            if (e.checked =3D=3D true)
             {
-                e.checked=3Dfalse;
+                e.checked =3D false;
             }
             else
             {
-                e.checked=3Dtrue;
+                e.checked =3D true;
             }
         }
     }
@@ -871,13 +958,13 @@
  */
 function select_checkbox(form_id)
 {
-    var form=3D$(form_id);
-    for (var i=3D0;i<form.length;i++)
+    var form =3D $(form_id);
+    for (var i =3D 0; i < form.length; i++)
     {
-        var e=3Dform.elements[i];
-        if ( e.type=3D=3D'checkbox')
+        var e =3D form.elements[i];
+        if (e.type =3D=3D 'checkbox')
         {
-            e.checked=3Dtrue;
+            e.checked =3D true;
         }
     }
 }
@@ -887,84 +974,85 @@
  */
 function unselect_checkbox(form_id)
 {
-    var form=3D$(form_id);
-    for (var i=3D0;i<form.length;i++)
+    var form =3D $(form_id);
+    for (var i =3D 0; i < form.length; i++)
     {
-        var e=3Dform.elements[i];
-        if ( e.type=3D=3D'checkbox')
+        var e =3D form.elements[i];
+        if (e.type =3D=3D 'checkbox')
         {
-            e.checked=3Dfalse;
+            e.checked =3D false;
         }
     }
 }
 /**
-* show the calculator
-*/
+ * show the calculator
+ */
 function show_calc()
 {
-    if ( g('calc1'))
+    if (g('calc1'))
     {
-        this.document.getElementById('inp').value=3D"";
+        this.document.getElementById('inp').value =3D "";
         this.document.getElementById('inp').focus();
         return;
     }
-    var sid=3D'calc1';
-    var shtml=3D'';
-	shtml+=3D'<div style=3D"float:right;height:10px;display:block;margin-to=
p:2px;margin-right:2px">	<a onclick=3D"removeDiv(\'calc1\');" href=3D"jav=
ascript:void(0)" id=3D"close_div">Fermer</a></div>';
-	shtml+=3D'<div>   <h2 class=3D"info">Calculatrice</h2></div>';
-    shtml+=3D'<form name=3D"calc_line"  method=3D"GET" onSubmit=3D"cal()=
;return false;" >Calculatrice simplifi=C3=A9e: =C3=A9crivez simplement le=
s op=C3=A9rations que vous voulez puis la touche retour. exemple : 1+2+3*=
(1/5) <input class=3D"input_text" type=3D"text" size=3D"30" id=3D"inp" na=
me=3D"calculator"> <input type=3D"button" value=3D"Efface tout" class=3D"=
button" onClick=3D"Clean();return false;" > <input type=3D"button" class=3D=
"button" value=3D"Fermer" onClick=3D"removeDiv(\'calc1\')" >';
-    shtml+=3D'</form><span id=3D"result">  </span><br><span id=3D"sub_to=
tal">  Taper une formule (ex 20*5.1) puis enter  </span><br><span id=3D"l=
isting"> </span>';
+    var sid =3D 'calc1';
+    var shtml =3D '';
+    shtml +=3D '<div style=3D"float:right;height:10px;display:block;marg=
in-top:2px;margin-right:2px">	<a onclick=3D"removeDiv(\'calc1\');" href=3D=
"javascript:void(0)" id=3D"close_div">Fermer</a></div>';
+    shtml +=3D '<div>   <h2 class=3D"info">Calculatrice</h2></div>';
+    shtml +=3D '<form name=3D"calc_line"  method=3D"GET" onSubmit=3D"cal=
();return false;" >Calculatrice simplifi=C3=A9e: =C3=A9crivez simplement =
les op=C3=A9rations que vous voulez puis la touche retour. exemple : 1+2+=
3*(1/5) <input class=3D"input_text" type=3D"text" size=3D"30" id=3D"inp" =
name=3D"calculator"> <input type=3D"button" value=3D"Efface tout" class=3D=
"button" onClick=3D"Clean();return false;" > <input type=3D"button" class=
=3D"button" value=3D"Fermer" onClick=3D"removeDiv(\'calc1\')" >';
+    shtml +=3D '</form><span id=3D"result">  </span><br><span id=3D"sub_=
total">  Taper une formule (ex 20*5.1) puis enter  </span><br><span id=3D=
"listing"> </span>';
=20
-var obj=3D{id:sid,html:shtml,
-	 drag:true,style:''
-        };
+    var obj =3D {id: sid, html: shtml,
+        drag: true, style: ''
+    };
     add_div(obj);
     this.document.getElementById('inp').focus();
 }
-function display_periode(p_dossier,p_id)
+function display_periode(p_dossier, p_id)
 {
=20
-     try
+    try
     {
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dinput_per"+"&p_=
id=3D"+p_id;
-	var popup=3D{'id': 'mod_periode','cssclass':'inner_box','html':loading(=
),'style':'width:30em','drag':true};
-	if ( ! $('mod_periode') ) {
-	    add_div(popup);
-	}
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dinput_per=
" + "&p_id=3D" + p_id;
+        var popup =3D {'id': 'mod_periode', 'cssclass': 'inner_box', 'ht=
ml': loading(), 'style': 'width:30em', 'drag': true};
+        if (!$('mod_periode')) {
+            add_div(popup);
+        }
         var action =3D new Ajax.Request(
-            "ajax_misc.php" ,
-            {method:'get',
-              parameters:queryString,
-              onFailure:ajax_misc_failure,
-              onSuccess:success_display_periode
-            }
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_display_periode
+                }
         );
-	$('mod_periode').style.top=3DposY-70;
-	$('mod_periode').style.left=3DposX-70;
-   }
+        $('mod_periode').style.top =3D posY - 70;
+        $('mod_periode').style.left =3D posX - 70;
+    }
     catch (e)
     {
-        alert("display_periode "+e.message);
+        alert("display_periode " + e.message);
     }
=20
 }
 function success_display_periode(req)
-{try
+{
+    try
     {
=20
-        var answer=3Dreq.responseXML;
-        var html=3Danswer.getElementsByTagName('data');
+        var answer =3D req.responseXML;
+        var html =3D answer.getElementsByTagName('data');
=20
-        if ( html.length =3D=3D 0 )
+        if (html.length =3D=3D 0)
         {
-            var rec=3Dreq.responseText;
-            alert ('erreur :'+rec);
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
         }
=20
-        var code_html=3DgetNodeText(html[0]);
-        code_html=3Dunescape_xml(code_html);
+        var code_html =3D getNodeText(html[0]);
+        code_html =3D unescape_xml(code_html);
=20
-        $('mod_periode').innerHTML=3Dcode_html;
+        $('mod_periode').innerHTML =3D code_html;
     }
     catch (e)
     {
@@ -974,110 +1062,116 @@
     {
         code_html.evalScripts();
     }
-    catch(e)
+    catch (e)
     {
-        alert("success_display_periode Impossible executer script de la =
reponse\n"+e.message);
+        alert("success_display_periode Impossible executer script de la =
reponse\n" + e.message);
     }
=20
 }
 function save_periode(obj)
 {
-     try
+    try
     {
-        var queryString=3D$(obj).serialize()+"&op=3Dsave_per";
+        var queryString =3D $(obj).serialize() + "&op=3Dsave_per";
=20
         var action =3D new Ajax.Request(
-            "ajax_misc.php" ,
-            {method:'post',
-              parameters:queryString,
-              onFailure:ajax_misc_failure,
-              onSuccess:success_display_periode
-            }
+                "ajax_misc.php",
+                {method: 'post',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: success_display_periode
+                }
         );
=20
     }
     catch (e)
     {
-        alert("display_periode "+e.message);
+        alert("display_periode " + e.message);
     }
=20
     return false;
 }
 /**
-*@brief basic answer to ajax on success, it will fill the ctl with
-* the code. In that case, you need to create the object before the Ajax.=
Request
-*The difference with success box is that
-*@see add_div removeDiv success_box is that the width and height are not=
 changed
-*@parameter ctl is the ID of the object containing the html (div, button=
...)
-*@parameter code is the html code, with it you fill the ctl element
-*/
+ *@brief basic answer to ajax on success, it will fill the ctl with
+ * the code. In that case, you need to create the object before the Ajax=
.Request
+ *The difference with success box is that
+ *@see add_div removeDiv success_box is that the width and height are no=
t changed
+ *@parameter ctl is the ID of the object containing the html (div, butto=
n...)
+ *@parameter code is the html code, with it you fill the ctl element
+ */
 function fill_box(req)
 {
-    try{
+    try {
=20
-	remove_waiting_box();
+        remove_waiting_box();
=20
-	var answer=3Dreq.responseXML;
-	var a=3Danswer.getElementsByTagName('ctl');
-	var html=3Danswer.getElementsByTagName('code');
-	if ( a.length =3D=3D 0 ) {var rec=3Dreq.responseText;alert ('erreur :'+=
rec);}
-	var name_ctl=3Da[0].firstChild.nodeValue;
-	var code_html=3DgetNodeText(html[0]); // Firefox ne prend que les 4096 =
car.
-	code_html=3Dunescape_xml(code_html);
-	$(name_ctl).innerHTML=3Dcode_html;
+        var answer =3D req.responseXML;
+        var a =3D answer.getElementsByTagName('ctl');
+        var html =3D answer.getElementsByTagName('code');
+        if (a.length =3D=3D 0) {
+            var rec =3D req.responseText;
+            alert('erreur :' + rec);
+        }
+        var name_ctl =3D a[0].firstChild.nodeValue;
+        var code_html =3D getNodeText(html[0]); // Firefox ne prend que =
les 4096 car.
+        code_html =3D unescape_xml(code_html);
+        $(name_ctl).innerHTML =3D code_html;
     }
     catch (e) {
-	alert(e.message);}
-    try{
-	code_html.evalScripts();}
-    catch(e){
-	alert("Impossible executer script de la reponse\n"+e.message);}
+        alert(e.message);
+    }
+    try {
+        code_html.evalScripts();
+    }
+    catch (e) {
+        alert("Impossible executer script de la reponse\n" + e.message);
+    }
=20
=20
 }
 /**
-*display a popin to  let you modified a predefined operation
-*@param dossier_id
-*@param od_id from table op_predef
-*/
-function mod_predf_op(dossier_id,od_id)
+ *display a popin to  let you modified a predefined operation
+ *@param dossier_id
+ *@param od_id from table op_predef
+ */
+function mod_predf_op(dossier_id, od_id)
 {
-    var target=3D"mod_predf_op";
-	removeDiv(target);
-    var sx=3D'20%';
-    var sy=3D'20%';
-    var str_style=3D"top:"+sx+";left:"+sy+'width:60%;';
+    var target =3D "mod_predf_op";
+    removeDiv(target);
+    var sx =3D '20%';
+    var sy =3D '20%';
+    var str_style =3D "top:" + sx + ";left:" + sy + 'width:60%;';
=20
-    var div=3D{id:target, cssclass:'inner_box',style:str_style,html:load=
ing(),drag:1};
+    var div =3D {id: target, cssclass: 'inner_box', style: str_style, ht=
ml: loading(), drag: 1};
=20
     add_div(div);
=20
-    var qs=3D"gDossier=3D"+dossier_id+'&op=3Dmod_predf&id=3D'+od_id;
+    var qs =3D "gDossier=3D" + dossier_id + '&op=3Dmod_predf&id=3D' + od=
_id;
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:fill_box
-				  }
-				);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: fill_box
+            }
+    );
=20
 }
=20
 function save_predf_op(obj)
 {
     waiting_box();
-    var querystring=3D$(obj).serialize()+'&op=3Dsave_predf';
+    var querystring =3D $(obj).serialize() + '&op=3Dsave_predf';
     // Create a ajax request to get all the person
-    var action =3D new Ajax.Request ('ajax_misc.php',
-				   {
-				       method:			 'post',
-				       parameters:			 querystring,
-				       onFailure:			 null,
-				       onSuccess:			refresh_window
-				   }
-                                  );
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'post',
+                parameters: querystring,
+                onFailure: null,
+                onSuccess: refresh_window
+            }
+    );
=20
     return false;
 }
@@ -1085,72 +1179,78 @@
  *ctl_concern is the widget to update
  *amount_id is either a html obj. or an amount
  */
-function search_reconcile(dossier,ctl_concern,amount_id,ledger)
+function search_reconcile(dossier, ctl_concern, amount_id, ledger)
 {
-	var dossier=3Dg('gDossier').value;
-	if ( amount_id =3D=3D undefined )
-		{amount_id=3D0;}
-	else if ($(amount_id))
-		{
-			if ($(amount_id).value)
-			{amount_id=3D$(amount_id).value;}
-			else if
-			($(amount_id).innerHTML) {amount_id=3D$(amount_id).innerHTML;}
-		}
+    var dossier =3D g('gDossier').value;
+    if (amount_id =3D=3D undefined)
+    {
+        amount_id =3D 0;
+    }
+    else if ($(amount_id))
+    {
+        if ($(amount_id).value)
+        {
+            amount_id =3D $(amount_id).value;
+        }
+        else if
+                ($(amount_id).innerHTML) {
+            amount_id =3D $(amount_id).innerHTML;
+        }
+    }
=20
-	var target=3D"search_op";
-	removeDiv(target);
-	var str_style=3Dfixed_position(77, 99);
-        str_style+=3D";width:92%;overflow:auto;";
+    var target =3D "search_op";
+    removeDiv(target);
+    var str_style =3D fixed_position(77, 99);
+    str_style +=3D ";width:92%;overflow:auto;";
=20
-    var div=3D{id:target, cssclass:'inner_box',style:str_style,html:load=
ing(),drag:1};
+    var div =3D {id: target, cssclass: 'inner_box', style: str_style, ht=
ml: loading(), drag: 1};
=20
     add_div(div);
-	var target=3D{gDossier:dossier,
-				ctlc:ctl_concern,
-				op:'search_op',
-				ctl:target,
-				ac:'JSSEARCH',
-				amount_id:amount_id,
-				ledger:ledger};
+    var target =3D {gDossier: dossier,
+        ctlc: ctl_concern,
+        op: 'search_op',
+        ctl: target,
+        ac: 'JSSEARCH',
+        amount_id: amount_id,
+        ledger: ledger};
=20
-    var qs=3DencodeJSON(target);
+    var qs =3D encodeJSON(target);
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function (req){
-						  remove_waiting_box();
-						  $('search_op').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-					  }
-				  }
-				);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    $('search_op').innerHTML =3D req.responseText;
+                    req.responseText.evalScripts();
+                }
+            }
+    );
 }
 /**
  * search in a popin obj if the object form
  */
 function search_operation(obj)
 {
-    try{
-	var dossier=3Dg('gDossier').value;
-	waiting_box();
-	var target=3D"search_op";
-        var qs=3DForm.serialize('search_form_ajx')+"&op=3Dsearch_op&ctl=3D=
search_op";
-        var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-        {
-            method:'get',
-            parameters:qs,
-            onFailure:null,
-            onSuccess:function (req){
-                remove_waiting_box();
-                $('search_op').innerHTML=3Dreq.responseText;
-                req.responseText.evalScripts();
-            }
-        }
-    );
+    try {
+        var dossier =3D g('gDossier').value;
+        waiting_box();
+        var target =3D "search_op";
+        var qs =3D Form.serialize('search_form_ajx') + "&op=3Dsearch_op&=
ctl=3Dsearch_op";
+        var action =3D new Ajax.Request('ajax_misc.php',
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: null,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        $('search_op').innerHTML =3D req.responseText;
+                        req.responseText.evalScripts();
+                    }
+                }
+        );
     } catch (e)
     {
         remove_waiting_box();
@@ -1159,75 +1259,78 @@
 }
=20
 function set_reconcile(obj)
- {
+{
=20
-	 try
-	{
-		var ctlc=3Dobj.elements['ctlc'];
+    try
+    {
+        var ctlc =3D obj.elements['ctlc'];
=20
-		for (var e=3D0;e<obj.elements.length;e++)
-		{
+        for (var e =3D 0; e < obj.elements.length; e++)
+        {
=20
-			var elmt=3Dobj.elements[e];
-			if ( elmt.type =3D=3D "checkbox")
-			{
-				if (elmt.checked=3D=3Dtrue )
-				{
-					var str_name=3Delmt.name;
-					var nValue=3Dstr_name.replace("jr_concerned","");
-					if ( $(ctlc.value).value !=3D '') {$(ctlc.value).value+=3D',';}
-					$(ctlc.value).value+=3DnValue;
-				}
-			}
-		}
-		removeDiv('search_op');
-	}
-	catch(e)
-	{
-		alert(e.message)
-	}
- }
+            var elmt =3D obj.elements[e];
+            if (elmt.type =3D=3D "checkbox")
+            {
+                if (elmt.checked =3D=3D true)
+                {
+                    var str_name =3D elmt.name;
+                    var nValue =3D str_name.replace("jr_concerned", "");
+                    if ($(ctlc.value).value !=3D '') {
+                        $(ctlc.value).value +=3D ',';
+                    }
+                    $(ctlc.value).value +=3D nValue;
+                }
+            }
+        }
+        removeDiv('search_op');
+    }
+    catch (e)
+    {
+        alert(e.message)
+    }
+}
 function remove_waiting_box()
 {
-			removeDiv('wait_box');
-			$('info_div').innerHTML=3D"";
-			$('info_div').style.display=3D"none";
+    removeDiv('wait_box');
+    $('info_div').innerHTML =3D "";
+    $('info_div').style.display =3D "none";
 }
-function get_profile_detail(gDossier,profile_id)
+function get_profile_detail(gDossier, profile_id)
 {
-	waiting_box();
-	var qs=3D"op=3Ddisplay_profile&gDossier=3D"+gDossier+"&p_id=3D"+profile=
_id+"&ctl=3Ddetail_profile";
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  remove_waiting_box();
-						  $('detail_profile').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-						  $('detail_profile').show();
-						  if ( profile_id !=3D "-1" ) profile_show('profile_gen_div');
-					  }
-				  }
-				);
+    waiting_box();
+    var qs =3D "op=3Ddisplay_profile&gDossier=3D" + gDossier + "&p_id=3D=
" + profile_id + "&ctl=3Ddetail_profile";
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    $('detail_profile').innerHTML =3D req.responseText;
+                    req.responseText.evalScripts();
+                    $('detail_profile').show();
+                    if (profile_id !=3D "-1")
+                        profile_show('profile_gen_div');
+                }
+            }
+    );
 }
 function get_profile_detail_success(xml)
 {
-	remove_waiting_box();
+    remove_waiting_box();
=20
 }
 /**
  * @brief compute the string to position a div in a fixed way
  * @return string
  */
-function fixed_position(p_sx,p_sy)
+function fixed_position(p_sx, p_sy)
 {
-	var sx=3Dp_sx;
-	var sy=3Dcalcy(p_sy);
+    var sx =3D p_sx;
+    var sy =3D calcy(p_sy);
=20
-    var str_style=3D"top:"+sy+";left:"+sx+";position:absolute";
-	return str_style;
+    var str_style =3D "top:" + sy + ";left:" + sx + ";position:absolute"=
;
+    return str_style;
=20
 }
 /**
@@ -1236,176 +1339,184 @@
  */
 function calcy(p_sy)
 {
-	var sy=3Dp_sy;
-	if ( window.scrollY)
-        {
-            sy=3Dwindow.scrollY+p_sy;
-        }
-        else
-        {
-            sy=3Ddocument.body.scrollTop+p_sy;
-        }
-	return sy;
+    var sy =3D p_sy;
+    if (window.scrollY)
+    {
+        sy =3D window.scrollY + p_sy;
+    }
+    else
+    {
+        sy =3D document.body.scrollTop + p_sy;
+    }
+    return sy;
=20
 }
-function mod_menu(gdossier,pm_id)
+function mod_menu(gdossier, pm_id)
 {
-	waiting_box();
-	removeDiv('divdm'+pm_id);
-	var qs=3D"op=3Ddet_menu&gDossier=3D"+gdossier+"&pm_id=3D"+pm_id+"&ctl=3D=
divdm"+pm_id;
-	var pos=3Dfixed_position(250,150);
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  add_div({id:"divdm"+pm_id,drag:1,cssclass:"inner_box",style:pos=
});
-							  $('divdm'+pm_id).innerHTML=3Dreq.responseText;
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+    waiting_box();
+    removeDiv('divdm' + pm_id);
+    var qs =3D "op=3Ddet_menu&gDossier=3D" + gdossier + "&pm_id=3D" + pm=
_id + "&ctl=3Ddivdm" + pm_id;
+    var pos =3D fixed_position(250, 150);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        add_div({id: "divdm" + pm_id, drag: 1, cssclass:=
 "inner_box", style: pos});
+                        $('divdm' + pm_id).innerHTML =3D req.responseTex=
t;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
 function add_menu(obj)
 {
-	var pdossier=3Dobj.dossier;
-	var p_id=3Dobj.p_id;
-	var p_type=3Dobj.type;
-	waiting_box();
-	removeDiv('divdm'+p_id);
-	var qs=3D"op=3Dadd_menu&gDossier=3D"+pdossier+"&p_id=3D"+p_id+"&ctl=3Dd=
ivdm"+p_id+"&type=3D"+p_type;
-	var pos=3Dfixed_position(250,150);
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  add_div({id:"divdm"+p_id,drag:1,cssclass:"inner_box",style:pos}=
);
-							  $('divdm'+p_id).innerHTML=3Dreq.responseText;
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+    var pdossier =3D obj.dossier;
+    var p_id =3D obj.p_id;
+    var p_type =3D obj.type;
+    waiting_box();
+    removeDiv('divdm' + p_id);
+    var qs =3D "op=3Dadd_menu&gDossier=3D" + pdossier + "&p_id=3D" + p_i=
d + "&ctl=3Ddivdm" + p_id + "&type=3D" + p_type;
+    var pos =3D fixed_position(250, 150);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        add_div({id: "divdm" + p_id, drag: 1, cssclass: =
"inner_box", style: pos});
+                        $('divdm' + p_id).innerHTML =3D req.responseText=
;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
 function add_plugin(p_dossier)
 {
-	waiting_box();
-	removeDiv('divplugin');
-	var qs=3D"op=3Dadd_plugin&gDossier=3D"+p_dossier+"&ctl=3Ddivplugin";
+    waiting_box();
+    removeDiv('divplugin');
+    var qs =3D "op=3Dadd_plugin&gDossier=3D" + p_dossier + "&ctl=3Ddivpl=
ugin";
=20
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  var pos=3Dfixed_position(250,150)+";width:30%";
-							add_div({id:"divplugin",drag:1,cssclass:"inner_box",style:pos});
-							  $('divplugin').innerHTML=3Dreq.responseText;
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({id: "divplugin", drag: 1, cssclass: "in=
ner_box", style: pos});
+                        $('divplugin').innerHTML =3D req.responseText;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
-function mod_plugin(p_dossier,me_code)
+function mod_plugin(p_dossier, me_code)
 {
-	waiting_box();
-	removeDiv('divplugin');
-	var qs=3D"op=3Dmod_plugin&gDossier=3D"+p_dossier+"&ctl=3Ddivplugin&me_c=
ode=3D"+me_code;
+    waiting_box();
+    removeDiv('divplugin');
+    var qs =3D "op=3Dmod_plugin&gDossier=3D" + p_dossier + "&ctl=3Ddivpl=
ugin&me_code=3D" + me_code;
=20
-	var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function(req){
-						  try{
-							  remove_waiting_box();
-							  var pos=3Dfixed_position(250,150)+";width:30%";
-							  add_div({id:"divplugin",drag:1,cssclass:"inner_box",style:pos})=
;
-							  $('divplugin').innerHTML=3Dreq.responseText;
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({id: "divplugin", drag: 1, cssclass: "in=
ner_box", style: pos});
+                        $('divplugin').innerHTML =3D req.responseText;
=20
-						  } catch(e){alert(e.message);}
-					  }
-				  }
-				);
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
+            }
+    );
 }
 function create_menu(p_dossier)
 {
     waiting_box();
     removeDiv('divmenu');
-    var qs=3D"op=3Dcreate_menu&gDossier=3D"+p_dossier+"&ctl=3Ddivmenu";
+    var qs =3D "op=3Dcreate_menu&gDossier=3D" + p_dossier + "&ctl=3Ddivm=
enu";
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-    {
-        method:'get',
-        parameters:qs,
-        onFailure:null,
-        onSuccess:function(req){
-            try{
-                remove_waiting_box();
-                var pos=3Dfixed_position(250,150)+";width:30%";
-                add_div({
-                    id:"divmenu",
-                    drag:1,
-                    cssclass:"inner_box",
-                    style:pos
-                });
-                $('divmenu').innerHTML=3Dreq.responseText;
-            } catch(e){
-                alert(e.message);
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({
+                            id: "divmenu",
+                            drag: 1,
+                            cssclass: "inner_box",
+                            style: pos
+                        });
+                        $('divmenu').innerHTML =3D req.responseText;
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
             }
-        }
-    }
     );
 }
-function modify_menu(p_dossier,me_code)
+function modify_menu(p_dossier, me_code)
 {
     waiting_box();
     removeDiv('divmenu');
-    var qs=3D"op=3Dmodify_menu&gDossier=3D"+p_dossier+"&ctl=3Ddivmenu&me=
_code=3D"+me_code;
+    var qs =3D "op=3Dmodify_menu&gDossier=3D" + p_dossier + "&ctl=3Ddivm=
enu&me_code=3D" + me_code;
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-    {
-        method:'get',
-        parameters:qs,
-        onFailure:null,
-        onSuccess:function(req){
-            try{
-                remove_waiting_box();
-                var pos=3Dfixed_position(250,150)+";width:30%";
-                add_div({
-                    id:"divmenu",
-                    drag:1,
-                    cssclass:"inner_box",
-                    style:pos
-                });
-                $('divmenu').innerHTML=3Dreq.responseText;
+    var action =3D new Ajax.Request('ajax_misc.php',
+            {
+                method: 'get',
+                parameters: qs,
+                onFailure: null,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var pos =3D fixed_position(250, 150) + ";width:3=
0%";
+                        add_div({
+                            id: "divmenu",
+                            drag: 1,
+                            cssclass: "inner_box",
+                            style: pos
+                        });
+                        $('divmenu').innerHTML =3D req.responseText;
=20
-            } catch(e){
-                alert(e.message);
+                    } catch (e) {
+                        alert(e.message);
+                    }
+                }
             }
-        }
-    }
     );
 }
 function get_properties(obj)
 {
-    var a_array=3D[];
-    var s_type=3D"["+typeof obj+"]";
+    var a_array =3D [];
+    var s_type =3D "[" + typeof obj + "]";
     for (var m in obj)
     {
-	a_array.push(m);
+        a_array.push(m);
     }
-    alert(s_type+a_array.join(","));
+    alert(s_type + a_array.join(","));
 }
 /**
  * @brief add a line in the form for the report
@@ -1413,243 +1524,253 @@
  */
 function rapport_add_row(p_dossier)
 {
-    style=3D'style=3D"border: 1px solid blue;"';
-    var table=3D$("rap1");
-    var line=3Dtable.rows.length;
+    style =3D 'style=3D"border: 1px solid blue;"';
+    var table =3D $("rap1");
+    var line =3D table.rows.length;
=20
-    var row=3Dtable.insertRow(line);
+    var row =3D table.insertRow(line);
     // left cell
     var cellPos =3D row.insertCell(0);
-    cellPos.innerHTML=3D'<input type=3D"text" '+style+' size=3D"3" id=3D=
"pos'+line+'" name=3D"pos'+line+'" value=3D"'+line+'">';
+    cellPos.innerHTML =3D '<input type=3D"text" ' + style + ' size=3D"3"=
 id=3D"pos' + line + '" name=3D"pos' + line + '" value=3D"' + line + '">'=
;
=20
     // right cell
     var cellName =3D row.insertCell(1);
-    cellName.innerHTML=3D'<input type=3D"text" '+style+' size=3D"40" id=3D=
"text'+line+'" name=3D"text'+line+'">';
+    cellName.innerHTML =3D '<input type=3D"text" ' + style + ' size=3D"4=
0" id=3D"text' + line + '" name=3D"text' + line + '">';
=20
     // button + formula
     var cellbutton =3D row.insertCell(2);
-    var but_html=3Dtable.rows[1].cells[2].innerHTML;
-    but_html=3Dbut_html.replace(/form0/g,"form"+line);
-    cellbutton.innerHTML=3Dbut_html;
+    var but_html =3D table.rows[1].cells[2].innerHTML;
+    but_html =3D but_html.replace(/form0/g, "form" + line);
+    cellbutton.innerHTML =3D but_html;
     but_html.evalScripts();
=20
-    g('form'+line).value=3D'';
+    g('form' + line).value =3D '';
 }
 /**
  * Search an action in an inner box
  */
-function search_action(dossier,ctl_concern)
+function search_action(dossier, ctl_concern)
 {
-	try
-	{
-	var dossier=3Dg('gDossier').value;
+    try
+    {
+        var dossier =3D g('gDossier').value;
=20
-	var target=3D"search_action_div";
-	removeDiv(target);
-	var str_style=3Dfixed_position(77, 99);
-        str_style+=3D";width:80%";
+        var target =3D "search_action_div";
+        removeDiv(target);
+        var str_style =3D fixed_position(77, 99);
+        str_style +=3D ";width:80%";
=20
-    var div=3D{id:target, cssclass:'inner_box',style:str_style,html:load=
ing(),drag:1};
+        var div =3D {id: target, cssclass: 'inner_box', style: str_style=
, html: loading(), drag: 1};
=20
-    add_div(div);
-	var target=3D{gDossier:dossier,
-				ctlc:ctl_concern,
-				op:'search_action',
-				ctl:target
-				};
+        add_div(div);
+        var target =3D {gDossier: dossier,
+            ctlc: ctl_concern,
+            op: 'search_action',
+            ctl: target
+        };
=20
-    var qs=3DencodeJSON(target);
+        var qs =3D encodeJSON(target);
=20
-    var action=3Dnew Ajax.Request ( 'ajax_misc.php',
-				  {
-				      method:'get',
-				      parameters:qs,
-				      onFailure:null,
-				      onSuccess:function (req){
-						  try {
-						  remove_waiting_box();
-						  $('search_action_div').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-						  }catch( e){alert(e.message);}
-					  }
-				  }
-				);
-	}catch( e){alert(e.message);}
+        var action =3D new Ajax.Request('ajax_misc.php',
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: null,
+                    onSuccess: function(req) {
+                        try {
+                            remove_waiting_box();
+                            $('search_action_div').innerHTML =3D req.res=
ponseText;
+                            req.responseText.evalScripts();
+                        } catch (e) {
+                            alert(e.message);
+                        }
+                    }
+                }
+        );
+    } catch (e) {
+        alert(e.message);
+    }
 }
=20
 function result_search_action(obj)
 {
-     try
+    try
     {
-        var queryString=3D$(obj).serialize()+"&op=3Dsearch_action";
+        var queryString =3D $(obj).serialize() + "&op=3Dsearch_action";
         var action =3D new Ajax.Request(
-            "ajax_misc.php" ,
-            {method:'get',
-              parameters:queryString,
-              onFailure:ajax_misc_failure,
-              onSuccess:function (req){
-						  try {
-						  remove_waiting_box();
-						  $('search_action_div').innerHTML=3Dreq.responseText;
-						  req.responseText.evalScripts();
-						  }catch( e){alert(e.message);}
-					  }
-            }
+                "ajax_misc.php",
+                {method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        try {
+                            remove_waiting_box();
+                            $('search_action_div').innerHTML =3D req.res=
ponseText;
+                            req.responseText.evalScripts();
+                        } catch (e) {
+                            alert(e.message);
+                        }
+                    }
+                }
         )
=20
     }
     catch (e)
     {
-        alert("display_periode "+e.message);
+        alert("display_periode " + e.message);
     }
=20
     return false;
 }
=20
 function set_action_related(p_obj)
- {
+{
=20
-	 try
-	{
-		var obj=3D$(p_obj);
-		var ctlc=3Dobj.elements['ctlc'];
+    try
+    {
+        var obj =3D $(p_obj);
+        var ctlc =3D obj.elements['ctlc'];
=20
-		for (var e=3D0;e<obj.elements.length;e++)
-		{
+        for (var e =3D 0; e < obj.elements.length; e++)
+        {
=20
-			var elmt=3Dobj.elements[e];
-			if ( elmt.type =3D=3D "checkbox")
-			{
-				if (elmt.checked=3D=3Dtrue )
-				{
-					var str_name=3Delmt.name;
-						var nValue=3Delmt.value;
-						if ( $(ctlc.value).value !=3D '') {$(ctlc.value).value+=3D',';}
-						$(ctlc.value).value+=3DnValue;
-				}
-			}
-		}
-		removeDiv('search_action_div');
-		return false;
-	}
-	catch(e)
-	{
-		alert(e.message);
-		return false;
-	}
- }
- /**
+            var elmt =3D obj.elements[e];
+            if (elmt.type =3D=3D "checkbox")
+            {
+                if (elmt.checked =3D=3D true)
+                {
+                    var str_name =3D elmt.name;
+                    var nValue =3D elmt.value;
+                    if ($(ctlc.value).value !=3D '') {
+                        $(ctlc.value).value +=3D ',';
+                    }
+                    $(ctlc.value).value +=3D nValue;
+                }
+            }
+        }
+        removeDiv('search_action_div');
+        return false;
+    }
+    catch (e)
+    {
+        alert(e.message);
+        return false;
+    }
+}
+/**
  *@brief change a document_modele
  */
-function stock_repo_change(p_dossier,r_id)
+function stock_repo_change(p_dossier, r_id)
 {
-    var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dmod_stock_repo"+"&r=
_id=3D"+r_id;
-    var nTop=3Dcalcy(posY);
-    var nLeft=3D"200px";
-    var str_style=3D"top:"+nTop+"px;left:"+nLeft+";width:50em;height:aut=
o";
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dmod_stock_rep=
o" + "&r_id=3D" + r_id;
+    var nTop =3D calcy(posY);
+    var nLeft =3D "200px";
+    var str_style =3D "top:" + nTop + "px;left:" + nLeft + ";width:50em;=
height:auto";
=20
     removeDiv('change_stock_repo_div');
     waiting_box();
     var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-					  remove_waiting_box();
-					  add_div({id:'change_stock_repo_div',style:str_style,cssclass:'inn=
er_box',drag:"1"});
-					  $('change_stock_repo_div').innerHTML=3Dreq.responseText;
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    add_div({id: 'change_stock_repo_div', style: str_sty=
le, cssclass: 'inner_box', drag: "1"});
+                    $('change_stock_repo_div').innerHTML =3D req.respons=
eText;
=20
-				      }
-				  }
-				  );
+                }
+            }
+    );
 }
-function stock_inv_detail(p_dossier,p_id)
+function stock_inv_detail(p_dossier, p_id)
 {
-	var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dview_mod_stock"+"&c_id=
=3D"+p_id+"&ctl=3Dview_mod_stock_div";
-    var nTop=3Dcalcy(posY);
-    var nLeft=3D"200px";
-    var str_style=3D"top:"+nTop+"px;left:"+nLeft+";width:75%;";
+    var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dview_mod_stoc=
k" + "&c_id=3D" + p_id + "&ctl=3Dview_mod_stock_div";
+    var nTop =3D calcy(posY);
+    var nLeft =3D "200px";
+    var str_style =3D "top:" + nTop + "px;left:" + nLeft + ";width:75%;"=
;
=20
     removeDiv('view_mod_stock_div');
     waiting_box();
     var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-					  remove_waiting_box();
-					  add_div({id:'view_mod_stock_div',style:str_style,cssclass:'inner_=
box',drag:"1"});
-					  $('view_mod_stock_div').innerHTML=3Dreq.responseText;
-					  req.responseText.evalScripts();
-				      }
-				  }
-				  );
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    add_div({id: 'view_mod_stock_div', style: str_style,=
 cssclass: 'inner_box', drag: "1"});
+                    $('view_mod_stock_div').innerHTML =3D req.responseTe=
xt;
+                    req.responseText.evalScripts();
+                }
+            }
+    );
 }
 function show_fin_chdate(obj_id)
 {
-	try
-	{
-		var ch=3D$(obj_id).options[$(obj_id).selectedIndex].value;
-		if (ch =3D=3D 2 ) {
-			$('chdate_ext').hide();
-			$('thdate').show();
-		}
-		if (ch =3D=3D 1 ) {
-			$('chdate_ext').show();
-			$('thdate').hide();
-		}
-		var nb=3D$('nb_item').value;
-		for (i=3D0;i<nb;i++) {
-			if ( $('tdchdate'+i)) {
-				if (ch =3D=3D 2) {
-					$('tdchdate'+i).show();
-				}
-				if (ch =3D=3D 1 ) {
-					$('tdchdate'+i).hide();
+    try
+    {
+        var ch =3D $(obj_id).options[$(obj_id).selectedIndex].value;
+        if (ch =3D=3D 2) {
+            $('chdate_ext').hide();
+            $('thdate').show();
+        }
+        if (ch =3D=3D 1) {
+            $('chdate_ext').show();
+            $('thdate').hide();
+        }
+        var nb =3D $('nb_item').value;
+        for (i =3D 0; i < nb; i++) {
+            if ($('tdchdate' + i)) {
+                if (ch =3D=3D 2) {
+                    $('tdchdate' + i).show();
+                }
+                if (ch =3D=3D 1) {
+                    $('tdchdate' + i).hide();
=20
-				}
-			}
-		}
-	}catch (e) {
-		alert(e.message);
-	}
+                }
+            }
+        }
+    } catch (e) {
+        alert(e.message);
+    }
 }
 /**
  * tab menu for the profile parameter
  */
 function profile_show(p_div)
 {
-	try{
-		var div=3D['profile_gen_div','profile_menu_div','profile_print_div','p=
rofile_gestion_div','profile_repo_div'];
-		for (var r =3D0;r<div.length;r++ ) {$(div[r]).hide();}
-		$(p_div).show();
-	} catch(e)
-	{
-		alert(e.message)
-	}
+    try {
+        var div =3D ['profile_gen_div', 'profile_menu_div', 'profile_pri=
nt_div', 'profile_gestion_div', 'profile_repo_div'];
+        for (var r =3D 0; r < div.length; r++) {
+            $(div[r]).hide();
+        }
+        $(p_div).show();
+    } catch (e)
+    {
+        alert(e.message)
+    }
 }
-function detail_category_show(p_div,p_dossier,p_id)
+function detail_category_show(p_div, p_dossier, p_id)
 {
-	$(p_div).show();
-	waiting_box();
-	$('detail_category_div').innerHTML=3D"";
-	var queryString=3D"gDossier=3D"+p_dossier+"&id=3D"+p_id+"&op=3Dfddetail=
";
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-						$('list_cat_div').hide();
-						$('detail_category_div').innerHTML=3Dreq.responseText;
-						$('detail_category_div').show();
-						req.responseText.evalScripts();
-				      }
-				  }
-				  );
+    $(p_div).show();
+    waiting_box();
+    $('detail_category_div').innerHTML =3D "";
+    var queryString =3D "gDossier=3D" + p_dossier + "&id=3D" + p_id + "&=
op=3Dfddetail";
+    var action =3D new Ajax.Request(
+            "ajax_misc.php",
+            {
+                method: 'get', parameters: queryString,
+                onFailure: ajax_misc_failure,
+                onSuccess: function(req) {
+                    remove_waiting_box();
+                    $('list_cat_div').hide();
+                    $('detail_category_div').innerHTML =3D req.responseT=
ext;
+                    $('detail_category_div').show();
+                    req.responseText.evalScripts();
+                }
+            }
+    );
 }
 /**
  * @brief check if the parameter is a valid a valid date or not, returns=
 true if it is valid otherwise
@@ -1659,19 +1780,19 @@
 function check_date(p_str_date)
 {
     var format =3D /^\d{2}\.\d{2}\.\d{4}$/;
-    if(!format.test(p_str_date)){
-	return false;
+    if (!format.test(p_str_date)) {
+        return false;
     }
-    else{
-	var date_temp =3D p_str_date.split('.');
-        var nMonth=3DparseFloat(date_temp[1])-1;
-	var ma_date =3D new Date(date_temp[2], nMonth, date_temp[0]);
-	if(ma_date.getFullYear()=3D=3Ddate_temp[2] && ma_date.getMonth()=3D=3Dn=
Month && ma_date.getDate()=3D=3Ddate_temp[0]){
-	    return true;
-	}
-	else{
-	    return false;
-	}
+    else {
+        var date_temp =3D p_str_date.split('.');
+        var nMonth =3D parseFloat(date_temp[1]) - 1;
+        var ma_date =3D new Date(date_temp[2], nMonth, date_temp[0]);
+        if (ma_date.getFullYear() =3D=3D date_temp[2] && ma_date.getMont=
h() =3D=3D nMonth && ma_date.getDate() =3D=3D date_temp[0]) {
+            return true;
+        }
+        else {
+            return false;
+        }
     }
=20
 }
@@ -1683,8 +1804,8 @@
  */
 function check_date_id(p_id_date)
 {
-	var str_date=3D$(p_id_date).value;
-	return check_date(str_date);
+    var str_date =3D $(p_id_date).value;
+    return check_date(str_date);
 }
 /**
  *
@@ -1692,46 +1813,46 @@
  * @param dossier is the folder
  * @param modify : show the modify button values : 0 for no 1 for yes
  */
-function view_action(ag_id,dossier,modify)
+function view_action(ag_id, dossier, modify)
 {
-	waiting_box();
-	layer++;
-	id =3D 'action' + layer;
+    waiting_box();
+    layer++;
+    id =3D 'action' + layer;
=20
-	querystring =3D 'gDossier=3D' + dossier + '&op=3Dvw_action&ag_id=3D' + =
ag_id + '&div=3D' + id+'&mod=3D'+modify;
-	var action =3D new Ajax.Request(
-			"ajax_misc.php",
-			{
-				method: 'get',
-				parameters: querystring,
-				onFailure: error_box,
-				onSuccess: function(req) {
-					try {
-						remove_waiting_box();
-                                                var answer=3Dreq.respons=
eXML;
-                                                var html=3Danswer.getEle=
mentsByTagName('code');
-                                                if ( html.length =3D=3D =
0 )
-                                                {
-                                                    var rec=3Dreq.respon=
seText;
-                                                    alert ('erreur :'+re=
c);
-                                                }
-                                                var code_html=3DgetNodeT=
ext(html[0]);
-                                                code_html=3Dunescape_xml=
(code_html);
-						var pos =3D fixed_position(0, 50) + ";width:90%;left:5%;";
-						add_div({
-							id: id,
-							drag: 1,
-							cssclass: "inner_box",
-							style: pos
-						});
-						$(id).innerHTML =3D code_html;
-						compute_all_ledger();
-					} catch (e) {
-						alert('view_action'+e.message);
-					}
-				}
-			}
-	);
+    querystring =3D 'gDossier=3D' + dossier + '&op=3Dvw_action&ag_id=3D'=
 + ag_id + '&div=3D' + id + '&mod=3D' + modify;
+    var action =3D new Ajax.Request(
+            "ajax_misc.php",
+            {
+                method: 'get',
+                parameters: querystring,
+                onFailure: error_box,
+                onSuccess: function(req) {
+                    try {
+                        remove_waiting_box();
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D req.responseText;
+                            alert('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        var pos =3D fixed_position(0, 50) + ";width:90%;=
left:5%;";
+                        add_div({
+                            id: id,
+                            drag: 1,
+                            cssclass: "inner_box",
+                            style: pos
+                        });
+                        $(id).innerHTML =3D code_html;
+                        compute_all_ledger();
+                    } catch (e) {
+                        alert('view_action' + e.message);
+                    }
+                }
+            }
+    );
 }
 /**
  * @brief filter quickly a table
@@ -1742,42 +1863,44 @@
  * @returns nothing
  * @see HtmlInput::filter_table
  */
-function filter_table(phrase, _id, colnr,start_row) {
-	$('info_div').innerHTML=3D"Un instant";
-	$('info_div').style.display=3D"block";
-	var words =3D $(phrase).value.toLowerCase();
-	var table =3D document.getElementById(_id);
+function filter_table(phrase, _id, colnr, start_row) {
+    $('info_div').innerHTML =3D "Un instant";
+    $('info_div').style.display =3D "block";
+    var words =3D $(phrase).value.toLowerCase();
+    var table =3D document.getElementById(_id);
=20
-	// if colnr contains a comma then check several columns
-	var aCol =3D new Array();
-	if (colnr.indexOf(',') >=3D 0) {
-		aCol =3D colnr.split(',');
-	} else {
-		aCol[0] =3D colnr;
-	}
-	var ele;
+    // if colnr contains a comma then check several columns
+    var aCol =3D new Array();
+    if (colnr.indexOf(',') >=3D 0) {
+        aCol =3D colnr.split(',');
+    } else {
+        aCol[0] =3D colnr;
+    }
+    var ele;
=20
-	for (var r =3D start_row; r < table.rows.length; r++) {
-		var found=3D0;
-		for (var col =3D0;col < aCol.length;col++)
-		{
-			var idx=3DaCol[col];
-			if (table.rows[r].cells[idx])
-				 {
-					ele =3D table.rows[r].cells[idx].innerHTML.replace(/<[^>]+>/g, "");
-						//var displayStyle =3D 'none';
-					if (ele.toLowerCase().indexOf(words) >=3D 0){ found=3D1; }
-				 }
+    for (var r =3D start_row; r < table.rows.length; r++) {
+        var found =3D 0;
+        for (var col =3D 0; col < aCol.length; col++)
+        {
+            var idx =3D aCol[col];
+            if (table.rows[r].cells[idx])
+            {
+                ele =3D table.rows[r].cells[idx].innerHTML.replace(/<[^>=
]+>/g, "");
+                //var displayStyle =3D 'none';
+                if (ele.toLowerCase().indexOf(words) >=3D 0) {
+                    found =3D 1;
+                }
+            }
=20
-		}
-		if (found =3D=3D 1 ){
-			table.rows[r].style.display =3D '';
-		} else {
-			table.rows[r].style.display =3D 'none';
-		}
-		$('info_div').style.display=3D"none";
-		$('info_div').innerHTML=3D"";
-	}
+        }
+        if (found =3D=3D 1) {
+            table.rows[r].style.display =3D '';
+        } else {
+            table.rows[r].style.display =3D 'none';
+        }
+        $('info_div').style.display =3D "none";
+        $('info_div').innerHTML =3D "";
+    }
 }
 /**
  * @brief
@@ -1785,31 +1908,31 @@
  */
 function display_task(p_id)
 {
-	new Draggable(p_id,{starteffect:function()
-                                  {
-			new Effect.Highlight(obj.id,{scroll:window,queue:'end'});
-                           }}
-                         );
-    $(p_id).style.top=3DposY;
-    $(p_id).style.left=3DposX;
-	$(p_id).style.display=3D'block';
+    new Draggable(p_id, {starteffect: function()
+        {
+            new Effect.Highlight(obj.id, {scroll: window, queue: 'end'})=
;
+        }}
+    );
+    $(p_id).style.top =3D posY;
+    $(p_id).style.left =3D posX;
+    $(p_id).style.display =3D 'block';
=20
 }
 /**
  * @brief
  * Set a message in the info
  */
-function info_message (p_message)
+function info_message(p_message)
 {
-		$('info_div').innerHTML=3Dp_message;
-		$('info_div').style.display=3D"block";
+    $('info_div').innerHTML =3D p_message;
+    $('info_div').style.display =3D "block";
 }
 /**
  * @brief hide the info box
  */
 function info_hide()
 {
-		$('info_div').style.display=3D"none";
+    $('info_div').style.display =3D "none";
 }
 /**
  * Show the navigator in a internal window
@@ -1819,33 +1942,33 @@
     try {
         waiting_box();
         removeDiv('navi_div')
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dnavigator";
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                add_div({id:'navi_div',s=
tyle:'top:2em;left:2em;width:90%',cssclass:'inner_box'});
-						$('navi_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                    sorttable.makeSortab=
le($("navi_tb"));
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dnavigator=
";
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        add_div({id: 'navi_div', style: 'top:2em;left:2e=
m;width:90%', cssclass: 'inner_box'});
+                        $('navi_div').innerHTML =3D req.responseText;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                            sorttable.makeSortable($("navi_tb"));
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief Display an internal windows to set the user's preference
@@ -1855,32 +1978,32 @@
     try {
         waiting_box();
         removeDiv('preference_div')
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dpreference";
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                add_div({id:'preference_=
div',drag:1});
-						$('preference_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dpreferenc=
e";
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        add_div({id: 'preference_div', drag: 1});
+                        $('preference_div').innerHTML =3D req.responseTe=
xt;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief Display user's bookmark
@@ -1890,34 +2013,34 @@
     try {
         waiting_box();
         removeDiv('bookmark_div');
-        var param=3Dwindow.location.search;
-        param=3Dparam.gsub('?','');
-        var queryString=3D"gDossier=3D"+p_dossier+"&op=3Dbookmark&"+para=
m;
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                add_div({id:'bookmark_di=
v',cssclass:'inner_box',drag:1});
-						$('bookmark_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var param =3D window.location.search;
+        param =3D param.gsub('?', '');
+        var queryString =3D "gDossier=3D" + p_dossier + "&op=3Dbookmark&=
" + param;
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        add_div({id: 'bookmark_div', cssclass: 'inner_bo=
x', drag: 1});
+                        $('bookmark_div').innerHTML =3D req.responseText=
;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief save the bookmark
@@ -1925,33 +2048,33 @@
 function save_bookmark() {
     try {
         waiting_box();
-        var queryString=3D"op=3Dbookmark&"+$("bookmark_frm").serialize()=
;
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-                                                // removeDiv('bookmark_d=
iv');
-                                                //=20
-						$('bookmark_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "op=3Dbookmark&" + $("bookmark_frm").seriali=
ze();
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        // removeDiv('bookmark_div');
+                        //=20
+                        $('bookmark_div').innerHTML =3D req.responseText=
;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         info_message(e.getMessage);
     }
-   =20
+
 }
 /**
  * @brief remove selected bookmark
@@ -1959,31 +2082,31 @@
 function remove_bookmark() {
     try {
         waiting_box();
-        var queryString=3D"op=3Dbookmark&"+$("bookmark_del_frm").seriali=
ze();
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						remove_waiting_box();
-						$('bookmark_div').innerHTML=3Dreq.responseText;
-                                                try
-                                                {
-                                                    req.responseText.eva=
lScripts();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "op=3Dbookmark&" + $("bookmark_del_frm").ser=
ialize();
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        $('bookmark_div').innerHTML =3D req.responseText=
;
+                        try
+                        {
+                            req.responseText.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
-   =20
+
 }
 /**
  *@brief display the error message into the div error_content_div (inclu=
ded into error_div)
@@ -1992,47 +2115,47 @@
  */
 function error_message(message)
 {
-    $('error_content_div').innerHTML=3Dmessage;
-    $('error_div').style.visibility=3D'visible';
+    $('error_content_div').innerHTML =3D message;
+    $('error_div').style.visibility =3D 'visible';
 }
 /**
  * @brief show the detail of a tag and propose to save it
  */
-function show_tag(p_dossier,p_ac,p_tag_id,p_post)
+function show_tag(p_dossier, p_ac, p_tag_id, p_post)
 {
     try {
         waiting_box();
-        var queryString=3D"op=3Dtag_detail&tag=3D"+p_tag_id+"&gDossier=3D=
"+p_dossier+"&ac=3D"+p_ac+'&form=3D'+p_post;
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get', parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req){
-						var answer=3Dreq.responseXML;
-                                                var html=3Danswer.getEle=
mentsByTagName('code');
-                                                if ( html.length =3D=3D =
0 )
-                                                {
-                                                    var rec=3Dreq.respon=
seText;
-                                                    alert ('erreur :'+re=
c);
-                                                }
-                                                var code_html=3DgetNodeT=
ext(html[0]);
-                                                code_html=3Dunescape_xml=
(code_html);
-						remove_waiting_box();
-                                                add_div({id:'tag_div',cs=
sclass:'inner_box',drag:1});
-						$('tag_div').innerHTML=3Dcode_html;
-                                                try
-                                                {
-                                                    code_html.evalScript=
s();
-                                                }
-                                                catch(e)
-                                                {
-                                                    alert("answer_box Im=
possible executer script de la reponse\n"+e.message);
-                                                }
+        var queryString =3D "op=3Dtag_detail&tag=3D" + p_tag_id + "&gDos=
sier=3D" + p_dossier + "&ac=3D" + p_ac + '&form=3D' + p_post;
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D req.responseText;
+                            alert('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        add_div({id: 'tag_div', cssclass: 'inner_box', d=
rag: 1});
+                        $('tag_div').innerHTML =3D code_html;
+                        try
+                        {
+                            code_html.evalScripts();
+                        }
+                        catch (e)
+                        {
+                            alert("answer_box Impossible executer script=
 de la reponse\n" + e.message);
+                        }
=20
-				      }
-				  }
-				  );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2045,25 +2168,25 @@
 {
     try {
         waiting_box();
-        var queryString=3D"op=3Dtag_save&"+$("tag_detail_frm").serialize=
();
-	var action =3D new Ajax.Request(
-				  "ajax_misc.php" ,
-				  {
-				      method:'get',=20
-                                      parameters:queryString,
-				      onFailure:ajax_misc_failure,
-				      onSuccess:function(req,j){
-                                              remove_waiting_box();
-                                              removeDiv('tag_div');
-				      }
-				  }
-				  );
+        var queryString =3D "op=3Dtag_save&" + $("tag_detail_frm").seria=
lize();
+        var action =3D new Ajax.Request(
+                "ajax_misc.php",
+                {
+                    method: 'get',
+                    parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        remove_waiting_box();
+                        removeDiv('tag_div');
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
         return false;
     }
-   return false;
-   =20
+    return false;
+
 }
 /**
  * Show a list of tag which can be added to the current followup documen=
t
@@ -2071,34 +2194,34 @@
  * @param {type} ag_id
  * @returns {undefined}
  */
-function action_tag_select(p_dossier,ag_id)
+function action_tag_select(p_dossier, ag_id)
 {
     try {
         waiting_box();
-        var queryString=3D"ag_id=3D"+ag_id+"&op=3Dtag_list&gDossier=3D"+=
p_dossier;
+        var queryString =3D "ag_id=3D" + ag_id + "&op=3Dtag_list&gDossie=
r=3D" + p_dossier;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    add_div({id:'tag_div=
',style:'width:40%;',cssclass:'inner_box',drag:1});
-                                                    $('tag_div').style.t=
op=3DposY-70;
-                                                    $('tag_div').style.l=
eft=3DposX-70;
-                                                    remove_waiting_box()=
;
-                                                    $('tag_div').innerHT=
ML=3Dcode_html;
-                                          }
-                                      }
-                                      );
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        add_div({id: 'tag_div', style: 'width:40%;', css=
class: 'inner_box', drag: 1});
+                        $('tag_div').style.top =3D posY - 70;
+                        $('tag_div').style.left =3D posX - 70;
+                        remove_waiting_box();
+                        $('tag_div').innerHTML =3D code_html;
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2109,32 +2232,32 @@
  * @param {type} ag_id
  * @returns {undefined}
  */
-function action_tag_add(p_dossier,ag_id,t_id)
+function action_tag_add(p_dossier, ag_id, t_id)
 {
     try {
         waiting_box();
-        var queryString=3D"t_id=3D"+t_id+"&ag_id=3D"+ag_id+"&op=3Dtag_ad=
d&gDossier=3D"+p_dossier;
+        var queryString =3D "t_id=3D" + t_id + "&ag_id=3D" + ag_id + "&o=
p=3Dtag_add&gDossier=3D" + p_dossier;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    $('action_tag_td').i=
nnerHTML=3Dcode_html;
-                                                    removeDiv('tag_div')=
;
-                                          }
-                                      }
-                                      );
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        $('action_tag_td').innerHTML =3D code_html;
+                        removeDiv('tag_div');
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2145,33 +2268,34 @@
  * @param {type} ag_id
  * @returns {undefined}
  */
-function action_tag_remove(p_dossier,ag_id,t_id)
+function action_tag_remove(p_dossier, ag_id, t_id)
 {
-    if ( confirm ('Enlevez ce tags ?')=3D=3D false ) return;
+    if (confirm('Enlevez ce tags ?') =3D=3D false)
+        return;
     try {
         waiting_box();
-        var queryString=3D"t_id=3D"+t_id+"&ag_id=3D"+ag_id+"&op=3Dtag_re=
move&gDossier=3D"+p_dossier;
+        var queryString =3D "t_id=3D" + t_id + "&ag_id=3D" + ag_id + "&o=
p=3Dtag_remove&gDossier=3D" + p_dossier;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    $('action_tag_td').i=
nnerHTML=3Dcode_html;
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        $('action_tag_td').innerHTML =3D code_html;
=20
-                                          }
-                                      }
-                                      );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2184,36 +2308,36 @@
  * @param {type} p_dossier
  * @returns {undefined}
  */
-function search_display_tag(p_dossier,p_prefix)
+function search_display_tag(p_dossier, p_prefix)
 {
     try {
         waiting_box();
-        var queryString=3D"op=3Dsearch_display_tag&gDossier=3D"+p_dossie=
r+"&pref=3D"+p_prefix;
+        var queryString =3D "op=3Dsearch_display_tag&gDossier=3D" + p_do=
ssier + "&pref=3D" + p_prefix;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('code');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    add_div({id:p_prefix=
+'tag_div',style:'width:40%',cssclass:'inner_box',drag:1});
-                                                    $(p_prefix+'tag_div'=
).style.top=3DposY-80;
-                                                    $(p_prefix+'tag_div'=
).style.left=3DposX-200;
-                                                    remove_waiting_box()=
;
-                                                    $(p_prefix+'tag_div'=
).innerHTML=3Dcode_html;
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        add_div({id: p_prefix + 'tag_div', style: 'width=
:40%', cssclass: 'inner_box', drag: 1});
+                        $(p_prefix + 'tag_div').style.top =3D posY - 80;
+                        $(p_prefix + 'tag_div').style.left =3D posX - 20=
0;
+                        remove_waiting_box();
+                        $(p_prefix + 'tag_div').innerHTML =3D code_html;
=20
-                                          }
-                                      }
-                                      );
+                    }
+                }
+        );
     } catch (e) {
         error_message(e.getMessage);
     }
@@ -2224,81 +2348,83 @@
  * @param {type} p_dossier
  * @param {type} p_tag_id
  */
-function search_add_tag(p_dossier,p_tag_id,p_prefix)
+function search_add_tag(p_dossier, p_tag_id, p_prefix)
 {
     try {
-        var clear_button=3D0;
-        if (  tag_choose =3D=3D '' && p_prefix=3D=3D'search') {
-            tag_choose=3D$(p_prefix+'tag_choose_td').innerHTML ;
-            clear_button=3D1;
+        var clear_button =3D 0;
+        if (tag_choose =3D=3D '' && p_prefix =3D=3D 'search') {
+            tag_choose =3D $(p_prefix + 'tag_choose_td').innerHTML;
+            clear_button =3D 1;
         }
         waiting_box();
-        var queryString=3D"op=3Dsearch_add_tag&gDossier=3D"+p_dossier+"&=
id=3D"+p_tag_id+"&clear=3D"+clear_button+'&pref=3D'+p_prefix;
+        var queryString =3D "op=3Dsearch_add_tag&gDossier=3D" + p_dossie=
r + "&id=3D" + p_tag_id + "&clear=3D" + clear_button + '&pref=3D' + p_pre=
fix;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('html');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    remove_waiting_box()=
;
-                                                    $(p_prefix+'tag_choo=
se_td').innerHTML=3D$(p_prefix+'tag_choose_td').innerHTML+code_html;
-                                                    removeDiv(p_prefix+'=
tag_div');
-                                          }
-                                      }
-                                      );
-    }catch (e) {
-         error_message(e.getMessage);
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('html')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        remove_waiting_box();
+                        $(p_prefix + 'tag_choose_td').innerHTML =3D $(p_=
prefix + 'tag_choose_td').innerHTML + code_html;
+                        removeDiv(p_prefix + 'tag_div');
+                    }
+                }
+        );
+    } catch (e) {
+        error_message(e.getMessage);
     }
 }
 /**
  * Clear the tags in the cell tag_choose_td of the search screen
  * @returns {undefined}
  */
-function search_clear_tag(p_dossier,p_prefix)
+function search_clear_tag(p_dossier, p_prefix)
 {
-    if ( p_prefix !=3D'search') {
-        $(p_prefix+'tag_choose_td').innerHTML=3D"";
+    if (p_prefix !=3D 'search') {
+        $(p_prefix + 'tag_choose_td').innerHTML =3D "";
         return;
     }
     try {
-        var queryString=3D"op=3Dsearch_clear_tag&gDossier=3D"+p_dossier+=
"&pref=3D"+p_prefix;
+        var queryString =3D "op=3Dsearch_clear_tag&gDossier=3D" + p_doss=
ier + "&pref=3D" + p_prefix;
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
String,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                  var answer=3Dreq.respo=
nseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('html');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                    $(p_prefix+'tag_choo=
se_td').innerHTML=3Dcode_html;
-                                                    tag_choose=3D"";
-                                          }
-                                      }
-                                      );
-    }catch (e) {
-         error_message(e.getMessage);
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: queryString,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('html')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        $(p_prefix + 'tag_choose_td').innerHTML =3D code=
_html;
+                        tag_choose =3D "";
+                    }
+                }
+        );
+    } catch (e) {
+        error_message(e.getMessage);
     }
 }
 function action_show_checkbox()
 {
-    var a=3Ddocument.getElementsByName('ag_id_td');
-    for (var i=3D0;i<a.length;i++) {    a[i].style.display=3D'block';   =
 }
+    var a =3D document.getElementsByName('ag_id_td');
+    for (var i =3D 0; i < a.length; i++) {
+        a[i].style.display =3D 'block';
+    }
 }
 /**
  *=20
@@ -2312,81 +2438,91 @@
 function calendar_zoom(obj)
 {
     try {
-       =20
-        var query=3D"";
-        query=3D"op=3Dcalendar_zoom&gDossier=3D"+obj.gDossier+"&in=3D"+$=
(obj.invalue).value+'&out=3D'+obj.outdiv;
+
+        var query =3D "";
+        query =3D "op=3Dcalendar_zoom&gDossier=3D" + obj.gDossier + "&in=
=3D" + $(obj.invalue).value + '&out=3D' + obj.outdiv;
         waiting_box();
         var action =3D new Ajax.Request(
-                                      "ajax_misc.php" ,
-                                      {
-                                          method:'get', parameters:query=
,
-                                          onFailure:ajax_misc_failure,
-                                          onSuccess:function(req,j){
-                                                    var answer=3Dreq.res=
ponseXML;
-                                                    var html=3Danswer.ge=
tElementsByTagName('html');
-                                                    if ( html.length =3D=
=3D 0 )
-                                                    {
-                                                        var rec=3Dunesca=
pe_xml(req.responseText);
-                                                        error_message ('=
erreur :'+rec);
-                                                    }
-                                                    var code_html=3DgetN=
odeText(html[0]);
-                                                    code_html=3Dunescape=
_xml(code_html);
-                                                   =20
-                                                    // if the target doe=
sn't exist=20
-                                                    // then create it
-                                                    if ( obj.outdiv =3D=3D=
 undefined ) {
-                                                        obj.outdiv=3D'ca=
lendar_zoom_div';
-                                                    }
-                                                    if (   $(obj.outdiv)=
 =3D=3D undefined) {
-                                                        var str_style=3D=
fixed_position(0,20);
-                                                        add_div({id:obj.=
outdiv,style:'margin-left:3%;width:94%;height:94%;'+str_style,cssclass:"i=
nner_box",drag:1});
-                                                    }
-                                                    remove_waiting_box()=
;
-                                                    $(obj.outdiv).innerH=
TML=3Dcode_html;
-                                                    $(obj.outdiv).show()=
;
-                                          }
-                                      }
-                                      );
-    }catch (e) {
-         error_message('calendar_zoom '+e.getMessage);
+                "ajax_misc.php",
+                {
+                    method: 'get', parameters: query,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req, j) {
+                        var answer =3D req.responseXML;
+                        var html =3D answer.getElementsByTagName('html')=
;
+                        if (html.length =3D=3D 0)
+                        {
+                            var rec =3D unescape_xml(req.responseText);
+                            error_message('erreur :' + rec);
+                        }
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+
+                        // if the target doesn't exist=20
+                        // then create it
+                        if (obj.outdiv =3D=3D undefined) {
+                            obj.outdiv =3D 'calendar_zoom_div';
+                        }
+                        if ($(obj.outdiv) =3D=3D undefined) {
+                            var str_style =3D fixed_position(0, 20);
+                            add_div({id: obj.outdiv, style: 'margin-left=
:3%;width:94%;height:94%;' + str_style, cssclass: "inner_box", drag: 1});
+                        }
+                        remove_waiting_box();
+                        $(obj.outdiv).innerHTML =3D code_html;
+                        $(obj.outdiv).show();
+                    }
+                }
+        );
+    } catch (e) {
+        error_message('calendar_zoom ' + e.getMessage);
     }
- =20
-   =20
+
+
 }
 /**
  * @brief add a line in the form for the stock
  */
 function stock_add_row()
 {
-	try{
-    style=3D'class=3D"input_text"';
-    var mytable=3Dg("stock_tb").tBodies[0];
-    var ofirstRow=3Dmytable.rows[1];
-    var line=3Dmytable.rows.length;
-    var nCell=3Dmytable.rows[1].cells.length;
-    var row=3Dmytable.insertRow(line);
-    var nb=3Dg("row");
-    for (var e=3D0;e<nCell;e++)
-    {
-        var newCell=3Drow.insertCell(e);
-        if (mytable.rows[1].cells[e].hasClassName('num') ) { newCell.add=
ClassName("num");}
-       =20
-        var tt=3DofirstRow.cells[e].innerHTML;
-        var new_tt=3Dtt.replace(/sg_code0/g,"sg_code"+nb.value);
-        new_tt=3Dnew_tt.replace(/sg_quantity0/g,"sg_quantity"+nb.value);
-        new_tt=3Dnew_tt.replace(/label0/g,"label"+nb.value);
-        newCell.innerHTML=3Dnew_tt;
-        new_tt.evalScripts();
-    }
+    try {
+        style =3D 'class=3D"input_text"';
+        var mytable =3D g("stock_tb").tBodies[0];
+        var ofirstRow =3D mytable.rows[1];
+        var line =3D mytable.rows.length;
+        var nCell =3D mytable.rows[1].cells.length;
+        var row =3D mytable.insertRow(line);
+        var nb =3D g("row");
+        for (var e =3D 0; e < nCell; e++)
+        {
+            var newCell =3D row.insertCell(e);
+            if (mytable.rows[1].cells[e].hasClassName('num')) {
+                newCell.addClassName("num");
+            }
=20
-    g("sg_code"+nb.value).innerHTML=3D'&nbsp;';
-    g("sg_code"+nb.value).value=3D'';
-    g("label"+nb.value).innerHTML=3D'';
-    g("sg_quantity"+nb.value).value=3D'0';
+            var tt =3D ofirstRow.cells[e].innerHTML;
+            var new_tt =3D tt.replace(/sg_code0/g, "sg_code" + nb.value)=
;
+            new_tt =3D new_tt.replace(/sg_quantity0/g, "sg_quantity" + n=
b.value);
+            new_tt =3D new_tt.replace(/label0/g, "label" + nb.value);
+            newCell.innerHTML =3D new_tt;
+            new_tt.evalScripts();
+        }
=20
-    nb.value++;
+        g("sg_code" + nb.value).innerHTML =3D '&nbsp;';
+        g("sg_code" + nb.value).value =3D '';
+        g("label" + nb.value).innerHTML =3D '';
+        g("sg_quantity" + nb.value).value =3D '0';
=20
-    new_tt.evalScripts();
-	} catch(e) {alert(e.message);}
+        nb.value++;
=20
+        new_tt.evalScripts();
+    } catch (e) {
+        alert(e.message);
+    }
+
+}
+function show_description(p_id)
+{
+    $('print_desc'+p_id).hide();
+    $('input_desc'+p_id).show();
+   =20
 }
\ No newline at end of file

Modified: phpcompta/trunk/html/show_document.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/show_document.php	2013-12-06 13:40:41 UTC (rev 5=
575)
+++ phpcompta/trunk/html/show_document.php	2013-12-06 14:41:27 UTC (rev 5=
576)
@@ -61,6 +61,19 @@
 	header("Content-type: text/html; charset: utf8", true);
 	print $json;
 }
+/* update the description of the document */
+if ( $action =3D=3D "upd_doc")=20
+{
+    	if ($g_user->check_action(VIEWDOC) =3D=3D 1)
+	{
+            $doc =3D new Document($cn, $_REQUEST['d_id']);
+            $doc->get();
+            if ( $g_user->can_write_action($doc->ag_id))
+		// retrieve the document
+		$doc->update_description(strip_tags ($_REQUEST['value']));
+	}
+
+}
 /* remove the operation from action_gestion_operation */
 if ($action =3D=3D 'rmop')
 {

Modified: phpcompta/trunk/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style.css	2013-12-06 13:40:41 UTC (rev 5575)
+++ phpcompta/trunk/html/style.css	2013-12-06 14:41:27 UTC (rev 5576)
@@ -960,16 +960,6 @@
=20
=20
 }
-div#div_jrn{
-    position:absolute;
-    border:1px solid black;
-    top:15%;left:100;
-    visibility:hidden;
-    z-index:2;
-    width:50em;
-    background-color:#EDF3FF;
-
-}
 div#div_cat{
     position:absolute;
     border:1px solid black;
@@ -1017,7 +1007,6 @@
     color:blue;
     font-size:2.74em;
     margin-right:30%;
-    float: right;
 }
 tr.footer{
     font-size:0.87em;
@@ -1034,8 +1023,8 @@
 {
     float: right;
     margin-right:150;
+    width:50%;
=20
-
 }
 #predef_form {
     margin-left:20%;
@@ -1077,9 +1066,7 @@
     text-align:center;
 }
 div#div_jrnsearch_op{
-
     border:1px solid black;
-    display:none;
     width:50em;
     background-color:#EDF3FF;
     position:absolute;


Property changes on: phpcompta/trunk/include
___________________________________________________________________
Name: svn:ignore
   - .constant.php.swp
.action.inc.php.swp

   + .constant.php.swp
.action.inc.php.swp
.directory


Modified: phpcompta/trunk/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ac_common.php	2013-12-06 13:40:41 UTC (rev 55=
75)
+++ phpcompta/trunk/include/ac_common.php	2013-12-06 14:41:27 UTC (rev 55=
76)
@@ -53,9 +53,9 @@
     return '<b>' . htmlspecialchars($p_string) . '</b>';
 }
=20
-function th($p_string, $p_extra=3D'')
+function th($p_string, $p_extra=3D'',$raw=3D'')
 {
-    return '<th  ' . $p_extra . '>' . htmlspecialchars($p_string) . '</t=
h>';
+    return '<th  ' . $p_extra . '>' . htmlspecialchars($p_string).$raw .=
 '</th>';
 }
=20
 function h2info($p_string)

Copied: phpcompta/trunk/include/ajax_ledger_show.php (from rev 5575, phpc=
ompta/tags/rel670/include/ajax_ledger_show.php)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ajax_ledger_show.php	                        =
(rev 0)
+++ phpcompta/trunk/include/ajax_ledger_show.php	2013-12-06 14:41:27 UTC =
(rev 5576)
@@ -0,0 +1,32 @@
+<?php
+/**
+ * @brief
+ * Show a div for selecting ledger
+ * return a html code for creating a window
+ * parameter=20
+ *   - type=20
+ *   - div
+ *   - nbjrn
+ *   - r_jrn[]
+ */
+// require_once '.php';
+require_once 'class_acc_ledger.php';
+require_once 'class_html_input.php';
+if ( ! isset ($r_jrn)) { $r_jrn=3Dnull;}
+$ctl=3D'div_jrn'.$div;
+ob_start();
+echo HtmlInput::select_ledger($type,$r_jrn, $div);
+
+$response =3D ob_get_clean();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl>$ctl</ctl>
+<code>$html</code>
+</data>
+EOF;
+exit();
+?>   =20
\ No newline at end of file

Modified: phpcompta/trunk/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_ledger.php	2013-12-06 13:40:41 UTC =
(rev 5575)
+++ phpcompta/trunk/include/class_acc_ledger.php	2013-12-06 14:41:27 UTC =
(rev 5576)
@@ -2421,13 +2421,30 @@
=20
 	function search_form($p_type, $all_type_ledger =3D 1, $div =3D "")
 	{
-		global $g_user;
-		$r =3D '';
-		/* security : filter ledger on user */
-		$filter_ledger =3D $g_user->get_ledger($p_type, 3);
-
-		$selected =3D (isset($_REQUEST['r_jrn' . $div])) ? $_REQUEST['r_jrn' .=
 $div] : null;
-		$f_ledger =3D HtmlInput::select_ledger($filter_ledger, $selected, $div=
);
+            global $g_user;
+            $r=3D"";
+                $bledger_param=3D  json_encode(array(
+                    'dossier'=3D>$_REQUEST['gDossier'],
+                    'type'=3D>$p_type,
+                    'all_type'=3D>$all_type_ledger,
+                    'div'=3D>$div
+                    ));
+               =20
+                $bledger_param=3D  str_replace('"', "'", $bledger_param)=
;
+                $bledger=3Dnew ISmallButton('l');
+                $bledger->label=3D"choix des journaux";
+                $bledger->javascript=3D" show_ledger_choice($bledger_par=
am)";
+                $f_ledger=3D$bledger->input();
+                $hid_jrn=3D"";
+                if ( isset ($_REQUEST[$div.'nb_jrn']) ){
+                    for ($i=3D0;$i < $_REQUEST[$div.'nb_jrn'];$i++) {
+                        if ( isset ($_REQUEST[$div."r_jrn"][$i]))
+                            $hid_jrn.=3DHtmlInput::hidden($div.'r_jrn['.=
$i.']',$_REQUEST[$div."r_jrn"][$i]);
+                    }
+                    $hid_jrn.=3DHtmlInput::hidden($div.'nb_jrn',$_REQUES=
T[$div.'nb_jrn']);
+                } else {
+                    $hid_jrn=3DHtmlInput::hidden($div.'nb_jrn',0);
+                }
                 /* Compute date for exercice */
                 $period =3D $g_user->get_periode();
                 $per =3D new Periode($this->db, $period);
@@ -2618,7 +2635,13 @@
 		if (!empty($p_array))
 			extract($p_array);
=20
-		$r_jrn =3D (isset($r_jrn)) ? $r_jrn : -1;
+                if (isset($op) )=20
+                    $r_jrn =3D (isset(${$op."r_jrn"})) ? ${$op."r_jrn"} =
: -1;
+                else
+                {
+                    $r_jrn =3D (isset($r_jrn)) ? $r_jrn : -1;
+                   =20
+                }
=20
 		/* if no variable are set then give them a default
 		 * value */
@@ -2678,12 +2701,13 @@
 			$aLedger =3D $g_user->get_ledger($p_action, 3);
 			$fil_ledger =3D '';
 			$sp =3D '';
-			for ($i =3D 0; $i < count($aLedger); $i++)
+			for ($i =3D 0; $i < count($r_jrn); $i++)
 			{
-				if (isset($r_jrn[$i]))
+                                if (isset($r_jrn[$i]) )
 				{
-					$fil_ledger.=3D$sp . $aLedger[$i]['jrn_def_id'];
-					$sp =3D ',';
+                                    $a=3D$r_jrn[$i];
+  				    $fil_ledger.=3D$sp . $a;
+                                    $sp =3D ',';
 				}
 			}
 			$fil_ledger =3D ' jrn_def_id in (' . $fil_ledger . ')';
@@ -3317,6 +3341,10 @@
=20
 		$min_row =3D new INum("min_row",$this->jrn_deb_max_line);
 		$min_row->prec=3D0;
+               =20
+                $description=3Dnew ITextarea('p_description');
+                $description->value=3D$this->jrn_def_description;
+                $str_description=3D$description->input();
=20
 		/* Load the card */
 		$card =3D $this->get_fiche_def();
@@ -3413,6 +3441,7 @@
 		$this->jrn_def_pj_pref =3D $jrn_def_pj_pref;
 		$this->jrn_def_fiche_deb =3D (isset($FICHEDEB)) ? join($FICHEDEB, ',')=
 : "";
 		$this->jrn_deb_max_line=3D($min_row<1)?1:$min_row;
+		$this->jrn_def_description=3D$p_description;
 		switch ($this->jrn_def_type)
 		{
 			case 'ACH':
@@ -3509,6 +3538,9 @@
 		$pj_seq =3D '';
 		$last_seq =3D 0;
 		$new =3D 1;
+                $description=3Dnew ITextarea('p_description');
+                $description->value=3D"";
+                $str_description=3D$description->input();
 		/* bank card */
 		$qcode_bank =3D '';
 		/* Numbering (only FIN) */
@@ -3541,7 +3573,7 @@
 		$this->jrn_def_fiche_deb =3D (isset($FICHEDEB)) ? join($FICHEDEB, ',')=
 : "";
 		$this->jrn_deb_max_line=3D$min_row;
 		$this->jrn_def_code =3D sprintf("%s%02d", trim(substr($this->jrn_def_t=
ype, 0, 1)), Acc_Ledger::next_number($this->db, $this->jrn_def_type));
-
+                $this->jrn_def_description=3D$p_description;
 		switch ($this->jrn_def_type)
 		{
 			case 'ACH':

Modified: phpcompta/trunk/include/class_acc_ledger_purchase.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_ledger_purchase.php	2013-12-06 13:4=
0:41 UTC (rev 5575)
+++ phpcompta/trunk/include/class_acc_ledger_purchase.php	2013-12-06 14:4=
1:27 UTC (rev 5576)
@@ -474,7 +474,10 @@
                 // always save quantity but in withStock we can find
                 // what card need a stock management
                 if ( $g_parameter->MY_STOCK=3D'Y'&& isset ($repo))
-                    Stock_Goods::insert_goods($this->db,array('j_id'=3D>=
$j_id,'goods'=3D>${'e_march'.$i},'quant'=3D>$nNeg*${'e_quant'.$i},'dir'=3D=
>'d','repo'=3D>$repo)) ;
+                {
+                    $dir=3D(${'e_quant'.$i} < 0 ) ? 'c':'d';
+                    Stock_Goods::insert_goods($this->db,array('j_id'=3D>=
$j_id,'goods'=3D>${'e_march'.$i},'quant'=3D>$nNeg*${'e_quant'.$i},'dir'=3D=
>$dir,'repo'=3D>$repo)) ;
+                }
=20
                 if ( $g_parameter->MY_ANALYTIC !=3D "nu" )
                 {

Modified: phpcompta/trunk/include/class_acc_ledger_sold.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_ledger_sold.php	2013-12-06 13:40:41=
 UTC (rev 5575)
+++ phpcompta/trunk/include/class_acc_ledger_sold.php	2013-12-06 14:41:27=
 UTC (rev 5576)
@@ -333,7 +333,10 @@
                 // always save quantity but in withStock we can find
                 // what card need a stock management
                 if ($g_parameter->MY_STOCK =3D 'Y' && isset($repo))
-                    Stock_Goods::insert_goods($this->db, array('j_id' =3D=
> $j_id, 'goods' =3D> ${'e_march' . $i}, 'quant' =3D> $nNeg * ${'e_quant'=
 . $i}, 'dir' =3D> 'c', 'repo' =3D> $repo));
+                {
+                    $dir=3D(${'e_quant'.$i} < 0 ) ? 'd':'c';
+                    Stock_Goods::insert_goods($this->db, array('j_id' =3D=
> $j_id, 'goods' =3D> ${'e_march' . $i}, 'quant' =3D> $nNeg * ${'e_quant'=
 . $i}, 'dir' =3D> $dir, 'repo' =3D> $repo));
+                }
=20
=20
                 if ($g_parameter->MY_ANALYTIC !=3D "nu") {

Modified: phpcompta/trunk/include/class_document.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_document.php	2013-12-06 13:40:41 UTC (r=
ev 5575)
+++ phpcompta/trunk/include/class_document.php	2013-12-06 14:41:27 UTC (r=
ev 5576)
@@ -38,6 +38,7 @@
     var $d_mimetype;  /*!< $d_mimetype  */
     var $d_filename;  /*!< $d_filename */
     var $d_lob;       /*!< $d_lob the oid of the lob */
+    var $d_description;       /*!< Description of the file*/
     var $d_number;    /*!< $d_number number of the document */
     var $md_id;       /*!< $md_id document's template */
     /* Constructor
@@ -370,10 +371,10 @@
                 $this->d_lob=3D$oid;
                 $this->d_filename=3D$_FILES['file_upload']['name'][$i];
                 $this->d_mimetype=3D$_FILES['file_upload']['type'][$i];
-
+                $this->d_description=3D  strip_tags($_POST['input_desc']=
[$i]);
                 // insert into  the table
-                $sql=3D"insert into document (ag_id, d_lob,d_filename,d_=
mimetype,d_number) values ($1,$2,$3,$4,5)";
-                $this->db->exec_sql($sql,array($p_ag_id,$this->d_lob,$th=
is->d_filename,$this->d_mimetype));
+                $sql=3D"insert into document (ag_id, d_lob,d_filename,d_=
mimetype,d_number,d_description) values ($1,$2,$3,$4,$5,$6)";
+                $this->db->exec_sql($sql,array($p_ag_id,$this->d_lob,$th=
is->d_filename,$this->d_mimetype,1,$this->d_description));
             }
         } /* end for */
         $this->db->commit();
@@ -439,7 +440,7 @@
     function get_all($ag_id)
     {
         $res=3D$this->db->get_array('select d_id, ag_id, d_lob, d_number=
, d_filename,'.
-                                  ' d_mimetype from document where ag_id=
=3D$1',array($ag_id));
+                                  ' d_mimetype,d_description from docume=
nt where ag_id=3D$1',array($ag_id));
         $a=3Darray();
         for ($i=3D0;$i<sizeof($res); $i++ )
         {
@@ -450,6 +451,7 @@
             $doc->d_number=3D$res[$i]['d_number'];
             $doc->d_filename=3D$res[$i]['d_filename'];
             $doc->d_mimetype=3D$res[$i]['d_mimetype'];
+            $doc->d_description=3D$row['d_description'];
             $a[$i]=3Dclone $doc;
         }
         return $a;
@@ -469,6 +471,7 @@
         $this->d_filename=3D$row['d_filename'];
         $this->d_lob=3D$row['d_lob'];
         $this->d_number=3D$row['d_number'];
+        $this->d_description=3D$row['d_description'];
=20
     }
     /*!
@@ -1231,5 +1234,10 @@
         // if ad_id is not type select get value
         return $ad_value;
     }
+    function update_description ($p_desc)
+    {
+        $this->db->exec_sql('update document set d_description =3D $1 wh=
ere d_id=3D$2',
+                array($p_desc,$this->d_id));
+    }
=20
 }

Modified: phpcompta/trunk/include/class_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_fiche.php	2013-12-06 13:40:41 UTC (rev =
5575)
+++ phpcompta/trunk/include/class_fiche.php	2013-12-06 14:41:27 UTC (rev =
5576)
@@ -73,7 +73,8 @@
     {
         global $g_user;
       $sql_ledger=3D$g_user->get_ledger_sql('FIN',3);
-      $avail=3D$this->cn->get_array("select jrn_def_id,jrn_def_bank from=
 jrn_def where jrn_def_type=3D'FIN' and $sql_ledger
+      $avail=3D$this->cn->get_array("select jrn_def_id,jrn_def_name,"
+              . "jrn_def_bank,jrn_def_description from jrn_def where jrn=
_def_type=3D'FIN' and $sql_ledger
                             order by jrn_def_name");
=20
       if ( count($avail) =3D=3D 0 )
@@ -82,6 +83,8 @@
       for ($i=3D0;$i<count($avail);$i++)
         {
             $t=3Dnew Fiche($this->cn,$avail[$i]['jrn_def_bank']);
+            $t->ledger_name=3D$avail[$i]['jrn_def_name'];
+            $t->ledger_description=3D$avail[$i]['jrn_def_description'];
             $t->getAttribut();
             $all[$i]=3D$t;
=20

Modified: phpcompta/trunk/include/class_follow_up.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_follow_up.php	2013-12-06 13:40:41 UTC (=
rev 5575)
+++ phpcompta/trunk/include/class_follow_up.php	2013-12-06 14:41:27 UTC (=
rev 5576)
@@ -379,7 +379,7 @@
 		$upload->name =3D "file_upload[]";
 		$upload->readOnly=3D$readonly;
 		$upload->value =3D "";
-		$aAttachedFile =3D $this->db->get_array('select d_id,d_filename,d_mime=
type,' .
+		$aAttachedFile =3D $this->db->get_array('select d_id,d_filename,d_desc=
ription,d_mimetype,' .
 				'\'show_document.php?' .
 				Dossier::get() . '&d_id=3D\'||d_id as link' .
 				' from document where ag_id=3D$1', array($this->ag_id));

Modified: phpcompta/trunk/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_html_input.php	2013-12-06 13:40:41 UTC =
(rev 5575)
+++ phpcompta/trunk/include/class_html_input.php	2013-12-06 14:41:27 UTC =
(rev 5576)
@@ -301,41 +301,54 @@
      * return the html code to create an hidden div and a button
      * to show this DIV. This contains all the available ledgers
      * for the user in READ or RW
-     *@param $p_array is an array obtains thanks User::get_ledger
      *@param $selected is an array of checkbox
+     *@param $div div suffix
      *@note the choosen ledger are stored in the array r_jrn (_GET)
      */
-    static function select_ledger($p_array,$p_selected,$div=3D'')
+    static function select_ledger($p_type,$p_selected,$div=3D'')
     {
+        global $g_user;
+	$r =3D '';
+	/* security : filter ledger on user */
+	$p_array =3D $g_user->get_ledger($p_type, 3);
+       =20
         ob_start();
-        $ledger=3Dnew ISmallButton('l');
-        $ledger->label=3D"choix des journaux";
-        $ledger->javascript=3D" show_ledger_choice()";
-        echo $ledger->input();
+       =20
=20
         /* create a hidden div for the ledger */
         echo '<div id=3D"div_jrn'.$div.'" >';
-        echo '<h2 class=3D"info">Choix des journaux</h2>';
-
-        echo '<ul>';
+        echo HtmlInput::title_box("Journaux", $div."jrn_search");
+        echo '<form method=3D"GET" id=3D"'.$div.'search_frm" onsubmit=3D=
"return hide_ledger_choice(\''.$div.'search_frm\')">';
+        echo HtmlInput::hidden('nb_jrn', count($p_array));
+        echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2'=
, 1);
+        echo '<table class=3D"result" id=3D"'.$div.'tb_jrn">';
+        echo '<tr>';
+        echo th('Nom');
+        echo th('Description');
+        echo th('Type');
+        echo '</tr>';
+       =20
         for ($e=3D0;$e<count($p_array);$e++)
         {
             $row=3D$p_array[$e];
-            $r=3Dnew ICheckBox('r_jrn['.$e.']',$row['jrn_def_id']);
+            $r=3Dnew ICheckBox($div.'r_jrn'.$e,$row['jrn_def_id']);
             $idx=3D$row['jrn_def_id'];
-            if ( $p_selected !=3D null && isset($p_selected[$e]))
+            if ( $p_selected !=3D null &&  in_array($row['jrn_def_id'],$=
p_selected))
             {
                 $r->selected=3Dtrue;
             }
-            echo '<li style=3D"list-style-type: none;">'.$r->input().$ro=
w['jrn_def_name'].'('.$row['jrn_def_type'].')</li>';
+            $class=3D($e%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
+            echo '<tr '.$class.'>';
+            echo '<td >'.$r->input().$row['jrn_def_name'].'</td>';
+            echo '<td >'.$row['jrn_def_description'].'</td>';
+            echo '<td >'.$row['jrn_def_type'].'</td>';
+            echo '</tr>';
=20
         }
-        echo '</ul>';
-        $hide=3Dnew IButton('l');
-        $hide->label=3D"Valider";
-        $hide->javascript=3D" hide_ledger_choice() ";
-        echo $hide->input();
-
+        echo '</table>';
+        echo HtmlInput::hidden('div',$div);
+        echo HtmlInput::submit('save','Valider');
+        echo '</form>';
         echo '</div>';
         $ret=3Dob_get_contents();
         ob_end_clean();

Modified: phpcompta/trunk/include/class_jrn_def_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_jrn_def_sql.php	2013-12-06 13:40:41 UTC=
 (rev 5575)
+++ phpcompta/trunk/include/class_jrn_def_sql.php	2013-12-06 14:41:27 UTC=
 (rev 5576)
@@ -36,6 +36,7 @@
 		, "jrn_def_pj_pref" =3D> "jrn_def_pj_pref"
 		, "jrn_def_bank" =3D> "jrn_def_bank"
 		, "jrn_def_num_op" =3D> "jrn_def_num_op"
+		, "jrn_def_description" =3D> "jrn_def_description"
 	);
=20
 	function __construct(& $p_cn, $p_id=3D-1)
@@ -193,6 +194,7 @@
 ,jrn_def_pj_pref
 ,jrn_def_bank
 ,jrn_def_num_op
+,jrn_def_description
 ) values ($1
 ,$2
 ,$3
@@ -207,6 +209,7 @@
 ,$12
 ,$13
 ,$14
+,$15
 ) returning jrn_def_id";
=20
 			$this->jrn_def_id =3D $this->db->get_value(
@@ -224,6 +227,7 @@
 				, $this->jrn_def_pj_pref
 				, $this->jrn_def_bank
 				, $this->jrn_def_num_op
+				, strip_tags($this->jrn_def_description)
 					)
 			);
 		}
@@ -243,7 +247,8 @@
 ,jrn_def_pj_pref
 ,jrn_def_bank
 ,jrn_def_num_op
-,jrn_def_id) values ($1
+,jrn_def_id
+,jrn_def_description) values ($1
 ,$2
 ,$3
 ,$4
@@ -258,6 +263,7 @@
 ,$13
 ,$14
 ,$15
+,$16
 ) returning jrn_def_id";
=20
 			$this->jrn_def_id =3D $this->db->get_value(
@@ -275,7 +281,8 @@
 				, $this->jrn_def_pj_pref
 				, $this->jrn_def_bank
 				, $this->jrn_def_num_op
-				, $this->jrn_def_id)
+				, $this->jrn_def_id
+                                , strip_tags($this->jrn_def_description)=
)
 			);
 		}
 	}
@@ -299,7 +306,8 @@
 ,jrn_def_pj_pref =3D $12
 ,jrn_def_bank =3D $13
 ,jrn_def_num_op =3D $14
- where jrn_def_id=3D $15";
+,jrn_def_description =3D $15
+ where jrn_def_id=3D $16";
 		$res =3D $this->db->exec_sql(
 				$sql, array($this->jrn_def_name
 			, $this->jrn_def_class_deb
@@ -315,6 +323,7 @@
 			, $this->jrn_def_pj_pref
 			, $this->jrn_def_bank
 			, $this->jrn_def_num_op
+			, strip_tags($this->jrn_def_description)
 			, $this->jrn_def_id)
 		);
 	}
@@ -340,6 +349,7 @@
 ,jrn_def_pj_pref
 ,jrn_def_bank
 ,jrn_def_num_op
+,jrn_def_description
  from public.jrn_def where jrn_def_id=3D$1";
 		/* please adapt */
 		$res =3D $this->db->get_array(

Modified: phpcompta/trunk/include/class_user.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_user.php	2013-12-06 13:40:41 UTC (rev 5=
575)
+++ phpcompta/trunk/include/class_user.php	2013-12-06 14:41:27 UTC (rev 5=
576)
@@ -302,7 +302,7 @@
=20
 			$sql =3D "select jrn_def_id,jrn_def_type,
                  jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_t=
ype_id,jrn_desc,uj_priv,
-                 jrn_deb_max_line,jrn_cred_max_line
+                 jrn_deb_max_line,jrn_cred_max_line,jrn_def_description
                  from jrn_def join jrn_type on jrn_def_type=3Djrn_type_i=
d
                  join user_sec_jrn on uj_jrn_id=3Djrn_def_id
                  where
@@ -314,7 +314,7 @@
 		{
 			$sql_type =3D ($p_type =3D=3D 'ALL') ? '' : "where jrn_def_type=3Dupp=
er('" . sql_string($p_type) . "')";
 			$sql =3D "select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_d=
eb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line,
-                 jrn_type_id,jrn_desc,'W' as uj_priv
+                 jrn_type_id,jrn_desc,'W' as uj_priv,jrn_def_description
                  from jrn_def join jrn_type on jrn_def_type=3Djrn_type_i=
d
                  $sql_type
                  order by jrn_Def_name";

Modified: phpcompta/trunk/include/compta_ach.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/compta_ach.inc.php	2013-12-06 13:40:41 UTC (r=
ev 5575)
+++ phpcompta/trunk/include/compta_ach.inc.php	2013-12-06 14:41:27 UTC (r=
ev 5576)
@@ -227,7 +227,7 @@
=20
 if (!isset($_POST['e_date']) && $g_parameter->MY_DATE_SUGGEST=3D=3D'Y')
 	echo create_script(" get_last_date()");
-
+echo create_script(" update_name()");
 echo '</div>';
=20
=20

Modified: phpcompta/trunk/include/compta_fin.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/compta_fin.inc.php	2013-12-06 13:40:41 UTC (r=
ev 5575)
+++ phpcompta/trunk/include/compta_fin.inc.php	2013-12-06 14:41:27 UTC (r=
ev 5576)
@@ -150,5 +150,5 @@
 }else {
 	echo create_script(" ajax_saldo('first_sold');");
 }
-
+echo create_script(" update_name()");
 exit();
\ No newline at end of file

Modified: phpcompta/trunk/include/compta_fin_rec.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/compta_fin_rec.inc.php	2013-12-06 13:40:41 UT=
C (rev 5575)
+++ phpcompta/trunk/include/compta_fin_rec.inc.php	2013-12-06 14:41:27 UT=
C (rev 5576)
@@ -151,7 +151,7 @@
 	$r.=3Dtd($row['jr_comment']);
 	$r.=3Dtd($js);
 	$amount=3D$cn->get_value('select qf_amount from quant_fin where jr_id=3D=
$1', array($row['jr_id']));
-	$r.=3D'<td class=3D"num" class=3D"sorttable_numeric" sortable_customeke=
y=3D"'.$amount.'" style=3D"text-align:right">'.nbm ($amount).'</td>';
+	$r.=3D'<td class=3D"num" class=3D"sorttable_numeric" sorttable_customke=
y=3D"'.$amount.'" style=3D"text-align:right">'.nbm ($amount).'</td>';
=20
 	$diff=3Dbcadd($diff,$amount);
 	$tot_not_reconcilied+=3D$row['jr_montant'];

Modified: phpcompta/trunk/include/compta_fin_saldo.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/compta_fin_saldo.inc.php	2013-12-06 13:40:41 =
UTC (rev 5575)
+++ phpcompta/trunk/include/compta_fin_saldo.inc.php	2013-12-06 14:41:27 =
UTC (rev 5576)
@@ -36,16 +36,23 @@
=20
     echo '<div class=3D"content">';
     echo dossier::hidden();
-    echo '<table style=3D"margin-left:10%;width:60%" class=3D"result">';
-    echo tr(th('Quick Code').th('Compte en banque',' style=3D"text-align=
:left"').th('solde op=C3=A9ration',' style=3D"text-align:right"')
-	    .th('solde extrait/relev=C3=A9',' style=3D"text-align:right"')
-	    .th('diff=C3=A9rence',' style=3D"text-align:right"'));
+    echo _('Filtre :').HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3'=
, '1');
+    echo '<table class=3D"sortable"  style=3D"margin-left:10%;width:60%"=
 class=3D"result" id=3D"fin_saldo_tb">';
+    echo tr(th('Quick Code',' class=3D" sorttable_sorted_reverse"',HtmlI=
nput::infobulle(17).'<span id=3D"sorttable_sortrevind">&nbsp;&blacktriang=
le;</span>')
+            .th('Compte en banque',' style=3D"text-align:left"')
+            .th('Journal',' style=3D"text-align:center"')
+            .th('Description',' style=3D"text-align:center"')
+            .th('solde op=C3=A9ration',' style=3D"text-align:right" clas=
s=3D"sorttable_numeric"')
+	    .th('solde extrait/relev=C3=A9',' style=3D"text-align:right" class=3D=
"sorttable_numeric"')
+	    .th('diff=C3=A9rence',' style=3D"text-align:right" class=3D"sorttab=
le_numeric"')
+            );
     // Filter the saldo
     //  on the current year
     $filter_year=3D"  j_tech_per in (select p_id from parm_periode where=
  p_exercice=3D'".$g_user->get_exercice()."')";
     // for highligting tje line
     $idx=3D0;
     bcscale(2);
+    $tot_extrait=3D0;$tot_diff=3D0;$tot_operation=3D0;
     // for each account
     for ( $i =3D 0; $i < count($array);$i++)
     {
@@ -73,7 +80,7 @@
             if ( $idx%2 !=3D 0 )
                 $odd=3D"odd";
             else
-                $odd=3D"";
+                $odd=3D"even";
=20
             $idx++;
             echo "<tr class=3D\"$odd\">";
@@ -86,18 +93,35 @@
             echo "<TD >".
             $array[$i]->strAttribut(ATTR_DEF_NAME).
             "</TD>".
-            "<TD align=3D\"right\">".
+             td(h($array[$i]->ledger_name)).
+             td(h($array[$i]->ledger_description)).
+            '<TD class=3D"sorttable_numeric" sorttable_customkey=3D"'.$s=
olde.'"  style=3D"text-align:right">'.
 	      nbm($solde).
             "</TD>".
-            "<TD align=3D\"right\">".
+            '<TD class=3D"sorttable_numeric" sorttable_customkey=3D"'.$s=
aldo_rec.'"  style=3D"text-align:right">'.
 	      nbm($saldo_rec).
             "</TD>".
-            "<TD align=3D\"right\">".
+            '<TD class=3D"sorttable_numeric" sorttable_customkey=3D"'.$d=
iff.'"  style=3D"text-align:right">'.
 	      nbm($diff).
             "</TD>".
             "</TR>";
+            $tot_extrait=3Dbcadd($tot_extrait,$solde);
+            $tot_operation=3Dbcadd($tot_operation,$saldo_rec);
+            $tot_diff=3Dbcadd($tot_diff,$diff);
         }
     }// for
+    echo '<tfoot>';
+    echo '<tr>';
+    echo td('');
+    echo td('');
+    echo td('');
+    echo td(' TOTAUX ','style=3D"font-weight:bold"');
+    echo td(nbm($tot_extrait),'style=3D"font-weight:bold" class=3D"num"'=
);
+    echo td(nbm($tot_operation),' style=3D"font-weight:bold" class=3D"nu=
m"');
+    echo td(nbm($tot_diff),' style=3D"font-weight:bold" class=3D"num"');
+    echo '</tr>';
+   =20
+    echo '</tfoot>';
     echo "</table>";
     echo "</div>";
     exit();

Modified: phpcompta/trunk/include/compta_ven.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/compta_ven.inc.php	2013-12-06 13:40:41 UTC (r=
ev 5575)
+++ phpcompta/trunk/include/compta_ven.inc.php	2013-12-06 14:41:27 UTC (r=
ev 5576)
@@ -236,6 +236,6 @@
 	{
 		echo create_script(" get_last_date()");
 	}
-=09
+echo create_script(" update_name()");=09
 exit();
 ?>

Modified: phpcompta/trunk/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/constant.php	2013-12-06 13:40:41 UTC (rev 557=
5)
+++ phpcompta/trunk/include/constant.php	2013-12-06 14:41:27 UTC (rev 557=
6)
@@ -71,7 +71,7 @@
 define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/plugin_last_versio=
n.txt');
=20
=20
-define ("DBVERSION",109);
+define ("DBVERSION",110);
 define ("MONO_DATABASE",25);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');

Modified: phpcompta/trunk/include/fiche.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/fiche.inc.php	2013-12-06 13:40:41 UTC (rev 55=
75)
+++ phpcompta/trunk/include/fiche.inc.php	2013-12-06 14:41:27 UTC (rev 55=
76)
@@ -309,7 +309,9 @@
 				continue;
 		}
 		echo '<h2>' . $cn->get_value("select fd_label from fiche_def where fd_=
id=3D$1", array($afiche[$e]['fd_id'])) . '</h2>';
-		echo '<table class=3D"result" style=3D"width:80%;margin-left:10%">';
+                $id=3D"table_".$afiche[$e]."_id";
+                echo _('Filtre rapide:').HtmlInput::filter_table($id, '0=
,1,2', '1');=20
+		echo '<table class=3D"sortable" id=3D"'.$id.'" class=3D"result" style=3D=
"width:80%;margin-left:10%">';
 		echo tr(
 				th('Quick Code') .
 				th('Libell=C3=A9') .
@@ -341,15 +343,16 @@
 					td(HtmlInput::history_card($oCard->id, $oCard->strAttribut(ATTR_DEF=
_QUICKCODE))) .
 					td($oCard->strAttribut(ATTR_DEF_NAME)) .
 					td($oCard->strAttribut(ATTR_DEF_ACCOUNT)).
-					td(nbm($solde['debit']), 'style=3D"text-align:right"') .
-					td(nbm($solde['credit']), 'style=3D"text-align:right"') .
-					td(nbm(abs($solde['solde'])), 'style=3D"text-align:right"') .
+					td(nbm($solde['debit']), 'class=3D"sorttable_numeric" sorttable_cus=
tomkey=3D"'.$solde['debit'].'" style=3D"text-align:right"') .
+					td(nbm($solde['credit']), 'class=3D"sorttable_numeric" sorttable_cu=
stomkey=3D"'.$solde['debit'].'" style=3D"text-align:right"') .
+					td(nbm(abs($solde['solde'])), 'class=3D"sorttable_numeric" sorttabl=
e_customkey=3D"'.$solde['solde'].'" style=3D"text-align:right"') .
 					td((($solde['debit'] < $solde['credit']) ? 'CRED' : 'DEB'), 'style=3D=
"text-align:right"'), $class
 			);
=20
=20
=20
 		}
+                echo '<tfoot>';
                 echo tr(
                                 td('').
                                 td(_('Totaux')).
@@ -358,6 +361,7 @@
                                 td(nbm($sum_cred), 'style=3D"text-align:=
right"').
                                 td(nbm(abs($sum_solde)), 'style=3D"text-=
align:right"').
                                 td((($sum_deb < $sum_cred) ? 'CRED' : 'D=
EB'), 'style=3D"text-align:right"'),"");
+                echo '</tfoot>';
 		echo '</table>';
 	}
 	if ( $allcard =3D=3D 0 ) echo $str_add_card;

Modified: phpcompta/trunk/include/function_javascript.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/function_javascript.php	2013-12-06 13:40:41 U=
TC (rev 5575)
+++ phpcompta/trunk/include/function_javascript.php	2013-12-06 14:41:27 U=
TC (rev 5576)
@@ -21,7 +21,7 @@
=20
     if ( !  file_exists('js/'.$p_string))
         alert("Erreur js/$p_string n existe pas");
-    $script=3D'<script type=3D"text/javascript" charset=3D"utf8" languag=
e=3D"javascript" src=3D"js/'.$p_string.'"></script>';
+    $script=3D'<script type=3D"text/javascript" charset=3D"utf-8" langua=
ge=3D"javascript" src=3D"js/'.$p_string.'"></script>';
     // debug
=20
     return $script;
@@ -34,7 +34,7 @@
  */
 function create_script($p_string)
 {
-    $script=3D'<script type=3D"text/javascript" charset=3D"utf8" languag=
e=3D"javascript">'.$p_string.' </script>';
+    $script=3D'<script type=3D"text/javascript" charset=3D"utf-8" langua=
ge=3D"javascript">'.$p_string.' </script>';
     return $script;
=20
 }

Modified: phpcompta/trunk/include/history_operation.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/history_operation.inc.php	2013-12-06 13:40:41=
 UTC (rev 5575)
+++ phpcompta/trunk/include/history_operation.inc.php	2013-12-06 14:41:27=
 UTC (rev 5576)
@@ -94,7 +94,7 @@
=20
=20
 $msg=3D"";
-/* by default we should the default period */
+/* by default we should use the default period */
 if (!isset($p_array['date_start']))
 {
 	$period =3D $g_user->get_periode();
@@ -102,11 +102,11 @@
 	list($date_start, $date_end) =3D $per->get_date_limit();
 	$p_array['date_start'] =3D $date_start;
 	$p_array['date_end'] =3D $date_end;
-	$msg=3D'<h2 class=3D"info2">'."Periode ".$date_start." au ".$date_end.'=
</h2>';
+	$msg=3D'<h2 class=3D"info2">'."P=C3=A9riode ".$date_start." au ".$date_=
end.'</h2>';
 }
 else
 {
-	$msg=3D'<h2 class=3D"info2">'."Periode ".$_GET['date_start']." au ".$_G=
ET['date_end'].'</h2>';
+	$msg=3D'<h2 class=3D"info2">'."P=C3=A9riode ".$_GET['date_start']." au =
".$_GET['date_end'].'</h2>';
=20
 }
 /*  compute the sql stmt */

Modified: phpcompta/trunk/include/operation_ods_new.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/operation_ods_new.inc.php	2013-12-06 13:40:41=
 UTC (rev 5575)
+++ phpcompta/trunk/include/operation_ods_new.inc.php	2013-12-06 14:41:27=
 UTC (rev 5576)
@@ -107,6 +107,7 @@
 echo '</form>';
=20
 echo "<script>checkTotalDirect();</script>";
+echo create_script(" update_name()");
=20
 if ($g_parameter->MY_DATE_SUGGEST=3D=3D'Y')
 {

Modified: phpcompta/trunk/include/search.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/search.inc.php	2013-12-06 13:40:41 UTC (rev 5=
575)
+++ phpcompta/trunk/include/search.inc.php	2013-12-06 14:41:27 UTC (rev 5=
576)
@@ -126,9 +126,9 @@
 	echo HtmlInput::submit("upd_rec","Mettre =C3=A0 jour");
     if (! $inside )echo $bar;
=20
-    if (isset($_GET['r_jrn'])) {
-      foreach ($_GET['r_jrn'] as $k=3D>$v)
-		echo HtmlInput::hidden('r_jrn['.$k.']',$v);
+    if (isset($_GET[$op.'r_jrn'])) {
+      foreach ($_GET[$op.'r_jrn'] as $k=3D>$v)
+		echo HtmlInput::hidden($op.'r_jrn['.$k.']',$v);
     }
     echo '</form>';
 }

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-06 13:40:41 UT=
C (rev 5575)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-06 14:41:27 UT=
C (rev 5576)
@@ -318,7 +318,7 @@
=20
=20
 <div id=3D"add_todo_list" >
-	<script charset=3D"utf8" type=3D"text/javascript" language=3D"javascrip=
t">
+	<script charset=3D"utf-8" type=3D"text/javascript" language=3D"javascri=
pt">
 		new Draggable($('add_todo_list'),{});
 	</script>
 <form method=3D"post">

Modified: phpcompta/trunk/include/template/detail-action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/detail-action.php	2013-12-06 13:40:4=
1 UTC (rev 5575)
+++ phpcompta/trunk/include/template/detail-action.php	2013-12-06 14:41:2=
7 UTC (rev 5576)
@@ -125,6 +125,7 @@
             <td>
               <?php echo $str_ag_dest;?>
           </tr>
+<?php if ($this->ag_id > 0 ): ?>
           <tr>
             <TD>
                 Dossier / tags
@@ -136,6 +137,7 @@
                 ?>
             </td>
           </TR>
+<?php endif; ?>         =20
         </table>
=20
 </div>
@@ -381,8 +383,31 @@
 for ($i=3D0;$i<sizeof($aAttachedFile);$i++) :
   ?>
=20
-	  <li> <A class=3D"print" style=3D"display:inline" id=3D"<?php echo "do=
c".$aAttachedFile[$i]['d_id'];?>" href=3D"<?php echo $aAttachedFile[$i]['=
link']?>"><?php echo $aAttachedFile[$i]['d_filename'];?>
-    </A>
+      <li> <A class=3D"print" style=3D"display:inline" id=3D"<?php echo =
"doc".$aAttachedFile[$i]['d_id'];?>" href=3D"<?php echo $aAttachedFile[$i=
]['link']?>">
+          <?php echo $aAttachedFile[$i]['d_filename'];?>         </a>
+
+             =20
+                  <br/>
+        <label>Description</label>
+        <span id=3D"print_desc<?php echo $aAttachedFile[$i]['d_id'];?>">=
 <?php echo h($aAttachedFile[$i]['d_description'])?>
+       <?php if ($p_view !=3D 'READ') : ?>=20
+        <?php=20
+            $js=3Dsprintf("javascript:show_description('%s')",$aAttached=
File[$i]['d_id']);
+        ?>
+        <a class=3D"mtitle" style=3D"color:orange" id=3D"<?php echo 'des=
c'.$aAttachedFile[$i]['d_id'];?>" onclick=3D"<?php echo $js?>">Modifier</=
a>   =20
+       =20
+        </span>
+        <span class=3D"noprint" id=3D"input_desc<?php echo $aAttachedFil=
e[$i]['d_id'];?>" style=3D"display:none" >
+              <input type=3D"input" class=3D"input_text" id=3D"input_des=
c_txt<?php echo $aAttachedFile[$i]['d_id'];?>" value=3D"<?php echo h($aAt=
tachedFile[$i]['d_description'])?>">
+              <?php=20
+              $js=3Dsprintf("update_document('%s','%s')",dossier::id(),$=
aAttachedFile[$i]['d_id']);
+              echo HtmlInput::button('save_desc'.$aAttachedFile[$i]['d_i=
d'], 'Sauve', 'onclick=3D"'.$js.'"','smallbutton');
+              ?>
+        </span>
+        <?php else: ?>
+        </span>
+        <?php endif;?>
+              <br/>
 <?php $rmDoc=3Dsprintf("javascript:if ( confirm('"._('Voulez-vous efface=
r le document')." %s')=3D=3Dtrue ) {remove_document('%s','%s');}",
 	$aAttachedFile[$i]['d_filename'],
 	dossier::id(),
@@ -400,7 +425,7 @@
 try {
 	docAdded=3Ddocument.getElementById('add_file');
 	new_element=3Ddocument.createElement('li');
-	new_element.innerHTML=3D'<input class=3D"inp" type=3D"file" value=3D"" =
name=3D"file_upload[]"/>';
+	new_element.innerHTML=3D'<input class=3D"inp" type=3D"file" value=3D"" =
name=3D"file_upload[]"/><br><label>Description</label><input type=3D"inpu=
t" class=3D"input_text" name=3D"input_desc[]" >';
 	docAdded.appendChild(new_element);
 }
 catch(exception) { alert('<?php echo j(_('Je ne peux pas ajouter de fich=
ier'))?>'); alert(exception.message);}
@@ -413,6 +438,9 @@
       <li>
         <?php echo $upload->input();
         ?>
+          <br/>
+        <label>Description</label>
+        <input type=3D"input" class=3D"input_text" name=3D"input_desc[]"=
 >
       </li>
     </ol>
   <span   >

Modified: phpcompta/trunk/include/template/ledger_search.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/ledger_search.php	2013-12-06 13:40:4=
1 UTC (rev 5575)
+++ phpcompta/trunk/include/template/ledger_search.php	2013-12-06 14:41:2=
7 UTC (rev 5576)
@@ -6,6 +6,11 @@
 </td>
 <td>
    <?php echo $f_ledger; ?>
+    <span id=3D"ledger_id<?php echo $div;?>">
+        <?php
+        echo $hid_jrn;
+        ?>
+    </span>
 </td>
 </tr>
=20

Modified: phpcompta/trunk/include/template/module.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/module.php	2013-12-06 13:40:41 UTC (=
rev 5575)
+++ phpcompta/trunk/include/template/module.php	2013-12-06 14:41:27 UTC (=
rev 5576)
@@ -36,7 +36,7 @@
 			?>
=20
 	</form>
-	<script charset=3D"utf8" language=3D"javascript">
+	<script charset=3D"utf-8" language=3D"javascript">
=20
 		try {
 			new Ajax.Autocompleter("ac","ac_choices","direct.php?gDossier=3D<?php=
 echo $gDossier?>",

Modified: phpcompta/trunk/include/template/param_jrn.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/param_jrn.php	2013-12-06 13:40:41 UT=
C (rev 5575)
+++ phpcompta/trunk/include/template/param_jrn.php	2013-12-06 14:41:27 UT=
C (rev 5576)
@@ -116,6 +116,14 @@
 </TD>
 </tr>
 <?php endif; ?>
+<tr>
+    <td>
+    <?php echo _('Description') ?>
+    </TD>
+    <td>
+     <?php echo $str_description; ?>  =20
+    </td>
+</tr>   =20
 </TABLE>
     <?php
     /////////////////// ACH //////////////////////////////////

Modified: phpcompta/trunk/include/template/result_cat_card_summary.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/result_cat_card_summary.php	2013-12-=
06 13:40:41 UTC (rev 5575)
+++ phpcompta/trunk/include/template/result_cat_card_summary.php	2013-12-=
06 14:41:27 UTC (rev 5576)
@@ -2,7 +2,7 @@
 Filtre rapide :   =20
     <?php
     $col=3D"";$sp=3D"";
-    for ($e=3D0;$e<count($aHeading);$e++) {$col.=3D$e.$sp; $sp=3D",";}
+    for ($e=3D0;$e<count($aHeading);$e++) {$col.=3D$sp.$e; $sp=3D",";}
     echo HtmlInput::filter_table("fiche_tb_id", $col, '1');=20
     ?>
 <table id=3D"fiche_tb_id" class=3D"sortable">



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


From MAILER-DAEMON Fri Dec 06 11:31:04 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoyIy-00043t-6q
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 11:31:04 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 17:19:32 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127734.1386347463.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5577 - in phpcompta/tags/rel670:
	html/admin/sql/patch include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 16:31:03 -0000

Author: danydb
Date: 2013-12-06 17:19:32 +0100 (Fri, 06 Dec 2013)
New Revision: 5577

Added:
   phpcompta/tags/rel670/html/admin/sql/patch/upgrade110.sql
Modified:
   phpcompta/tags/rel670/include/ajax_bookmark.php
   phpcompta/tags/rel670/include/constant.php
Log:
bug #931 - Parfois on ne peut pas ajouter le favori
Ajout vue v_menu_description_favori
Task #931 - Parfois on ne peut pas ajouter le favori

Added: phpcompta/tags/rel670/html/admin/sql/patch/upgrade110.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/admin/sql/patch/upgrade110.sql	           =
             (rev 0)
+++ phpcompta/tags/rel670/html/admin/sql/patch/upgrade110.sql	2013-12-06 =
16:19:32 UTC (rev 5577)
@@ -0,0 +1,26 @@
+begin;
+create or replace view v_menu_description_favori as
+ WITH t_menu AS (
+         SELECT mr.me_menu, pm.me_code, pm.me_code_dep, pm.p_type_displa=
y, pu.user_name, mr.me_file, mr.me_javascript, mr.me_description, mr.me_d=
escription_etendue
+           FROM profile_menu pm
+      JOIN profile_user pu ON pu.p_id =3D pm.p_id
+   JOIN profile p ON p.p_id =3D pm.p_id
+   JOIN menu_ref mr USING (me_code)
+        )
+ SELECT DISTINCT (COALESCE(v3.me_code || '/'::text, ''::text) || COALESC=
E(v2.me_code, ''::text)) ||=20
+        CASE
+            WHEN v2.me_code IS NULL THEN COALESCE(v1.me_code, ''::text)
+            WHEN v2.me_code IS NOT NULL THEN COALESCE('/'::text || v1.me=
_code, ''::text)
+            ELSE NULL::text
+        END AS code, v1.me_code, v1.me_description, v1.me_description_et=
endue, v1.me_file, v1.user_name, '> '::text || v1.me_menu AS v1menu,=20
+        CASE
+            WHEN COALESCE(v3.me_menu, ''::text) <> ''::text THEN ' > '::=
text || v2.me_menu
+            ELSE v2.me_menu
+        END AS v2menu, v3.me_menu AS v3menu, v3.p_type_display, COALESCE=
(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript)) AS javas=
cript
+   FROM t_menu v1
+   LEFT JOIN t_menu v2 ON v1.me_code_dep =3D v2.me_code
+   LEFT JOIN t_menu v3 ON v2.me_code_dep =3D v3.me_code
+  WHERE v1.p_type_display <> 'P'::text;
+update version set val=3D111;
+
+commit;

Modified: phpcompta/tags/rel670/include/ajax_bookmark.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/ajax_bookmark.php	2013-12-06 14:41:27 U=
TC (rev 5576)
+++ phpcompta/tags/rel670/include/ajax_bookmark.php	2013-12-06 16:19:32 U=
TC (rev 5577)
@@ -59,7 +59,7 @@
=20
 $bookmark_sql=3D"select distinct b_id,b_action,b_order,me_description, j=
avascript"
         . " from bookmark "
-        . "join v_menu_description on (code=3Db_action)"
+        . "join v_menu_description_favori on (code=3Db_action)"
         . "where "
         . "login=3D$1 order by b_order,b_action";
 $a_bookmark=3D$cn->get_array($bookmark_sql,array($g_user->login));

Modified: phpcompta/tags/rel670/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/constant.php	2013-12-06 14:41:27 UTC (r=
ev 5576)
+++ phpcompta/tags/rel670/include/constant.php	2013-12-06 16:19:32 UTC (r=
ev 5577)
@@ -71,7 +71,7 @@
 define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/plugin_last_versio=
n.txt');
=20
=20
-define ("DBVERSION",110);
+define ("DBVERSION",111);
 define ("MONO_DATABASE",25);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');



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


From MAILER-DAEMON Fri Dec 06 11:42:23 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VoyTv-0004xm-Es
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Dec 2013 11:42:23 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Dec 2013 17:30:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.127763.1386348142.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5578 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Dec 2013 16:42:21 -0000

Author: danydb
Date: 2013-12-06 17:30:55 +0100 (Fri, 06 Dec 2013)
New Revision: 5578

Modified:
   phpcompta/tags/rel670/include/class_html_input.php
Log:
bug #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche est =
clipp?\195?\169=20

ajout d'un bouton "Fermer"
Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche est=
 clipp?\195?\169

Modified: phpcompta/tags/rel670/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_html_input.php	2013-12-06 16:19:3=
2 UTC (rev 5577)
+++ phpcompta/tags/rel670/include/class_html_input.php	2013-12-06 16:30:5=
5 UTC (rev 5578)
@@ -348,6 +348,7 @@
         echo '</table>';
         echo HtmlInput::hidden('div',$div);
         echo HtmlInput::submit('save','Valider');
+        echo HtmlInput::button_close($div."jrn_search");
         echo '</form>';
         echo '</div>';
         $ret=3Dob_get_contents();



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


From MAILER-DAEMON Sat Dec 07 14:28:15 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VpNXz-00067u-Ng
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Dec 2013 14:28:15 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Dec 2013 20:16:46 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.128710.1386444494.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5579 - phpcompta/tags/rel670/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 07 Dec 2013 19:28:14 -0000

Author: danydb
Date: 2013-12-07 20:16:46 +0100 (Sat, 07 Dec 2013)
New Revision: 5579

Modified:
   phpcompta/tags/rel670/include/class_html_input.php
Log:
bug #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche est =
clipp?\195?\169=20

Cosm?\195?\169tique
Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche est=
 clipp?\195?\169

Modified: phpcompta/tags/rel670/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_html_input.php	2013-12-06 16:30:5=
5 UTC (rev 5578)
+++ phpcompta/tags/rel670/include/class_html_input.php	2013-12-07 19:16:4=
6 UTC (rev 5579)
@@ -318,6 +318,7 @@
         /* create a hidden div for the ledger */
         echo '<div id=3D"div_jrn'.$div.'" >';
         echo HtmlInput::title_box("Journaux", $div."jrn_search");
+        echo '<div style=3D"padding:5px">';
         echo '<form method=3D"GET" id=3D"'.$div.'search_frm" onsubmit=3D=
"return hide_ledger_choice(\''.$div.'search_frm\')">';
         echo HtmlInput::hidden('nb_jrn', count($p_array));
         echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2'=
, 1);
@@ -339,7 +340,7 @@
             }
             $class=3D($e%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
             echo '<tr '.$class.'>';
-            echo '<td >'.$r->input().$row['jrn_def_name'].'</td>';
+            echo '<td style=3D"white-space: nowrap">'.$r->input().$row['=
jrn_def_name'].'</td>';
             echo '<td >'.$row['jrn_def_description'].'</td>';
             echo '<td >'.$row['jrn_def_type'].'</td>';
             echo '</tr>';
@@ -351,6 +352,7 @@
         echo HtmlInput::button_close($div."jrn_search");
         echo '</form>';
         echo '</div>';
+        echo '</div>';
         $ret=3Dob_get_contents();
         ob_end_clean();
         return $ret;



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


From MAILER-DAEMON Sat Dec 07 15:39:05 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VpOeX-0004j5-HY
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Dec 2013 15:39:05 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Dec 2013 21:27:37 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.128734.1386448744.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5580 - phpcompta/tags/rel670/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 07 Dec 2013 20:39:04 -0000

Author: danydb
Date: 2013-12-07 21:27:36 +0100 (Sat, 07 Dec 2013)
New Revision: 5580

Modified:
   phpcompta/tags/rel670/include/template/action_search_result.php
Log:
Cosm?\195?\169tique

Modified: phpcompta/tags/rel670/include/template/action_search_result.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/action_search_result.php	2013-=
12-07 19:16:46 UTC (rev 5579)
+++ phpcompta/tags/rel670/include/template/action_search_result.php	2013-=
12-07 20:27:36 UTC (rev 5580)
@@ -57,7 +57,7 @@
 		</th>
 	</tr>
 <?php for ($i=3D0;$i<$limit;$i++):?>
-	<?php $class=3D($i%2=3D=3D0)?' class=3D"odd" ':' class=3D"info"'; ?>
+	<?php $class=3D($i%2=3D=3D0)?' class=3D"odd" ':' class=3D"even"'; ?>
 	<tr  <?php echo $class?>>
 		<td>
 			<?php



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


From MAILER-DAEMON Sat Dec 07 17:18:46 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VpQD0-0007qg-4b
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Dec 2013 17:18:46 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Dec 2013 23:07:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.128802.1386454725.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5581 - in phpcompta/tags/rel670: html/js
	include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 07 Dec 2013 22:18:44 -0000

Author: danydb
Date: 2013-12-07 23:07:15 +0100 (Sat, 07 Dec 2013)
New Revision: 5581

Modified:
   phpcompta/tags/rel670/html/js/scripts.js
   phpcompta/tags/rel670/include/template/letter_all.php
   phpcompta/tags/rel670/include/template/letter_prop.php
Log:
Fix some cosmetic bug, works with IE11

Modified: phpcompta/tags/rel670/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/scripts.js	2013-12-07 20:27:36 UTC (rev=
 5580)
+++ phpcompta/tags/rel670/html/js/scripts.js	2013-12-07 22:07:15 UTC (rev=
 5581)
@@ -811,7 +811,8 @@
                                 style: ';position:absolute;width:60%;z-i=
ndex:20;margin-left:20%',
                                 drag: 1
                             };
-                            var y=3Dcalcy(posY);
+                            //var y=3Dcalcy(posY);
+                            var y=3DposY;
                             if (json_obj.div !=3D '')obj.cssclass=3D"";
                             obj.style=3D"top:"+y+obj.style;
                             add_div(obj);

Modified: phpcompta/tags/rel670/include/template/letter_all.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/letter_all.php	2013-12-07 20:2=
7:36 UTC (rev 5580)
+++ phpcompta/tags/rel670/include/template/letter_all.php	2013-12-07 22:0=
7:15 UTC (rev 5581)
@@ -42,7 +42,7 @@
 <?php
 for ($i=3D0;$i<count($this->content);$i++):
   $class=3D"";
-if ( ($i % 2) =3D=3D 0 ) $class=3D"odd";
+$class=3D ( ($i % 2) =3D=3D 0 ) ? "odd":"even";
 ?>
   <tr <?php echo "class=3D\"$class\""; ?> >
 <td>

Modified: phpcompta/tags/rel670/include/template/letter_prop.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/template/letter_prop.php	2013-12-07 20:=
27:36 UTC (rev 5580)
+++ phpcompta/tags/rel670/include/template/letter_prop.php	2013-12-07 22:=
07:15 UTC (rev 5581)
@@ -47,7 +47,7 @@
=20
 for ($i=3D0;$i<count($this->content);$i++):
   $class=3D"";
-if ( ($i % 2) =3D=3D 0 ) $class=3D"odd";
+$class=3D ( ($i % 2) =3D=3D 0 ) ? "odd":"even";
 if ( $i < $linked_limit ) $class=3D"even";
 if ($linked_limit !=3D 0 && $i=3D=3D$linked_limit)
 {



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


From MAILER-DAEMON Sun Dec 08 06:21:43 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VpcQh-0004fQ-Lo
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 06:21:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 12:10:13 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129053.1386501702.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5582 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 11:21:41 -0000

Author: danydb
Date: 2013-12-08 12:10:13 +0100 (Sun, 08 Dec 2013)
New Revision: 5582

Modified:
   phpcompta/trunk/html/style-light.css
Log:
play with style

Modified: phpcompta/trunk/html/style-light.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-light.css	2013-12-07 22:07:15 UTC (rev 558=
1)
+++ phpcompta/trunk/html/style-light.css	2013-12-08 11:10:13 UTC (rev 558=
2)
@@ -79,6 +79,15 @@
     margin:0px;
=20
 }
+div.welcome h2.info {
+    background-color: inherit;
+    color:inherit;
+    font-size:1.50em;
+    text-align:center;
+    padding:0px;
+    margin:0px;
+    border-bottom: solid 1px #FF0000;
+}
=20
=20
 h3.info {



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


From MAILER-DAEMON Sun Dec 08 06:22:12 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VpcRA-0004hW-SR
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 06:22:12 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 12:10:45 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129054.1386501732.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5583 - in phpcompta/trunk: . html/admin/sql/patch
	html/js include include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 11:22:12 -0000

Author: danydb
Date: 2013-12-08 12:10:44 +0100 (Sun, 08 Dec 2013)
New Revision: 5583

Added:
   phpcompta/trunk/html/admin/sql/patch/upgrade110.sql
Modified:
   phpcompta/trunk/
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/include/ajax_bookmark.php
   phpcompta/trunk/include/class_html_input.php
   phpcompta/trunk/include/constant.php
   phpcompta/trunk/include/template/action_search_result.php
   phpcompta/trunk/include/template/letter_all.php
   phpcompta/trunk/include/template/letter_prop.php
Log:
Merged revisions 5577-5581 via svnmerge from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel670

........
  r5577 | danydb | 2013-12-06 17:19:32 +0100 (ven., 06 d?\195?\169c. 2013=
) | 3 lines
 =20
  bug #931 - Parfois on ne peut pas ajouter le favori
  Ajout vue v_menu_description_favori
  Task #931 - Parfois on ne peut pas ajouter le favori
........
  r5578 | danydb | 2013-12-06 17:30:55 +0100 (ven., 06 d?\195?\169c. 2013=
) | 4 lines
 =20
  bug #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche es=
t clipp?\195?\169=20
 =20
  ajout d'un bouton "Fermer"
  Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche e=
st clipp?\195?\169
........
  r5579 | danydb | 2013-12-07 20:16:46 +0100 (sam., 07 d?\195?\169c. 2013=
) | 4 lines
 =20
  bug #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche es=
t clipp?\195?\169=20
 =20
  Cosm?\195?\169tique
  Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche e=
st clipp?\195?\169
........
  r5580 | danydb | 2013-12-07 21:27:36 +0100 (sam., 07 d?\195?\169c. 2013=
) | 1 line
 =20
  Cosm?\195?\169tique
........
  r5581 | danydb | 2013-12-07 23:07:15 +0100 (sam., 07 d?\195?\169c. 2013=
) | 1 line
 =20
  Fix some cosmetic bug, works with IE11
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel670:1-5539,5541-5575
   + /phpcompta/tags/rel670:1-5539,5541-5582

Copied: phpcompta/trunk/html/admin/sql/patch/upgrade110.sql (from rev 558=
1, phpcompta/tags/rel670/html/admin/sql/patch/upgrade110.sql)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/sql/patch/upgrade110.sql	                 =
       (rev 0)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade110.sql	2013-12-08 11:10:=
44 UTC (rev 5583)
@@ -0,0 +1,26 @@
+begin;
+create or replace view v_menu_description_favori as
+ WITH t_menu AS (
+         SELECT mr.me_menu, pm.me_code, pm.me_code_dep, pm.p_type_displa=
y, pu.user_name, mr.me_file, mr.me_javascript, mr.me_description, mr.me_d=
escription_etendue
+           FROM profile_menu pm
+      JOIN profile_user pu ON pu.p_id =3D pm.p_id
+   JOIN profile p ON p.p_id =3D pm.p_id
+   JOIN menu_ref mr USING (me_code)
+        )
+ SELECT DISTINCT (COALESCE(v3.me_code || '/'::text, ''::text) || COALESC=
E(v2.me_code, ''::text)) ||=20
+        CASE
+            WHEN v2.me_code IS NULL THEN COALESCE(v1.me_code, ''::text)
+            WHEN v2.me_code IS NOT NULL THEN COALESCE('/'::text || v1.me=
_code, ''::text)
+            ELSE NULL::text
+        END AS code, v1.me_code, v1.me_description, v1.me_description_et=
endue, v1.me_file, v1.user_name, '> '::text || v1.me_menu AS v1menu,=20
+        CASE
+            WHEN COALESCE(v3.me_menu, ''::text) <> ''::text THEN ' > '::=
text || v2.me_menu
+            ELSE v2.me_menu
+        END AS v2menu, v3.me_menu AS v3menu, v3.p_type_display, COALESCE=
(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript)) AS javas=
cript
+   FROM t_menu v1
+   LEFT JOIN t_menu v2 ON v1.me_code_dep =3D v2.me_code
+   LEFT JOIN t_menu v3 ON v2.me_code_dep =3D v3.me_code
+  WHERE v1.p_type_display <> 'P'::text;
+update version set val=3D111;
+
+commit;

Modified: phpcompta/trunk/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/scripts.js	2013-12-08 11:10:13 UTC (rev 5582)
+++ phpcompta/trunk/html/js/scripts.js	2013-12-08 11:10:44 UTC (rev 5583)
@@ -811,7 +811,8 @@
                                 style: ';position:absolute;width:60%;z-i=
ndex:20;margin-left:20%',
                                 drag: 1
                             };
-                            var y=3Dcalcy(posY);
+                            //var y=3Dcalcy(posY);
+                            var y=3DposY;
                             if (json_obj.div !=3D '')obj.cssclass=3D"";
                             obj.style=3D"top:"+y+obj.style;
                             add_div(obj);

Modified: phpcompta/trunk/include/ajax_bookmark.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ajax_bookmark.php	2013-12-08 11:10:13 UTC (re=
v 5582)
+++ phpcompta/trunk/include/ajax_bookmark.php	2013-12-08 11:10:44 UTC (re=
v 5583)
@@ -59,7 +59,7 @@
=20
 $bookmark_sql=3D"select distinct b_id,b_action,b_order,me_description, j=
avascript"
         . " from bookmark "
-        . "join v_menu_description on (code=3Db_action)"
+        . "join v_menu_description_favori on (code=3Db_action)"
         . "where "
         . "login=3D$1 order by b_order,b_action";
 $a_bookmark=3D$cn->get_array($bookmark_sql,array($g_user->login));

Modified: phpcompta/trunk/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_html_input.php	2013-12-08 11:10:13 UTC =
(rev 5582)
+++ phpcompta/trunk/include/class_html_input.php	2013-12-08 11:10:44 UTC =
(rev 5583)
@@ -318,6 +318,7 @@
         /* create a hidden div for the ledger */
         echo '<div id=3D"div_jrn'.$div.'" >';
         echo HtmlInput::title_box("Journaux", $div."jrn_search");
+        echo '<div style=3D"padding:5px">';
         echo '<form method=3D"GET" id=3D"'.$div.'search_frm" onsubmit=3D=
"return hide_ledger_choice(\''.$div.'search_frm\')">';
         echo HtmlInput::hidden('nb_jrn', count($p_array));
         echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2'=
, 1);
@@ -339,7 +340,7 @@
             }
             $class=3D($e%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
             echo '<tr '.$class.'>';
-            echo '<td >'.$r->input().$row['jrn_def_name'].'</td>';
+            echo '<td style=3D"white-space: nowrap">'.$r->input().$row['=
jrn_def_name'].'</td>';
             echo '<td >'.$row['jrn_def_description'].'</td>';
             echo '<td >'.$row['jrn_def_type'].'</td>';
             echo '</tr>';
@@ -348,8 +349,10 @@
         echo '</table>';
         echo HtmlInput::hidden('div',$div);
         echo HtmlInput::submit('save','Valider');
+        echo HtmlInput::button_close($div."jrn_search");
         echo '</form>';
         echo '</div>';
+        echo '</div>';
         $ret=3Dob_get_contents();
         ob_end_clean();
         return $ret;

Modified: phpcompta/trunk/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/constant.php	2013-12-08 11:10:13 UTC (rev 558=
2)
+++ phpcompta/trunk/include/constant.php	2013-12-08 11:10:44 UTC (rev 558=
3)
@@ -71,7 +71,7 @@
 define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/plugin_last_versio=
n.txt');
=20
=20
-define ("DBVERSION",110);
+define ("DBVERSION",111);
 define ("MONO_DATABASE",25);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');

Modified: phpcompta/trunk/include/template/action_search_result.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_search_result.php	2013-12-08 =
11:10:13 UTC (rev 5582)
+++ phpcompta/trunk/include/template/action_search_result.php	2013-12-08 =
11:10:44 UTC (rev 5583)
@@ -57,7 +57,7 @@
 		</th>
 	</tr>
 <?php for ($i=3D0;$i<$limit;$i++):?>
-	<?php $class=3D($i%2=3D=3D0)?' class=3D"odd" ':' class=3D"info"'; ?>
+	<?php $class=3D($i%2=3D=3D0)?' class=3D"odd" ':' class=3D"even"'; ?>
 	<tr  <?php echo $class?>>
 		<td>
 			<?php

Modified: phpcompta/trunk/include/template/letter_all.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/letter_all.php	2013-12-08 11:10:13 U=
TC (rev 5582)
+++ phpcompta/trunk/include/template/letter_all.php	2013-12-08 11:10:44 U=
TC (rev 5583)
@@ -42,7 +42,7 @@
 <?php
 for ($i=3D0;$i<count($this->content);$i++):
   $class=3D"";
-if ( ($i % 2) =3D=3D 0 ) $class=3D"odd";
+$class=3D ( ($i % 2) =3D=3D 0 ) ? "odd":"even";
 ?>
   <tr <?php echo "class=3D\"$class\""; ?> >
 <td>

Modified: phpcompta/trunk/include/template/letter_prop.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/letter_prop.php	2013-12-08 11:10:13 =
UTC (rev 5582)
+++ phpcompta/trunk/include/template/letter_prop.php	2013-12-08 11:10:44 =
UTC (rev 5583)
@@ -47,7 +47,7 @@
=20
 for ($i=3D0;$i<count($this->content);$i++):
   $class=3D"";
-if ( ($i % 2) =3D=3D 0 ) $class=3D"odd";
+$class=3D ( ($i % 2) =3D=3D 0 ) ? "odd":"even";
 if ( $i < $linked_limit ) $class=3D"even";
 if ($linked_limit !=3D 0 && $i=3D=3D$linked_limit)
 {



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


From MAILER-DAEMON Sun Dec 08 08:40:38 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vpeb8-0002qD-Tf
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 08:40:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 14:29:07 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129115.1386510038.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5584 - in phpcompta/tags/rel670: html/js include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 13:40:37 -0000

Author: danydb
Date: 2013-12-08 14:29:06 +0100 (Sun, 08 Dec 2013)
New Revision: 5584

Modified:
   phpcompta/tags/rel670/html/js/scripts.js
   phpcompta/tags/rel670/include/ac_common.php
   phpcompta/tags/rel670/include/balance.inc.php
   phpcompta/tags/rel670/include/class_html_input.php
   phpcompta/tags/rel670/include/export_balance_csv.php
   phpcompta/tags/rel670/include/export_balance_pdf.php
   phpcompta/tags/rel670/include/impress_rec.inc.php
Log:
bug #0000928 	Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche e=
st clipp?\195?\169

Bug fixed for PRINTBAL and PRINTREC, fixed in export CSV and PDF

Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche est=
 clipp?\195?\169

Modified: phpcompta/tags/rel670/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/html/js/scripts.js	2013-12-08 11:10:44 UTC (rev=
 5583)
+++ phpcompta/tags/rel670/html/js/scripts.js	2013-12-08 13:29:06 UTC (rev=
 5584)
@@ -815,6 +815,10 @@
                             var y=3DposY;
                             if (json_obj.div !=3D '')obj.cssclass=3D"";
                             obj.style=3D"top:"+y+obj.style;
+                            if ( json_obj.class )=20
+                            {=20
+                                obj.cssclass=3Djson_obj.class;
+                            }
                             add_div(obj);
=20
=20

Modified: phpcompta/tags/rel670/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/ac_common.php	2013-12-08 11:10:44 UTC (=
rev 5583)
+++ phpcompta/tags/rel670/include/ac_common.php	2013-12-08 13:29:06 UTC (=
rev 5584)
@@ -1094,4 +1094,16 @@
 </div>
 <?php
 }
+function get_array_column($p_array,$key)
+{
+    $array=3Darray();
+    for ($i=3D0;$i<count($p_array);$i++)
+    {
+        $r=3D$p_array[$i];
+        if ( isset($r[$key])) {
+            $array[]=3D$r[$key];
+        }
+    }
+    return $array;
+}
 ?>

Modified: phpcompta/tags/rel670/include/balance.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/balance.inc.php	2013-12-08 11:10:44 UTC=
 (rev 5583)
+++ phpcompta/tags/rel670/include/balance.inc.php	2013-12-08 13:29:06 UTC=
 (rev 5584)
@@ -91,7 +91,8 @@
 echo 'Filtre ';
 $rad=3Dnew IRadio();
 $array_ledger=3D$g_user->get_ledger('ALL',3);
-$selected=3D(isset($_GET['r_jrn']))?$_GET['r_jrn']:null;
+$array=3Dget_array_column($array_ledger,'jrn_def_id');
+$selected=3D(isset($_GET['balr_jrn']))?$_GET['balr_jrn']:null;
 $select_cat=3D(isset($_GET['r_cat']))?$_GET['r_cat']:null;
 $array_cat=3DAcc_Ledger::array_cat();
=20
@@ -101,7 +102,9 @@
 echo '<li>'.$rad->input('p_filter',0).'Aucun filtre, tous les journaux'.=
'</li>';
 if (  isset($_GET['p_filter']) && $_GET['p_filter']=3D=3D1) $rad->select=
ed=3D't';
 else $rad->selected=3Dfalse;
-echo '<li>'.$rad->input('p_filter',1).'Filtr=C3=A9 par journal'.HtmlInpu=
t::select_ledger($array_ledger,$selected).'</li>';
+echo '<li>'.$rad->input('p_filter',1).'Filtr=C3=A9 par journal ';
+echo HtmlInput::button_choice_ledger(array('div'=3D>'bal','type'=3D>'ALL=
','all_type'=3D>1));
+echo '</li>';
 if (  isset($_GET['p_filter']) && $_GET['p_filter']=3D=3D2) $rad->select=
ed=3D't';
 else $rad->selected=3Dfalse;
 echo '<li>'.$rad->input('p_filter',2).'Filtr=C3=A9 par cat=C3=A9gorie'.H=
tmlInput::select_cat($array_cat).'</li>';
@@ -194,9 +197,9 @@
     HtmlInput::hidden("from_periode",$_GET['from_periode']).
     HtmlInput::hidden("to_periode",$_GET['to_periode']);
     echo HtmlInput::hidden('p_filter',$_GET['p_filter']);
-    for ($e=3D0;$e<count($array_ledger);$e++)
-        if (isset($selected[$e]))
-            echo    HtmlInput::hidden("r_jrn[$e]",$e);
+    for ($e=3D0;$e<count($selected);$e++)
+        if (isset($selected[$e]) && in_array ($selected[$e],$array))
+            echo    HtmlInput::hidden("r_jrn[$e]",$selected[$e]);
     for ($e=3D0;$e<count($array_cat);$e++)
         if (isset($select_cat[$e]))
             echo    HtmlInput::hidden("r_cat[$e]",$e);
@@ -215,9 +218,11 @@
     HtmlInput::hidden("to_periode",$_GET['to_periode']);
     echo HtmlInput::get_to_hidden(array('ac'));
     echo HtmlInput::hidden('p_filter',$_GET['p_filter']);
-    if (isset($_GET ['r_jrn']))
-        if (isset($selected[$e]))
-            echo    HtmlInput::hidden("r_jrn[$e]",$e);
+    for ($e=3D0;$e<count($selected);$e++){
+        if (isset($selected[$e]) && in_array ($selected[$e],$array)){
+                echo    HtmlInput::hidden("r_jrn[$e]",$selected[$e]);
+            }
+    }
     for ($e=3D0;$e<count($array_cat);$e++)
         if (isset($select_cat[$e]))
             echo    HtmlInput::hidden("r_cat[$e]",$e);
@@ -244,9 +249,9 @@
     $bal=3Dnew Acc_Balance($cn);
     if ( $_GET['p_filter']=3D=3D1)
     {
-        for ($e=3D0;$e<count($array_ledger);$e++)
-            if (isset($selected[$e]))
-                $bal->jrn[]=3D$array_ledger[$e]['jrn_def_id'];
+        for ($e=3D0;$e<count($selected);$e++)
+            if (isset($selected[$e]) && in_array ($selected[$e],$array))
+                $bal->jrn[]=3D$selected[$e];
     }
     if ( $_GET['p_filter'] =3D=3D 0 )
     {

Modified: phpcompta/tags/rel670/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/class_html_input.php	2013-12-08 11:10:4=
4 UTC (rev 5583)
+++ phpcompta/tags/rel670/include/class_html_input.php	2013-12-08 13:29:0=
6 UTC (rev 5584)
@@ -777,5 +777,47 @@
             $button->javascript=3D"calendar_zoom($obj)";
             return $button->input();
         }
+        /**
+         *=20
+         * @param type $p_array indice
+         *   - div div name
+         *   - type ALL, VEN, ACH or ODS
+         *   - all_type 1 yes 0 no
+         *=20
+         */
+        static function button_choice_ledger($p_array)
+        {
+            extract ($p_array);
+            $bledger_param =3D json_encode(array(
+                'dossier' =3D> $_REQUEST['gDossier'],
+                'type' =3D> $type,
+                'all_type' =3D> $all_type,
+                'div' =3D> $div,
+                'class'=3D>'inner_box'
+            ));
=20
-}
\ No newline at end of file
+            $bledger_param =3D str_replace('"', "'", $bledger_param);
+            $bledger =3D new ISmallButton('l');
+            $bledger->label =3D "choix des journaux";
+            $bledger->javascript =3D " show_ledger_choice($bledger_param=
)";
+            $f_ledger =3D $bledger->input();
+            $hid_jrn =3D "";
+            if (isset($_REQUEST[$div . 'nb_jrn']))
+            {
+                for ($i =3D 0; $i < $_REQUEST[$div . 'nb_jrn']; $i++)
+                {
+                    if (isset($_REQUEST[$div . "r_jrn"][$i]))
+                        $hid_jrn.=3DHtmlInput::hidden($div . 'r_jrn[' . =
$i . ']', $_REQUEST[$div . "r_jrn"][$i]);
+                }
+                $hid_jrn.=3DHtmlInput::hidden($div . 'nb_jrn', $_REQUEST=
[$div . 'nb_jrn']);
+            } else
+            {
+                $hid_jrn =3D HtmlInput::hidden($div . 'nb_jrn', 0);
+            }
+            echo $f_ledger;
+            echo '<span id=3D"ledger_id' . $div . '">';
+            echo $hid_jrn;
+            echo '</span>';
+        }
+
+}

Modified: phpcompta/tags/rel670/include/export_balance_csv.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/export_balance_csv.php	2013-12-08 11:10=
:44 UTC (rev 5583)
+++ phpcompta/tags/rel670/include/export_balance_csv.php	2013-12-08 13:29=
:06 UTC (rev 5584)
@@ -49,10 +49,11 @@
     {
         $selected=3D$_GET['r_jrn'];
         $array_ledger=3D$g_user->get_ledger('ALL',3);
-        for ($e=3D0;$e<count($array_ledger);$e++)
+        $array=3Dget_array_column($array_ledger,'jrn_def_id');
+        for ($e=3D0;$e<count($selected);$e++)
         {
-            if (isset ($selected[$e]))
-                $bal->jrn[]=3D$array_ledger[$e]['jrn_def_id'];
+            if (isset ($selected[$e]) && in_array ($selected[$e],$array)=
 )
+                $bal->jrn[]=3D$selected[$e];
         }
     }
     break;

Modified: phpcompta/tags/rel670/include/export_balance_pdf.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/export_balance_pdf.php	2013-12-08 11:10=
:44 UTC (rev 5583)
+++ phpcompta/tags/rel670/include/export_balance_pdf.php	2013-12-08 13:29=
:06 UTC (rev 5584)
@@ -58,10 +58,11 @@
     {
         $selected=3D$_GET['r_jrn'];
         $array_ledger=3D$g_user->get_ledger('ALL',3);
-        for ($e=3D0;$e<count($array_ledger);$e++)
+        $array=3Dget_array_column($array_ledger,'jrn_def_id');
+        for ($e=3D0;$e<count($selected);$e++)
         {
-            if (isset ($selected[$e]))
-                $bal->jrn[]=3D$array_ledger[$e]['jrn_def_id'];
+            if (isset ($selected[$e]) && in_array ($selected[$e],$array)=
)
+                $bal->jrn[]=3D$selected[$e];
         }
     }
     break;

Modified: phpcompta/tags/rel670/include/impress_rec.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel670/include/impress_rec.inc.php	2013-12-08 11:10:44=
 UTC (rev 5583)
+++ phpcompta/tags/rel670/include/impress_rec.inc.php	2013-12-08 13:29:06=
 UTC (rev 5584)
@@ -40,7 +40,8 @@
 $r_jrn=3D(isset($_GET['r_jrn']))?$_GET['r_jrn']:'';
 echo '<form method=3D"GET">';
 echo dossier::hidden().HtmlInput::hidden('ac',$_GET['ac']).HtmlInput::hi=
dden('type','rec');
-echo 'Filtre par journal :'.HtmlInput::select_ledger($aledger,$r_jrn );
+echo 'Filtre par journal';
+HtmlInput::button_choice_ledger(array('div'=3D>'','type'=3D>'ALL','all_t=
ype'=3D>1));
 echo '<br/>';
 /*
  * Limit by date, default current exercice



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


From MAILER-DAEMON Sun Dec 08 08:50:58 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vpel8-000596-DW
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 08:50:58 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 14:39:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129118.1386510657.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5585 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 13:50:57 -0000

Author: danydb
Date: 2013-12-08 14:39:29 +0100 (Sun, 08 Dec 2013)
New Revision: 5585

Modified:
   phpcompta/trunk/html/style-light.css
Log:
Create new style

Modified: phpcompta/trunk/html/style-light.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-light.css	2013-12-08 13:29:06 UTC (rev 558=
4)
+++ phpcompta/trunk/html/style-light.css	2013-12-08 13:39:29 UTC (rev 558=
5)
@@ -1,7 +1,7 @@
 /* <style type=3D"text/css"> */
=20
 BODY {
-    background-color:#EDF3FF;
+    background-color:wheat;
     font-family:arial,verdana,sans-serif,helvetica;
     padding: 0px 0px 0px 0px ;
     margin:0;
@@ -284,8 +284,11 @@
     width:95px;
     height :30px;
     font-size:0.75em;;
-    background-color:#DDE6FF;
-    border:1px solid #99B1DF;
+    border-bottom: solid 1px #e08000;
+    border-collapse: collapse;
+    padding: 0;
+    margin: 0;
+    border-spacing: 0px;
 }
 td.msubtitle {
     text-align:center;
@@ -332,16 +335,13 @@
    =20
 }
 td.selectedcell{
-    border-style:inset;
-    border-color:blue;
-    border-width:1pt ;
     font-size:1.2em;
     font-weight: bold;
-    background:#5D90CD ;
-    color:white;
+    color:red;
     text-align:center;
     width:120px;
     border-radius:5px;
+    border-bottom: solid 4px #e08000;
 }
 a.mtitle {
     text-decoration:none;
@@ -359,7 +359,7 @@
     font-size:0.75em;;
     text-decoration:none;
     display:block;
-    color:white;
+    color:red;
 }
 a.dossier {
     font-size:0.75em;;
@@ -383,7 +383,9 @@
 td.mtitle:hover,td.mtitle:hover a
 {
     background-color:#a9d6e4;
-    color:white;
+    color:white;=20
+    border-bottom: solid 1px #e08000;
+   =20
 }
 td.msubtitle:hover,td.msubtitle:hover a
 {
@@ -832,38 +834,9 @@
     cursor:inherit;
 }
=20
-a#anchorbutton, .button, a.button,div.content a.button {
+a#anchorbutton, .button, a.button,div.content a.button,a#smallanchorbutt=
on, .smallbutton, a.smallbutton,div.content a.smallbutton {
     color:white;
     font-weight: bold;
-    font-size:0.87em;
-    text-decoration:none;
-    font-family: arial,verdana,sans-serif,helvetica;
-    background-image: url("image/bg-submit2.gif");
-    background-repeat: repeat-x;
-    background-position: left;
-
-    border-style:  outset ;
-    border-color:  blue ;
-    border-width:0px;
-    padding:8px;
-    margin-top:3px;
-    cursor:pointer;
-    margin:1 2 1 2;
-    border-radius: 5px;
-    moz-border-radius:5px;
-
-}
-a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover  {
-    cursor:pointer;
-    background-color:white;
-    border-style:  inset ;
-    color:red;
-    margin:1 2 1 2;
-
-}
-a#smallanchorbutton, .smallbutton, a.smallbutton,div.content a.smallbutt=
on {
-    color:white;
-    font-weight: bold;
     font-size:0.75em;
     text-decoration:none;
     font-family: arial,verdana,sans-serif,helvetica;
@@ -885,7 +858,7 @@
     moz-border-radius:2px;
=20
 }
-a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,div.co=
ntent a.smallbutton:hover  {
+a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover,a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,d=
iv.content a.smallbutton:hover  {
     cursor:pointer;
     background-color:white;
     border-style:  inset ;
@@ -940,12 +913,12 @@
     width: 40%;
 }
 body.op_detail_frame,div.op_detail_frame  {
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
     height:100%; width:100%;
=20
 }
 div.inner_box  {
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
     font-family:arial,verdana,sans-serif,helvetica;
     padding:0;
     margin:0;



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


From MAILER-DAEMON Sun Dec 08 08:51:24 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VpelY-0005Bn-Jm
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 08:51:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 14:39:54 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129119.1386510683.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5586 - in phpcompta/trunk: . html/js include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 13:51:23 -0000

Author: danydb
Date: 2013-12-08 14:39:54 +0100 (Sun, 08 Dec 2013)
New Revision: 5586

Modified:
   phpcompta/trunk/
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/include/ac_common.php
   phpcompta/trunk/include/balance.inc.php
   phpcompta/trunk/include/class_html_input.php
   phpcompta/trunk/include/export_balance_csv.php
   phpcompta/trunk/include/export_balance_pdf.php
   phpcompta/trunk/include/impress_rec.inc.php
Log:
Merged revisions 5584 via svnmerge from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel670

........
  r5584 | danydb | 2013-12-08 14:29:06 +0100 (dim., 08 d?\195?\169c. 2013=
) | 5 lines
 =20
  bug #0000928 	Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche=
 est clipp?\195?\169
 =20
  Bug fixed for PRINTBAL and PRINTREC, fixed in export CSV and PDF
 =20
  Task #928 - Fen?\195?\170tre Journaux dans fen?\195?\170tre recherche e=
st clipp?\195?\169
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel670:1-5539,5541-5582
   + /phpcompta/tags/rel670:1-5539,5541-5585

Modified: phpcompta/trunk/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/scripts.js	2013-12-08 13:39:29 UTC (rev 5585)
+++ phpcompta/trunk/html/js/scripts.js	2013-12-08 13:39:54 UTC (rev 5586)
@@ -815,6 +815,10 @@
                             var y=3DposY;
                             if (json_obj.div !=3D '')obj.cssclass=3D"";
                             obj.style=3D"top:"+y+obj.style;
+                            if ( json_obj.class )=20
+                            {=20
+                                obj.cssclass=3Djson_obj.class;
+                            }
                             add_div(obj);
=20
=20

Modified: phpcompta/trunk/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ac_common.php	2013-12-08 13:39:29 UTC (rev 55=
85)
+++ phpcompta/trunk/include/ac_common.php	2013-12-08 13:39:54 UTC (rev 55=
86)
@@ -1094,4 +1094,16 @@
 </div>
 <?php
 }
+function get_array_column($p_array,$key)
+{
+    $array=3Darray();
+    for ($i=3D0;$i<count($p_array);$i++)
+    {
+        $r=3D$p_array[$i];
+        if ( isset($r[$key])) {
+            $array[]=3D$r[$key];
+        }
+    }
+    return $array;
+}
 ?>

Modified: phpcompta/trunk/include/balance.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/balance.inc.php	2013-12-08 13:39:29 UTC (rev =
5585)
+++ phpcompta/trunk/include/balance.inc.php	2013-12-08 13:39:54 UTC (rev =
5586)
@@ -91,7 +91,8 @@
 echo 'Filtre ';
 $rad=3Dnew IRadio();
 $array_ledger=3D$g_user->get_ledger('ALL',3);
-$selected=3D(isset($_GET['r_jrn']))?$_GET['r_jrn']:null;
+$array=3Dget_array_column($array_ledger,'jrn_def_id');
+$selected=3D(isset($_GET['balr_jrn']))?$_GET['balr_jrn']:null;
 $select_cat=3D(isset($_GET['r_cat']))?$_GET['r_cat']:null;
 $array_cat=3DAcc_Ledger::array_cat();
=20
@@ -101,7 +102,9 @@
 echo '<li>'.$rad->input('p_filter',0).'Aucun filtre, tous les journaux'.=
'</li>';
 if (  isset($_GET['p_filter']) && $_GET['p_filter']=3D=3D1) $rad->select=
ed=3D't';
 else $rad->selected=3Dfalse;
-echo '<li>'.$rad->input('p_filter',1).'Filtr=C3=A9 par journal'.HtmlInpu=
t::select_ledger($array_ledger,$selected).'</li>';
+echo '<li>'.$rad->input('p_filter',1).'Filtr=C3=A9 par journal ';
+echo HtmlInput::button_choice_ledger(array('div'=3D>'bal','type'=3D>'ALL=
','all_type'=3D>1));
+echo '</li>';
 if (  isset($_GET['p_filter']) && $_GET['p_filter']=3D=3D2) $rad->select=
ed=3D't';
 else $rad->selected=3Dfalse;
 echo '<li>'.$rad->input('p_filter',2).'Filtr=C3=A9 par cat=C3=A9gorie'.H=
tmlInput::select_cat($array_cat).'</li>';
@@ -194,9 +197,9 @@
     HtmlInput::hidden("from_periode",$_GET['from_periode']).
     HtmlInput::hidden("to_periode",$_GET['to_periode']);
     echo HtmlInput::hidden('p_filter',$_GET['p_filter']);
-    for ($e=3D0;$e<count($array_ledger);$e++)
-        if (isset($selected[$e]))
-            echo    HtmlInput::hidden("r_jrn[$e]",$e);
+    for ($e=3D0;$e<count($selected);$e++)
+        if (isset($selected[$e]) && in_array ($selected[$e],$array))
+            echo    HtmlInput::hidden("r_jrn[$e]",$selected[$e]);
     for ($e=3D0;$e<count($array_cat);$e++)
         if (isset($select_cat[$e]))
             echo    HtmlInput::hidden("r_cat[$e]",$e);
@@ -215,9 +218,11 @@
     HtmlInput::hidden("to_periode",$_GET['to_periode']);
     echo HtmlInput::get_to_hidden(array('ac'));
     echo HtmlInput::hidden('p_filter',$_GET['p_filter']);
-    if (isset($_GET ['r_jrn']))
-        if (isset($selected[$e]))
-            echo    HtmlInput::hidden("r_jrn[$e]",$e);
+    for ($e=3D0;$e<count($selected);$e++){
+        if (isset($selected[$e]) && in_array ($selected[$e],$array)){
+                echo    HtmlInput::hidden("r_jrn[$e]",$selected[$e]);
+            }
+    }
     for ($e=3D0;$e<count($array_cat);$e++)
         if (isset($select_cat[$e]))
             echo    HtmlInput::hidden("r_cat[$e]",$e);
@@ -244,9 +249,9 @@
     $bal=3Dnew Acc_Balance($cn);
     if ( $_GET['p_filter']=3D=3D1)
     {
-        for ($e=3D0;$e<count($array_ledger);$e++)
-            if (isset($selected[$e]))
-                $bal->jrn[]=3D$array_ledger[$e]['jrn_def_id'];
+        for ($e=3D0;$e<count($selected);$e++)
+            if (isset($selected[$e]) && in_array ($selected[$e],$array))
+                $bal->jrn[]=3D$selected[$e];
     }
     if ( $_GET['p_filter'] =3D=3D 0 )
     {

Modified: phpcompta/trunk/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_html_input.php	2013-12-08 13:39:29 UTC =
(rev 5585)
+++ phpcompta/trunk/include/class_html_input.php	2013-12-08 13:39:54 UTC =
(rev 5586)
@@ -777,5 +777,47 @@
             $button->javascript=3D"calendar_zoom($obj)";
             return $button->input();
         }
+        /**
+         *=20
+         * @param type $p_array indice
+         *   - div div name
+         *   - type ALL, VEN, ACH or ODS
+         *   - all_type 1 yes 0 no
+         *=20
+         */
+        static function button_choice_ledger($p_array)
+        {
+            extract ($p_array);
+            $bledger_param =3D json_encode(array(
+                'dossier' =3D> $_REQUEST['gDossier'],
+                'type' =3D> $type,
+                'all_type' =3D> $all_type,
+                'div' =3D> $div,
+                'class'=3D>'inner_box'
+            ));
=20
-}
\ No newline at end of file
+            $bledger_param =3D str_replace('"', "'", $bledger_param);
+            $bledger =3D new ISmallButton('l');
+            $bledger->label =3D "choix des journaux";
+            $bledger->javascript =3D " show_ledger_choice($bledger_param=
)";
+            $f_ledger =3D $bledger->input();
+            $hid_jrn =3D "";
+            if (isset($_REQUEST[$div . 'nb_jrn']))
+            {
+                for ($i =3D 0; $i < $_REQUEST[$div . 'nb_jrn']; $i++)
+                {
+                    if (isset($_REQUEST[$div . "r_jrn"][$i]))
+                        $hid_jrn.=3DHtmlInput::hidden($div . 'r_jrn[' . =
$i . ']', $_REQUEST[$div . "r_jrn"][$i]);
+                }
+                $hid_jrn.=3DHtmlInput::hidden($div . 'nb_jrn', $_REQUEST=
[$div . 'nb_jrn']);
+            } else
+            {
+                $hid_jrn =3D HtmlInput::hidden($div . 'nb_jrn', 0);
+            }
+            echo $f_ledger;
+            echo '<span id=3D"ledger_id' . $div . '">';
+            echo $hid_jrn;
+            echo '</span>';
+        }
+
+}

Modified: phpcompta/trunk/include/export_balance_csv.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/export_balance_csv.php	2013-12-08 13:39:29 UT=
C (rev 5585)
+++ phpcompta/trunk/include/export_balance_csv.php	2013-12-08 13:39:54 UT=
C (rev 5586)
@@ -49,10 +49,11 @@
     {
         $selected=3D$_GET['r_jrn'];
         $array_ledger=3D$g_user->get_ledger('ALL',3);
-        for ($e=3D0;$e<count($array_ledger);$e++)
+        $array=3Dget_array_column($array_ledger,'jrn_def_id');
+        for ($e=3D0;$e<count($selected);$e++)
         {
-            if (isset ($selected[$e]))
-                $bal->jrn[]=3D$array_ledger[$e]['jrn_def_id'];
+            if (isset ($selected[$e]) && in_array ($selected[$e],$array)=
 )
+                $bal->jrn[]=3D$selected[$e];
         }
     }
     break;

Modified: phpcompta/trunk/include/export_balance_pdf.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/export_balance_pdf.php	2013-12-08 13:39:29 UT=
C (rev 5585)
+++ phpcompta/trunk/include/export_balance_pdf.php	2013-12-08 13:39:54 UT=
C (rev 5586)
@@ -58,10 +58,11 @@
     {
         $selected=3D$_GET['r_jrn'];
         $array_ledger=3D$g_user->get_ledger('ALL',3);
-        for ($e=3D0;$e<count($array_ledger);$e++)
+        $array=3Dget_array_column($array_ledger,'jrn_def_id');
+        for ($e=3D0;$e<count($selected);$e++)
         {
-            if (isset ($selected[$e]))
-                $bal->jrn[]=3D$array_ledger[$e]['jrn_def_id'];
+            if (isset ($selected[$e]) && in_array ($selected[$e],$array)=
)
+                $bal->jrn[]=3D$selected[$e];
         }
     }
     break;

Modified: phpcompta/trunk/include/impress_rec.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/impress_rec.inc.php	2013-12-08 13:39:29 UTC (=
rev 5585)
+++ phpcompta/trunk/include/impress_rec.inc.php	2013-12-08 13:39:54 UTC (=
rev 5586)
@@ -40,7 +40,8 @@
 $r_jrn=3D(isset($_GET['r_jrn']))?$_GET['r_jrn']:'';
 echo '<form method=3D"GET">';
 echo dossier::hidden().HtmlInput::hidden('ac',$_GET['ac']).HtmlInput::hi=
dden('type','rec');
-echo 'Filtre par journal :'.HtmlInput::select_ledger($aledger,$r_jrn );
+echo 'Filtre par journal';
+HtmlInput::button_choice_ledger(array('div'=3D>'','type'=3D>'ALL','all_t=
ype'=3D>1));
 echo '<br/>';
 /*
  * Limit by date, default current exercice



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


From MAILER-DAEMON Sun Dec 08 09:51:32 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vpfhj-0001uL-Vi
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 09:51:31 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 15:39:57 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129136.1386514291.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5587 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 14:51:30 -0000

Author: danydb
Date: 2013-12-08 15:39:56 +0100 (Sun, 08 Dec 2013)
New Revision: 5587

Modified:
   phpcompta/trunk/html/style-light.css
Log:
rewrite style-light

Modified: phpcompta/trunk/html/style-light.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-light.css	2013-12-08 13:39:54 UTC (rev 558=
6)
+++ phpcompta/trunk/html/style-light.css	2013-12-08 14:39:56 UTC (rev 558=
7)
@@ -70,14 +70,14 @@
     padding:0px;
     margin:0px;
 }
-h2.info {
-    background-color:#879ed4;
-    color:white;
+h2.info,h2.title{
     font-size:1.34em;
     text-align:center;
     padding:0px;
     margin:0px;
-
+    border-bottom: #CBD9F4 groove 2px;
+    background-color: #F7D9A5;
+    color:black;
 }
 div.welcome h2.info {
     background-color: inherit;
@@ -148,6 +148,7 @@
     display:inline;
     color: blue;
     font-size:0.75em;
+    background-color: #F7F5C0;
    =20
 }
 td.tool a.mtitle:hover {
@@ -284,7 +285,7 @@
     width:95px;
     height :30px;
     font-size:0.75em;;
-    border-bottom: solid 1px #e08000;
+    border-bottom:1px dashed #e08000;
     border-collapse: collapse;
     padding: 0;
     margin: 0;
@@ -312,7 +313,7 @@
 }
=20
 tr.odd {
-    background-color:#DDE6FF;
+    background-color:#E3F4F9;
     font-size:0.87em;;
 }
 tr.highlight {
@@ -324,7 +325,7 @@
   font-size:0.87em;;
 }
 td.odd{
-    background-color:#DDE6FF ;
+    background-color:yellowgreen ;
 }
 td.even{
     border:0px;
@@ -343,7 +344,8 @@
     border-radius:5px;
     border-bottom: solid 4px #e08000;
 }
-a.mtitle {
+a.mtitle,a.mtitle:visited{
+    color:orangered;
     text-decoration:none;
     display:inline;
 }
@@ -407,8 +409,14 @@
     text-decoration:none;
     display:block;
 }
+a.cell:visited {
+    font-size:0.75em;;
+    color:white;
+    background-color:#5D90CD;
+    text-decoration:none;
+    display:block;
+}
=20
-
 a.one:link {
     text-decoration:none;
     color:#3010FF
@@ -840,7 +848,7 @@
     font-size:0.75em;
     text-decoration:none;
     font-family: arial,verdana,sans-serif,helvetica;
-    background-image: url("image/bg-submit2.gif");
+    background-image: url("image/bg-submit3.gif");
     background-repeat: repeat-x;
     background-position: left;
=20
@@ -868,10 +876,10 @@
 }
 td.tool {
     border: solid 1px gray;
-    background-color: white;
-    border-bottom-width: 2px;
+    background-color: #F7F5C0;
+    border-bottom-width: 3px;
     text-align:center;
-    border-radius:2px;
+   =20
 }
 div.topmenu {
=20
@@ -936,13 +944,8 @@
=20
 }
 div#div_jrn{
-    position:absolute;
     border:1px solid black;
-    top:15%;left:100;
-    visibility:hidden;
-    z-index:2;
-    width:50em;
-    background-color:#EDF3FF;
+    background-color:#FCEED4;
=20
 }
 div#div_cat{
@@ -968,7 +971,7 @@
     z-index:2;
     width:50%;
     display:none;
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
 -moz-box-shadow: 10px 10px 5px #888;
 -webkit-box-shadow: 10px 10px 5px #888;
 box-shadow: 10px 10px 5px #888;
@@ -1160,15 +1163,6 @@
     font-size:0.87em;
     font-style: italic;
 }
-h2.title {
-    background-color:#879ed4;
-    color:white;
-    font-size:1.34em;
-    text-align:center;
-    padding:0.24%;
-    border:1px solid darkblue;
-
-}
 h3.title {
     color: blue;
     font-size:0.87em;
@@ -1234,7 +1228,7 @@
 }
 div#modele_op_div{
     display: none;
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
     font-family:arial,verdana,sans-serif,helvetica;
     padding:0;
     margin:0;
@@ -1271,10 +1265,10 @@
     margin-right:0.48%;
 }
 div.inner_box tr.odd {
-    background:  #CBD9F4;
+    background:  #E3F4F9;
 }
 #modele_op_tab tr.odd {
-    background:  #CBD9F4;
+    background:  yellowgreen;
 }
 div#bookmark_div {
     background-color:#e4e7ed;



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


From MAILER-DAEMON Sun Dec 08 15:53:18 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VplLq-0004zS-Ap
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 15:53:18 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 21:41:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129284.1386535997.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r600 - in trunk/rapport_avance: include sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 20:53:16 -0000

Author: danydb
Date: 2013-12-08 21:41:46 +0100 (Sun, 08 Dec 2013)
New Revision: 600

Added:
   trunk/rapport_avance/sql/2-trigger.sql
Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/include/declaration.inc.php
   trunk/rapport_avance/sql/2-listing_compute_detail.sql
Log:
Add order, comment and code into listing_compute_detail
Add fct Rapav_Listing_Formula::display , Rapav_Listing_Formula::keep

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
03 20:40:13 UTC (rev 599)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
08 20:41:46 UTC (rev 600)
@@ -45,72 +45,80 @@
     function compute(RAPAV_Listing &$rapav_listing, $p_date_start, $p_da=
te_end)
     {
         global $cn;
-        // save an object Listing_Compute with the flag to_keep to N
-        $this->data->l_start =3D $p_date_start;
-        $this->data->l_end =3D $p_date_end;
-        $this->data->l_keep =3D 'N';
-        $this->data->l_id =3D $rapav_listing->Data->l_id;
-        $this->data->insert();
+        try
+        {
+            // save an object Listing_Compute with the flag to_keep to N
+            $this->data->l_start =3D $p_date_start;
+            $this->data->l_end =3D $p_date_end;
+            $this->data->l_keep =3D 'N';
+            $this->data->l_id =3D $rapav_listing->Data->l_id;
+            $this->data->insert();
=20
-        // retrieve all the code from $rapav_listing
-        $rapav_listing->load_detail();
-        $a_code =3D $rapav_listing->a_detail;
+            // retrieve all the code from $rapav_listing
+            $rapav_listing->load_detail();
+            $a_code =3D $rapav_listing->a_detail;
=20
-        // for each code, compute the value must end with the rapav_list=
ing_compute objects
-        $nb =3D count($a_code);
+            // for each code, compute the value must end with the rapav_=
listing_compute objects
+            $nb =3D count($a_code);
=20
-        // ------------------------------------------------------
-        // For each card
-        $fiche_def =3D new Fiche_Def($cn);
-        $fiche_def->id =3D $rapav_listing->Data->getp('fiche_def_id');
-        $a_fiche =3D $fiche_def->get_by_type();
-        $nb_fiche =3D count($a_fiche);
-        for ($e =3D 0; $e < $nb_fiche; $e++)
-        {
-            /*
-             * save a listing_compute_fiche
-             */
-            $fiche=3Dnew RAPAV_Listing_Compute_Fiche_SQL();
-            $fiche->f_id=3D$a_fiche[$e]['f_id'];
-            $this->lc_id =3D $this->data->lc_id;
-            $fiche->insert();
-           =20
-            $a_later =3D array();
-            for ($i =3D 0; $i < $nb; $i++)
+            // ------------------------------------------------------
+            // For each card
+            $fiche_def =3D new Fiche_Def($cn);
+            $fiche_def->id =3D $rapav_listing->Data->getp('fiche_def_id'=
);
+            $a_fiche =3D $fiche_def->get_by_type();
+            $nb_fiche =3D count($a_fiche);
+            for ($e =3D 0; $e < $nb_fiche; $e++)
             {
-                //Compute if an object either Rapav_Formula_Account, Rap=
av_Formula_Attribute,
-                // Rapav_Formula_Compute or Rapav_Formula_Formula,
-                unset($compute);
-                $compute =3D RAPAV_Listing_Formula::make_object($a_code[=
$i]->Param);
-                $compute->fiche=3D$fiche;
-               =20
-                if ($compute->sig =3D=3D 'COMP')
+                /*
+                 * save a listing_compute_fiche
+                 */
+                $fiche =3D new RAPAV_Listing_Compute_Fiche_SQL();
+                $fiche->f_id =3D $a_fiche[$e]['f_id'];
+                $this->lc_id =3D $this->data->lc_id;
+                $fiche->insert();
+
+                $a_later =3D array();
+                for ($i =3D 0; $i < $nb; $i++)
                 {
-                    $a_later[] =3D clone $compute;
-                } else
+                    //Compute if an object either Rapav_Formula_Account,=
 Rapav_Formula_Attribute,
+                    // Rapav_Formula_Compute or Rapav_Formula_Formula,
+                    unset($compute);
+                    $compute =3D RAPAV_Listing_Formula::make_object($a_c=
ode[$i]->Param);
+                    $compute->fiche =3D $fiche;
+
+                    if ($compute->sig =3D=3D 'COMP')
+                    {
+                        $a_later[] =3D clone $compute;
+                    } else
+                    {
+                        $compute->set_listing_compute($this->data->lc_id=
);
+                        $compute->filter_operation($this->type_operation=
);
+
+
+                        //compute
+                        $compute->compute($p_date_start, $p_date_end);
+                        // save computed
+                        $compute->save_computed();
+                    }
+                }
+                $nb_later =3D count($a_later);
+
+                /**
+                 * for Listing_Formula_compute
+                 */
+                for ($i =3D 0; $i < $nb_later; $i++)
                 {
                     $compute->set_listing_compute($this->data->lc_id);
-                    $compute->filter_operation($this->type_operation);
-                   =20
-                   =20
-                    //compute
-                    $compute->compute($p_date_start, $p_date_end);
-                    // save computed
-                    $compute->save_computed();
+                    $a_later[$i]->compute($p_date_start, $p_date_end);
+                    $a_later[$i]->save_computed();
                 }
             }
-            $nb_later =3D count($a_later);
-
-            /**
-             * for Listing_Formula_compute
-             */
-            for ($i =3D 0; $i < $nb_later; $i++)
-            {
-                $compute->set_listing_compute($this->data->lc_id);
-                $a_later[$i]->compute($p_date_start, $p_date_end);
-                $a_later[$i]->save_computed();
-            }
+        } catch (Exception $e)
+        {
+            $cn->rollback();
+            throw $e;
         }
+        $cn->commit();
     }
=20
     /**
@@ -127,7 +135,51 @@
=20
     function display()
     {
-       =20
+        global $cn;
+        $ofiche=3Dnew RAPAV_Listing_Compute_Fiche_SQL();
+        $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
+        $nb_fiche=3DDatabase::num_row($r_fiche);
+
+        /* For each card */
+        for ($i =3D 0;$i < $nb_fiche;$i++)
+        {
+            $fiche=3D$ofiche->next($r_fiche,$i);
+           =20
+            $odetail=3Dnew RAPAV_Listing_Compute_Detail_SQL();
+            $r_detail=3D$odetail->seek(" where lf_id=3D$1 order by lc_or=
der",array($fiche->lf_id));
+            $nb_detail=3DDatabase::num_row($r_detail);
+            // table header
+            if ($nb_detail > 0 && $i =3D=3D 0)
+            {
+                echo '<table style=3D"min-width:100%" class=3D"result">'=
;
+                echo '<tr>';
+                for ($e=3D0;$e<$nb_detail;$e++)
+                {
+                    $detail=3D$odetail->next($r_detail,$e);
+                    echo th( $detail->lc_code);
+                }
+                echo '</tr>';
+            }
+            /** for each detail */
+            echo '<tr>';
+            for ($e=3D0;$e <$nb_detail;$e++)
+            {
+                $detail=3D$odetail->next($r_detail,$e);
+               =20
+                echo (($detail->ld_value_numeric !=3D=3D null)?td(nbm($d=
etail->ld_value_numeric),'class=3D"num"'):"");
+                echo (($detail->ld_value_text !=3D=3D null)?td($detail->=
ld_value_text):"");
+                echo (($detail->ld_value_date!=3D=3D null)?td($detail->l=
d_value_date):"");
+            }
+            echo '</tr>';
+        }
+        echo '</table>';
     }
+    function keep($p_id)
+    {
+        $this->data->lc_id=3D$p_id;
+        $this->data->load();
+        $this->data->l_keep=3D'Y';
+        $this->data->save();
+    }
=20
 }

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
03 20:40:13 UTC (rev 599)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
08 20:41:46 UTC (rev 600)
@@ -28,7 +28,11 @@
     {
         $this->detail->lf_id =3D $this->fiche->lf_id;
         $this->detail->lp_id =3D $this->data->lp_id;
+        $this->detail->lc_code =3D $this->data->lp_code;
+        $this->detail->lc_comment =3D $this->data->lp_comment;
+        $this->detail->lc_order =3D $this->data->l_order;
         $this->detail->save();
+        $this->fiche->save();
     }
=20
     function set_listing_compute($param)
@@ -106,10 +110,6 @@
         $this->fiche->f_id =3D $f_id;
     }
=20
-    function save_fiche()
-    {
-        $this->fiche->save();
-    }
=20
     function filter_operation($param)
     {

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-03 =
20:40:13 UTC (rev 599)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-08 =
20:41:46 UTC (rev 600)
@@ -544,6 +544,9 @@
     var $ld_value_text;
     var $lp_id;
     var $lf_id;
+    var $lc_code;
+    var $lc_comment;
+    var $lc_order;
=20
     /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
=20
@@ -561,6 +564,9 @@
             , "ld_value_text" =3D> "ld_value_text"
             , "lp_id" =3D> "lp_id"
             , "lf_id" =3D> "lf_id"
+            ,'code'=3D>'lc_code'
+            ,'comment'=3D>'lc_comment'
+            ,'order'=3D>'lc_order'
         );
=20
         $this->type =3D array(
@@ -571,6 +577,9 @@
             , "ld_value_text" =3D> "text"
             , "lp_id" =3D> "numeric"
             , "lf_id" =3D> "numeric"
+            , 'lc_code'=3D>"text"
+            , 'lc_comment'=3D>"text"
+            , 'lc_order'=3D>"numeric"
         );
=20
         $this->default =3D array(

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-03 20:40:13 =
UTC (rev 599)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-08 20:41:46 =
UTC (rev 600)
@@ -84,6 +84,16 @@
         exit();
     }
 }
+/**
+ * Save listing now you can export them to csv and generate file if any
+ */
+if ( isset($_POST['save_listing']))
+{
+    $listing=3Dnew RAPAV_Listing_Compute();
+    $listing->keep($_POST['lc_id']);
+    $listing->display();
+    exit();
+}
 /*
  * compute listing
  */
@@ -100,6 +110,7 @@
         $listing->filter_operation($_GET['p_operation_paid']);
         $listing->compute($p_listing, $_GET['p_start'], $_GET['p_end']);
         echo '<form class=3D"print" method=3D"POST">';
+        echo HtmlInput::hidden('lc_id',$listing->lc_id);
         $listing->display();
         echo HtmlInput::submit('save_listing', 'Sauver');
         echo '</form>';
@@ -150,12 +161,12 @@
 ?>
 <div id=3D"Choix">
     <h2>Choisissez ce que vous souhaitez g=C3=A9n=C3=A9rer</h2>
-    <table style=3D"border-collapse: collapse;width: 40%">
+    <table style=3D"border-collapse: separate;width: 40%">
         <tr >
-            <td id=3D"rapport_td_id" class=3D"mtitle" style=3D"border-ra=
dius:0">
+            <td id=3D"rapport_td_id" class=3D"mtitle" style=3D"border-ra=
dius:0;border-bottom: 2;border-top:0;border-left:0;border-right:0">
                 <A class=3D"mtitle" HREF=3D"javascript:void(0)" onclick=3D=
"select_rapport();"> Rapport</A>
             </td>
-            <td id=3D"listing_td_id" class=3D"mtitle" style=3D"border-ra=
dius:0">
+            <td id=3D"listing_td_id" class=3D"mtitle" style=3D"border-ra=
dius:0;border-bottom: 2;border-top:0;border-left:0;border-right:0">
                 <A class=3D"mtitle" HREF=3D"javascript:void(0)"onclick=3D=
"select_listing();"> Listing / Documents</A>
             </td>
         </tr>

Modified: trunk/rapport_avance/sql/2-listing_compute_detail.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-03 20:4=
0:13 UTC (rev 599)
+++ trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-08 20:4=
1:46 UTC (rev 600)
@@ -11,6 +11,9 @@
   ld_value_text text, -- Used when computed value is a text
   lp_id bigint, -- fk to listing_param, used for the condition
   lf_id bigint, -- FK to listing_compute_fiche
+  lc_code text,
+  lc_comment text,
+  lc_order bigint,
   CONSTRAINT listing_compute_detail_pkey PRIMARY KEY (ld_id ),
   CONSTRAINT listing_compute_detail_lc_id_fkey FOREIGN KEY (lc_id)
       REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
@@ -33,6 +36,9 @@
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_text =
IS 'Used when computed value is a text';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lp_id IS 'fk t=
o listing_param, used for the condition';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lf_id IS 'FK t=
o listing_compute_fiche';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_code IS 'co=
de from listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_comment IS =
'comment from listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_order IS 'o=
rder from listing_param';
=20
=20
 -- Index: rapport_advanced.fki_listing_compute_fiche_lf_id2_fk

Added: trunk/rapport_avance/sql/2-trigger.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-trigger.sql	                        (rev 0=
)
+++ trunk/rapport_avance/sql/2-trigger.sql	2013-12-08 20:41:46 UTC (rev 6=
00)
@@ -0,0 +1,15 @@
+=EF=BB=BFCREATE OR REPLACE FUNCTION rapport_advanced.listing_compute_trg=
()=20
+ returns trigger=20
+ as=20
+$_BODY_$
+declare=20
+begin
+ NEW.l_timestamp=3Dnow() ;
+return NEW;
+end;
+$_BODY_$ LANGUAGE plpgsql;
+CREATE TRIGGER listing_compute_trg
+ BEFORE=20
+ INSERT OR UPDATE=20
+ on rapport_advanced.listing_compute
+ FOR EACH ROW EXECUTE PROCEDURE rapport_advanced.listing_compute_trg();



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


From MAILER-DAEMON Sun Dec 08 15:56:34 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VplP0-000658-DV
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Dec 2013 15:56:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Dec 2013 21:45:04 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129285.1386536193.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r601 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 08 Dec 2013 20:56:32 -0000

Author: danydb
Date: 2013-12-08 21:45:04 +0100 (Sun, 08 Dec 2013)
New Revision: 601

Modified:
   trunk/rapport_avance/include/class_rapav_listing_formula.php
Log:
protect againt division by zero

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
08 20:41:46 UTC (rev 600)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
08 20:45:04 UTC (rev 601)
@@ -428,7 +428,12 @@
                                 ', array($this->detail->lc_id, $search,$=
this->fiche->f_id));
             $formula =3D str_replace($piece, $value, $formula);
         }
-        eval('$amount =3D ' . $formula . ';');
+        if ( strpos("1".$formula,"/0.0000") !=3D 0)
+        {
+            $amount=3D0;
+        } else {
+            eval('$amount =3D ' . $formula . ';');
+        }
         //
         $this->detail->ld_value_numeric=3D $amount;
     }



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


From MAILER-DAEMON Mon Dec 09 09:09:12 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vq1WJ-0007ii-Ks
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Dec 2013 09:09:11 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Dec 2013 14:57:40 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129860.1386598151.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r602 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Dec 2013 14:09:11 -0000

Author: danydb
Date: 2013-12-09 14:57:40 +0100 (Mon, 09 Dec 2013)
New Revision: 602

Modified:
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/include/declaration.inc.php
Log:
Task #0000937: Listing : filtre sur op?\195?\169ration
Doit encore ?\195?\170tre test?\195?\169
Task #937 - Listing : filtre sur op?\195?\169ration

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
08 20:45:04 UTC (rev 601)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
09 13:57:40 UTC (rev 602)
@@ -283,6 +283,25 @@
     {
         global $cn;
         $sql =3D "";
+        switch ($this->type_operation)
+        {
+            case 0:
+                /*--all operation --*/
+                $sql_filter_operation=3D"";
+                break;
+            case '1':
+                /* -- only paid --*/
+                $sql_filter_operation=3D" and j_id in (select j_id from =
jrnx join=20
+                    jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'Y')";
+                break;
+            case '2':
+                /*-- only unpaid --*/
+                $sql_filter_operation=3D" and j_id in (select j_id from =
jrnx join=20
+                    jrn on (j_grpt=3Djr_grpt_id)=20
+                    join jrn_def on (jrn_def_id=3Djr_def_id)
+                    where coalesce(jr_rapt,'')=3D'' and jrn_def_type in =
('ACH','VEN'))";
+                break;
+        }
         if ($this->data->jrn_def_id !=3D null)
         {
             $sql =3D ' and j_jrn_def =3D' . $this->data->jrn_def_id;
@@ -299,7 +318,7 @@
             $p_start =3D '01.01.1900';
             $p_end =3D '01.01.2100';
         }
-
+        $sql.=3D$sql_filter_operation;
         $amount =3D Impress::parse_formula($cn, "", $this->data->fp_form=
ula, $p_start, $p_end, true, 1, $sql);
         $this->detail->ld_value_numeric =3D $amount['montant'];
     }
@@ -428,6 +447,7 @@
                                 ', array($this->detail->lc_id, $search,$=
this->fiche->f_id));
             $formula =3D str_replace($piece, $value, $formula);
         }
+        /** Protect against division by zero */
         if ( strpos("1".$formula,"/0.0000") !=3D 0)
         {
             $amount=3D0;
@@ -553,6 +573,25 @@
=20
         $sql_date =3D RAPAV::get_sql_date($this->data->date_paid);
         $card_saldo =3D ($this->data->lp_card_saldo =3D=3D 0) ? "jrn1" :=
 "jrn2";
+         switch ($this->type_operation)
+        {
+            case 0:
+                /*--all operation --*/
+                $sql_filter_operation=3D"";
+                break;
+            case '1':
+                /* -- only paid --*/
+                $sql_filter_operation=3D" and $card_saldo.j_id in (selec=
t j_id from jrnx join=20
+                    jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'Y')";
+                break;
+            case '2':
+                /*-- only unpaid --*/
+                $sql_filter_operation=3D" and $card_saldo.j_id in (selec=
t j_id from jrnx join=20
+                    jrn on (j_grpt=3Djr_grpt_id)=20
+                    join jrn_def on (jrn_def_id=3Djr_def_id)
+                    where coalesce(jr_rapt,'')=3D'' and jrn_def_type in =
('ACH','VEN'))";
+                break;
+        }
         bcscale(2);
         switch ($this->data->type_sum_account)
         {
@@ -572,7 +611,7 @@
                                 and
                                 jrn2.f_id =3D $4
                                 $filter_ledger
-                                   =20
+                                $sql_filter_operation   =20
                                 ) as tv_amount
 							 ";
                 $amount =3D $cn->get_value($sql, array(
@@ -601,6 +640,7 @@
                                 and
                                 $card_saldo.j_debit=3D't'
                                 $filter_ledger
+                                $sql_filter_operation
                                 ) as tv_amount
 							 ";
                 $amount =3D $cn->get_value($sql, array(
@@ -626,6 +666,7 @@
                                 and
                                 $card_saldo.j_debit=3D'f'
                                 $filter_ledger
+                                $sql_filter_operation
                                 ) as tv_amount
 							 ";
                 $amount =3D $cn->get_value($sql, array(

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-08 20:45:04 =
UTC (rev 601)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-09 13:57:40 =
UTC (rev 602)
@@ -91,6 +91,11 @@
 {
     $listing=3Dnew RAPAV_Listing_Compute();
     $listing->keep($_POST['lc_id']);
+   =20
+    if ($listing->has_template() =3D=3D true) {
+        $listing->generate_doc();
+    }
+   =20
     $listing->display();
     exit();
 }



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


From MAILER-DAEMON Mon Dec 09 09:16:24 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vq1dI-0005LP-2W
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Dec 2013 09:16:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Dec 2013 15:04:52 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.129868.1386598583.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r603 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Dec 2013 14:16:22 -0000

Author: danydb
Date: 2013-12-09 15:04:52 +0100 (Mon, 09 Dec 2013)
New Revision: 603

Modified:
   trunk/rapport_avance/include/class_rapav_listing_formula.php
Log:
Task #0000937: Listing : filtre sur op?\195?\169ration
jr_rapt vaut paid ou rien
Task #937 - Listing : filtre sur op?\195?\169ration

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
09 13:57:40 UTC (rev 602)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
09 14:04:52 UTC (rev 603)
@@ -292,7 +292,7 @@
             case '1':
                 /* -- only paid --*/
                 $sql_filter_operation=3D" and j_id in (select j_id from =
jrnx join=20
-                    jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'Y')";
+                    jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'paid')=
";
                 break;
             case '2':
                 /*-- only unpaid --*/
@@ -582,7 +582,7 @@
             case '1':
                 /* -- only paid --*/
                 $sql_filter_operation=3D" and $card_saldo.j_id in (selec=
t j_id from jrnx join=20
-                    jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'Y')";
+                    jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'paid')=
";
                 break;
             case '2':
                 /*-- only unpaid --*/



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


From MAILER-DAEMON Mon Dec 09 15:14:09 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vq7DV-0003kc-LH
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Dec 2013 15:14:09 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Dec 2013 21:02:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130132.1386620049.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5588 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Dec 2013 20:14:08 -0000

Author: danydb
Date: 2013-12-09 21:02:37 +0100 (Mon, 09 Dec 2013)
New Revision: 5588

Modified:
   phpcompta/trunk/html/style-light.css
Log:
new style : orange

Modified: phpcompta/trunk/html/style-light.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-light.css	2013-12-08 14:39:56 UTC (rev 558=
7)
+++ phpcompta/trunk/html/style-light.css	2013-12-09 20:02:37 UTC (rev 558=
8)
@@ -42,7 +42,7 @@
 h2 {
     font-family:arial,verdana,sans-serif,helvetica;
     font-size:1.35em;
-    color:grey;
+    color:brown;
     margin:1px;
     padding:1px;
     font-style: italic;
@@ -98,7 +98,7 @@
 }
=20
 h2.info2 {
-    color:blue;
+    color:red;
     font-size:1em;;
     text-align:center;
=20
@@ -148,7 +148,6 @@
     display:inline;
     color: blue;
     font-size:0.75em;
-    background-color: #F7F5C0;
    =20
 }
 td.tool a.mtitle:hover {
@@ -156,7 +155,7 @@
     display:inline;
     font-size:0.75em;;
     color: darkblue;
-    background-color:#5D90CD;
+    background-color:white;
=20
 }
 #top {
@@ -270,7 +269,8 @@
=20
 table.mtitle {
     border:0;
-    text-align:center
+    text-align:center;
+    min-width: 50%;
 }
 td.mshort {
     height:15px;
@@ -282,7 +282,6 @@
 }
 td.mtitle {
     text-align:center;
-    width:95px;
     height :30px;
     font-size:0.75em;;
     border-bottom:1px dashed #e08000;
@@ -313,7 +312,7 @@
 }
=20
 tr.odd {
-    background-color:#E3F4F9;
+    background-color:#FCFFCC;
     font-size:0.87em;;
 }
 tr.highlight {
@@ -325,7 +324,7 @@
   font-size:0.87em;;
 }
 td.odd{
-    background-color:yellowgreen ;
+
 }
 td.even{
     border:0px;
@@ -384,9 +383,9 @@
 }
 td.mtitle:hover,td.mtitle:hover a
 {
-    background-color:#a9d6e4;
-    color:white;=20
-    border-bottom: solid 1px #e08000;
+    background-color:#FCFFCC;
+    color:brown;=20
+    border: solid 1px #e08000;
    =20
 }
 td.msubtitle:hover,td.msubtitle:hover a
@@ -577,11 +576,11 @@
 .input_text_ro {
     border:solid 1px blue;
     background:#EDEDED;
-    color:blue;
+    color:brown;
     margin:1px;
 }
 .input_text {
-    border:groove 1px blue;
+    border:solid 1px brown;
     margin:1px;
 }
 .input_text:hover {
@@ -600,7 +599,7 @@
     color:grey;
 }
 select {
-    border: 1px solid blue;
+    border: 1px solid brown;
     margin:2px;
     background-color:white;
=20
@@ -814,7 +813,7 @@
 }
=20
 div.pc_calendar td.weekend {
-    background-color:#cce0e6;
+    background-color:#FCFFCC;
=20
 }
 div.pc_calendar td.workday{
@@ -848,7 +847,7 @@
     font-size:0.75em;
     text-decoration:none;
     font-family: arial,verdana,sans-serif,helvetica;
-    background-image: url("image/bg-submit3.gif");
+    background-image: url("image/bg-submit4.gif");
     background-repeat: repeat-x;
     background-position: left;
=20
@@ -862,8 +861,6 @@
     margin-top:3px;
     cursor:pointer;
     margin:1 2 1 2;
-    border-radius: 2px;
-    moz-border-radius:2px;
=20
 }
 a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover,a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,d=
iv.content a.smallbutton:hover  {
@@ -886,7 +883,7 @@
 }
=20
 #dossier h2{
-    color:darkblue;
+    color:black;
     display:inline;
     font-size:2em;
     margin:0px;
@@ -992,7 +989,7 @@
 }
 h2#jrn_name
 {
-    color:blue;
+    color:brown;
     font-size:2.74em;
     margin-right:30%;
     float: right;
@@ -1265,10 +1262,10 @@
     margin-right:0.48%;
 }
 div.inner_box tr.odd {
-    background:  #E3F4F9;
+    background:  #FCFFCC;
 }
 #modele_op_tab tr.odd {
-    background:  yellowgreen;
+    background:  #FCFFCC;
 }
 div#bookmark_div {
     background-color:#e4e7ed;
@@ -1325,3 +1322,8 @@
 	list-style-type:none;
 	text-align:left;
 }
+input.inum {
+    text-align:right;
+    border:1px solid brown;
+    margin:2px
+}
\ No newline at end of file



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


From MAILER-DAEMON Mon Dec 09 15:18:38 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vq7Hq-00057P-FJ
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Dec 2013 15:18:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Dec 2013 21:07:07 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130135.1386620317.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5589 - in phpcompta/trunk: html include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Dec 2013 20:18:36 -0000

Author: danydb
Date: 2013-12-09 21:07:07 +0100 (Mon, 09 Dec 2013)
New Revision: 5589

Modified:
   phpcompta/trunk/html/style-color.css
   phpcompta/trunk/html/style-epad.css
   phpcompta/trunk/html/style.css
   phpcompta/trunk/include/class_inum.php
Log:
Update style

Modified: phpcompta/trunk/html/style-color.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-color.css	2013-12-09 20:02:37 UTC (rev 558=
8)
+++ phpcompta/trunk/html/style-color.css	2013-12-09 20:07:07 UTC (rev 558=
9)
@@ -1358,3 +1358,8 @@
 	list-style-type:none;
 	text-align:left;
 }
+input.inum {
+    text-align:right;
+    border:1px solid blue;
+    margin:2px
+}
\ No newline at end of file

Modified: phpcompta/trunk/html/style-epad.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-epad.css	2013-12-09 20:02:37 UTC (rev 5588=
)
+++ phpcompta/trunk/html/style-epad.css	2013-12-09 20:07:07 UTC (rev 5589=
)
@@ -1349,3 +1349,8 @@
 	list-style-type:none;
 	text-align:left;
 }
+input.inum {
+    text-align:right;
+    border:1px solid blue;
+    margin:2px
+}
\ No newline at end of file

Modified: phpcompta/trunk/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style.css	2013-12-09 20:02:37 UTC (rev 5588)
+++ phpcompta/trunk/html/style.css	2013-12-09 20:07:07 UTC (rev 5589)
@@ -1343,3 +1343,8 @@
 	list-style-type:none;
 	text-align:left;
 }
+input.inum {
+    text-align:right;
+    border:1px solid blue;
+    margin:2px
+}
\ No newline at end of file

Modified: phpcompta/trunk/include/class_inum.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_inum.php	2013-12-09 20:02:37 UTC (rev 5=
588)
+++ phpcompta/trunk/include/class_inum.php	2013-12-09 20:07:07 UTC (rev 5=
589)
@@ -45,8 +45,8 @@
         parent::__construct($name,$value);
=20
         $this->size=3D9;
-        $this->style=3D'style=3D"text-align:right;border:1px solid blue;=
margin:2px"';
-		$this->javascript=3D 'onchange=3D"format_number(this,2);"';
+        $this->style=3D'class=3D"inum"';
+	$this->javascript=3D 'onchange=3D"format_number(this,2);"';
     }
     /*!\brief print in html the readonly value of the widget*/
     public function display()
@@ -55,7 +55,8 @@
         $readonly=3D" readonly ";
 		$this->id=3D($this->id=3D=3D"")?$this->name:$this->id;
=20
-        $style=3D'style=3D"border:solid 1px blue;color:black;background:=
#EDEDED;text-align:right"';
+        //$style=3D'style=3D"border:solid 1px blue;color:black;backgroun=
d:#EDEDED;text-align:right"';
+        $style=3D' class=3D"inum input_text_ro"';
         $this->value=3Dstr_replace('"','',$this->value);
         $r=3D'<INPUT '.$style.' TYPE=3D"TEXT" id=3D"'.
            $this->id.'"'.



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


From MAILER-DAEMON Mon Dec 09 15:19:49 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vq7Iz-0005t2-Oi
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Dec 2013 15:19:49 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Dec 2013 21:08:19 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130136.1386620389.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5590 - phpcompta/trunk/html/image
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Dec 2013 20:19:48 -0000

Author: danydb
Date: 2013-12-09 21:08:19 +0100 (Mon, 09 Dec 2013)
New Revision: 5590

Added:
   phpcompta/trunk/html/image/bg-submit4.gif
Log:
Update style

Added: phpcompta/trunk/html/image/bg-submit4.gif
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)


Property changes on: phpcompta/trunk/html/image/bg-submit4.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



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


From MAILER-DAEMON Tue Dec 10 08:02:29 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqMxJ-0001er-SU
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Dec 2013 08:02:29 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Dec 2013 13:50:56 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130775.1386680549.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r604 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Dec 2013 13:02:28 -0000

Author: danydb
Date: 2013-12-10 13:50:56 +0100 (Tue, 10 Dec 2013)
New Revision: 604

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/declaration.inc.php
Log:
task #938 - Listing : permettre s?\195?\169lection
Sauve les fiches
Filtre sur table
Task #938 - Listing : permettre la s?\195?\169lection

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
09 14:04:52 UTC (rev 603)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
10 12:50:56 UTC (rev 604)
@@ -35,7 +35,11 @@
     {
         $this->data =3D new RAPAV_Listing_Compute_SQL();
     }
-
+    function load($p_id)
+    {
+        $this->data->lc_id=3D$p_id;
+        $this->data->load();
+    }
     /**
      * Compute all the values and save them in the table rapav_listing_c=
ompute
      * @param RAPAV_Listing $rapav_listing
@@ -132,8 +136,12 @@
     {
         $this->type_operation =3D $p_type;
     }
-
-    function display()
+    /**
+     * Display the result of the computing, no card are deleted for the =
moment
+     * @param $with true display the checkbox, false don't
+     * @global type $cn
+     */
+    function display($with_sel,$form_name=3D"")
     {
         global $cn;
         $ofiche=3Dnew RAPAV_Listing_Compute_Fiche_SQL();
@@ -151,8 +159,18 @@
             // table header
             if ($nb_detail > 0 && $i =3D=3D 0)
             {
-                echo '<table style=3D"min-width:100%" class=3D"result">'=
;
+                $col=3Darray();
+                for ($e=3D0;$e<$nb_detail;$e++)
+                {
+                    $col[]=3D$e;
+                }
+                $col_range=3Dimplode(",",$col);
+                echo "Filtre ".HtmlInput::filter_table($form_name."_tb",=
 $col_range, 1);
+                echo '<table id=3D"'.$form_name.'_tb" style=3D"min-width=
:100%" class=3D"result">';
                 echo '<tr>';
+                if ( $with_sel ) {
+                    echo '<TH><INPUT TYPE=3D"CHECKBOX" onclick=3D"toggle=
_checkbox(\''.$form_name.'\')"></TH>';
+                }
                 for ($e=3D0;$e<$nb_detail;$e++)
                 {
                     $detail=3D$odetail->next($r_detail,$e);
@@ -165,7 +183,11 @@
             for ($e=3D0;$e <$nb_detail;$e++)
             {
                 $detail=3D$odetail->next($r_detail,$e);
-               =20
+                if ($e=3D=3D0 && $with_sel)
+                {
+                     $check_box=3Dnew ICheckBox("selected_card[]", $fich=
e->lf_id);
+                     echo td($check_box->input());
+                }
                 echo (($detail->ld_value_numeric !=3D=3D null)?td(nbm($d=
etail->ld_value_numeric),'class=3D"num"'):"");
                 echo (($detail->ld_value_text !=3D=3D null)?td($detail->=
ld_value_text):"");
                 echo (($detail->ld_value_date!=3D=3D null)?td($detail->l=
d_value_date):"");
@@ -174,6 +196,10 @@
         }
         echo '</table>';
     }
+    /**
+     * Set the flag to keep to Y
+     * @param $p_id lc_id of the RAPAV_Listing_Compute to keep
+     */
     function keep($p_id)
     {
         $this->data->lc_id=3D$p_id;
@@ -181,5 +207,26 @@
         $this->data->l_keep=3D'Y';
         $this->data->save();
     }
-
+    /**
+     * Return true or false if the corresponding RAPAV_Listing has a doc=
ument
+     * @return true if RAPAV_Listing has a template otherwise false
+     */
+    function has_template()
+    {
+        return false;
+    }
+    /**
+     * Save the card selected, they are in an array with the idx selecte=
d_fiche
+     * @param $p_array array=20
+     */
+    function save_selected($p_array)
+    {
+        global $cn;
+        if (count($p_array)=3D=3D0)
+                return;
+        $to_keep=3Dimplode(',',$p_array);
+        $to_keep=3Dsql_string($to_keep);
+        $cn->exec_sql(" delete from rapport_advanced.listing_compute_fic=
he
+            where lf_id not in ($to_keep)");
+    }
 }

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-09 14:04:52 =
UTC (rev 603)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-10 12:50:56 =
UTC (rev 604)
@@ -90,13 +90,17 @@
 if ( isset($_POST['save_listing']))
 {
     $listing=3Dnew RAPAV_Listing_Compute();
-    $listing->keep($_POST['lc_id']);
+    $listing->load($_POST['lc_id']);
+    if ( isset ($_POST['selected_card']) )
+    {
+        $listing->keep($_POST['lc_id']);
+        $listing->save_selected($_POST['selected_card']);
+    }
    =20
     if ($listing->has_template() =3D=3D true) {
         $listing->generate_doc();
     }
-   =20
-    $listing->display();
+    $listing->display(false);
     exit();
 }
 /*
@@ -114,10 +118,10 @@
         $p_listing =3D new Rapav_Listing($_GET['p_listing']);
         $listing->filter_operation($_GET['p_operation_paid']);
         $listing->compute($p_listing, $_GET['p_start'], $_GET['p_end']);
-        echo '<form class=3D"print" method=3D"POST">';
+        echo '<form class=3D"print" id=3D"'.'select_card_frm'.'" method=3D=
"POST">';
         echo HtmlInput::hidden('lc_id',$listing->lc_id);
-        $listing->display();
-        echo HtmlInput::submit('save_listing', 'Sauver');
+        $listing->display(true,'select_card_frm');
+        echo HtmlInput::submit('save_listing', 'Sauver la s=C3=A9lection=
');
         echo '</form>';
         exit();
     }



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


From MAILER-DAEMON Tue Dec 10 10:40:21 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqPQ5-0005EU-Pl
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Dec 2013 10:40:21 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Dec 2013 15:39:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130920.1386690020.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r605 - trunk/rapport_avance/sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Dec 2013 15:40:20 -0000

Author: danydb
Date: 2013-12-10 15:39:08 +0100 (Tue, 10 Dec 2013)
New Revision: 605

Added:
   trunk/rapport_avance/sql/2-listing_compute_historique.sql
Log:
task #932 : Listing Ajout Historique
Create table
Task #932 - Listing : ajout op?\195?\169ration Historique

Added: trunk/rapport_avance/sql/2-listing_compute_historique.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_historique.sql	           =
             (rev 0)
+++ trunk/rapport_avance/sql/2-listing_compute_historique.sql	2013-12-10 =
14:39:08 UTC (rev 605)
@@ -0,0 +1,30 @@
+
+ALTER TABLE rapport_advanced.listing_param ADD COLUMN lp_paid text;
+COMMENT ON COLUMN rapport_advanced.listing_param.lp_paid IS 'used by Lis=
ting_Compute_Historique';
+
+-- Table: rapport_advanced.listing_compute_historique
+
+-- DROP TABLE rapport_advanced.listing_compute_historique;
+
+CREATE TABLE rapport_advanced.listing_compute_historique
+(
+  lh_id bigserial NOT NULL, -- PK
+  ld_id bigint, -- FK to listing_compute_detail
+  jr_id bigint, -- FK to jrn
+  CONSTRAINT listing_compute_historique_pkey PRIMARY KEY (lh_id ),
+  CONSTRAINT listing_compute_historique_jr_id_fkey FOREIGN KEY (jr_id)
+      REFERENCES jrn (jr_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT listing_compute_historique_ld_id_fkey FOREIGN KEY (ld_id)
+      REFERENCES rapport_advanced.listing_compute_detail (ld_id) MATCH S=
IMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE
+)
+WITH (
+  OIDS=3DFALSE
+);
+COMMENT ON TABLE rapport_advanced.listing_compute_historique
+  IS 'Content : history of operation for a detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.lh_id IS '=
PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.ld_id IS '=
FK to listing_compute_detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.jr_id IS '=
FK to jrn';
+



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


From MAILER-DAEMON Tue Dec 10 12:00:15 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqQfP-000448-1u
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Dec 2013 12:00:15 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Dec 2013 17:48:39 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130985.1386694813.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r606 - in trunk/rapport_avance: doc include sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Dec 2013 17:00:12 -0000

Author: danydb
Date: 2013-12-10 17:48:39 +0100 (Tue, 10 Dec 2013)
New Revision: 606

Modified:
   trunk/rapport_avance/doc/rapav-listing-code.odt
   trunk/rapport_avance/include/class_rapav.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/sql/2-listing_compute_detail.sql
   trunk/rapport_avance/sql/2-listing_compute_historique.sql
Log:
task #932 : Listing Ajout Historique
Create table
Task #932 - Listing : ajout op?\195?\169ration Historique

Modified: trunk/rapport_avance/doc/rapav-listing-code.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)

Modified: trunk/rapport_avance/include/class_rapav.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav.php	2013-12-10 14:39:08 UTC =
(rev 605)
+++ trunk/rapport_avance/include/class_rapav.php	2013-12-10 16:48:39 UTC =
(rev 606)
@@ -97,15 +97,15 @@
      * @return string
      * @throws Exception if $p_date not valid
      */
-    static function get_sql_date($p_date)
+    static function get_sql_date($p_date,$p_prefix=3D"")
     {
         switch ($p_date)
         {
             case 0:
-                $sql_date =3D "and (jrn1.j_date >=3D to_date($2,'DD.MM.Y=
YYY') and jrn1.j_date <=3D to_date($3,'DD.MM.YYYY'))";
+                $sql_date =3D "and ($p_prefix.j_date >=3D to_date($2,'DD=
.MM.YYYY') and jrn1.j_date <=3D to_date($3,'DD.MM.YYYY'))";
                 break;
             case 1:
-                $sql_date =3D " and j_id in=20
+                $sql_date =3D " and $p_prefix.j_id in=20
                 (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
                     where
                     coalesce(jr_date_paid,to_date('01.01.1900','DD.MM.YY=
YY')) >=3D to_date($2,'DD.MM.YYYY')
@@ -114,7 +114,7 @@
                     ";
                 break;
             case 2:
-                $sql_date =3D " and j_id in=20
+                $sql_date =3D " and $p_prefix.j_id in=20
                 (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
                     where
                     coalesce(jr_ech,to_date('01.01.1900','DD.MM.YYYY')) =
>=3D to_date($2,'DD.MM.YYYY')

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
10 14:39:08 UTC (rev 605)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
10 16:48:39 UTC (rev 606)
@@ -179,7 +179,8 @@
                 echo '</tr>';
             }
             /** for each detail */
-            echo '<tr>';
+            $class=3D($i%2=3D=3D0)?' class=3D"even" ':'class=3D"odd" ';
+            echo '<tr '.$class.'>';
             for ($e=3D0;$e <$nb_detail;$e++)
             {
                 $detail=3D$odetail->next($r_detail,$e);

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
10 14:39:08 UTC (rev 605)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
10 16:48:39 UTC (rev 606)
@@ -31,6 +31,7 @@
         $this->detail->lc_code =3D $this->data->lp_code;
         $this->detail->lc_comment =3D $this->data->lp_comment;
         $this->detail->lc_order =3D $this->data->l_order;
+        $this->detail->lc_histo =3D $this->data->lp_histo;
         $this->detail->save();
         $this->fiche->save();
     }
@@ -72,7 +73,9 @@
             case 'COMP':
                 $ret =3D new Rapav_Formula_Compute($obj);
                 break;
-
+            case 'COMP':
+                $ret =3D new Rapav_Formula_Histo($obj);
+                break;
             default:
                 throw new Exception('Object ' . var_export($obj, true) .=
 ' invalide ');
                 break;
@@ -565,14 +568,15 @@
     function compute($p_start, $p_end)
     {
         global $cn;
+        $this->histo=3Darray();
         $filter_ledger =3D "";
         if ($this->data->jrn_def_id !=3D "")
         {
             $filter_ledger =3D " and jrn1.j_jrn_def =3D " . sql_string($=
this->data->jrn_def_id);
         }
=20
-        $sql_date =3D RAPAV::get_sql_date($this->data->date_paid);
         $card_saldo =3D ($this->data->lp_card_saldo =3D=3D 0) ? "jrn1" :=
 "jrn2";
+        $sql_date =3D RAPAV::get_sql_date($this->data->date_paid,$card_s=
aldo);
          switch ($this->type_operation)
         {
             case 0:
@@ -600,9 +604,9 @@
             case 2:
                 // Compute D-C
                 $sql =3D "
-                        select sum(jrnx_amount)
-                        from (
-                                select distinct $card_saldo.j_id,case wh=
en $card_saldo.j_debit =3D 't' then $card_saldo.j_montant else $card_sald=
o.j_montant*(-1) end as jrnx_amount
+                       =20
+                         (
+                                select distinct $card_saldo.j_id,$card_s=
aldo.j_grpt,case when $card_saldo.j_debit =3D 't' then $card_saldo.j_mont=
ant else $card_saldo.j_montant*(-1) end as jrnx_amount
                                 from jrnx as jrn1
                                 join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
                                 where
@@ -614,12 +618,22 @@
                                 $sql_filter_operation   =20
                                 ) as tv_amount
 							 ";
-                $amount =3D $cn->get_value($sql, array(
+                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
 ".$sql, array(
                     $this->data->fp_formula,
                     $p_start,
                     $p_end,
                     $this->fiche->f_id
                 ));
+                if ($this->data->lp_histo =3D=3D 1 )=20
+                {
+                    $this->histo=3D$cn->get_array("select distinct jr_id=
 from=20
+                        jrn join $sql on (j_grpt=3Djr_grpt_id) ",array (
+                        $this->data->fp_formula,
+                        $p_start,
+                        $p_end,
+                        $this->fiche->f_id));
+
+                }
                 // if C-D is asked then reverse the result
                 if ($this->data->type_sum_account =3D=3D 2)
                     $amount =3D bcmul($amount, -1);
@@ -627,9 +641,8 @@
             // Only DEBIT
             case 3:
                 $sql =3D "
-                        select sum(jrnx_amount)
-                        from (
-                                select distinct $card_saldo.j_id,$card_s=
aldo.j_montant as jrnx_amount
+                         (
+                                select distinct $card_saldo.j_id,$card_s=
aldo.j_grpt,$card_saldo.j_montant as jrnx_amount
                                 from jrnx as jrn1
                                 join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
                                 where
@@ -643,19 +656,29 @@
                                 $sql_filter_operation
                                 ) as tv_amount
 							 ";
-                $amount =3D $cn->get_value($sql, array(
+                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
".$sql, array(
                     $this->data->fp_formula,
                     $p_start,
                     $p_end,
                     $this->fiche->f_id
                 ));
+               if ($this->data->lp_histo =3D=3D 1 )=20
+                {
+                    $this->histo=3D$cn->get_array("select distinct jr_id=
 from=20
+                        jrn join $sql on (j_grpt=3Djr_grpt_id) ",array (
+                        $this->data->fp_formula,
+                        $p_start,
+                        $p_end,
+                        $this->fiche->f_id));
+
+                }
+
                 break;
             // Only CREDIT
             case 4:
                 $sql =3D "
-                        select sum(jrnx_amount)
-                        from (
-                                select distinct $card_saldo.j_id,jrn1.j_=
montant as jrnx_amount
+                         (
+                                select distinct $card_saldo.j_id,$card_s=
aldo.j_grpt,$card_saldo.j_montant as jrnx_amount
                                 from jrnx as jrn1
                                 join jrnx as jrn2 on (jrn1.j_grpt=3Djrn2=
.j_grpt)
                                 where
@@ -669,12 +692,23 @@
                                 $sql_filter_operation
                                 ) as tv_amount
 							 ";
-                $amount =3D $cn->get_value($sql, array(
+                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
 ".$sql, array(
                     $this->data->fp_formula,
                     $p_start,
                     $p_end,
                     $this->fiche->f_id
                 ));
+               if ($this->data->lp_histo =3D=3D 1 )=20
+                {
+                    $this->histo=3D$cn->get_array("select distinct jr_id=
 from=20
+                        jrn join $sql on (j_grpt=3Djr_grpt_id) ",array (
+                        $this->data->fp_formula,
+                        $p_start,
+                        $p_end,
+                        $this->fiche->f_id));
+
+                }
+
                 break;
=20
             default:
@@ -686,12 +720,32 @@
         /*
          * 4 possibilities with type_sum_account
          */
+        if ($amount=3D=3D"") $amount=3D0;
         $this->detail->ld_value_numeric =3D $amount;
     }
+    function save_computed()
+    {
+        parent::save_computed();
+        /*
+         * Save history now
+         */
+        if ($this->data->lp_histo =3D=3D 1 )=20
+        {
+            for ($e=3D0;$e<  count($this->histo);$e++)
+            {
+                $histo=3Dnew RAPAV_Listing_Compute_Historique_SQL();
+                $histo->jr_id=3D$this->histo[$e]['jr_id'];
+                $histo->ld_id=3D$this->detail->ld_id;
+                $histo->save();
+                unset($histo);
+            }
+        }
+    }
=20
     function input()
     {
         global $cn;
+        $histo_operation=3Dnew ICheckBox('histo');
         $account =3D new IPoste("p_formula", "", "formula_acc_input_id")=
;
         $account->label =3D _("Recherche poste");
         $account->set_attribute('gDossier', dossier::id());
@@ -702,6 +756,10 @@
                 . ' rapport_advanced.total_type_account order by 2');
=20
         echo '<p>';
+        echo "Reprendre historique op=C3=A9ration: " . $histo_operation-=
>input();
+        echo '</p>';
+       =20
+        echo '<p>';
         echo "type de total : " . $sel_total_type_row->input();
         echo '</p>';
=20
@@ -731,6 +789,7 @@
         $this->data->setp('formula_type', 'ACCOUNT');
         $this->data->setp('sum_signed', $p_array['tt_id']);
         $this->data->lp_card_saldo =3D (isset($p_array['card_saldo'])) ?=
 1 : 0;
+        $this->data->lp_histo =3D (isset($p_array['histo'])) ? 1 : 0;
         $this->data->save();
     }
=20

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-10 =
14:39:08 UTC (rev 605)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-10 =
16:48:39 UTC (rev 606)
@@ -362,6 +362,7 @@
             "attribut_card" =3D> "ad_id",
             "card_saldo" =3D> "lp_card_saldo",
             "with_card" =3D> "lp_with_card",
+            "lp_histo"=3D>"lp_histo"
         );
=20
         $this->type =3D array(
@@ -385,6 +386,7 @@
             "ad_id" =3D> "numeric",
             "lp_card_saldo" =3D> "text",
             "lp_with_card" =3D> "text",
+            "lp_histo" =3D> "numeric",
         );
=20
         $this->default =3D array(
@@ -547,6 +549,7 @@
     var $lc_code;
     var $lc_comment;
     var $lc_order;
+    var $lc_histo;
=20
     /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
=20
@@ -567,6 +570,7 @@
             ,'code'=3D>'lc_code'
             ,'comment'=3D>'lc_comment'
             ,'order'=3D>'lc_order'
+            ,'history'=3D>'lc_histo'
         );
=20
         $this->type =3D array(
@@ -580,6 +584,7 @@
             , 'lc_code'=3D>"text"
             , 'lc_comment'=3D>"text"
             , 'lc_order'=3D>"numeric"
+            , 'lc_histo'=3D>"numeric"
         );
=20
         $this->default =3D array(
@@ -599,5 +604,53 @@
     }
=20
 }
+/**
+ * @brief Manage the table rapport_advanced.listing_compute_historique
+ */
+class RAPAV_Listing_Compute_Historique_SQL extends Phpcompta_SQL
+{
=20
+    //------ Attributes-----
+    var $lh_id;
+    var $ld_id;
+    var $jr_id;
+
+
+    function __construct($p_id =3D -1)
+    {
+
+
+        $this->table =3D "rapport_advanced.listing_compute_historique";
+        $this->primary_key =3D "lh_id";
+
+        $this->name =3D array(
+            "lh_id" =3D> "lh_id", "lh_id" =3D> "lh_id"
+            , "ld_id" =3D> "ld_id"
+            , "jr_id" =3D> "jr_id"
+        );
+
+        $this->type =3D array(
+            "lh_id" =3D> "numeric"
+            , "ld_id" =3D> "numeric"
+            , "jr_id" =3D> "numeric"
+        );
+
+        $this->default =3D array(
+            "lh_id" =3D> "auto"
+        );
+        global $cn;
+        $this->date_format =3D "DD.MM.YYYY";
+        parent::__construct($cn, $p_id);
+    }
+
+    /**
+     * @brief Add here your own code: verify is always call BEFORE inser=
t or update
+     */
+    public function verify()
+    {
+        parent::verify();
+    }
+
+}
+
 ?>

Modified: trunk/rapport_avance/sql/2-listing_compute_detail.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-10 14:3=
9:08 UTC (rev 605)
+++ trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-10 16:4=
8:39 UTC (rev 606)
@@ -1,3 +1,6 @@
+ALTER TABLE rapport_advanced.listing_param ADD COLUMN lp_histo integer;
+ALTER TABLE rapport_advanced.listing_param ALTER COLUMN lp_histo SET DEF=
AULT 0;
+COMMENT ON COLUMN rapport_advanced.listing_param.lp_histo IS '0 : no his=
tory 1 : with history';
 =EF=BB=BF-- Table: rapport_advanced.listing_compute_detail
=20
 -- DROP TABLE rapport_advanced.listing_compute_detail;
@@ -14,6 +17,7 @@
   lc_code text,
   lc_comment text,
   lc_order bigint,
+  lc_histo integer DEFAULT 0,
   CONSTRAINT listing_compute_detail_pkey PRIMARY KEY (ld_id ),
   CONSTRAINT listing_compute_detail_lc_id_fkey FOREIGN KEY (lc_id)
       REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
@@ -39,6 +43,7 @@
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_code IS 'co=
de from listing_param';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_comment IS =
'comment from listing_param';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_order IS 'o=
rder from listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute.lc_histo IS '0 : no h=
istory 1 : with history';
=20
=20
 -- Index: rapport_advanced.fki_listing_compute_fiche_lf_id2_fk

Modified: trunk/rapport_avance/sql/2-listing_compute_historique.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_historique.sql	2013-12-10 =
14:39:08 UTC (rev 605)
+++ trunk/rapport_avance/sql/2-listing_compute_historique.sql	2013-12-10 =
16:48:39 UTC (rev 606)
@@ -2,29 +2,27 @@
 ALTER TABLE rapport_advanced.listing_param ADD COLUMN lp_paid text;
 COMMENT ON COLUMN rapport_advanced.listing_param.lp_paid IS 'used by Lis=
ting_Compute_Historique';
=20
--- Table: rapport_advanced.listing_compute_historique
-
--- DROP TABLE rapport_advanced.listing_compute_historique;
-
 CREATE TABLE rapport_advanced.listing_compute_historique
 (
   lh_id bigserial NOT NULL, -- PK
-  ld_id bigint, -- FK to listing_compute_detail
+  lc_id bigint, -- FK to listing_compute_detail
   jr_id bigint, -- FK to jrn
   CONSTRAINT listing_compute_historique_pkey PRIMARY KEY (lh_id ),
   CONSTRAINT listing_compute_historique_jr_id_fkey FOREIGN KEY (jr_id)
       REFERENCES jrn (jr_id) MATCH SIMPLE
       ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT listing_compute_historique_ld_id_fkey FOREIGN KEY (ld_id)
+  CONSTRAINT listing_compute_historique_ld_id_fkey FOREIGN KEY (lc_id)
       REFERENCES rapport_advanced.listing_compute_detail (ld_id) MATCH S=
IMPLE
       ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE
 )
 WITH (
   OIDS=3DFALSE
 );
+ALTER TABLE rapport_advanced.listing_compute_historique
+  OWNER TO phpcompta;
 COMMENT ON TABLE rapport_advanced.listing_compute_historique
   IS 'Content : history of operation for a detail';
 COMMENT ON COLUMN rapport_advanced.listing_compute_historique.lh_id IS '=
PK';
-COMMENT ON COLUMN rapport_advanced.listing_compute_historique.ld_id IS '=
FK to listing_compute_detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.lc_id IS '=
FK to listing_compute_detail';
 COMMENT ON COLUMN rapport_advanced.listing_compute_historique.jr_id IS '=
FK to jrn';
=20



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


From MAILER-DAEMON Tue Dec 10 12:00:45 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqQft-0004vn-Eg
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Dec 2013 12:00:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Dec 2013 17:49:14 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.130988.1386694844.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r607 - trunk/rapport_avance/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Dec 2013 17:00:44 -0000

Author: danydb
Date: 2013-12-10 17:49:13 +0100 (Tue, 10 Dec 2013)
New Revision: 607

Modified:
   trunk/rapport_avance/include/template/listing_param_input.php
Log:
Change Poste comptable par Solde Fiche / Poste Comptable

Modified: trunk/rapport_avance/include/template/listing_param_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/listing_param_input.php	2013-12=
-10 16:48:39 UTC (rev 606)
+++ trunk/rapport_avance/include/template/listing_param_input.php	2013-12=
-10 16:49:13 UTC (rev 607)
@@ -50,7 +50,7 @@
=20
             <td id=3D"new_account_id_bt"  class=3D"tool" style=3D"backgr=
ound:inherit">
                 <a class=3D"mtitle" href=3D"javascript:void(0)"   onclic=
k=3D"show_listing_formula('new_account_id')">
-                    Poste comptable
+                    Solde Fiche / Poste Comptable
                 </a>
             </td>
             <td id=3D"new_attribute_id_bt"  class=3D"tool" style=3D"back=
ground:inherit">



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


From MAILER-DAEMON Wed Dec 11 08:38:27 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vqjzf-000695-Q1
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 08:38:27 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 14:26:52 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133270.1386769106.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r608 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 13:38:26 -0000

Author: danydb
Date: 2013-12-11 14:26:51 +0100 (Wed, 11 Dec 2013)
New Revision: 608

Added:
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
Log:
Task #939 : generation de document
Nouvelle classe pour g?\195?\169n?\195?\169ration
Task #939 - Listing : G?\195?\169n?\195?\169ration de document

Added: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	  =
                      (rev 0)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 13:26:51 UTC (rev 608)
@@ -0,0 +1,271 @@
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Prop=
erties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of class_rapav_listing_compute_fiche
+ *
+ * @author dany
+ */
+class RAPAV_Listing_Compute_Fiche extends RAPAV_Listing_Compute_Fiche_SQ=
L
+{
+
+    private function get_file_to_parse(RAPAV_Listing_Compute &$listing_c=
ompute)
+    {
+        global $cn;
+        // create a temp directory in /tmp to unpack file and to parse i=
t
+        $dirname =3D tempnam($_ENV['TMP'], 'rapav_listing');
+
+
+        unlink($dirname);
+        mkdir($dirname);
+        chdir($dirname);
+        // Retrieve the lob and save it into $dirname
+        $cn->start();
+
+
+        $filename =3D $listing->Data->l_filename;
+        $exp =3D $cn->lo_export($listing_compute->listing->Data->l_lob, =
$dirname . DIRECTORY_SEPARATOR . $filename);
+
+        if ($exp =3D=3D=3D false)
+            echo_warning(__FILE__ . ":" . __LINE__ . "Export NOK $filena=
me");
+
+        $type =3D "n";
+        // if the doc is a OOo, we need to unzip it first
+        // and the name of the file to change is always content.xml
+        if (strpos($listing_compute->listing->Data->l_mimetype, 'vnd.oas=
is') !=3D 0)
+        {
+            ob_start();
+            $zip =3D new Zip_Extended;
+            if ($zip->open($filename) =3D=3D=3D TRUE)
+            {
+                $zip->extractTo($dirname . DIRECTORY_SEPARATOR);
+                $zip->close();
+            } else
+            {
+                echo __FILE__ . ":" . __LINE__ . "cannot unzip model " .=
 $filename;
+            }
+
+            // Remove the file we do  not need anymore
+            unlink($filename);
+            ob_end_clean();
+            $file_to_parse =3D "content.xml";
+            $type =3D "OOo";
+        } else
+            $file_to_parse =3D $filename;
+
+        $cn->commit();
+        return array($file_to_parse, $dirname, $type);
+    }
+
+    private function generate_document(RAPAV_Listing_Compute &$listing_c=
ompute)
+    {
+        global $cn;
+
+        if ($listing_compute->listing->Data->l_filename =3D=3D "")
+            return;
+
+        list($file_to_parse, $dirname, $type) =3D $this->get_file_to_par=
se($listing_compute);
+
+        // parse the document
+        $this->parse_document($dirname, $file_to_parse, $type);
+
+        // Add special tag
+        $this->special_tag($dirname, $file_to_parse, $type);
+
+        // if the doc is a OOo, we need to re-zip it
+        if ($type =3D=3D 'OOo')
+        {
+            ob_start();
+            $zip =3D new Zip_Extended;
+            $res =3D $zip->open($listing_compute->listing->Data->l_filen=
ame, ZipArchive::CREATE);
+            if ($res !=3D=3D TRUE)
+            {
+                echo __FILE__ . ":" . __LINE__ . "cannot recreate zip";
+                exit;
+            }
+            $zip->add_recurse_folder($dirname . DIRECTORY_SEPARATOR);
+            $zip->close();
+
+            ob_end_clean();
+
+            $file_to_save =3D $listing_compute->listing->Data->l_filenam=
e;
+        } else
+        {
+            $file_to_save =3D $file_to_parse;
+        }
+
+        $this->load_document($dirname . DIRECTORY_SEPARATOR . $file_to_s=
ave);
+    }
+
+    private function parse_document($p_dir, $p_filename, $p_type)
+    {
+        global $cn;
+        // Retrieve all the code + amount
+        if ($p_type =3D=3D "OOo")
+        {
+            $array =3D $cn->get_array("select '&lt;&lt;'||lc_code||'&gt;=
&gt;' as code,
+                    coalesce(ld_value_numeric,ld_value_text,ld_value_dat=
e) as value,
+                    case=20
+                        when ld_value_numeric is not null then 1=20
+                        when ld_value_text is not null then 2
+                        when ld_value_date is not null then 3
+                    end
+                        as type
+                    from rapport_advanced.listing_compute_detail where l=
f_id=3D$1 "
+                    , array($this->lf_id));
+        } else
+        {
+            $array =3D $cn->get_array("select '<<'||lc_code||'>>' as cod=
e,
+                    coalesce(ld_value_numeric,ld_value_text,ld_value_dat=
e) as value =20
+                    case=20
+                        when ld_value_numeric is not null then 1=20
+                        when ld_value_text is not null then 2
+                        when ld_value_date is not null then 3
+                    end
+                        as type
+                    from rapport_advanced.listing_compute_detail where l=
f_id=3D$1 "
+                    , array($this->lf_id));
+        }
+
+        // open the files
+        $ifile =3D fopen($p_dir . '/' . $p_filename, 'r');
+
+        // check if tmpdir exist otherwise create it
+        $temp_dir =3D $_SERVER["DOCUMENT_ROOT"] . DIRECTORY_SEPARATOR . =
'tmp';
+        if (is_dir($temp_dir) =3D=3D false)
+        {
+            if (mkdir($temp_dir) =3D=3D false)
+            {
+                echo "Ne peut pas cr=C3=A9er le r=C3=A9pertoire " . $tem=
p_dir;
+                exit();
+            }
+        }
+        // Compute output_name
+        $oname =3D tempnam($temp_dir, "listing_");
+        $ofile =3D fopen($oname, "w+");
+
+        // read ifile
+        while (!feof($ifile))
+        {
+            $buffer =3D fgets($ifile);
+            // for each code replace in p_filename the code surrounded b=
y << >> by the amount (value) or &lt; or &gt;
+            foreach ($array as $key =3D> $value)
+            {
+                if ($value['type']=3D=3D1)
+                {
+                    $searched =3D 'office:value-type=3D"string"><text:p>=
' . $value['code'];
+                    $replaced =3D 'office:value-type=3D"float" office:va=
lue=3D"' . $value['value'] . '"><text:p>' . $value['code'];
+                    $buffer =3D str_replace($searched, $replaced, $buffe=
r);
+                }
+                $buffer =3D str_replace($value['code'], $value['value'],=
 $buffer);
+            }
+            // write to output
+            fwrite($ofile, $buffer);
+        }
+
+        // copy the output to input
+        fclose($ifile);
+        fclose($ofile);
+
+        if (($ret =3D copy($oname, $p_dir . '/' . $p_filename)) =3D=3D F=
ALSE)
+        {
+            echo _('Ne peut pas sauver ' . $oname . ' vers ' . $p_dir . =
'/' . $p_filename . ' code d\'erreur =3D' . $ret);
+        }
+        unlink($oname);
+    }
+
+    private function special_tag($p_dir, $p_filename, $p_type,RAPAV_List=
ing_Compute &$listing_compute)
+    {
+        global $cn, $g_parameter;
+        // Retrieve all the code + libelle
+        $array[] =3D array('code' =3D> 'PERIODE_DECLARATION', 'value' =3D=
> format_date($listing_compute->Data->l_start) . " - " . format_date($lis=
ting_compute->Data->l_end));
+        $array[] =3D array('code' =3D> 'TITRE', 'value' =3D> $listing_co=
mpute->listing->Data->l_name);
+        $array[] =3D array('code' =3D> 'DOSSIER', 'value' =3D> $cn->form=
at_name($_REQUEST['gDossier'], 'dos'));
+        $array[] =3D array('code' =3D> 'NAME', 'value' =3D> $g_parameter=
->MY_NAME);
+        $array[] =3D array('code' =3D> 'STREET', 'value' =3D> $g_paramet=
er->MY_STREET);
+        $array[] =3D array('code' =3D> 'NUMBER', 'value' =3D> $g_paramet=
er->MY_NUMBER);
+        $array[] =3D array('code' =3D> 'LOCALITE', 'value' =3D> $g_param=
eter->MY_COMMUNE);
+        $array[] =3D array('code' =3D> 'COUNTRY', 'value' =3D> $g_parame=
ter->MY_PAYS);
+        $array[] =3D array('code' =3D> 'PHONE', 'value' =3D> $g_paramete=
r->MY_TEL);
+        $array[] =3D array('code' =3D> 'CEDEX', 'value' =3D> $g_paramete=
r->MY_CP);
+        $array[] =3D array('code' =3D> 'FAX', 'value' =3D> $g_parameter-=
>MY_FAX);
+        $array[] =3D array('code' =3D> 'NOTE', 'value' =3D> $listing_com=
pute->$Data->l_description);
+
+        // open the files
+        $ifile =3D fopen($p_dir . '/' . $p_filename, 'r');
+
+        // check if tmpdir exist otherwise create it
+        $temp_dir =3D $_SERVER["DOCUMENT_ROOT"] . DIRECTORY_SEPARATOR . =
'tmp';
+        if (is_dir($temp_dir) =3D=3D false)
+        {
+            if (mkdir($temp_dir) =3D=3D false)
+            {
+                echo "Ne peut pas cr=C3=A9er le r=C3=A9pertoire " . $tem=
p_dir;
+                exit();
+            }
+        }
+        // Compute output_name
+        $oname =3D tempnam($temp_dir, "listing_");
+        $ofile =3D fopen($oname, "w+");
+
+        // read ifile
+        while (!feof($ifile))
+        {
+            $buffer =3D fgets($ifile);
+            // for each code replace in p_filename the code surrounded b=
y << >> by the amount (value) or &lt; or &gt;
+            foreach ($array as $key =3D> $value)
+            {
+                if ($p_type =3D=3D 'OOo')
+                {
+                    $replace =3D '&lt;&lt;' . $value['code'] . '&gt;&gt;=
';
+                    $fmt_value =3D $value['value'];
+                    $fmt_value =3D str_replace('&', '&amp;', $fmt_value)=
;
+                    $fmt_value =3D str_replace('<', '&lt;', $fmt_value);
+                    $fmt_value =3D str_replace('>', '&gt;', $fmt_value);
+                    $fmt_value =3D str_replace('"', '&quot;', $fmt_value=
);
+                    $fmt_value =3D str_replace("'", '&apos;', $fmt_value=
);
+                } else
+                {
+                    $replace =3D '<<' . $value['code'] . '>>';
+                    $fmt_value =3D $value['value'];
+                }
+                $buffer =3D str_replace($replace, $fmt_value, $buffer);
+            }
+            // write to output
+            fwrite($ofile, $buffer);
+        }
+
+        // copy the output to input
+        fclose($ifile);
+        fclose($ofile);
+
+        if (($ret =3D copy($oname, $p_dir . '/' . $p_filename)) =3D=3D F=
ALSE)
+        {
+            echo _('Ne peut pas sauver ' . $oname . ' vers ' . $p_dir . =
'/' . $p_filename . ' code d\'erreur =3D' . $ret);
+        }
+        unlink($oname);
+    }
+
+    private function load_document_card($p_file)
+    {
+        global $cn;
+        $cn->start();
+        $this->lf_lob =3D $cn->lo_import($p_file);
+        if ($this->lf_lob =3D=3D false)
+        {
+            echo "ne peut pas importer [$p_file]";
+            return 1;
+        }
+        $this->lf_size =3D filesize($p_file);
+        $date =3D date('ymd-Hi');
+        $this->lf_filename =3D $date . '-' . $this->d_filename;
+        $this->update();
+        $cn->commit();
+    }
+
+}



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


From MAILER-DAEMON Wed Dec 11 11:22:55 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqmYp-0000JP-Bb
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 11:22:55 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 17:11:20 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133670.1386778974.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5591 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 16:22:53 -0000

Author: danydb
Date: 2013-12-11 17:11:19 +0100 (Wed, 11 Dec 2013)
New Revision: 5591

Modified:
   phpcompta/trunk/include/class_zip_extended.php
Log:
Fix bug in ZIP creator

Modified: phpcompta/trunk/include/class_zip_extended.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_zip_extended.php	2013-12-09 20:08:19 UT=
C (rev 5590)
+++ phpcompta/trunk/include/class_zip_extended.php	2013-12-11 16:11:19 UT=
C (rev 5591)
@@ -57,11 +57,11 @@
 		  {
 		    // Add the files
 		    $this->addFile($dir . $file, $zipdir . $file);
-		    $filecnt +=3D1;
+		    $filenct +=3D1;
 		  }
 	      }
 	    //Add the directory when folder was empty
-	    if( (!empty($zipdir)) && ($filecnt=3D=3D0))=20
+	    if( (!empty($zipdir)) && ($filenct=3D=3D0))=20
 	      {
 		// remove directory separator before addEmptyDir     =20
 		// otherwhisen create double folder in zip



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


From MAILER-DAEMON Wed Dec 11 11:32:49 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqmiP-0002kd-QG
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 11:32:49 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 17:21:19 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133684.1386779569.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r609 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 16:32:48 -0000

Author: danydb
Date: 2013-12-11 17:21:19 +0100 (Wed, 11 Dec 2013)
New Revision: 609

Modified:
   trunk/rapport_avance/include/class_rapav_declaration.php
Log:
save bug when computing the sql_date

Modified: trunk/rapport_avance/include/class_rapav_declaration.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-11 1=
3:26:51 UTC (rev 608)
+++ trunk/rapport_avance/include/class_rapav_declaration.php	2013-12-11 1=
6:21:19 UTC (rev 609)
@@ -247,6 +247,7 @@
             {
                 if (is_numeric($value['dr_amount']))
                 {
+                    /* -- works only with OOo Calc -- */
                     $searched =3D 'office:value-type=3D"string"><text:p>=
' . $value['code'];
                     $replaced =3D 'office:value-type=3D"float" office:va=
lue=3D"' . $value['dr_amount'] . '"><text:p>' . $value['code'];
                     $buffer =3D str_replace($searched, $replaced, $buffe=
r);
@@ -978,7 +979,7 @@
             $filter_ledger =3D " and jrn1.j_jrn_def =3D " . sql_string($=
this->form->jrn_def_id);
         }
        =20
-        $sql_date=3DRAPAV::get_sql_date($this->form->date_paid );
+       =20
=20
         bcscale(2);
         switch ($this->form->type_sum_account)
@@ -986,6 +987,7 @@
             // Saldo
             case 1:
             case 2:
+                $sql_date=3DRAPAV::get_sql_date($this->form->date_paid,'=
jrn1' );
                 // Compute D-C
                 $sql =3D "
                         select sum(jrnx_amount)
@@ -1013,6 +1015,7 @@
                 break;
             // Only DEBIT
             case 3:
+                $sql_date=3DRAPAV::get_sql_date($this->form->date_paid,'=
jrn1' );
                 $sql =3D "
                         select sum(jrnx_amount)
                         from (
@@ -1038,6 +1041,7 @@
                 break;
             // Only CREDIT
             case 4:
+                $sql_date=3DRAPAV::get_sql_date($this->form->date_paid,'=
jrn1' );
                 $sql =3D "
                         select sum(jrnx_amount)
                         from (



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


From MAILER-DAEMON Wed Dec 11 11:34:02 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vqmja-0003Pb-Bh
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 11:34:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 17:22:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133685.1386779641.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r610 - in trunk/rapport_avance: . doc include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 16:34:01 -0000

Author: danydb
Date: 2013-12-11 17:22:28 +0100 (Wed, 11 Dec 2013)
New Revision: 610

Added:
   trunk/rapport_avance/doc/test-listing.odt
Modified:
   trunk/rapport_avance/doc/
   trunk/rapport_avance/include/class_rapav.php
   trunk/rapport_avance/include/class_rapav_listing.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/include/declaration.inc.php
   trunk/rapport_avance/raw.php
Log:
Task #939 : create document for each
Task #939 - Listing : G?\195?\169n?\195?\169ration de document


Property changes on: trunk/rapport_avance/doc
___________________________________________________________________
Name: svn:ignore
   - .~lock.rapav.odt#
.~lock.rapav-listing-code.odt#

   + .~lock.rapav.odt#
.~lock.rapav-listing-code.odt#
.~lock.test-listing.odt#


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


Property changes on: trunk/rapport_avance/doc/test-listing.odt
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/rapport_avance/include/class_rapav.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav.php	2013-12-11 16:21:19 UTC =
(rev 609)
+++ trunk/rapport_avance/include/class_rapav.php	2013-12-11 16:22:28 UTC =
(rev 610)
@@ -99,13 +99,14 @@
      */
     static function get_sql_date($p_date,$p_prefix=3D"")
     {
+        if ($p_prefix !=3D "") {$p_prefix=3D$p_prefix.".";}
         switch ($p_date)
         {
             case 0:
-                $sql_date =3D "and ($p_prefix.j_date >=3D to_date($2,'DD=
.MM.YYYY') and jrn1.j_date <=3D to_date($3,'DD.MM.YYYY'))";
+                $sql_date =3D "and (".$p_prefix."j_date >=3D to_date($2,=
'DD.MM.YYYY') and ".$p_prefix."j_date <=3D to_date($3,'DD.MM.YYYY'))";
                 break;
             case 1:
-                $sql_date =3D " and $p_prefix.j_id in=20
+                $sql_date =3D " and ".$p_prefix."j_id in=20
                 (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
                     where
                     coalesce(jr_date_paid,to_date('01.01.1900','DD.MM.YY=
YY')) >=3D to_date($2,'DD.MM.YYYY')
@@ -114,7 +115,7 @@
                     ";
                 break;
             case 2:
-                $sql_date =3D " and $p_prefix.j_id in=20
+                $sql_date =3D " and ".$p_prefix."j_id in=20
                 (select j_id from jrnx join jrn on (j_grpt =3D jr_grpt_i=
d)
                     where
                     coalesce(jr_ech,to_date('01.01.1900','DD.MM.YYYY')) =
>=3D to_date($2,'DD.MM.YYYY')

Modified: trunk/rapport_avance/include/class_rapav_listing.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing.php	2013-12-11 16:21=
:19 UTC (rev 609)
+++ trunk/rapport_avance/include/class_rapav_listing.php	2013-12-11 16:22=
:28 UTC (rev 610)
@@ -17,14 +17,14 @@
 class Rapav_Listing
 {
=20
-    public $Data; /* !< RAPAV_Listing_SQL */
+    public $data; /* !< RAPAV_Listing_SQL */
     public $a_detail; /* !< array of RAPAV_Listing_Param corresponding t=
o the listing */
=20
   =20
=20
     function __construct($p_id =3D -1)
     {
-        $this->Data =3D new RAPAV_Listing_SQL($p_id);
+        $this->data =3D new RAPAV_Listing_SQL($p_id);
         $this->a_detail =3D array();
     }
=20
@@ -33,7 +33,7 @@
      */
     function to_list()
     {
-        $res =3D $this->Data->seek('join fiche_def using (fd_id) order b=
y l_name');
+        $res =3D $this->data->seek('join fiche_def using (fd_id) order b=
y l_name');
         require 'template/rapav_listing_to_list.php';
     }
=20
@@ -70,15 +70,15 @@
         /*
          * if $this->l_id <> -1 then modification otherwise add
          */
-        if ($this->Data->l_id <> -1)
+        if ($this->data->l_id <> -1)
         {
-            $name->value =3D $this->Data->l_name;
-            $description->value =3D $this->Data->l_description;
-            $fichedef->selected =3D $this->Data->fd_id;
+            $name->value =3D $this->data->l_name;
+            $description->value =3D $this->data->l_description;
+            $fichedef->selected =3D $this->data->fd_id;
             $ck =3D new ICheckBox('remove');
             $str_remove =3D " Cochez pour effacer " . $ck->input();
             // If there is a file
-            if ($this->Data->l_filename !=3D "")
+            if ($this->data->l_filename !=3D "")
             {
                 $file =3D new ISpan('listing_mod_id');
                 // Add js for removing=20
@@ -86,11 +86,11 @@
                     'gDossier' =3D> Dossier::id(),
                     'ac' =3D> $_REQUEST['ac'],
                     'pc' =3D> $_REQUEST['plugin_code'],
-                    'id' =3D> $this->Data->l_id,
+                    'id' =3D> $this->data->l_id,
                     'cin' =3D> '',
                     'cout' =3D> 'listing_mod_id');
                 $json =3D 'listing_remove_modele(' . str_replace('"', "'=
", json_encode($arg)) . ')';
-                $file->value =3D $this->Data->l_filename . HtmlInput::an=
chor(' <span style=3D"background-color:red">X </span>', "", ' onclick=3D"=
' . $json . '"');
+                $file->value =3D $this->data->l_filename . HtmlInput::an=
chor(' <span style=3D"background-color:red">X </span>', "", ' onclick=3D"=
' . $json . '"');
             }
         }
         require 'template/rapav_listing_form_modify.php';
@@ -114,10 +114,10 @@
                 throw new Exception('Le nom ne peut pas =C3=AAtre vide')=
;
             }
=20
-            $this->Data->setp('name', $p_array['name']);
-            $this->Data->setp('description', $p_array['description']);
-            $this->Data->setp('fiche_def_id', $p_array['fiche_def']);
-            $this->Data->save();
+            $this->data->setp('name', $p_array['name']);
+            $this->data->setp('description', $p_array['description']);
+            $this->data->setp('fiche_def_id', $p_array['fiche_def']);
+            $this->data->save();
             $this->load_file();
             $cn->commit();
         } catch (Exception $ex)
@@ -156,13 +156,13 @@
                     }
                 }
                 // the upload in the database is successfull
-                $this->Data->l_lob =3D $oid;
-                $this->Data->l_filename =3D $_FILES['listing_mod']['name=
'];
-                $this->Data->l_mimetype =3D $_FILES['listing_mod']['type=
'];
-                $this->Data->l_size =3D $_FILES['listing_mod']['size'];
+                $this->data->l_lob =3D $oid;
+                $this->data->l_filename =3D $_FILES['listing_mod']['name=
'];
+                $this->data->l_mimetype =3D $_FILES['listing_mod']['type=
'];
+                $this->data->l_size =3D $_FILES['listing_mod']['size'];
=20
                 // update rapav
-                $this->Data->update();
+                $this->data->update();
             }
         } catch (Exception $ex)
         {
@@ -179,17 +179,17 @@
     function remove_modele()
     {
         global $cn;
-        if ($this->Data->l_lob =3D=3D null)
+        if ($this->data->l_lob =3D=3D null)
             return;
         try
         {
             $cn->start();
-            $this->Data->cn->lo_unlink($this->Data->l_lob);
-            $this->Data->l_filename =3D null;
-            $this->Data->l_lob =3D null;
-            $this->Data->l_size =3D null;
-            $this->Data->l_mimetype =3D null;
-            $this->Data->update();
+            $this->data->cn->lo_unlink($this->data->l_lob);
+            $this->data->l_filename =3D null;
+            $this->data->l_lob =3D null;
+            $this->data->l_size =3D null;
+            $this->data->l_mimetype =3D null;
+            $this->data->update();
             $cn->commit();
         } catch (Exception $e)
         {
@@ -207,7 +207,7 @@
         try
         {
             $this->remove_modele();
-            $this->Data->delete();
+            $this->data->delete();
         } catch (Exception $e)
         {
             $cn->rollback;
@@ -231,7 +231,7 @@
             'gDossier' =3D> Dossier::id(),
             'ac' =3D> $_REQUEST['ac'],
             'pc' =3D> $_REQUEST['plugin_code'],
-            'id' =3D> $this->Data->l_id,
+            'id' =3D> $this->data->l_id,
             'cin' =3D> 'listing_tb_id',
             'cout' =3D> 'listing_mod_div');
         $json =3D 'listing_modify(' . str_replace('"', "'", json_encode(=
$arg)) . ')';
@@ -248,9 +248,9 @@
      */
     function load_detail()
     {
-        if ($this->Data->getp('id') =3D=3D -1)
+        if ($this->data->getp('id') =3D=3D -1)
             throw new Exception("Undefined objet " . __FILE__ . ':' . __=
LINE__);
-        $this->a_detail =3D RAPAV_Listing_Param::get_listing_detail($thi=
s->Data->getp('id'));
+        $this->a_detail =3D RAPAV_Listing_Param::get_listing_detail($thi=
s->data->getp('id'));
     }
=20
     /**
@@ -262,7 +262,7 @@
         $arg =3D json_encode(array(
             'cin' =3D> 'listing_param_input_div_id',
             'gDossier' =3D> Dossier::id(),
-            'id' =3D> $this->Data->getp('id'),
+            'id' =3D> $this->data->getp('id'),
             'tb_id' =3D> 'definition_tb_id',
             'ac' =3D> $_REQUEST['ac'],
             'pc' =3D> $_REQUEST['plugin_code'])
@@ -276,7 +276,7 @@
     {
         $param =3D new RAPAV_Listing_Param();
         $param->Param->l_id=3D$l_id;
-        $param->input($this->Data->getp("id"));
+        $param->input($this->data->getp("id"));
     }
=20
     /**
@@ -287,9 +287,9 @@
     function get_categorie_name()
     {
         global $cn;
-        if ($this->Data->getp('id') =3D=3D 0)
+        if ($this->data->getp('id') =3D=3D 0)
             return;
-        $cat =3D $cn->get_value('select fd_label from fiche_def where fd=
_id=3D$1', array($this->Data->getp('fiche_def_id')));
+        $cat =3D $cn->get_value('select fd_label from fiche_def where fd=
_id=3D$1', array($this->data->getp('fiche_def_id')));
         return $cat;
     }
=20
@@ -301,9 +301,9 @@
     function get_categorie_description()
     {
         global $cn;
-        if ($this->Data->getp('id') =3D=3D 0)
+        if ($this->data->getp('id') =3D=3D 0)
             return;
-        $cat =3D $cn->get_value('select fd_description from fiche_def wh=
ere fd_id=3D$1', array($this->Data->getp('fiche_def_id')));
+        $cat =3D $cn->get_value('select fd_description from fiche_def wh=
ere fd_id=3D$1', array($this->data->getp('fiche_def_id')));
         return $cat;
     }
=20

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 16:21:19 UTC (rev 609)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 16:22:28 UTC (rev 610)
@@ -14,7 +14,7 @@
 require_once 'class_rapav_listing.php';
 require_once 'class_rapav_listing_formula.php';
 require_once 'class_rapport_avance_sql.php';
-
+require_once 'class_rapav_listing_compute_fiche.php';
 class RAPAV_Listing_Compute
 {
=20
@@ -22,6 +22,7 @@
      * < Data point to listing_compute
      */
     var $data;
+    var $listing;
=20
     /**
      * Type of operation
@@ -34,12 +35,19 @@
     function __construct()
     {
         $this->data =3D new RAPAV_Listing_Compute_SQL();
+        $this->listing=3Dnew RAPAV_Listing();
     }
     function load($p_id)
     {
         $this->data->lc_id=3D$p_id;
         $this->data->load();
+        $this->load_listing($this->data->l_id);
     }
+    private function load_listing($p_id)
+    {
+        $this->listing->data->l_id=3D$p_id;
+        $this->listing->data->load();
+    }
     /**
      * Compute all the values and save them in the table rapav_listing_c=
ompute
      * @param RAPAV_Listing $rapav_listing
@@ -55,8 +63,9 @@
             $this->data->l_start =3D $p_date_start;
             $this->data->l_end =3D $p_date_end;
             $this->data->l_keep =3D 'N';
-            $this->data->l_id =3D $rapav_listing->Data->l_id;
+            $this->data->l_id =3D $rapav_listing->data->l_id;
             $this->data->insert();
+            $this->listing=3Dclone $rapav_listing;
=20
             // retrieve all the code from $rapav_listing
             $rapav_listing->load_detail();
@@ -68,7 +77,7 @@
             // ------------------------------------------------------
             // For each card
             $fiche_def =3D new Fiche_Def($cn);
-            $fiche_def->id =3D $rapav_listing->Data->getp('fiche_def_id'=
);
+            $fiche_def->id =3D $rapav_listing->data->getp('fiche_def_id'=
);
             $a_fiche =3D $fiche_def->get_by_type();
             $nb_fiche =3D count($a_fiche);
             for ($e =3D 0; $e < $nb_fiche; $e++)
@@ -214,7 +223,14 @@
      */
     function has_template()
     {
-        return false;
+        if ($this->listing->data->l_filename !=3D "")=20
+            {
+                return true;
+            }
+            else=20
+            {
+                return false;
+            }
     }
     /**
      * Save the card selected, they are in an array with the idx selecte=
d_fiche
@@ -228,6 +244,47 @@
         $to_keep=3Dimplode(',',$p_array);
         $to_keep=3Dsql_string($to_keep);
         $cn->exec_sql(" delete from rapport_advanced.listing_compute_fic=
he
-            where lf_id not in ($to_keep)");
+            where lf_id not in ($to_keep) and lc_id=3D$1",array($this->d=
ata->lc_id));
     }
+    function generate()
+    {
+        global $cn;
+        $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
+        $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
+        $nb_fiche=3DDatabase::num_row($r_fiche);
+
+        /* For each card */
+        for ($i =3D 0;$i < $nb_fiche;$i++)
+        {
+            $fiche=3D$ofiche->next($r_fiche,$i);
+            $fiche->set_listing_compute($this);
+            $fiche->generate_document();
+        }
+    }
+    /**
+     * @brief display a form to generate CSV
+     */
+    function propose_CSV()
+    {
+        echo '<form method=3D"GET" action=3D"extension.raw.php" class=3D=
"noprint" style=3D"display:inline">';
+        echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
+        echo HtmlInput::hidden('lc_id',$this->data->lc_id);
+        echo HtmlInput::hidden('act','export_listing_csv');
+        echo HtmlInput::submit("export_listing", "Export CSV");
+        echo '</form>';
+    }
+    /**
+     * @brief display a form to generate document
+     */
+
+    function propose_generate()
+    {
+        echo '<form method=3D"GET" action=3D"do.php" class=3D"noprint" s=
tyle=3D"display:inline">';
+        echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
+        echo HtmlInput::hidden('lc_id',$this->data->lc_id);
+        echo HtmlInput::submit("generate_document", "G=C3=A9n=C3=A9ratio=
n des documents");
+        echo '</form>';
+       =20
+    }
+  =20
 }

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 16:21:19 UTC (rev 609)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 16:22:28 UTC (rev 610)
@@ -14,8 +14,12 @@
 class RAPAV_Listing_Compute_Fiche extends RAPAV_Listing_Compute_Fiche_SQ=
L
 {
=20
-    private function get_file_to_parse(RAPAV_Listing_Compute &$listing_c=
ompute)
+    function set_listing_compute(RAPAV_Listing_Compute &$listing_compute=
)
     {
+        $this->listing_compute=3D$listing_compute;
+    }
+    private function get_file_to_parse()
+    {
         global $cn;
         // create a temp directory in /tmp to unpack file and to parse i=
t
         $dirname =3D tempnam($_ENV['TMP'], 'rapav_listing');
@@ -28,8 +32,8 @@
         $cn->start();
=20
=20
-        $filename =3D $listing->Data->l_filename;
-        $exp =3D $cn->lo_export($listing_compute->listing->Data->l_lob, =
$dirname . DIRECTORY_SEPARATOR . $filename);
+        $filename =3D $this->listing_compute->listing->data->l_filename;
+        $exp =3D $cn->lo_export($this->listing_compute->listing->data->l=
_lob, $dirname . DIRECTORY_SEPARATOR . $filename);
=20
         if ($exp =3D=3D=3D false)
             echo_warning(__FILE__ . ":" . __LINE__ . "Export NOK $filena=
me");
@@ -37,7 +41,7 @@
         $type =3D "n";
         // if the doc is a OOo, we need to unzip it first
         // and the name of the file to change is always content.xml
-        if (strpos($listing_compute->listing->Data->l_mimetype, 'vnd.oas=
is') !=3D 0)
+        if (strpos($this->listing_compute->listing->data->l_mimetype, 'v=
nd.oasis') !=3D 0)
         {
             ob_start();
             $zip =3D new Zip_Extended;
@@ -62,14 +66,14 @@
         return array($file_to_parse, $dirname, $type);
     }
=20
-    private function generate_document(RAPAV_Listing_Compute &$listing_c=
ompute)
+    function generate_document()
     {
         global $cn;
=20
-        if ($listing_compute->listing->Data->l_filename =3D=3D "")
+        if ($this->listing_compute->listing->data->l_filename =3D=3D "")
             return;
=20
-        list($file_to_parse, $dirname, $type) =3D $this->get_file_to_par=
se($listing_compute);
+        list($file_to_parse, $dirname, $type) =3D $this->get_file_to_par=
se();
=20
         // parse the document
         $this->parse_document($dirname, $file_to_parse, $type);
@@ -82,7 +86,7 @@
         {
             ob_start();
             $zip =3D new Zip_Extended;
-            $res =3D $zip->open($listing_compute->listing->Data->l_filen=
ame, ZipArchive::CREATE);
+            $res =3D $zip->open($this->listing_compute->listing->data->l=
_filename, ZipArchive::CREATE);
             if ($res !=3D=3D TRUE)
             {
                 echo __FILE__ . ":" . __LINE__ . "cannot recreate zip";
@@ -93,7 +97,7 @@
=20
             ob_end_clean();
=20
-            $file_to_save =3D $listing_compute->listing->Data->l_filenam=
e;
+            $file_to_save =3D $this->listing_compute->listing->data->l_f=
ilename;
         } else
         {
             $file_to_save =3D $file_to_parse;
@@ -109,7 +113,7 @@
         if ($p_type =3D=3D "OOo")
         {
             $array =3D $cn->get_array("select '&lt;&lt;'||lc_code||'&gt;=
&gt;' as code,
-                    coalesce(ld_value_numeric,ld_value_text,ld_value_dat=
e) as value,
+                    ld_value_numeric,ld_value_text,ld_value_date,
                     case=20
                         when ld_value_numeric is not null then 1=20
                         when ld_value_text is not null then 2
@@ -121,7 +125,7 @@
         } else
         {
             $array =3D $cn->get_array("select '<<'||lc_code||'>>' as cod=
e,
-                    coalesce(ld_value_numeric,ld_value_text,ld_value_dat=
e) as value =20
+                   ld_value_numeric,ld_value_text,ld_value_date,=20
                     case=20
                         when ld_value_numeric is not null then 1=20
                         when ld_value_text is not null then 2
@@ -156,13 +160,28 @@
             // for each code replace in p_filename the code surrounded b=
y << >> by the amount (value) or &lt; or &gt;
             foreach ($array as $key =3D> $value)
             {
-                if ($value['type']=3D=3D1)
+                switch ($value['type'])
                 {
-                    $searched =3D 'office:value-type=3D"string"><text:p>=
' . $value['code'];
-                    $replaced =3D 'office:value-type=3D"float" office:va=
lue=3D"' . $value['value'] . '"><text:p>' . $value['code'];
-                    $buffer =3D str_replace($searched, $replaced, $buffe=
r);
+                    case 1:
+                        if ($p_type=3D=3D'OOo')
+                        {
+                            $searched =3D 'office:value-type=3D"string">=
<text:p>' . $value['code'];
+                            $replaced =3D 'office:value-type=3D"float" o=
ffice:value=3D"' . $value['ld_value_numeric'] . '"><text:p>' . $value['co=
de'];
+                            $buffer =3D str_replace($searched, $replaced=
, $buffer);
+                        }
+                    // everybody
+                        $buffer =3D str_replace($value['code'], $value['=
ld_value_numeric'], $buffer);
+                    break;
+                    case 2:
+                         $buffer =3D str_replace($value['code'], $value[=
'ld_value_text'], $buffer);
+                        break;
+                    case 3:
+                         $buffer =3D str_replace($value['code'], $value[=
'ld_value_date'], $buffer);
+                        break;
+                    default:
+                        throw new Exception(__FILE__.':'.__LINE__.' type=
 inconnu');
+                        break;
                 }
-                $buffer =3D str_replace($value['code'], $value['value'],=
 $buffer);
             }
             // write to output
             fwrite($ofile, $buffer);
@@ -179,12 +198,12 @@
         unlink($oname);
     }
=20
-    private function special_tag($p_dir, $p_filename, $p_type,RAPAV_List=
ing_Compute &$listing_compute)
+    private function special_tag($p_dir, $p_filename, $p_type)
     {
         global $cn, $g_parameter;
         // Retrieve all the code + libelle
-        $array[] =3D array('code' =3D> 'PERIODE_DECLARATION', 'value' =3D=
> format_date($listing_compute->Data->l_start) . " - " . format_date($lis=
ting_compute->Data->l_end));
-        $array[] =3D array('code' =3D> 'TITRE', 'value' =3D> $listing_co=
mpute->listing->Data->l_name);
+        $array[] =3D array('code' =3D> 'PERIODE_DECLARATION', 'value' =3D=
> format_date($this->listing_compute->data->l_start) . " - " . format_dat=
e($this->listing_compute->data->l_end));
+        $array[] =3D array('code' =3D> 'TITRE', 'value' =3D> $this->list=
ing_compute->listing->data->l_name);
         $array[] =3D array('code' =3D> 'DOSSIER', 'value' =3D> $cn->form=
at_name($_REQUEST['gDossier'], 'dos'));
         $array[] =3D array('code' =3D> 'NAME', 'value' =3D> $g_parameter=
->MY_NAME);
         $array[] =3D array('code' =3D> 'STREET', 'value' =3D> $g_paramet=
er->MY_STREET);
@@ -194,7 +213,7 @@
         $array[] =3D array('code' =3D> 'PHONE', 'value' =3D> $g_paramete=
r->MY_TEL);
         $array[] =3D array('code' =3D> 'CEDEX', 'value' =3D> $g_paramete=
r->MY_CP);
         $array[] =3D array('code' =3D> 'FAX', 'value' =3D> $g_parameter-=
>MY_FAX);
-        $array[] =3D array('code' =3D> 'NOTE', 'value' =3D> $listing_com=
pute->$Data->l_description);
+        $array[] =3D array('code' =3D> 'NOTE', 'value' =3D> $this->listi=
ng_compute->data->l_description);
=20
         // open the files
         $ifile =3D fopen($p_dir . '/' . $p_filename, 'r');
@@ -251,7 +270,7 @@
         unlink($oname);
     }
=20
-    private function load_document_card($p_file)
+    private function load_document($p_file)
     {
         global $cn;
         $cn->start();
@@ -263,7 +282,8 @@
         }
         $this->lf_size =3D filesize($p_file);
         $date =3D date('ymd-Hi');
-        $this->lf_filename =3D $date . '-' . $this->d_filename;
+        $this->lf_filename =3D $date . '-' . $this->listing_compute->lis=
ting->data->l_filename;
+        $this->lf_mimetype=3D $this->listing_compute->listing->data->l_m=
imetype;
         $this->update();
         $cn->commit();
     }

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-11 =
16:21:19 UTC (rev 609)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-11 =
16:22:28 UTC (rev 610)
@@ -293,7 +293,15 @@
=20
 class RAPAV_Listing_SQL extends Phpcompta_SQL
 {
-
+    var $l_id;
+    var $l_description;
+    var $l_name;
+    var $l_lob;
+    var $l_filename;
+    var $l_mimetype;
+    var $l_size;
+    var $fd_id;
+   =20
     function __construct($p_id =3D -1)
     {
         $this->table =3D "rapport_advanced.listing";
@@ -418,8 +426,6 @@
=20
     function __construct($p_id =3D -1)
     {
-
-
         $this->table =3D "rapport_advanced.listing_compute";
         $this->primary_key =3D "lc_id";
=20

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-11 16:21:19 =
UTC (rev 609)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-11 16:22:28 =
UTC (rev 610)
@@ -85,6 +85,15 @@
     }
 }
 /**
+ * Generate all the document
+ */
+if ( isset($_GET['generate_document']) )
+{
+    $listing=3Dnew RAPAV_Listing_Compute();
+    $listing->load($_GET['lc_id']);
+    $listing->generate();
+}
+/**
  * Save listing now you can export them to csv and generate file if any
  */
 if ( isset($_POST['save_listing']))
@@ -97,10 +106,15 @@
         $listing->save_selected($_POST['selected_card']);
     }
    =20
+  =20
+    $listing->display(false);
+    /**
+     * Propose generate and export CSV
+     */
+    $listing->propose_CSV();
     if ($listing->has_template() =3D=3D true) {
-        $listing->generate_doc();
+        $listing->propose_generate();
     }
-    $listing->display(false);
     exit();
 }
 /*

Modified: trunk/rapport_avance/raw.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/raw.php	2013-12-11 16:21:19 UTC (rev 609)
+++ trunk/rapport_avance/raw.php	2013-12-11 16:22:28 UTC (rev 610)
@@ -129,4 +129,12 @@
=20
 	$cn->commit();
 }
+if ($act =3D=3D 'export_listing_csv')
+{
+    /**
+     * @todo
+     * to finish
+     */
+    echo 'export-listing-csv';
+}
 ?>



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


From MAILER-DAEMON Wed Dec 11 12:39:36 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vqnl2-0000l0-54
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 12:39:36 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 18:28:03 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133777.1386783575.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5592 - in phpcompta/trunk/html: . image
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 17:39:35 -0000

Author: danydb
Date: 2013-12-11 18:28:03 +0100 (Wed, 11 Dec 2013)
New Revision: 5592

Added:
   phpcompta/trunk/html/image/orange_flower.gif
Modified:
   phpcompta/trunk/html/style-light.css
Log:
New style : with flower

Added: phpcompta/trunk/html/image/orange_flower.gif
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)


Property changes on: phpcompta/trunk/html/image/orange_flower.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: phpcompta/trunk/html/style-light.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-light.css	2013-12-11 16:11:19 UTC (rev 559=
1)
+++ phpcompta/trunk/html/style-light.css	2013-12-11 17:28:03 UTC (rev 559=
2)
@@ -2,11 +2,15 @@
=20
 BODY {
     background-color:wheat;
+    background-image: url('image/orange_flower.gif');
     font-family:arial,verdana,sans-serif,helvetica;
     padding: 0px 0px 0px 0px ;
     margin:0;
-    color:black;
+    color:brown;
     font-size:0.85em;
+    background-repeat:no-repeat;
+    background-attachment:fixed;
+    background-position:center;=20
 }
 .notice {
     color:red;
@@ -14,7 +18,7 @@
 }
=20
 table.sortable, table.table_large, table.result  ,table.resultfooter {
-    color:blue;
+    color:brown;
     /* border:blue solid 1px; */
     width:100%;
     border-spacing:  0px;
@@ -29,11 +33,9 @@
 table.sortable th,  table.table_large th,table.result th {
     font-weight:bold;
     font-family:arial,verdana,sans-serif,helvetica;
-    border-bottom:1px solid blue;
+    border-bottom:1px solid #7C2A1F;
     border-top:0;
     font-size:0.75em;;
-
-    color:#25238F;
     text-align: left;
     font-style: italic;
=20
@@ -77,7 +79,7 @@
     margin:0px;
     border-bottom: #CBD9F4 groove 2px;
     background-color: #F7D9A5;
-    color:black;
+    color:#7C2A1F;
 }
 div.welcome h2.info {
     background-color: inherit;
@@ -289,6 +291,7 @@
     padding: 0;
     margin: 0;
     border-spacing: 0px;
+    background-color: wheat;
 }
 td.msubtitle {
     text-align:center;
@@ -339,9 +342,9 @@
     font-weight: bold;
     color:red;
     text-align:center;
-    width:120px;
     border-radius:5px;
     border-bottom: solid 4px #e08000;
+    background-color: wheat;
 }
 a.mtitle,a.mtitle:visited{
     color:orangered;
@@ -360,7 +363,6 @@
     font-size:0.75em;;
     text-decoration:none;
     display:block;
-    color:red;
 }
 a.dossier {
     font-size:0.75em;;
@@ -499,7 +501,7 @@
     display:inline;
=20
=20
-    color:black;
+    color:#CC5343;
=20
 }
=20
@@ -507,14 +509,14 @@
     text-decoration:none;
     display:inline;
     color:white;
-    background-color:darkblue;
+    background-color:brown;
=20
=20
 }
 div.content a.mtitle {
     text-decoration:none;
     display:inline;
-    color:blue;
+    color:#CC5343;
=20
=20
=20
@@ -523,7 +525,7 @@
 div.content a.mtitle:hover {
     text-decoration:none;
     display:inline;
-    background-color:darkblue;
+    background-color:brown;
     color:white;
=20
=20
@@ -535,7 +537,7 @@
     border-style:solid;
     background-color:orange;
     border-width:1px;
-    color:blue;
+    color:brown;
 }
 div.content input.text {
     font-family:arial,verdana,sans-serif,helvetica;
@@ -883,7 +885,7 @@
 }
=20
 #dossier h2{
-    color:black;
+    color:brown;
     display:inline;
     font-size:2em;
     margin:0px;
@@ -1069,7 +1071,7 @@
    font-size:0.87em;
     text-decoration:underline;
     display:inline;
-    color: #0000ff;
+    color: #CC5343;
 }
 a.line:hover,div_content a.line
 {



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


From MAILER-DAEMON Wed Dec 11 12:54:39 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vqnzb-0005ow-R7
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 12:54:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 18:43:05 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133819.1386784479.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r611 - in trunk/rapport_avance: . include
	include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 17:54:38 -0000

Author: danydb
Date: 2013-12-11 18:43:05 +0100 (Wed, 11 Dec 2013)
New Revision: 611

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/declaration.inc.php
   trunk/rapport_avance/include/template/rapav_listing_definition.php
   trunk/rapport_avance/raw.php
Log:
New style : with flower
Task #939 - Listing : G?\195?\169n?\195?\169ration de document

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 16:22:28 UTC (rev 610)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 17:43:05 UTC (rev 611)
@@ -147,7 +147,8 @@
     }
     /**
      * Display the result of the computing, no card are deleted for the =
moment
-     * @param $with true display the checkbox, false don't
+     * @param $with_sel true display the checkbox, false don't
+     * @param $form_name Name of the form (to compute it id)
      * @global type $cn
      */
     function display($with_sel,$form_name=3D"")
@@ -185,6 +186,7 @@
                     $detail=3D$odetail->next($r_detail,$e);
                     echo th( $detail->lc_code);
                 }
+                echo th("");
                 echo '</tr>';
             }
             /** for each detail */
@@ -202,6 +204,16 @@
                 echo (($detail->ld_value_text !=3D=3D null)?td($detail->=
ld_value_text):"");
                 echo (($detail->ld_value_date!=3D=3D null)?td($detail->l=
d_value_date):"");
             }
+            if ( $fiche->lf_filename !=3D "")
+            {
+                $arg=3Darray("gDossier"=3D>$_REQUEST['gDossier'],
+                    "plugin_code"=3D>$_REQUEST['plugin_code'],
+                    "ac"=3D>$_REQUEST['ac'],
+                    'act'=3D>'show_file',
+                    'lf_id'=3D>$fiche->lf_id);
+                $href=3D  "extension.raw.php?".http_build_query($arg);
+                echo td('<a href=3D"'.$href.'">'.$fiche->lf_filename);
+            }
             echo '</tr>';
         }
         echo '</table>';

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-11 16:22:28 =
UTC (rev 610)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-11 17:43:05 =
UTC (rev 611)
@@ -92,6 +92,8 @@
     $listing=3Dnew RAPAV_Listing_Compute();
     $listing->load($_GET['lc_id']);
     $listing->generate();
+    $listing->display(false);
+    exit();
 }
 /**
  * Save listing now you can export them to csv and generate file if any

Modified: trunk/rapport_avance/include/template/rapav_listing_definition.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/rapav_listing_definition.php	20=
13-12-11 16:22:28 UTC (rev 610)
+++ trunk/rapport_avance/include/template/rapav_listing_definition.php	20=
13-12-11 17:43:05 UTC (rev 611)
@@ -6,10 +6,10 @@
  */
 ?>
 <p>
-    Nom listing <?php echo h($this->Data->getp('name')); ?>
+    Nom listing <?php echo h($this->data->getp('name')); ?>
 </p>
 <p>
-    Description <?php echo h($this->Data->getp('description')); ?>
+    Description <?php echo h($this->data->getp('description')); ?>
 </p>
 <p>
     Cat=C3=A9gorie <?php echo h($this->get_categorie_name()); ?>

Modified: trunk/rapport_avance/raw.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/raw.php	2013-12-11 16:22:28 UTC (rev 610)
+++ trunk/rapport_avance/raw.php	2013-12-11 17:43:05 UTC (rev 611)
@@ -26,6 +26,8 @@
  */
 require_once 'include/class_formulaire_param.php';
 require_once 'include/class_rapav_declaration.php';
+require_once 'include/class_rapav_listing_compute_fiche.php';
+
 extract($_REQUEST);
 if ($act =3D=3D 'rapav_form_export')
 {
@@ -137,4 +139,51 @@
      */
     echo 'export-listing-csv';
 }
+/**
+ * Show generated file
+ */
+if ($act=3D=3D"show_file")
+{
+        $decl =3D new RAPAV_Listing_Compute_Fiche();
+	$decl->lf_id =3D $lf_id;
+	$decl->load();
+
+	$cn->start();
+	if ($decl->lf_filename =3D=3D "")
+	{
+		ini_set('zlib.output_compression', 'Off');
+		header("Pragma: public");
+		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+		header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+		header("Cache-Control: must-revalidate");
+		header('Content-type: ' . 'text/plain');
+		header('Content-Disposition: attachment;filename=3Dvide.txt', FALSE);
+		header("Accept-Ranges: bytes");
+		echo "******************";
+		echo _("Fichier effac=C3=A9");
+		echo "******************";
+		exit();
+	}
+	$tmp =3D tempnam($_ENV['TMP'], 'document_');
+
+	$cn->lo_export($decl->lf_lob, $tmp);
+
+	ini_set('zlib.output_compression', 'Off');
+	header("Pragma: public");
+	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+	header("Cache-Control: must-revalidate");
+	header('Content-type: ' . $decl->lf_mimetype);
+	header('Content-Disposition: attachment;filename=3D"' . $decl->lf_filen=
ame . '"', FALSE);
+	header("Accept-Ranges: bytes");
+	$file =3D fopen($tmp, 'r');
+	while (!feof($file))
+		echo fread($file, 8192);
+
+	fclose($file);
+
+	unlink($tmp);
+
+	$cn->commit();
+}
 ?>



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


From MAILER-DAEMON Wed Dec 11 13:11:52 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqoGG-0002zP-HG
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 13:11:52 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 19:00:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133936.1386785512.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r612 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 18:11:51 -0000

Author: danydb
Date: 2013-12-11 19:00:16 +0100 (Wed, 11 Dec 2013)
New Revision: 612

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/raw.php
Log:
task #0000940: Listing : export CSV
Export CSV mais sans Historique
Task #940 - Listing : export CSV

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 17:43:05 UTC (rev 611)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 18:00:16 UTC (rev 612)
@@ -298,5 +298,54 @@
         echo '</form>';
        =20
     }
-  =20
+    /**
+     * @brief export to CSV
+     */
+    function to_csv()
+    {
+        $title =3D mb_strtolower($this->listing->data->l_name, 'UTF-8');
+        $title =3D str_replace(array('/', '*', '<', '>', '*', '.', '+', =
':', '?', '!', " ", ";"), "_", $title);
+
+        $out =3D fopen("php://output", "w");
+        header('Pragma: public');
+        header('Content-type: application/csv');
+        header('Content-Disposition: attachment;filename=3D"' . $title .=
 '.csv"', FALSE);
+        $ofiche=3Dnew RAPAV_Listing_Compute_Fiche_SQL();
+        $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
+        $nb_fiche=3DDatabase::num_row($r_fiche);
+
+        /* For each card */
+        for ($i =3D 0;$i < $nb_fiche;$i++)
+        {
+            $fiche=3D$ofiche->next($r_fiche,$i);
+           =20
+            $odetail=3Dnew RAPAV_Listing_Compute_Detail_SQL();
+            $r_detail=3D$odetail->seek(" where lf_id=3D$1 order by lc_or=
der",array($fiche->lf_id));
+            $nb_detail=3DDatabase::num_row($r_detail);
+            // table header
+            if ($nb_detail > 0 && $i =3D=3D 0)
+            {
+                $col=3Darray();
+                for ($e=3D0;$e<$nb_detail;$e++)
+                {
+                    $detail=3D$odetail->next($r_detail,$e);
+                    $col[]=3D$detail->lc_code;
+                }
+                fputcsv($out, $col, ";", '"');
+            }
+            /** for each detail */
+            $det_csv=3Darray();
+            for ($e=3D0;$e <$nb_detail;$e++)
+            {
+                $detail=3D$odetail->next($r_detail,$e);
+                $value=3D (($detail->ld_value_numeric !=3D=3D null)?nb($=
detail->ld_value_numeric):"");
+                $value.=3D(($detail->ld_value_text !=3D=3D null)?$detail=
->ld_value_text:"");
+                $value.=3D(($detail->ld_value_date!=3D=3D null)?$detail-=
>ld_value_date:"");
+                $det_csv[]=3D$value;
+            }
+            fputcsv($out, $det_csv, ';', '"');
+        }
+       =20
+    }
+
 }

Modified: trunk/rapport_avance/raw.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/raw.php	2013-12-11 17:43:05 UTC (rev 611)
+++ trunk/rapport_avance/raw.php	2013-12-11 18:00:16 UTC (rev 612)
@@ -27,6 +27,7 @@
 require_once 'include/class_formulaire_param.php';
 require_once 'include/class_rapav_declaration.php';
 require_once 'include/class_rapav_listing_compute_fiche.php';
+require_once 'include/class_rapav_listing_compute.php';
=20
 extract($_REQUEST);
 if ($act =3D=3D 'rapav_form_export')
@@ -133,11 +134,10 @@
 }
 if ($act =3D=3D 'export_listing_csv')
 {
-    /**
-     * @todo
-     * to finish
-     */
-    echo 'export-listing-csv';
+   $decl =3D new RAPAV_Listing_Compute();
+   $decl->load($lc_id);
+   $decl->to_csv();
+   exit();
 }
 /**
  * Show generated file



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


From MAILER-DAEMON Wed Dec 11 13:21:47 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqoPr-0000Dh-DG
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 13:21:47 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 19:10:20 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.133959.1386786106.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r613 - in trunk/rapport_avance: doc include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 18:21:46 -0000

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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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_fic=
he
             where lf_id not in ($to_keep) and lc_id=3D$1",array($this->d=
ata->lc_id));
     }
-    function generate()
+    function generate($p_id)
     {
         global $cn;
         $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
         $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
         $nb_fiche=3DDatabase::num_row($r_fiche);
-
+        if (isNumber($p_id)=3D=3D0) {$p_id=3D0;}
         /* For each card */
         for ($i =3D 0;$i < $nb_fiche;$i++)
         {
             $fiche=3D$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=3D"GET" action=3D"do.php" class=3D"noprint" s=
tyle=3D"display:inline">';
+        $num=3Dnew IText('numerotation');
+        echo "Num=C3=A9ro de document ".$num->input();
         echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
         echo HtmlInput::hidden('lc_id',$this->data->lc_id);
         echo HtmlInput::submit("generate_document", "G=C3=A9n=C3=A9ratio=
n des documents");

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

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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=3Dnew RAPAV_Listing_Compute();
     $listing->load($_GET['lc_id']);
-    $listing->generate();
+    $listing->generate($_GET['numerotation']);
     $listing->display(false);
     exit();
 }



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


From MAILER-DAEMON Wed Dec 11 15:21:22 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqqHa-0004Pu-5H
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 15:21:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 21:09:43 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.134130.1386793281.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r614 - in trunk/rapport_avance: doc include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 20:21:20 -0000

Author: danydb
Date: 2013-12-11 21:09:43 +0100 (Wed, 11 Dec 2013)
New Revision: 614

Modified:
   trunk/rapport_avance/doc/test-listing.odt
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
Log:
task #934: Listing : numerotation des documents
Task #939 - Listing : G?\195?\169n?\195?\169ration de document

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

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 18:10:20 UTC (rev 613)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 20:09:43 UTC (rev 614)
@@ -86,6 +86,9 @@
=20
         // Add special tag
         $this->special_tag($dirname, $file_to_parse, $type);
+       =20
+        // Add history
+        $this->histo($dirname, $file_to_parse, $type);
=20
         // if the doc is a OOo, we need to re-zip it
         if ($type =3D=3D 'OOo')
@@ -276,7 +279,154 @@
         }
         unlink($oname);
     }
+    private function histo($p_dir, $p_filename, $p_type)
+    {
+        global $cn, $g_parameter;
+        // Retrieve all the code + libelle
+        $sql=3D"
+        select lc_code,jr_date,jr_ech,jr_comment,jr_rapt,jr_montant,jr_i=
nternal,novat,vat,lf_id,jr_pj_number
+                from rapport_advanced.listing_compute_detail
+                left join rapport_advanced.listing_compute_historique  u=
sing (ld_id)
+                join rapport_advanced.listing_compute_fiche using (lf_id=
)
+                left join jrn using (jr_id)
+                left join (
+                                select sum(qs_price) as novat,sum(qs_vat=
) as vat,qs_internal from quant_sold join jrn on(qs_internal=3Djr_interna=
l)
+                                group by qs_internal
+                                union all
+                                select sum(qp_price),sum(qp_vat),qp_inte=
rnal from quant_purchase join jrn on(qp_internal=3Djr_internal)
+                                group by qp_internal) as detail on (deta=
il.qs_internal=3Djrn.jr_internal)
+                where=20
+             lf_id =3D $1
+             order by 2";
+        $array=3D$cn->get_array($sql,array($this->lf_id));
+       =20
+        // Compute the code to replace
+        $nb_code=3Dcount($array);
+       =20
+        if ( $nb_code =3D=3D 0)
+            return;
+       =20
+        $a_code=3Darray();
+        for ($i=3D0;$i<$nb_code;$i++)
+        {
+            $a['date']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_DATE',
+                'value'=3D>$array[$i]['jr_date']
+                    );
+            $a['date_ech']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_ECH',
+                'value'=3D>$array[$i]['jr_ech']);
+           =20
+            $a['montantop']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_MONTANT_OPERATION',
+                'value'=3D>$array[$i]['jr_montant']);
+           =20
+            $a['comment']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_COMMENT',
+                'value'=3D>$array[$i]['jr_comment']);
+           =20
+            $a['piece']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_PIECE',
+                'value'=3D>$array[$i]['jr_pj_number']);
+           =20
+            $a['internal']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_INTERNAL',
+                'value'=3D>$array[$i]['jr_internal']);
+           =20
+            $a['novat']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_HTVA',
+                'value'=3D>$array[$i]['novat']);
+           =20
+            $a['vat']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_TVA',
+                'value'=3D>$array[$i]['vat']);
+           =20
+            $a['total']=3Darray(
+                'key'=3D>$array[$i]['lc_code'].'_TOTAL',
+                'value'=3D>bcadd($array[$i]['vat'],$array[$i]['novat']))=
;
+            $a_code[]=3D$a;
+        }
+        // open the files
+        $ifile =3D fopen($p_dir . '/' . $p_filename, 'r');
=20
+        // check if tmpdir exist otherwise create it
+        $temp_dir =3D $_SERVER["DOCUMENT_ROOT"] . DIRECTORY_SEPARATOR . =
'tmp';
+        if (is_dir($temp_dir) =3D=3D false)
+        {
+            if (mkdir($temp_dir) =3D=3D false)
+            {
+                echo "Ne peut pas cr=C3=A9er le r=C3=A9pertoire " . $tem=
p_dir;
+                exit();
+            }
+        }
+        // Compute output_name
+        $oname =3D tempnam($temp_dir, "listing_");
+        $ofile =3D fopen($oname, "w+");
+
+        // read ifile
+        while (!feof($ifile))
+        {
+            $buffer =3D fgets($ifile);
+            // for each code replace in p_filename the code surrounded b=
y << >> by the amount (value) or &lt; or &gt;
+            foreach ($a_code as $key =3D> $value)
+            {
+               =20
+                // search all key and replace each by a different value
+                foreach ($value as $key2=3D>$value2)
+                {
+                        if ($p_type =3D=3D 'OOo')
+                        {
+                            $replace =3D '&lt;&lt;' . $value2['key'] . '=
&gt;&gt;';
+                            $fmt_value =3D $value2['value'];
+                            $fmt_value =3D str_replace('&', '&amp;', $fm=
t_value);
+                            $fmt_value =3D str_replace('<', '&lt;', $fmt=
_value);
+                            $fmt_value =3D str_replace('>', '&gt;', $fmt=
_value);
+                            $fmt_value =3D str_replace('"', '&quot;', $f=
mt_value);
+                            $fmt_value =3D str_replace("'", '&apos;', $f=
mt_value);
+                        } else
+                        {
+                            $replace =3D '<<' . $value2['key'] . '>>';
+                            $fmt_value =3D $value2['value'];
+                        }
+                        $buffer =3D preg_replace("/".$replace."/", $fmt_=
value, $buffer,1);
+                }
+            }
+            /**
+             * clean  remainging HISTO tags
+             */
+            foreach ($a_code as $key =3D> $value)
+            {
+               =20
+                // search all key and replace each by a different value
+                foreach ($value as $key2=3D>$value2)
+                {
+                        if ($p_type =3D=3D 'OOo')
+                        {
+                            $replace =3D '&lt;&lt;' . $value2['key'] . '=
&gt;&gt;';
+                            $fmt_value =3D "";
+                        } else
+                        {
+                            $replace =3D '<<' . $value2['key'] . '>>';
+                            $fmt_value =3D "";
+                        }
+                        $buffer =3D str_replace($replace, $fmt_value, $b=
uffer);
+                }
+            }
+            // write to output
+            fwrite($ofile, $buffer);
+        }
+       =20
+
+        // copy the output to input
+        fclose($ifile);
+        fclose($ofile);
+
+        if (($ret =3D copy($oname, $p_dir . '/' . $p_filename)) =3D=3D F=
ALSE)
+        {
+            echo _('Ne peut pas sauver ' . $oname . ' vers ' . $p_dir . =
'/' . $p_filename . ' code d\'erreur =3D' . $ret);
+        }
+        unlink($oname);
+    }
     private function load_document($p_file)
     {
         global $cn;



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


From MAILER-DAEMON Wed Dec 11 15:51:12 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VqqkS-0000eA-RX
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 15:51:12 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 21:39:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.134158.1386795071.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r615 - in trunk/rapport_avance: . include sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 20:51:11 -0000

Author: danydb
Date: 2013-12-11 21:39:37 +0100 (Wed, 11 Dec 2013)
New Revision: 615

Added:
   trunk/rapport_avance/ajax_rapav_listing_display.php
Modified:
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/include/historique.inc.php
   trunk/rapport_avance/rapav_javascript.js
   trunk/rapport_avance/sql/2-listing_compute.sql
Log:
task #941  Listing : voir l'historique des listing sauvegarde

Ajout display + delete
Task #941 - Listing : voir l'historique des listing sauvegard?\195?\169

Modified: trunk/rapport_avance/ajax.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax.php	2013-12-11 20:09:43 UTC (rev 614)
+++ trunk/rapport_avance/ajax.php	2013-12-11 20:39:37 UTC (rev 615)
@@ -6,7 +6,7 @@
         'rapav_search_code,save_param_detail,rapav_declaration_display,'=
.
         'listing_modify,listing_remove_modele,listing_display_definition=
,'.
         'listing_param_add,save_param_listing,listing_detail_remove,'.
-        'listing_search_code');
+        'listing_search_code,rapav_listing_display');
 if ( in_array($act,$a_action ) =3D=3D true )
 {
     include 'ajax_'.$act.'.php';
@@ -29,6 +29,13 @@
                 array($_GET['d_id']));
         break;
     ////////////////////////////////////////////////////////////////////=
/
+    // Delete a saved listing (from history)
+    ////////////////////////////////////////////////////////////////////=
/
+    case 'rapav_listing_delete':
+        $cn->exec_sql("delete from rapport_advanced.listing_compute wher=
e lc_id=3D$1",
+                array($_GET['d_id']));
+        break;
+    ////////////////////////////////////////////////////////////////////=
/
     // Remove a template
     ////////////////////////////////////////////////////////////////////=
/
     case 'rapav_remove_doc_template':

Added: trunk/rapport_avance/ajax_rapav_listing_display.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_rapav_listing_display.php	                 =
       (rev 0)
+++ trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-11 20:39:=
37 UTC (rev 615)
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * @brief display a declaration from history but you can't modify it
+ */
+require_once 'include/class_rapav_listing_compute.php';
+global $cn;
+echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");
+$decl =3D new RAPAV_Listing_Compute();
+$decl->load($_GET['d_id']);
+$decl->display(false);
+//echo $decl->anchor_document();
+echo '<hr>';
+$decl->propose_CSV();
+echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");
+// require_once '.php';
+
+?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 20:09:43 UTC (rev 614)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 20:39:37 UTC (rev 615)
@@ -60,6 +60,7 @@
         try
         {
             // save an object Listing_Compute with the flag to_keep to N
+            $this->data->l_name=3D$rapav_listing->data->l_name;
             $this->data->l_start =3D $p_date_start;
             $this->data->l_end =3D $p_date_end;
             $this->data->l_keep =3D 'N';

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-11 =
20:09:43 UTC (rev 614)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-11 =
20:39:37 UTC (rev 615)
@@ -421,6 +421,7 @@
     var $l_end;
     var $l_keep;
     var $l_timestamp;
+    var $l_name;
=20
     /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
=20
@@ -437,6 +438,7 @@
             , "l_end" =3D> "l_end"
             , "l_keep" =3D> "l_keep"
             , "l_timestamp" =3D> "l_timestamp"
+            ,"l_name"=3D>"l_name"
         );
=20
         $this->type =3D array(
@@ -447,6 +449,7 @@
             , "l_end" =3D> "date"
             , "l_keep" =3D> "text"
             , "l_timestamp" =3D> "date"
+            , "l_name" =3D> "text"
         );
=20
         $this->default =3D array(

Modified: trunk/rapport_avance/include/historique.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/historique.inc.php	2013-12-11 20:09:43 U=
TC (rev 614)
+++ trunk/rapport_avance/include/historique.inc.php	2013-12-11 20:39:37 U=
TC (rev 615)
@@ -33,10 +33,19 @@
 		d_description,d_generated,
 		to_char(d_start,'YYMMDD') as fmt_start,
 		to_char(d_end,'YYMMDD') as fmt_end,
-		to_char(d_end,'YYMMDDHH24MI') as fmt_order_generated
+		to_char(d_generated,'YYMMDDHH24MI') as fmt_order_generated,
+                1 as type
 		from rapport_advanced.declaration
 		where to_keep=3D'Y'
-		order by d_start,d_title");
+                union all	=09
+                select lc_id,l_name,l_start,l_end,to_char(l_timestamp,'D=
D/MM/YY HH24:MI') as fmt_generated,
+		l_description,l_timestamp,
+		to_char(l_start,'YYMMDD') as fmt_start,
+		to_char(l_end,'YYMMDD') as fmt_end,
+		to_char(l_end,'YYMMDDHH24MI') as fmt_order_generated,
+                2
+		from rapport_advanced.listing_compute
+order by d_start,d_title");
 ?>
 <div id=3D"declaration_list_div">
 <?php
@@ -88,12 +97,24 @@
 		<td sortable_customkey=3D"<?php echo $data[$i]['fmt_order_generated']?=
>">
 			<?php echo h($data[$i]['fmt_generated'])?>
 		</td>
+<?php if  ($data[$i]['type']=3D=3D1): ?>
+
 		<td  id=3D"mod_<?php echo $data[$i]['d_id']?>">
 			<?php echo HtmlInput::anchor("Afficher","",sprintf("onclick=3D\"rapav=
_declaration_display('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_R=
EQUEST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
 		</td>
 		<td  id=3D"del_<?php echo $data[$i]['d_id']?>">
 			<?php echo HtmlInput::anchor("Efface","",sprintf("onclick=3D\"rapav_d=
eclaration_delete('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQU=
EST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
 		</td>
+<?php endif; ?>
+<?php if  ($data[$i]['type']=3D=3D2): ?>
+
+		<td  id=3D"mod_<?php echo $data[$i]['d_id']?>">
+			<?php echo HtmlInput::anchor("Afficher","",sprintf("onclick=3D\"rapav=
_listing_display('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQUE=
ST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
+		</td>
+		<td  id=3D"del_<?php echo $data[$i]['d_id']?>">
+			<?php echo HtmlInput::anchor("Efface","",sprintf("onclick=3D\"rapav_l=
isting_delete('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQUEST[=
'ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
+		</td>
+<?php endif; ?>               =20
 	</tr>
 	<?php endfor; ?>
 </table>

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-11 20:09:43 UTC (rev=
 614)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-11 20:39:37 UTC (rev=
 615)
@@ -849,3 +849,62 @@
         alert("listing_search_code" + e.message);
     }
 }
+function rapav_listing_display(plugin_code, ac, dossier, d_id)
+{
+    try
+    {
+        $('declaration_list_div').hide();
+        $('declaration_display_div').innerHTML =3D "";
+        $('declaration_display_div').show();
+        waiting_box();
+        var querystring =3D 'plugin_code=3D' + plugin_code + '&ac=3D' + =
ac + '&gDossier=3D' + dossier + '&act=3Drapav_listing_display' + "&d_id=3D=
" + d_id;
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: querystring,
+                    onFailure: error_get_predef,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        var answer =3D req.responseText;
+                        $('declaration_display_div').innerHTML =3D answe=
r;
+                        answer.evalScripts()
+                    }
+                }
+        );
+    }
+    catch (e)
+    {
+        alert(e.message);
+    }
+}
+function rapav_listing_delete(plugin_code, ac, dossier, d_id)
+{
+    try
+    {
+        if (confirm('Confirmez-vous l\'effacement ?') =3D=3D false) {
+            return;
+        }
+        waiting_box();
+        var querystring =3D 'plugin_code=3D' + plugin_code + '&ac=3D' + =
ac + '&gDossier=3D' + dossier + '&act=3Drapav_listing_delete' + "&d_id=3D=
" + d_id;
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: querystring,
+                    onFailure: error_get_predef,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        $('tr_' + d_id).style.textDecoration =3D "line-t=
hrough";
+                        $('tr_' + d_id).style.color =3D "red";
+                        $('del_' + d_id).innerHTML =3D "";
+                        $('mod_' + d_id).innerHTML =3D "";
+                    }
+                }
+        );
+    }
+    catch (e)
+    {
+        alert(e.message);
+    }
+}
\ No newline at end of file

Modified: trunk/rapport_avance/sql/2-listing_compute.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-11 20:09:43 UT=
C (rev 614)
+++ trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-11 20:39:37 UT=
C (rev 615)
@@ -5,8 +5,9 @@
 CREATE TABLE rapport_advanced.listing_compute
 (
   lc_id bigserial NOT NULL, -- PK
+  l_name text, -- Description or note
+  l_description text, -- Description or note
   l_id bigint, -- FK to listing
-  l_description text, -- Description or note
   l_start date, -- start data
   l_end date, -- end_date
   l_keep character(1) NOT NULL DEFAULT 'N'::bpchar, -- If yes, it is kee=
ped with N it will deleted
@@ -26,6 +27,7 @@
 ';
 COMMENT ON COLUMN rapport_advanced.listing_compute.lc_id IS 'PK';
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_id IS 'FK to listin=
g';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_name IS 'Title';
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_description IS 'Des=
cription or note';
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_start IS 'start dat=
a';
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_end IS 'end_date';



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


From MAILER-DAEMON Wed Dec 11 17:51:45 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vqsd7-0008Gd-Et
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Dec 2013 17:51:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Dec 2013 23:40:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.134217.1386802304.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r616 - in trunk/rapport_avance: . include sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Dec 2013 22:51:44 -0000

Author: danydb
Date: 2013-12-11 23:40:08 +0100 (Wed, 11 Dec 2013)
New Revision: 616

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/include/declaration.inc.php
   trunk/rapport_avance/rapav_constant.php
   trunk/rapport_avance/raw.php
   trunk/rapport_avance/sql/2-listing_compute_fiche.sql
Log:
task #0000942: Listing : conversion des documents en PDF
Conversion des documents en PDF, mais ?\195?\160 besoin d'utiliser UNO de=
 libreoffice

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 20:39:37 UTC (rev 615)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
11 22:40:08 UTC (rev 616)
@@ -187,7 +187,11 @@
                     $detail=3D$odetail->next($r_detail,$e);
                     echo th( $detail->lc_code);
                 }
-                echo th("");
+                echo th("Fichier");
+                if ( GENERATE_PDF =3D=3D 'YES')
+                {
+                    echo th('PDF');
+                }
                 echo '</tr>';
             }
             /** for each detail */
@@ -215,6 +219,16 @@
                 $href=3D  "extension.raw.php?".http_build_query($arg);
                 echo td('<a href=3D"'.$href.'">'.$fiche->lf_filename);
             }
+            if ( $fiche->lf_pdf !=3D "")
+            {
+                $arg=3Darray("gDossier"=3D>$_REQUEST['gDossier'],
+                    "plugin_code"=3D>$_REQUEST['plugin_code'],
+                    "ac"=3D>$_REQUEST['ac'],
+                    'act'=3D>'show_pdf',
+                    'lf_id'=3D>$fiche->lf_id);
+                $href=3D  "extension.raw.php?".http_build_query($arg);
+                echo td('<a href=3D"'.$href.'">'.$fiche->lf_pdf_filename=
);
+            }
             echo '</tr>';
         }
         echo '</table>';
@@ -276,6 +290,20 @@
             $fiche->generate_document();
         }
     }
+    function create_pdf()
+    {
+        global $cn;
+        $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
+        $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
+        $nb_fiche=3DDatabase::num_row($r_fiche);
+        if (isNumber($p_id)=3D=3D0) {$p_id=3D0;}
+        /* For each card */
+        for ($i =3D 0;$i < $nb_fiche;$i++)
+        {
+            $fiche=3D$ofiche->next($r_fiche,$i);
+            $file=3D$fiche->create_pdf();
+        }
+    }
     /**
      * @brief display a form to generate CSV
      */

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 20:39:37 UTC (rev 615)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-11 22:40:08 UTC (rev 616)
@@ -444,5 +444,28 @@
         $this->update();
         $cn->commit();
     }
+    function create_pdf()
+    {
+        global $cn;
+        if (GENERATE_PDF =3D=3D 'NO') return;
+        $cn->start();
+        if ( $this->lf_filename=3D=3D"")return;
+       =20
+        $file=3D$_ENV['TMP']."/".$this->lf_filename;
+       =20
+        $cn->lo_export($this->lf_lob,$file);
+       =20
+        // remove extension
+        $ext=3D  strrpos($this->lf_filename,".");
+        $dst_file=3D  substr($this->lf_filename, 0, $ext);
+        $dst_file.=3D".pdf";
+        passthru(OFFICE.$file,$status);
+        // reload it into database
+        $this->lf_pdf=3D$cn->lo_import($_ENV['TMP']."/".$dst_file);
+        $this->lf_pdf_filename=3D$dst_file;
+        $this->update();
+        $cn->commit();
+       =20
+    }
=20
 }

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-11 =
20:39:37 UTC (rev 615)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-11 =
22:40:08 UTC (rev 616)
@@ -484,6 +484,8 @@
     var $lf_filename;
     var $lf_mimetype;
     var $lc_id;
+    var $lf_pdf;
+    var $lf_pdf_filename;
=20
     /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
=20
@@ -501,15 +503,19 @@
             , "lf_lob" =3D> "lf_lob"
             , "lf_filename" =3D> "lf_filename"
             , "lf_mimetype" =3D> "lf_mimetype"
+            , "lf_pdf" =3D> "lf_pdf"
+            , "lf_pdf_filename" =3D> "lf_pdf_filename"
         );
=20
         $this->type =3D array(
             "lf_id" =3D> "numeric",
             "lc_id" =3D> "numeric",
             "f_id" =3D> "numeric"
-            , "lf_lob" =3D> "set_me"
+            , "lf_lob" =3D> "oid"
             , "lf_filename" =3D> "text"
             , "lf_mimetype" =3D> "text"
+            , "lf_pdf" =3D> "oid"
+            , "lf_pdf_filename" =3D> "text"
         );
=20
         $this->default =3D array(

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-11 20:39:37 =
UTC (rev 615)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-11 22:40:08 =
UTC (rev 616)
@@ -92,6 +92,10 @@
     $listing=3Dnew RAPAV_Listing_Compute();
     $listing->load($_GET['lc_id']);
     $listing->generate($_GET['numerotation']);
+   =20
+    if ( GENERATE_PDF =3D=3D 'YES')=20
+        $listing->create_pdf();
+   =20
     $listing->display(false);
     exit();
 }

Modified: trunk/rapport_avance/rapav_constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_constant.php	2013-12-11 20:39:37 UTC (rev =
615)
+++ trunk/rapport_avance/rapav_constant.php	2013-12-11 22:40:08 UTC (rev =
616)
@@ -10,6 +10,10 @@
 require_once ('class_database.php');
=20
 global $cn,$rapav_version,$errcode;
+/** -- pour utiliser unoconv d=C3=A9marrer un server libreoffice=20
+ * libreoffice --headless --accept=3D"socket,host=3D127.0.0.1,port=3D200=
2;urp;" --nofirststartwizard */
+define ('OFFICE','unoconv ');
+define ('GENERATE_PDF','NO');
 $cn=3Dnew Database (dossier::id());
 $rapav_version=3D4;
 ?>

Modified: trunk/rapport_avance/raw.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/raw.php	2013-12-11 20:39:37 UTC (rev 615)
+++ trunk/rapport_avance/raw.php	2013-12-11 22:40:08 UTC (rev 616)
@@ -186,4 +186,51 @@
=20
 	$cn->commit();
 }
+/**
+ * Show generated file
+ */
+if ($act=3D=3D"show_pdf")
+{
+        $decl =3D new RAPAV_Listing_Compute_Fiche();
+	$decl->lf_id =3D $lf_id;
+	$decl->load();
+
+	$cn->start();
+	if ($decl->lf_pdf =3D=3D "")
+	{
+		ini_set('zlib.output_compression', 'Off');
+		header("Pragma: public");
+		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+		header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+		header("Cache-Control: must-revalidate");
+		header('Content-type: ' . 'text/plain');
+		header('Content-Disposition: attachment;filename=3Dvide.txt', FALSE);
+		header("Accept-Ranges: bytes");
+		echo "******************";
+		echo _("Fichier effac=C3=A9");
+		echo "******************";
+		exit();
+	}
+	$tmp =3D tempnam($_ENV['TMP'], 'document_');
+
+	$cn->lo_export($decl->lf_pdf, $tmp);
+
+	ini_set('zlib.output_compression', 'Off');
+	header("Pragma: public");
+	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+	header("Cache-Control: must-revalidate");
+	header('Content-type: application/pdf');
+	header('Content-Disposition: attachment;filename=3D"' . $decl->lf_filen=
ame . '.pdf"', FALSE);
+	header("Accept-Ranges: bytes");
+	$file =3D fopen($tmp, 'r');
+	while (!feof($file))
+		echo fread($file, 8192);
+
+	fclose($file);
+
+	unlink($tmp);
+
+	$cn->commit();
+}
 ?>

Modified: trunk/rapport_avance/sql/2-listing_compute_fiche.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-11 20:39=
:37 UTC (rev 615)
+++ trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-11 22:40=
:08 UTC (rev 616)
@@ -7,7 +7,9 @@
   lf_id serial NOT NULL, -- PK
   f_id bigint NOT NULL, -- FK to fiche
   lf_lob oid, -- Generated file if any
+  lf_pdf oid, -- Generated file if any
   lf_filename text, -- Name of the generated file. It should be based on=
 the name of the template + unique id
+  lf_pdf_filename text, -- Generated file if any
   lf_mimetype text, -- Same mimetype as in table listing
   lc_id bigint,
   CONSTRAINT listing_compute_fiche_pkey PRIMARY KEY (lf_id ),
@@ -30,6 +32,8 @@
 COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_id IS 'PK';
 COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.f_id IS 'FK to =
fiche';
 COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_lob IS 'Gene=
rated file if any';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_pdf IS 'PDF =
File';
 COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_filename IS =
'Name of the generated file. It should be based on the name of the templa=
te + unique id';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_pdf_filename=
 IS 'Name of the PDF file.base of lf_filename';
 COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_mimetype IS =
'Same mimetype as in table listing';
=20



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


From MAILER-DAEMON Thu Dec 12 07:55:38 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vr5nl-0000Q5-OK
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Dec 2013 07:55:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Dec 2013 13:43:43 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.135564.1386852937.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5593 - in phpcompta/trunk/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Dec 2013 12:55:18 -0000

Author: danydb
Date: 2013-12-12 13:43:43 +0100 (Thu, 12 Dec 2013)
New Revision: 5593

Modified:
   phpcompta/trunk/include/ac_common.php
   phpcompta/trunk/include/template/dashboard.php
Log:
Esth?\195?\169tique : agrandi fen?\195?\170tre pour facture en retard...

Modified: phpcompta/trunk/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ac_common.php	2013-12-11 17:28:03 UTC (rev 55=
92)
+++ phpcompta/trunk/include/ac_common.php	2013-12-12 12:43:43 UTC (rev 55=
93)
@@ -1050,7 +1050,7 @@
 function display_dashboard_operation($p_array,$p_title,$p_div)
 {
 	?>
-<div id=3D"<?php echo $p_div;?>" class=3D"inner_box" style=3D"display:no=
ne;top:250;left:25%;width: 50%;height: 30%;overflow:auto;">
+<div id=3D"<?php echo $p_div;?>" class=3D"inner_box" style=3D"display:no=
ne;top:250;left:25%;width: 50%;min-height:50%;overflow:auto;">
 	<?php
 	echo HtmlInput::title_box($p_title, $p_div, "hide");
 	?>

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-11 17:28:03 UT=
C (rev 5592)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-12 12:43:43 UT=
C (rev 5593)
@@ -151,7 +151,7 @@
 </div>
 <div style=3D"float:right;width: 100%">
 =09
-<div id=3D"action_late_div"  class=3D"inner_box" style=3D"display:none;m=
argin-left:25%;top:25%;width: 50%;height:50%;overflow: auto;">
+<div id=3D"action_late_div"  class=3D"inner_box" style=3D"display:none;m=
argin-left:25%;top:25%;width: 50%;min-height:50%;overflow: auto;">
 	<?php
 		echo HtmlInput::title_box("Action en retard", "action_late_div","hide"=
)
 	?>
@@ -182,7 +182,7 @@
 	<?php endif; ?>
 	</div>
=20
-	<div id=3D"action_now_div" class=3D"inner_box" style=3D"display:none;ma=
rgin-left:25%;width: 50%;top:25%;height:50%;overflow: auto;">
+	<div id=3D"action_now_div" class=3D"inner_box" style=3D"display:none;ma=
rgin-left:25%;width: 50%;top:25%;min-height:50%;overflow: auto;">
 	<?php
 		echo HtmlInput::title_box("Action pour aujourd'hui", "action_now_div",=
"hide")
 	?>



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


From MAILER-DAEMON Thu Dec 12 11:13:49 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vr8tZ-0007vZ-Sg
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Dec 2013 11:13:49 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Dec 2013 17:02:13 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.135915.1386864828.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5594 - phpcompta/trunk/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Dec 2013 16:13:48 -0000

Author: danydb
Date: 2013-12-12 17:02:13 +0100 (Thu, 12 Dec 2013)
New Revision: 5594

Modified:
   phpcompta/trunk/include/template/dashboard.php
Log:
Esth?\195?\169tique : agrandi fen?\195?\170tre pour mini-rapport

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-12 12:43:43 UT=
C (rev 5593)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-12 16:02:13 UT=
C (rev 5594)
@@ -278,7 +278,7 @@
 }
=20
 if ( $report !=3D 0 ) : ?>
-<fieldset style=3D"height:50%;"><legend><?php echo $rapport->get_name()?=
></legend>
+<fieldset style=3D"min-height:50%;"><legend><?php echo $rapport->get_nam=
e()?></legend>
 <?php   =20
   $exercice=3D$g_user->get_exercice();
   if ( $exercice =3D=3D 0 ) {
@@ -307,7 +307,7 @@
   else :
 ?>
   <fieldset style=3D"height:50%;width:80%;background-color:white"><legen=
d><?php _('Aucun rapport d=C3=A9fini')?></legend>
-  <a href=3D"javascript:void(0)" onclick=3D"set_preference('<?php echo d=
ossier::id()?>')"><?php echo _('Cliquez ici pour mettre =C3=A0 jour vos p=
r=C3=A9f=C3=A9rences')?></a>
+  <a href=3D"javascript:void(0)" class=3D"cell" onclick=3D"set_preferenc=
e('<?php echo dossier::id()?>')"><?php echo _('Cliquez ici pour mettre =C3=
=A0 jour vos pr=C3=A9f=C3=A9rences')?></a>
=20
 </fieldset>
 <?php



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


From MAILER-DAEMON Sat Dec 14 07:11:53 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vro4X-0006DF-3t
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Dec 2013 07:11:53 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Dec 2013 13:00:14 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.138265.1387023112.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5595 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Dec 2013 12:11:51 -0000

Author: danydb
Date: 2013-12-14 13:00:14 +0100 (Sat, 14 Dec 2013)
New Revision: 5595

Modified:
   phpcompta/trunk/include/class_follow_up.php
Log:
Add documentation

Modified: phpcompta/trunk/include/class_follow_up.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_follow_up.php	2013-12-12 16:02:13 UTC (=
rev 5594)
+++ phpcompta/trunk/include/class_follow_up.php	2013-12-14 12:00:14 UTC (=
rev 5595)
@@ -81,6 +81,14 @@
 	var $ag_dest;  /*!< $ag_dest person who is in charged */
 	var $ag_contact;  /*!< $ag_contact contact */
 	var $ag_remind_date;  /*!< $ag_contact contact */
+        /**
+         * @brief $operation string related operation
+         */
+        var $operation;
+        /**
+         * @brief $action string related action
+         */
+        var $action;
=20
 	/**  constructor
 	 * \brief constructor
@@ -93,6 +101,9 @@
 		$this->ag_id=3D$p_id;
 		$this->f_id =3D 0;
                 $this->aAction_detail=3Darray();
+                $this->operation=3D"";
+                $this->action=3D"";
+               =20
 	}
 	static function sql_security_filter($cn,$p_mode)
 	{
@@ -579,7 +590,10 @@
 	/**
 	 * \brief Save the document and propose to save the generated document =
or
 	 *  to upload one, the data are included except the file. Temporary the=
 generated
-	 * document is save
+	 * document is save.
+         * The files into $_FILES['file_upload'] will be saved
+         * @note the array $_POST['input_desc'] must be set, contains th=
e description
+         * of the uploaded files
 	 *
 	 * \return
 	 */
@@ -978,6 +992,20 @@
 	/**\brief put an array in the variable member, the indice
 	 * is the member name
 	 * \param $p_array to parse
+         *      - ag_id id of the Follow_up
+         *      - ag_ref reference of the action
+         *      - qcode_dest quick_code of the card of dest
+         *      - f_id_dest f_id of the card of dest
+         *      - dt_id Document_Modele::dt_id
+         *      - ag_state document_state::s_id (default:2)
+         *      - ag_title title of the action
+         *      - ag_hour
+         *      - ag_dest Profile, profile of the user
+         *      - ag_comment comment
+         *      - ag_remind_date Remind Date
+         *      - operation related operation
+         *      - action related action=20
+         *      - op deprecated
 	 * \return nothing
 	 */
=20
@@ -1001,7 +1029,11 @@
 		$this->ag_comment =3D (isset($p_array['ag_comment'])) ? $p_array['ag_c=
omment'] : "";
 		$this->ag_remind_date =3D (isset($p_array['ag_remind_date'])) ? $p_arr=
ay['ag_remind_date'] : null;
 		$this->operation =3D (isset($p_array['operation'])) ? $p_array['operat=
ion'] : null;
-		$this->op =3D (isset($p_array['op'])) ? $p_array['op'] : null;
+                /**
+                 * @todo
+                 * deprecated : to remove
+                    $this->op =3D (isset($p_array['op'])) ? $p_array['op=
'] : null;=20
+                 */
 		$this->action =3D (isset($p_array['action'])) ? $p_array['action'] : n=
ull;
 	}
=20
@@ -1088,8 +1120,10 @@
=20
 	/**
 	 * remove a related operation
+         * @deprecated not used : dead_code
+         * @todo to remove
 	 */
-	function remove_operation()
+	function remove_operation_deprecated()
 	{
 		if ($this->op =3D=3D null)
 			return;



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


From MAILER-DAEMON Sat Dec 14 07:25:36 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VroHo-0000Lt-Ai
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Dec 2013 07:25:36 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Dec 2013 13:13:58 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.138272.1387023935.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r617 - trunk/rapport_avance
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Dec 2013 12:25:34 -0000

Author: danydb
Date: 2013-12-14 13:13:58 +0100 (Sat, 14 Dec 2013)
New Revision: 617

Modified:
   trunk/rapport_avance/ajax_rapav_listing_display.php
Log:
export CSV in ajax

Modified: trunk/rapport_avance/ajax_rapav_listing_display.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-11 22:40:=
08 UTC (rev 616)
+++ trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-14 12:13:=
58 UTC (rev 617)
@@ -3,6 +3,7 @@
  * @file
  * @brief display a declaration from history but you can't modify it
  */
+require_once 'rapav_constant.php';
 require_once 'include/class_rapav_listing_compute.php';
 global $cn;
 echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");



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


From MAILER-DAEMON Sat Dec 14 07:38:30 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VroUI-00020l-5s
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Dec 2013 07:38:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Dec 2013 13:26:52 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.138293.1387024709.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r618 - trunk/rapport_avance/sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Dec 2013 12:38:28 -0000

Author: danydb
Date: 2013-12-14 13:26:52 +0100 (Sat, 14 Dec 2013)
New Revision: 618

Added:
   trunk/rapport_avance/sql/3-parametre.sql
Log:
Ajout table parametre

Added: trunk/rapport_avance/sql/3-parametre.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/3-parametre.sql	                        (rev=
 0)
+++ trunk/rapport_avance/sql/3-parametre.sql	2013-12-14 12:26:52 UTC (rev=
 618)
@@ -0,0 +1,6 @@
+create table rapport_advanced.rapav_parameter
+(
+    param_code text primary key,
+    param_value text=20
+);
+insert into rapport_advanced.rapav_parameter values ('FROM','phpcompta@l=
ocalhost'), ('SMTP','localhost'),('PORT','25');
\ No newline at end of file



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


From MAILER-DAEMON Sat Dec 14 07:55:30 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vrokk-0004c3-3i
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Dec 2013 07:55:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Dec 2013 13:43:51 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.138312.1387025729.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r619 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Dec 2013 12:55:28 -0000

Author: danydb
Date: 2013-12-14 13:43:51 +0100 (Sat, 14 Dec 2013)
New Revision: 619

Modified:
   trunk/rapport_avance/ajax_rapav_declaration_display.php
   trunk/rapport_avance/ajax_rapav_listing_display.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/declaration.inc.php
Log:
Task #0000944: Listing : Propose de t?\195?\169l?\195?\169charger tous le=
s documents dans un ZIP
Task #0000935: Listing : inclure dans Suivi
Task #0000936: Listing : envoi par email

Modified: trunk/rapport_avance/ajax_rapav_declaration_display.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_rapav_declaration_display.php	2013-12-14 12=
:26:52 UTC (rev 618)
+++ trunk/rapport_avance/ajax_rapav_declaration_display.php	2013-12-14 12=
:43:51 UTC (rev 619)
@@ -27,7 +27,7 @@
  */
 require_once 'include/class_rapav_declaration.php';
 global $cn;
-echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");
+echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();",'rt'.$_GET['d_id'],'smallbutton')=
;
 $decl =3D new Rapav_Declaration();
 $decl->d_id =3D $_GET['d_id'];
 $decl->load();
@@ -36,6 +36,6 @@
 echo '<hr>';
 $ref=3DHtmlInput::array_to_string(array('gDossier','plugin_code','d_id')=
,$_GET,'extension.raw.php?');
 $ref.=3D"&amp;act=3Dexport_decla_csv";
-echo HtmlInput::button_anchor("Export CSV",$ref,'export_id');
-echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");
+echo HtmlInput::button_anchor("Export CSV",$ref,'export_id','','smallbut=
ton');
+echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();",'rt','smallbutton');
 ?>

Modified: trunk/rapport_avance/ajax_rapav_listing_display.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-14 12:26:=
52 UTC (rev 618)
+++ trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-14 12:43:=
51 UTC (rev 619)
@@ -6,14 +6,21 @@
 require_once 'rapav_constant.php';
 require_once 'include/class_rapav_listing_compute.php';
 global $cn;
-echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");
-$decl =3D new RAPAV_Listing_Compute();
-$decl->load($_GET['d_id']);
-$decl->display(false);
-//echo $decl->anchor_document();
+echo '<div class=3D"content">';
+echo '<p>';
+echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();",'rttop'.$_GET['d_id'],'smallbutto=
n');
+echo '</p>';
+$listing =3D new RAPAV_Listing_Compute();
+$listing->load($_GET['d_id']);
+$listing->display(false);
+//echo $listing->anchor_document();
 echo '<hr>';
-$decl->propose_CSV();
-echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();");
-// require_once '.php';
+$listing->propose_CSV();
+$listing->propose_send_mail();
+$listing->propose_include_follow();
+$listing->propose_download_all();
=20
+echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();",'rt'.$_GET['d_id'],'smallbutton')=
;
+echo '</div>';
+
 ?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
14 12:26:52 UTC (rev 618)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
14 12:43:51 UTC (rev 619)
@@ -313,7 +313,7 @@
         echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
         echo HtmlInput::hidden('lc_id',$this->data->lc_id);
         echo HtmlInput::hidden('act','export_listing_csv');
-        echo HtmlInput::submit("export_listing", "Export CSV");
+        echo HtmlInput::submit("export_listing", "Export CSV","","smallb=
utton");
         echo '</form>';
     }
     /**
@@ -327,7 +327,7 @@
         echo "Num=C3=A9ro de document ".$num->input();
         echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
         echo HtmlInput::hidden('lc_id',$this->data->lc_id);
-        echo HtmlInput::submit("generate_document", "G=C3=A9n=C3=A9ratio=
n des documents");
+        echo HtmlInput::submit("generate_document", "G=C3=A9n=C3=A9ratio=
n des documents","","smallbutton");
         echo '</form>';
        =20
     }
@@ -380,5 +380,38 @@
         }
        =20
     }
+    function propose_send_mail()
+    {
+       =20
+        echo '<form method=3D"GET" action=3D"extension.raw.php" class=3D=
"noprint" style=3D"display:inline">';
+        echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
+        echo HtmlInput::hidden('lc_id',$this->data->lc_id);
+        echo HtmlInput::hidden('act','export_send_mail');
+        echo HtmlInput::submit("export_send_mail", "Envoi par email","",=
"smallbutton");
+        echo '</form>';
+        return 0;
+    }
+    function propose_include_follow()
+    {
+       =20
+        echo '<form method=3D"GET" action=3D"extension.raw.php" class=3D=
"noprint" style=3D"display:inline">';
+        echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
+        echo HtmlInput::hidden('lc_id',$this->data->lc_id);
+        echo HtmlInput::hidden('act','include_follow_up');
+        echo HtmlInput::submit("include_follow_up", "Inclure dans les ac=
tions","","smallbutton");
+        echo '</form>';
+        return 0;
+    }
+    function propose_download_all()
+    {
+       =20
+        echo '<form method=3D"GET" action=3D"extension.raw.php" class=3D=
"noprint" style=3D"display:inline">';
+        echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
+        echo HtmlInput::hidden('lc_id',$this->data->lc_id);
+        echo HtmlInput::hidden('act','export_download_all');
+        echo HtmlInput::submit("export_download_all", "T=C3=A9l=C3=A9cha=
rger tous les documents","","smallbutton");
+        echo '</form>';
+        return 0;
+    }
=20
 }

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-14 12:26:52 =
UTC (rev 618)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-14 12:43:51 =
UTC (rev 619)
@@ -58,7 +58,7 @@
=20
     $ref_csv =3D HtmlInput::array_to_string(array('gDossier', 'plugin_co=
de', 'd_id'), $_REQUEST, 'extension.raw.php?');
     $ref_csv.=3D"&amp;act=3Dexport_decla_csv";
-    echo HtmlInput::button_anchor("Export CSV", $ref_csv, 'export_id');
+    echo HtmlInput::button_anchor("Export CSV", $ref_csv, 'export_id',""=
,'small_button');
     if ($decl->d_filename !=3D '' && $decl->d_step =3D=3D 0)
         echo $decl->anchor_document();
     exit();
@@ -97,6 +97,9 @@
         $listing->create_pdf();
    =20
     $listing->display(false);
+    $listing->propose_send_mail();
+    $listing->propose_include_follow();
+    $listing->propose_download_all();
     exit();
 }
 /**



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


From MAILER-DAEMON Tue Dec 17 08:04:21 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VsuJx-00004t-Rn
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 08:04:21 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Dec 2013 13:52:34 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141001.1387285461.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r620 - trunk/rapport_avance/sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 13:04:21 -0000

Author: danydb
Date: 2013-12-17 13:52:34 +0100 (Tue, 17 Dec 2013)
New Revision: 620

Modified:
   trunk/rapport_avance/sql/2-add-compute.sql
   trunk/rapport_avance/sql/2-listing_compute.sql
   trunk/rapport_avance/sql/2-listing_compute_detail.sql
   trunk/rapport_avance/sql/2-listing_compute_historique.sql
   trunk/rapport_avance/sql/2-trigger.sql
Log:
Fix trouble SQL

Modified: trunk/rapport_avance/sql/2-add-compute.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-add-compute.sql	2013-12-14 12:43:51 UTC (r=
ev 619)
+++ trunk/rapport_avance/sql/2-add-compute.sql	2013-12-17 12:52:34 UTC (r=
ev 620)
@@ -2,5 +2,7 @@
 -- TABLES are :
 -- 1. listing_compute
 -- 2. listing_compute_detail
+-- 2. listing_compute_fiche
+-- 2. listing_compute_historique
 -- 3. listing_condition
 -- 4. listing_compute_fiche

Modified: trunk/rapport_avance/sql/2-listing_compute.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-14 12:43:51 UT=
C (rev 619)
+++ trunk/rapport_avance/sql/2-listing_compute.sql	2013-12-17 12:52:34 UT=
C (rev 620)
@@ -34,13 +34,18 @@
 COMMENT ON COLUMN rapport_advanced.listing_compute.l_keep IS 'If yes, it=
 is keeped with N it will deleted';
=20
=20
--- Trigger: listing_compute_trg on rapport_advanced.listing_compute
-
--- DROP TRIGGER listing_compute_trg ON rapport_advanced.listing_compute;
-
+CREATE OR REPLACE FUNCTION rapport_advanced.listing_compute_trg()=20
+ returns trigger=20
+ as=20
+$_BODY_$
+declare=20
+begin
+ NEW.l_timestamp=3Dnow() ;
+return NEW;
+end;
+$_BODY_$ LANGUAGE plpgsql;
 CREATE TRIGGER listing_compute_trg
-  BEFORE INSERT OR UPDATE
-  ON rapport_advanced.listing_compute
-  FOR EACH ROW
-  EXECUTE PROCEDURE rapport_advanced.listing_compute_trg();
-
+ BEFORE=20
+ INSERT OR UPDATE=20
+ on rapport_advanced.listing_compute
+ FOR EACH ROW EXECUTE PROCEDURE rapport_advanced.listing_compute_trg();

Modified: trunk/rapport_avance/sql/2-listing_compute_detail.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-14 12:4=
3:51 UTC (rev 619)
+++ trunk/rapport_avance/sql/2-listing_compute_detail.sql	2013-12-17 12:5=
2:34 UTC (rev 620)
@@ -1,9 +1,12 @@
+\set ECHO all
+
+begin;
 ALTER TABLE rapport_advanced.listing_param ADD COLUMN lp_histo integer;
 ALTER TABLE rapport_advanced.listing_param ALTER COLUMN lp_histo SET DEF=
AULT 0;
 COMMENT ON COLUMN rapport_advanced.listing_param.lp_histo IS '0 : no his=
tory 1 : with history';
-=EF=BB=BF-- Table: rapport_advanced.listing_compute_detail
+-- Table: rapport_advanced.listing_compute_detail
=20
--- DROP TABLE rapport_advanced.listing_compute_detail;
+-- DROP TABLE rapport_advanced.listing_compute_detail
=20
 CREATE TABLE rapport_advanced.listing_compute_detail
 (
@@ -22,17 +25,8 @@
   CONSTRAINT listing_compute_detail_lc_id_fkey FOREIGN KEY (lc_id)
       REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
       ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT listing_compute_detail_lp_id_fkey FOREIGN KEY (lp_id)
-      REFERENCES rapport_advanced.listing_param (lp_id) MATCH SIMPLE
-      ON UPDATE SET NULL ON DELETE SET NULL
-)
-WITH (
-  OIDS=3DFALSE
-);
-ALTER TABLE rapport_advanced.listing_compute_detail
-  OWNER TO phpcompta;
-COMMENT ON TABLE rapport_advanced.listing_compute_detail
-  IS 'Detail of computing listing_param';
+  CONSTRAINT listing_compute_detail_lp_id_fkey FOREIGN KEY (lp_id) REFER=
ENCES rapport_advanced.listing_param (lp_id) MATCH SIMPLE ON UPDATE SET N=
ULL ON DELETE SET NULL);
+COMMENT ON TABLE rapport_advanced.listing_compute_detail  IS 'Detail of =
computing listing_param';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_id IS 'PK';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_id IS 'fk t=
o listing_compute';
 COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_date =
IS 'Used when computed value is a date';

Modified: trunk/rapport_avance/sql/2-listing_compute_historique.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_historique.sql	2013-12-14 =
12:43:51 UTC (rev 619)
+++ trunk/rapport_avance/sql/2-listing_compute_historique.sql	2013-12-17 =
12:52:34 UTC (rev 620)
@@ -5,13 +5,13 @@
 CREATE TABLE rapport_advanced.listing_compute_historique
 (
   lh_id bigserial NOT NULL, -- PK
-  lc_id bigint, -- FK to listing_compute_detail
+  ld_id bigint, -- FK to listing_compute_detail
   jr_id bigint, -- FK to jrn
   CONSTRAINT listing_compute_historique_pkey PRIMARY KEY (lh_id ),
   CONSTRAINT listing_compute_historique_jr_id_fkey FOREIGN KEY (jr_id)
       REFERENCES jrn (jr_id) MATCH SIMPLE
       ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT listing_compute_historique_ld_id_fkey FOREIGN KEY (lc_id)
+  CONSTRAINT listing_compute_historique_ld_id_fkey FOREIGN KEY (ld_id)
       REFERENCES rapport_advanced.listing_compute_detail (ld_id) MATCH S=
IMPLE
       ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE
 )
@@ -23,6 +23,5 @@
 COMMENT ON TABLE rapport_advanced.listing_compute_historique
   IS 'Content : history of operation for a detail';
 COMMENT ON COLUMN rapport_advanced.listing_compute_historique.lh_id IS '=
PK';
-COMMENT ON COLUMN rapport_advanced.listing_compute_historique.lc_id IS '=
FK to listing_compute_detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.ld_id IS '=
FK to listing_compute_detail';
 COMMENT ON COLUMN rapport_advanced.listing_compute_historique.jr_id IS '=
FK to jrn';
-

Modified: trunk/rapport_avance/sql/2-trigger.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-trigger.sql	2013-12-14 12:43:51 UTC (rev 6=
19)
+++ trunk/rapport_avance/sql/2-trigger.sql	2013-12-17 12:52:34 UTC (rev 6=
20)
@@ -1,15 +0,0 @@
-=EF=BB=BFCREATE OR REPLACE FUNCTION rapport_advanced.listing_compute_trg=
()=20
- returns trigger=20
- as=20
-$_BODY_$
-declare=20
-begin
- NEW.l_timestamp=3Dnow() ;
-return NEW;
-end;
-$_BODY_$ LANGUAGE plpgsql;
-CREATE TRIGGER listing_compute_trg
- BEFORE=20
- INSERT OR UPDATE=20
- on rapport_advanced.listing_compute
- FOR EACH ROW EXECUTE PROCEDURE rapport_advanced.listing_compute_trg();



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


From MAILER-DAEMON Tue Dec 17 12:39:53 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vsycb-0004AG-75
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 12:39:53 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Dec 2013 18:28:09 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141280.1387301992.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5596 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 17:39:51 -0000

Author: danydb
Date: 2013-12-17 18:28:09 +0100 (Tue, 17 Dec 2013)
New Revision: 5596

Added:
   phpcompta/trunk/include/class_filetosend.php
   phpcompta/trunk/include/class_sendmail.php
Log:
Task #946 : envoi de fichier par email
Task #946 - Envoi de fichier par email

Added: phpcompta/trunk/include/class_filetosend.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_filetosend.php	                        =
(rev 0)
+++ phpcompta/trunk/include/class_filetosend.php	2013-12-17 17:28:09 UTC =
(rev 5596)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @brief  file to add to a message
+ *
+ * @see Sendmail
+ * @author dany
+ */
+class FileToSend
+{
+    var $filename;
+    var $type;
+    var $path;
+    var $full_name;
+    function __construct($p_filename,$p_type=3D"")
+    {
+        $this->full_name=3D$p_filename;
+        if (strpos($p_filename,'/') !=3D false)
+        {
+            $this->path=3Ddirname($p_filename);
+        }
+        $this->filename=3Dbasename ($p_filename);
+        if ( $p_type=3D=3D"")
+        {
+            $this->guess_type();
+           =20
+        }
+    }
+    function guess_type()
+    {
+        $ext_pos=3D  strrpos($this->filename,'.');
+        if ( $ext_pos =3D=3D false ) {
+            $this->type=3D"application/octect";
+            return;
+        }
+        $ext=3D  substr($this->filename, $ext_pos+1, 3);
+        switch ($ext)
+        {
+            case 'odt':
+                $this->type=3D'application/vnd.oasis.opendocument.text';
+                break;
+            case 'ods':
+                $this->type=3D'application/vnd.oasis.opendocument.spread=
sheet';
+                break;
+            case 'pdf':
+                $this->type=3D"application/pdf";
+                break;
+            case 'zip':
+                $this->type=3D"application/zip";
+                break;
+            default:
+                $this->type=3D"application/octect";
+        }
+       =20
+    }
+ =20
+}

Added: phpcompta/trunk/include/class_sendmail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_sendmail.php	                        (r=
ev 0)
+++ phpcompta/trunk/include/class_sendmail.php	2013-12-17 17:28:09 UTC (r=
ev 5596)
@@ -0,0 +1,141 @@
+<?php
+
+
+/**
+ * Description of class_sendmail
+ *
+ * @author dany
+ */
+require_once 'class_filetosend.php';
+
+class Sendmail
+{
+
+    private $mailto;
+    private $afile;
+    private $subject;
+    private $message;
+    private $from;
+    private $content;
+
+    /**
+     * set the from
+     * @parameter $p_from has the form name <info@phpcompta.eu>
+     */
+    function set_from($p_from)
+    {
+        $this->from =3D $p_from;
+    }
+
+    /**
+     *=20
+     * @param $p_subject set the subject
+     */
+    function set_subject($p_subject)
+    {
+        $this->subject =3D $p_subject;
+    }
+
+    /**
+     * set the recipient
+     * @param type $p_mailto has the form name <email@email.com>
+     */
+    function mailto($p_mailto)
+    {
+        $this->mailto =3D $p_mailto;
+    }
+
+    /**
+     * body of the message (utf8)
+     * @param type $p_message
+     */
+    function set_message($p_message)
+    {
+        $this->message =3D $p_message;
+    }
+
+    /**
+     * Add file to the message
+     * @param FileToSend $file file to add to the message
+     */
+    function add_file(FileToSend $file)
+    {
+        $this->afile[] =3D $file;
+    }
+
+    /**
+     *  verify that the message is ready to go
+     * @throws Exception
+     */
+    function verify()
+    {
+        $array =3D explode(",", "from,subject,mailto,message");
+        for ($i =3D 0; $i < count($array); $i++)
+        {
+            $name =3D $array[$i];
+            if (trim($this->$name) =3D=3D "")
+            {
+                throw new Exception("$name est vide");
+            }
+        }
+    }
+    /**
+    * create the message before sending
+    */
+    function compose()
+    {
+        $this->verify();
+        $uid =3D md5(uniqid(time()));
+
+        // a random hash will be necessary to send mixed content
+        $separator =3D md5(time());
+
+        // carriage return type (we use a PHP end of line constant)
+        $eol =3D PHP_EOL;
+
+        // main header (multipart mandatory)
+        $headers =3D "From: " . $this->from . $eol;
+        $headers .=3D "MIME-Version: 1.0" . $eol;
+        $headers .=3D "Content-Type: multipart/mixed; boundary=3D\"" . $=
separator . "\"" . $eol . $eol;
+        $headers .=3D "Content-Transfer-Encoding: 7bit" . $eol;
+        $headers .=3D "This is a MIME encoded message." . $eol . $eol;
+        $headers .=3D $eol . $eol;
+
+        // message
+        $headers .=3D "--" . $separator . $eol;
+        $headers .=3D "Content-Type: text/plain; charset=3D\"utf-8\"" . =
$eol;
+        $headers .=3D "Content-Transfer-Encoding: 7bit" . $eol . $eol;
+        $headers .=3D $this->message . $eol . $eol;
+
+        // attachment
+        for ($i =3D 0; $i < count($this->afile); $i++)
+        {
+            $file =3D $this->afile[$i];
+            $file_size =3D filesize($file->full_name);
+            $handle =3D fopen($file->full_name, "r");
+            $content =3D fread($handle, $file_size);
+            fclose($handle);
+            $content =3D chunk_split(base64_encode($content));
+            $headers .=3D "--" . $separator . $eol;
+            $headers .=3D "Content-Type: " . $file->type . "; name=3D\""=
 . $file->filename . "\"" . $eol;
+            $headers .=3D "Content-Disposition: attachment; filename=3D\=
"" . $file->filename . "\"" . $eol;
+            $headers .=3D "Content-Transfer-Encoding: base64" . $eol;
+            $headers .=3D $content . $eol . $eol;
+        }
+        $headers .=3D "--" . $separator . "--";
+        $this->content =3D $headers;
+    }
+    /**
+     * Send the message=20
+     * @throws Exception
+     */
+    function send()
+    {
+        //SEND Mail
+        if (!mail($this->mailto, $this->subject, "", $this->content))
+        {
+            throw new Exception('send failed');
+        }
+    }
+
+}



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


From MAILER-DAEMON Tue Dec 17 12:44:32 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vsyh6-00059j-Pe
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 12:44:32 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Dec 2013 18:32:50 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141285.1387302272.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5597 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 17:44:32 -0000

Author: danydb
Date: 2013-12-17 18:32:50 +0100 (Tue, 17 Dec 2013)
New Revision: 5597

Modified:
   phpcompta/trunk/include/constant.php
Log:
Task #946 : envoi de fichier par email
Task #945 - Conversion des documents en PDF

Modified: phpcompta/trunk/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/constant.php	2013-12-17 17:28:09 UTC (rev 559=
6)
+++ phpcompta/trunk/include/constant.php	2013-12-17 17:32:50 UTC (rev 559=
7)
@@ -178,8 +178,13 @@
 define ("FICHE_TYPE_ACH_MAR",2);
 define ("FICHE_TYPE_ACH_SER",3);
 define ("FICHE_TYPE_ACH_MAT",7);
+/** -- pour utiliser unoconv d=C3=A9marrer un server libreoffice=20
+ * commande
+ * libreoffice --headless --accept=3D"socket,host=3D127.0.0.1,port=3D200=
2;urp;" --nofirststartwizard=20
+ */
+define ('OFFICE','unoconv ');
+define ('GENERATE_PDF','NO');
=20
-
 define ('JS_INFOBULLE','
         <DIV id=3D"bulle" class=3D"infobulle"></DIV>
         <script type=3D"text/javascript" language=3D"javascript"  src=3D=
"js/infobulle.js">



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


From MAILER-DAEMON Tue Dec 17 12:45:36 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vsyi7-000604-KQ
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 12:45:35 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Dec 2013 18:33:53 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141286.1387302334.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r621 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 17:45:33 -0000

Author: danydb
Date: 2013-12-17 18:33:52 +0100 (Tue, 17 Dec 2013)
New Revision: 621

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
Log:
Add documentation + description

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
17 12:52:34 UTC (rev 620)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
17 17:33:52 UTC (rev 621)
@@ -19,9 +19,12 @@
 {
=20
     /**
-     * < Data point to listing_compute
+     * < Data point to RAPAV_Listing_Compute_SQL
      */
     var $data;
+    /**
+     * < Data point to RAPAV_Listing
+     */
     var $listing;
=20
     /**
@@ -158,7 +161,8 @@
         $ofiche=3Dnew RAPAV_Listing_Compute_Fiche_SQL();
         $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
         $nb_fiche=3DDatabase::num_row($r_fiche);
-
+        echo 'Description';
+        echo '<p id=3D"description">'.h($this->data->l_description).'</p=
>';
         /* For each card */
         for ($i =3D 0;$i < $nb_fiche;$i++)
         {



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


From MAILER-DAEMON Tue Dec 17 12:46:08 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vsyid-0006PV-W2
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 12:46:07 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Dec 2013 18:34:27 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141287.1387302367.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r622 - trunk/rapport_avance
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 17:46:07 -0000

Author: danydb
Date: 2013-12-17 18:34:26 +0100 (Tue, 17 Dec 2013)
New Revision: 622

Modified:
   trunk/rapport_avance/rapav_constant.php
Log:
Task #945 : PDF genere depuis phpcompta=20
Task #945 - Conversion des documents en PDF

Modified: trunk/rapport_avance/rapav_constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_constant.php	2013-12-17 17:33:52 UTC (rev =
621)
+++ trunk/rapport_avance/rapav_constant.php	2013-12-17 17:34:26 UTC (rev =
622)
@@ -10,10 +10,7 @@
 require_once ('class_database.php');
=20
 global $cn,$rapav_version,$errcode;
-/** -- pour utiliser unoconv d=C3=A9marrer un server libreoffice=20
- * libreoffice --headless --accept=3D"socket,host=3D127.0.0.1,port=3D200=
2;urp;" --nofirststartwizard */
-define ('OFFICE','unoconv ');
-define ('GENERATE_PDF','NO');
+
 $cn=3Dnew Database (dossier::id());
 $rapav_version=3D4;
 ?>



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


From MAILER-DAEMON Tue Dec 17 14:54:52 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vt0jE-0008VK-Pv
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 14:54:52 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Dec 2013 20:43:05 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141366.1387310091.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r623 - in trunk/rapport_avance: . include
	include/template sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 19:54:50 -0000

Author: danydb
Date: 2013-12-17 20:43:05 +0100 (Tue, 17 Dec 2013)
New Revision: 623

Added:
   trunk/rapport_avance/ajax_parameter_send_mail.php
   trunk/rapport_avance/ajax_send_mail.php
   trunk/rapport_avance/include/template/parameter_send_mail_input.php
Modified:
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/include/class_rapport_avance_sql.php
   trunk/rapport_avance/index.php
   trunk/rapport_avance/rapav_javascript.js
   trunk/rapport_avance/raw.php
   trunk/rapport_avance/sql/2-listing_compute_fiche.sql
Log:
Task #936 Envoi des documents PDF ou g?\195?\169n?\195?\169r?\195?\169 pa=
r email
Task #936 - Listing : envoi par email

Modified: trunk/rapport_avance/ajax.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax.php	2013-12-17 17:34:26 UTC (rev 622)
+++ trunk/rapport_avance/ajax.php	2013-12-17 19:43:05 UTC (rev 623)
@@ -1,12 +1,15 @@
 <?php
 extract($_GET);
+if ( ! isset($act)) {
+    die(_('act invalide'));
+}
 global $cn;
 $a_action=3Dexplode(',',
         'mod_form,add_row_definition,mod_param,add_param_detail,'.
         'rapav_search_code,save_param_detail,rapav_declaration_display,'=
.
         'listing_modify,listing_remove_modele,listing_display_definition=
,'.
         'listing_param_add,save_param_listing,listing_detail_remove,'.
-        'listing_search_code,rapav_listing_display');
+        'listing_search_code,rapav_listing_display,parameter_send_mail,s=
end_mail');
 if ( in_array($act,$a_action ) =3D=3D true )
 {
     include 'ajax_'.$act.'.php';

Added: trunk/rapport_avance/ajax_parameter_send_mail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_parameter_send_mail.php	                   =
     (rev 0)
+++ trunk/rapport_avance/ajax_parameter_send_mail.php	2013-12-17 19:43:05=
 UTC (rev 623)
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Display form to enter parameters
+ */
+require_once 'include/class_rapav_listing_compute.php';
+require_once 'class_fiche_def.php';
+
+ob_start();
+$compute=3Dnew RAPAV_Listing_Compute();
+$compute->load($_GET['lc_id']);
+$fiche_def=3Dnew Fiche_Def($cn,$compute->listing->data->getp('fiche_def_=
id'));
+if ( $fiche_def->HasAttribute(ATTR_DEF_EMAIL) =3D=3D false) {
+    echo '<p class=3D"notice">';
+    echo _("Cette cat=C3=A9gorie n'a pas d'attribut email");
+    echo '</p>';
+} else {
+    echo HtmlInput::title_box(_('Envoi par email'), "parameter_send_mail=
_input");
+    $subject=3Dnew IText('p_subject');
+    $from=3Dnew IText('p_from');
+    $message=3Dnew ITextarea('p_message');
+    $attach=3Dnew ISelect('p_attach');
+    $attach->value=3Darray (
+            array('value'=3D>0,'label'=3D>_('Aucun document')),
+            array('value'=3D>1,'label'=3D>_('Document en PDF')),
+            array('value'=3D>2,'label'=3D>_('Document g=C3=A9n=C3=A9r=C3=
=A9'))
+    );
+    require_once 'include/template/parameter_send_mail_input.php';
+   =20
+}
+$response =3D ob_get_clean();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl></ctl>
+<code>$html</code>
+</data>
+EOF;
+?>       =20
\ No newline at end of file

Added: trunk/rapport_avance/ajax_send_mail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_send_mail.php	                        (rev =
0)
+++ trunk/rapport_avance/ajax_send_mail.php	2013-12-17 19:43:05 UTC (rev =
623)
@@ -0,0 +1,27 @@
+<?php
+require_once 'include/class_rapav_listing_compute.php';
+
+ob_start();
+$listing=3Dnew RAPAV_Listing_Compute();
+$listing->load($lc_id);
+$a_result=3D$listing->send_mail($p_from,$p_subject,$p_message,$p_attach)=
;
+echo HtmlInput::title_box(_('R=C3=A9sultat'),'parameter_send_mail_result=
');
+echo '<ol>';
+for ($i=3D0;$i<count($a_result);$i++)
+{
+    echo '<li>'.$a_result[$i].'</li>';
+}
+echo '</ol>';
+echo HtmlInput::button_close('parameter_send_mail_result');
+$response =3D ob_get_clean();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl></ctl>
+<code>$html</code>
+</data>
+EOF;
+?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
17 17:34:26 UTC (rev 622)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
17 19:43:05 UTC (rev 623)
@@ -294,6 +294,22 @@
             $fiche->generate_document();
         }
     }
+    function send_mail($p_from,$p_subject,$p_message,$p_attach)
+    {
+        global $cn;
+        $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
+        $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
+        $nb_fiche=3DDatabase::num_row($r_fiche);
+        if (isNumber($p_id)=3D=3D0) {$p_id=3D0;}
+        $a_result=3Darray();
+        /* For each card */
+        for ($i =3D 0;$i < $nb_fiche;$i++)
+        {
+            $fiche=3D$ofiche->next($r_fiche,$i);
+            $a_result[]=3D$fiche->send_mail($p_from,$p_subject,$p_messag=
e,$p_attach);
+        }
+        return $a_result;
+    }
     function create_pdf()
     {
         global $cn;
@@ -387,10 +403,10 @@
     function propose_send_mail()
     {
        =20
-        echo '<form method=3D"GET" action=3D"extension.raw.php" class=3D=
"noprint" style=3D"display:inline">';
+        echo '<form method=3D"GET" action=3D"ajax.php" id=3D"parameter_s=
end_mail_frm" onsubmit=3D"parameter_send_mail();return false;" class=3D"n=
oprint" style=3D"display:inline">';
         echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
         echo HtmlInput::hidden('lc_id',$this->data->lc_id);
-        echo HtmlInput::hidden('act','export_send_mail');
+        echo HtmlInput::hidden('act','parameter_send_mail');
         echo HtmlInput::submit("export_send_mail", "Envoi par email","",=
"smallbutton");
         echo '</form>';
         return 0;

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-17 17:34:26 UTC (rev 622)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-17 19:43:05 UTC (rev 623)
@@ -5,7 +5,7 @@
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
-
+require_once 'class_sendmail.php';
 /**
  * Description of class_rapav_listing_compute_fiche
  *
@@ -467,5 +467,97 @@
         $cn->commit();
        =20
     }
+    /**
+     *=20
+     * @global type $cn
+     * @param type $p_from
+     * @param type $p_subject
+     * @param type $p_message
+     * @param type $p_attach
+     * @return type
+     */
+    function send_mail($p_from, $p_subject, $p_message, $p_attach)
+    {
+        global $cn;
+        $fiche =3D new Fiche($cn, $this->f_id);
=20
+        $email =3D $fiche->strAttribut(ATTR_DEF_EMAIL);
+        $result =3D "";
+        $this->lf_email_send_date =3D date('Y.m.d H:i');
+
+        if ($email =3D=3D "")
+        {
+            $result =3D $fiche->strAttribut(ATTR_DEF_QUICKCODE) . " n'a =
pas d'email ";
+
+            $this->lf_email_send_result =3D $result;
+            $this->update();
+
+            return $result;
+        }
+        $mail =3D new Sendmail();
+        $mail->set_from($p_from);
+        $mail->set_message($p_message);
+        $mail->set_subject($p_subject);
+        $mail->mailto($email);
+        switch ($p_attach)
+        {
+            case 0:
+                /* no attach */
+                break;
+            case 1:
+                /* -- PDF -- */
+                if ($this->lf_pdf_filename =3D=3D "")
+                {
+                    $result =3D $fiche->strAttribut(ATTR_DEF_QUICKCODE) =
. " n'a pas de document en PDF";
+                    $this->lf_email_send_result =3D $result;
+                    $this->update();
+
+                    return $result;
+                }
+                $cn->start();
+                $file =3D $this->lf_pdf_filename;
+                $dir =3D tempnam($_ENV['TMP'], 'mail');
+                unlink($dir);
+                mkdir($dir);
+                $cn->lo_export($this->lf_pdf, $dir . '/' . $file);
+                $ofile =3D new FileToSend($dir . '/' . $file);
+                $mail->add_file($ofile);
+                break;
+            case 2:
+                /* -- Doc g=C3=A9n=C3=A9r=C3=A9 -- */
+                if ($this->lf_filename =3D=3D "")
+                {
+                    $result =3D $fiche->strAttribut(ATTR_DEF_QUICKCODE) =
. " n'a pas de document g=C3=A9n=C3=A9r=C3=A9";
+                    $this->lf_email_send_result =3D $result;
+                    $this->update();
+
+                    return $result;
+                }
+                $cn->start();
+                $file =3D $this->lf_filename;
+                $dir =3D tempnam($_ENV['TMP'], 'mail');
+                unlink($dir);
+                mkdir($dir);
+                $cn->lo_export($this->lf_lob, $dir . '/' . $file);
+                $ofile =3D new FileToSend($dir . '/' . $file);
+                $mail->add_file($ofile);
+                break;
+        }
+        $cn->commit();
+        try
+        {
+            $mail->send();
+            $result =3D $fiche->strAttribut(ATTR_DEF_QUICKCODE) . ' mess=
age envoy=C3=A9 email : ' . $fiche->strAttribut(ATTR_DEF_EMAIL);
+            $this->lf_email_send_result=3D$result;
+            $this->update();
+            return $result;
+        } catch (Exception $ex)
+        {
+            $result =3D $fiche->strAttribut(ATTR_DEF_QUICKCODE) . " erre=
ur mail " . $ex->getMessage();
+            $this->lf_email_send_result=3D$result;
+            $this->update();
+            return $result;
+        }
+    }
+
 }

Modified: trunk/rapport_avance/include/class_rapport_avance_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-17 =
17:34:26 UTC (rev 622)
+++ trunk/rapport_avance/include/class_rapport_avance_sql.php	2013-12-17 =
19:43:05 UTC (rev 623)
@@ -486,6 +486,10 @@
     var $lc_id;
     var $lf_pdf;
     var $lf_pdf_filename;
+    var $lf_action_included;
+    var $lf_email_send_date;
+    var $lf_email_send_result;
+   =20
=20
     /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
=20
@@ -505,6 +509,9 @@
             , "lf_mimetype" =3D> "lf_mimetype"
             , "lf_pdf" =3D> "lf_pdf"
             , "lf_pdf_filename" =3D> "lf_pdf_filename"
+            ,'action_included'=3D>'lf_action_included'
+            , 'email_send_date'=3D>'lf_email_send_date'
+            , 'email_send_result'=3D>'lf_email_send_result'
         );
=20
         $this->type =3D array(
@@ -516,6 +523,9 @@
             , "lf_mimetype" =3D> "text"
             , "lf_pdf" =3D> "oid"
             , "lf_pdf_filename" =3D> "text"
+            ,'lf_action_included'=3D>'text'
+            , 'lf_email_send_date'=3D>'text'
+            , 'lf_email_send_result'=3D>'text'
         );
=20
         $this->default =3D array(

Added: trunk/rapport_avance/include/template/parameter_send_mail_input.ph=
p
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/parameter_send_mail_input.php	 =
                       (rev 0)
+++ trunk/rapport_avance/include/template/parameter_send_mail_input.php	2=
013-12-17 19:43:05 UTC (rev 623)
@@ -0,0 +1,23 @@
+<form onsubmit=3D"send_email(); return false;" id=3D"parameter_send_emai=
l_input_frm">
+<?php
+    echo HtmlInput::array_to_hidden(array('gDossier','plugin_code','ac',=
'lc_id'), $_REQUEST);
+    echo HtmlInput::hidden('act','send_mail');
+?>
+<p>
+    <label>De </label><?php echo $from->input();?>
+</p>
+<p>
+    <label>Sujet</label><?php echo $subject->input();?>
+</p>
+<p>
+    <label>Message</label><?php echo $message->input();?>
+</p>
+
+<p>
+    <label>Attache</label><?php echo $attach->input();?>
+</p>
+<?php
+echo HtmlInput::submit("send_mail", _('Envoi'), '', 'smallbutton');
+echo HtmlInput::button_close('parameter_send_mail_input');
+?>
+</form>
\ No newline at end of file

Modified: trunk/rapport_avance/index.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/index.php	2013-12-17 17:34:26 UTC (rev 622)
+++ trunk/rapport_avance/index.php	2013-12-17 19:43:05 UTC (rev 623)
@@ -58,7 +58,7 @@
 	array($url . '&sa=3Dli', _('Liste'), _('Cr=C3=A9ation, modification, Pa=
ram=C3=A8tre de listes, mailing list'), 0),
 	array($url . '&sa=3Dfo', _('Formulaire'), _('Cr=C3=A9ation, modificatio=
n, Param=C3=A8tre'), 1),
 // 	array($url . '&sa=3Dde', _('G=C3=A9n=C3=A9ration D=C3=A9claration ')=
, _('G=C3=A9n=C3=A9ration D=C3=A9claration '), 2),
- 	array($url . '&sa=3Dde', _('G=C3=A9n=C3=A9ration D=C3=A9claration / li=
sting'), _('G=C3=A9n=C3=A9ration D=C3=A9claration / listing'), 2),
+ 	array($url . '&sa=3Dde', _('G=C3=A9n=C3=A9ration'), _('G=C3=A9n=C3=A9r=
ation D=C3=A9claration / listing'), 2),
 	array($url . '&sa=3Dhi', _('Historique'), _('Historique des d=C3=A9clar=
ations faites'), 3)
 );
=20

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-17 17:34:26 UTC (rev=
 622)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-17 19:43:05 UTC (rev=
 623)
@@ -906,5 +906,82 @@
     catch (e)
     {
         alert(e.message);
+        return false;
     }
+}
+function parameter_send_mail()
+{
+    try {
+        var qs =3D $('parameter_send_mail_frm').serialize(false);
+        waiting_box();
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        var answer =3D req.responseXML;
+                        var a =3D answer.getElementsByTagName('ctl');
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (a.length =3D=3D 0) {
+                            var rec =3D req.responseText;
+                            throw 'cannot find ctl element';
+                        }
+                        remove_waiting_box();
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        console.log(code_html);
+                        var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
+                        add_div({'id': 'parameter_send_mail_input', 'css=
class': 'inner_box', 'drag': 1, 'style': position});
+                        $('parameter_send_mail_input').innerHTML =3D cod=
e_html;
+                        remove_waiting_box();
+                    }
+                }
+        );
+        return false;
+    } catch (e)
+    {
+        alert(e.message);
+        return false;
+       =20
+    }
+}
+function send_email()
+{
+   try {
+        var qs =3D $('parameter_send_email_input_frm').serialize(false);
+        waiting_box();
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        var answer =3D req.responseXML;
+                        var a =3D answer.getElementsByTagName('ctl');
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (a.length =3D=3D 0) {
+                            var rec =3D req.responseText;
+                            throw 'cannot find ctl element';
+                        }
+                        remove_waiting_box();
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        console.log(code_html);
+                        var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
+                        add_div({'id': 'parameter_send_mail_result', 'cs=
sclass': 'inner_box', 'drag': 1, 'style': position});
+                        $('parameter_send_mail_result').innerHTML =3D co=
de_html;
+                        remove_waiting_box();
+                    }
+                }
+        );
+        return false;
+    } catch (e)
+    {
+        alert(e.message);
+        return false;
+       =20
+    }
 }
\ No newline at end of file

Modified: trunk/rapport_avance/raw.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/raw.php	2013-12-17 17:34:26 UTC (rev 622)
+++ trunk/rapport_avance/raw.php	2013-12-17 19:43:05 UTC (rev 623)
@@ -233,4 +233,5 @@
=20
 	$cn->commit();
 }
+
 ?>

Modified: trunk/rapport_avance/sql/2-listing_compute_fiche.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-17 17:34=
:26 UTC (rev 622)
+++ trunk/rapport_avance/sql/2-listing_compute_fiche.sql	2013-12-17 19:43=
:05 UTC (rev 623)
@@ -12,6 +12,9 @@
   lf_pdf_filename text, -- Generated file if any
   lf_mimetype text, -- Same mimetype as in table listing
   lc_id bigint,
+  lf_action_included text,
+  lf_email_send_date timestamp,
+  lf_email_send_result text,
   CONSTRAINT listing_compute_fiche_pkey PRIMARY KEY (lf_id ),
   CONSTRAINT fk_listing_compute_lc_id FOREIGN KEY (lc_id)
       REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE



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


From MAILER-DAEMON Tue Dec 17 20:36:25 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vt63l-0000LH-Kz
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 20:36:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 18 Dec 2013 02:24:42 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141639.1387330585.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r625 - in trunk/rapport_avance: . include
	include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Dec 2013 01:36:24 -0000

Author: danydb
Date: 2013-12-18 02:24:41 +0100 (Wed, 18 Dec 2013)
New Revision: 625

Added:
   trunk/rapport_avance/ajax_include_follow.php
   trunk/rapport_avance/ajax_include_follow_save.php
   trunk/rapport_avance/include/template/include_follow.php
Modified:
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/rapav_javascript.js
Log:
Task #935 ajout dans le suivi
Task #935 - Listing : inclure dans Suivi

Modified: trunk/rapport_avance/ajax.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax.php	2013-12-17 23:34:47 UTC (rev 624)
+++ trunk/rapport_avance/ajax.php	2013-12-18 01:24:41 UTC (rev 625)
@@ -9,7 +9,8 @@
         'rapav_search_code,save_param_detail,rapav_declaration_display,'=
.
         'listing_modify,listing_remove_modele,listing_display_definition=
,'.
         'listing_param_add,save_param_listing,listing_detail_remove,'.
-        'listing_search_code,rapav_listing_display,parameter_send_mail,s=
end_mail');
+        'listing_search_code,rapav_listing_display,parameter_send_mail,s=
end_mail,'
+        . 'include_follow,include_follow_save');
 if ( in_array($act,$a_action ) =3D=3D true )
 {
     include 'ajax_'.$act.'.php';

Added: trunk/rapport_avance/ajax_include_follow.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_include_follow.php	                        =
(rev 0)
+++ trunk/rapport_avance/ajax_include_follow.php	2013-12-18 01:24:41 UTC =
(rev 625)
@@ -0,0 +1,53 @@
+<?php
+global $g_user;
+
+
+ob_start();
+
+$titre =3D new IText('ag_title');
+
+// Profile in charged of the action
+$ag_dest =3D new ISelect();
+$ag_dest->name =3D "ag_dest";
+// select profile
+$aAg_dest =3D $cn->make_array("select  p_id as value, " .
+        "p_name as label " .
+        " from profile  "
+        . "where p_id in (select p_granted from "
+            . " user_sec_action_profile where ua_right=3D'W' and p_id=3D=
" . $g_user->get_profile() . ") order by 2");
+$ag_dest->value =3D $aAg_dest;
+
+// -- Date
+$date =3D new IDate();
+$date->name =3D "ag_timestamp";
+$date->value =3D date('d.m.Y');
+
+// -- remind date
+$remind_date =3D new IDate();
+$remind_date->name =3D "ag_remind_date";
+$remind_date->value =3D "";
+
+// -- document
+$category =3D new ISelect('dt_id');
+$category->value =3D $cn->make_array("select dt_id,dt_value from documen=
t_type order by dt_value");
+$category->readOnly =3D false;
+
+//-- description
+$desc =3D new ITextArea();
+$desc->style =3D ' class=3D"itextarea" style=3D"width:80%;margin-left:0p=
x"';
+$desc->name =3D "ag_comment";
+
+require_once 'include/template/include_follow.php';
+
+$response =3D ob_get_clean();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl></ctl>
+<code>$html</code>
+</data>
+EOF;
+?>       =20
\ No newline at end of file

Added: trunk/rapport_avance/ajax_include_follow_save.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_include_follow_save.php	                   =
     (rev 0)
+++ trunk/rapport_avance/ajax_include_follow_save.php	2013-12-18 01:24:41=
 UTC (rev 625)
@@ -0,0 +1,20 @@
+<?php
+
+require_once 'include/class_rapav_listing_compute.php';
+
+ob_start();
+$compute =3D new RAPAV_Listing_Compute();
+$compute->load($_GET['lc_id']);
+$compute->include_follow($_GET);
+$response =3D ob_get_clean();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl></ctl>
+<code>$html</code>
+</data>
+EOF;
+?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
17 23:34:47 UTC (rev 624)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
18 01:24:41 UTC (rev 625)
@@ -15,6 +15,7 @@
 require_once 'class_rapav_listing_formula.php';
 require_once 'class_rapport_avance_sql.php';
 require_once 'class_rapav_listing_compute_fiche.php';
+
 class RAPAV_Listing_Compute
 {
=20
@@ -300,7 +301,6 @@
         $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
         $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
         $nb_fiche=3DDatabase::num_row($r_fiche);
-        if (isNumber($p_id)=3D=3D0) {$p_id=3D0;}
         $a_result=3Darray();
         /* For each card */
         for ($i =3D 0;$i < $nb_fiche;$i++)
@@ -414,11 +414,11 @@
     function propose_include_follow()
     {
        =20
-        echo '<form method=3D"GET" action=3D"extension.raw.php" class=3D=
"noprint" style=3D"display:inline">';
+        echo '<form method=3D"GET" action=3D"ajax.php" onsubmit=3D"js_in=
clude_follow();return false;" id=3D"include_follow_frm" class=3D"noprint"=
 style=3D"display:inline">';
         echo HtmlInput::array_to_hidden(array('ac','gDossier','plugin_co=
de','sa'), $_REQUEST);
         echo HtmlInput::hidden('lc_id',$this->data->lc_id);
-        echo HtmlInput::hidden('act','include_follow_up');
-        echo HtmlInput::submit("include_follow_up", "Inclure dans les ac=
tions","","smallbutton");
+        echo HtmlInput::hidden('act','include_follow');
+        echo HtmlInput::submit("include_follow", "Inclure dans les actio=
ns","","smallbutton");
         echo '</form>';
         return 0;
     }
@@ -433,5 +433,22 @@
         echo '</form>';
         return 0;
     }
-
+    function include_follow($p_array)
+    {
+        global $cn;
+        $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
+        $r_fiche=3D$ofiche->seek (" where lc_id =3D $1",array($this->dat=
a->lc_id));
+        $nb_fiche=3DDatabase::num_row($r_fiche);
+        if (isNumber($p_id)=3D=3D0) {$p_id=3D0;}
+        $a_result=3Darray();
+        /* For each card */
+        $cn->start();
+        for ($i =3D 0;$i < $nb_fiche;$i++)
+        {
+            $fiche=3D$ofiche->next($r_fiche,$i);
+            $a_result[]=3D$fiche->include_follow($p_array);
+        }
+        $cn->commit();
+        return $a_result;
+    }
 }

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-17 23:34:47 UTC (rev 624)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-18 01:24:41 UTC (rev 625)
@@ -6,6 +6,8 @@
  * and open the template in the editor.
  */
 require_once 'class_sendmail.php';
+require_once 'class_follow_up.php';
+
 /**
  * Description of class_rapav_listing_compute_fiche
  *
@@ -562,5 +564,20 @@
             return $result;
         }
     }
+    function include_follow($p_array)
+    {
+        global $cn;
+        $action=3Dnew Follow_Up($cn);
+        if (isDate($p_array['ag_date'])=3D=3Dnull) $p_array['ag_date']=3D=
date('d.m.Y');
+        if ( trim($p_array['ag_title']) =3D=3D "")$p_array['ag_title']=3D=
"Ajout=C3=A9 depuis plugin";
+       =20
+        $action->fromArray($p_array);
+       =20
+        $action->f_id_dest=3D$this->f_id;
+        $fiche =3D new Fiche($cn, $this->f_id);
+        $action->qcode_dest=3D$fiche->strAttribut(ATTR_DEF_QUICKCODE);
+        $_POST['nb_item']=3D0;
+        $action->save();
+    }
=20
 }

Added: trunk/rapport_avance/include/template/include_follow.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/include_follow.php	            =
            (rev 0)
+++ trunk/rapport_avance/include/template/include_follow.php	2013-12-18 0=
1:24:41 UTC (rev 625)
@@ -0,0 +1,68 @@
+<?php echo HtmlInput::title_box("Suivi", "include_follow_result"); ?>
+<form method=3D"GET" onsubmit=3D"js_include_follow_save();
+        return false;" id=3D"include_follow_save_frm">
+    <table>
+        <tr>
+            <td>
+                <label>Date</label>
+            </td>       =20
+            <td>
+                <?php echo $date->input(); ?>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <label>Date rappel</label>
+            </td>
+            <td>
+                <?php echo $remind_date->input(); ?>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <label>
+                    Profil
+                </label>
+            </td>
+            <td>
+
+                <?php echo $ag_dest->input(); ?>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <label>Titre </label>
+            </td>
+            <td>
+                <?php echo $titre->input(); ?>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <label>
+                    Cat=C3=A9gorie
+                </label>
+            </td>
+            <td>
+                <?php echo $category->input(); ?>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <label>Commentaire</label>
+            </td>
+            <td>
+                <?php echo $desc->input(); ?>
+            </td>
+        </tr>
+    </table>
+    <p>
+        <?php
+        echo HtmlInput::array_to_hidden(array('gDossier', 'plugin_code',=
 'ac', 'lc_id'), $_REQUEST);
+        echo HtmlInput::hidden('act', 'include_follow_save');
+        echo HtmlInput::submit('include_follow_save_sbm', "Sauver", "", =
"smallbutton");
+        echo HtmlInput::button_close('include_follow_result');
+        ?>
+    </p>
+
+</form>

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-17 23:34:47 UTC (rev=
 624)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-18 01:24:41 UTC (rev=
 625)
@@ -949,6 +949,9 @@
 }
 function send_email()
 {
+    if (trim($('p_from').value)=3D=3D"") { alert('champs obligatoire man=
quant'); $('p_from').style.border=3D"solid 2px red";return false;}
+    if (trim($('p_subject').value)=3D=3D"") { alert('champs obligatoire =
manquant'); $('p_subject').style.border=3D"solid 2px red";return false;}
+    if (trim($('p_attach').value)=3D=3D"") { alert('champs obligatoire m=
anquant'); $('p_attach').style.border=3D"solid 2px red";return false;}
    try {
         var qs =3D $('parameter_send_email_input_frm').serialize(false);
         waiting_box();
@@ -984,4 +987,81 @@
         return false;
        =20
     }
+}
+function js_include_follow()
+{
+   try {
+       console.log('include_follow');
+        var qs =3D $('include_follow_frm').serialize(false);
+        waiting_box();
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        var answer =3D req.responseXML;
+                        var a =3D answer.getElementsByTagName('ctl');
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (a.length =3D=3D 0) {
+                            var rec =3D req.responseText;
+                            throw 'cannot find ctl element';
+                        }
+                        remove_waiting_box();
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        console.log(code_html);
+                        var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
+                        add_div({'id': 'include_follow_result', 'cssclas=
s': 'inner_box', 'drag': 1, 'style': position});
+                        $('include_follow_result').innerHTML =3D code_ht=
ml;
+                        remove_waiting_box();
+                    }
+                }
+        );
+        return false;
+    } catch (e)
+    {
+        alert(e.message);
+        return false;
+       =20
+    }
+}
+function js_include_follow_save()
+{
+   try {
+        var qs =3D $('include_follow_save_frm').serialize(false);
+        waiting_box();
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: qs,
+                    onFailure: ajax_misc_failure,
+                    onSuccess: function(req) {
+                        var answer =3D req.responseXML;
+                        var a =3D answer.getElementsByTagName('ctl');
+                        var html =3D answer.getElementsByTagName('code')=
;
+                        if (a.length =3D=3D 0) {
+                            var rec =3D req.responseText;
+                            throw 'cannot find ctl element';
+                        }
+                        remove_waiting_box();
+                        var code_html =3D getNodeText(html[0]);
+                        code_html =3D unescape_xml(code_html);
+                        console.log(code_html);
+                        var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
+                        add_div({'id': 'include_follow_save_result', 'cs=
sclass': 'inner_box', 'drag': 1, 'style': position});
+                        $('include_follow_save_result').innerHTML =3D co=
de_html;
+                        remove_waiting_box();
+                    }
+                }
+        );
+        return false;
+    } catch (e)
+    {
+        alert(e.message);
+        return false;
+       =20
+    }
 }
\ No newline at end of file



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


From MAILER-DAEMON Tue Dec 17 20:47:18 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vt6EI-0002Df-9H
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 20:47:18 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 18 Dec 2013 02:35:35 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141640.1387331237.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r626 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Dec 2013 01:47:16 -0000

Author: danydb
Date: 2013-12-18 02:35:35 +0100 (Wed, 18 Dec 2013)
New Revision: 626

Modified:
   trunk/rapport_avance/ajax_include_follow_save.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/rapav_javascript.js
Log:
Cosmetique : fait disparaitre les div input pour mail & action

Modified: trunk/rapport_avance/ajax_include_follow_save.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_include_follow_save.php	2013-12-18 01:24:41=
 UTC (rev 625)
+++ trunk/rapport_avance/ajax_include_follow_save.php	2013-12-18 01:35:35=
 UTC (rev 626)
@@ -5,7 +5,15 @@
 ob_start();
 $compute =3D new RAPAV_Listing_Compute();
 $compute->load($_GET['lc_id']);
-$compute->include_follow($_GET);
+$a_result =3D $compute->include_follow($_GET);
+echo HtmlInput::title_box('R=C3=A9sultat', 'include_follow_save_result')=
;
+echo '<ol>';
+for ($i =3D 0; $i < count($a_result); $i++)
+{
+    echo '<li>' . $a_result[$i] . '</li>';
+}
+echo '</ol>';
+echo HtmlInput::button_close('include_follow_save_result');
 $response =3D ob_get_clean();
 ob_end_clean();
 $html =3D escape_xml($response);

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-18 01:24:41 UTC (rev 625)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-18 01:35:35 UTC (rev 626)
@@ -568,7 +568,7 @@
     {
         global $cn;
         $action=3Dnew Follow_Up($cn);
-        if (isDate($p_array['ag_date'])=3D=3Dnull) $p_array['ag_date']=3D=
date('d.m.Y');
+        if (isDate($p_array['ag_timestamp'])=3D=3Dnull) $p_array['ag_tim=
estamp']=3Ddate('d.m.Y');
         if ( trim($p_array['ag_title']) =3D=3D "")$p_array['ag_title']=3D=
"Ajout=C3=A9 depuis plugin";
        =20
         $action->fromArray($p_array);
@@ -578,6 +578,7 @@
         $action->qcode_dest=3D$fiche->strAttribut(ATTR_DEF_QUICKCODE);
         $_POST['nb_item']=3D0;
         $action->save();
+        return $fiche->strAttribut(ATTR_DEF_QUICKCODE).' inclus dans Sui=
vi';
     }
=20
 }

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-18 01:24:41 UTC (rev=
 625)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-18 01:35:35 UTC (rev=
 626)
@@ -975,8 +975,9 @@
                         console.log(code_html);
                         var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
                         add_div({'id': 'parameter_send_mail_result', 'cs=
sclass': 'inner_box', 'drag': 1, 'style': position});
+                        remove_waiting_box();
                         $('parameter_send_mail_result').innerHTML =3D co=
de_html;
-                        remove_waiting_box();
+                        removeDiv('parameter_send_mail_input');
                     }
                 }
         );
@@ -991,7 +992,6 @@
 function js_include_follow()
 {
    try {
-       console.log('include_follow');
         var qs =3D $('include_follow_frm').serialize(false);
         waiting_box();
         var action =3D new Ajax.Request(
@@ -1052,8 +1052,9 @@
                         console.log(code_html);
                         var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
                         add_div({'id': 'include_follow_save_result', 'cs=
sclass': 'inner_box', 'drag': 1, 'style': position});
+                        remove_waiting_box();
                         $('include_follow_save_result').innerHTML =3D co=
de_html;
-                        remove_waiting_box();
+                        removeDiv('include_follow_result');
                     }
                 }
         );



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


From MAILER-DAEMON Tue Dec 17 20:48:37 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vt6FZ-0002JE-RV
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Dec 2013 20:48:37 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 18 Dec 2013 02:36:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.141643.1387331316.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5598 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Dec 2013 01:48:36 -0000

Author: danydb
Date: 2013-12-18 02:36:54 +0100 (Wed, 18 Dec 2013)
New Revision: 5598

Modified:
   phpcompta/trunk/include/class_html_input.php
Log:
Ajout class dans Button_close

Modified: phpcompta/trunk/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_html_input.php	2013-12-17 17:32:50 UTC =
(rev 5597)
+++ phpcompta/trunk/include/class_html_input.php	2013-12-18 01:36:54 UTC =
(rev 5598)
@@ -208,9 +208,9 @@
      *\param $p_javascript javascript for this button
      *\return string with htmlcode
      */
-    static function button_anchor($p_label,$p_value,$p_name=3D"",$p_java=
script=3D"")
+    static function button_anchor($p_label,$p_value,$p_name=3D"",$p_java=
script=3D"",$p_class=3D"button")
     {
-        $r=3Dsprintf('<span id=3D"%s" > <A class=3D"button" style=3D"dis=
play:inline;"  href=3D"%s" %s >%s</A></span>',
+        $r=3Dsprintf('<span id=3D"%s" > <A class=3D"'.$p_class.'" style=3D=
"display:inline;"  href=3D"%s" %s >%s</A></span>',
                    $p_name,
                    $p_value,
                    $p_javascript,
@@ -437,10 +437,10 @@
      *@param $action action action to perform (message) without onclick
      *@param $javascript javascript to execute
      */
-    static function button_action($action,$javascript,$id=3D"xx")
+    static function button_action($action,$javascript,$id=3D"xx",$p_clas=
s=3D"button")
     {
 		$r=3D"";
-		$r.=3D'<input type=3D"button" id=3D"'.$id.'"class=3D"button" onclick=3D=
"'.$javascript.'" value=3D"'.h($action).'">';
+		$r.=3D'<input type=3D"button" id=3D"'.$id.'"class=3D"'.$p_class.'" onc=
lick=3D"'.$javascript.'" value=3D"'.h($action).'">';
 		return $r;
=20
     }



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


From MAILER-DAEMON Wed Dec 18 14:58:11 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtNFz-0002Zq-Cz
	for mharc-phpcompta-dev@gnu.org; Wed, 18 Dec 2013 14:58:11 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 18 Dec 2013 20:46:27 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.142418.1387396690.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5599 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Dec 2013 19:58:10 -0000

Author: danydb
Date: 2013-12-18 20:46:27 +0100 (Wed, 18 Dec 2013)
New Revision: 5599

Modified:
   phpcompta/trunk/include/class_html_input.php
Log:
Filter_table : autocomplete to off

Modified: phpcompta/trunk/include/class_html_input.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_html_input.php	2013-12-18 01:36:54 UTC =
(rev 5598)
+++ phpcompta/trunk/include/class_html_input.php	2013-12-18 19:46:27 UTC =
(rev 5599)
@@ -754,7 +754,7 @@
 	{
 		$r=3D "
 			<span>
-			<input id=3D\"lk_".$p_table_id."\" class=3D\"input_text\" name=3D\"fi=
lter\" onkeyup=3D\"filter_table(this, '$p_table_id','$p_col',$start_row )=
\" type=3D\"text\">
+			<input id=3D\"lk_".$p_table_id."\" autocomplete=3D\"off\" class=3D\"i=
nput_text\" name=3D\"filter\" onkeyup=3D\"filter_table(this, '$p_table_id=
','$p_col',$start_row )\" type=3D\"text\">
 			<input type=3D\"button\" class=3D\"smallbutton\" onclick=3D\"$('lk_".=
$p_table_id."').value=3D'';filter_table($('lk_".$p_table_id."'), '$p_tabl=
e_id','$p_col',$start_row );\" value=3D\"X\">
 			</span>
 			";



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


From MAILER-DAEMON Fri Dec 20 04:46:22 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vtwf0-00049Q-Ne
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 04:46:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 10:34:36 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143836.1387532781.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r627 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 09:46:21 -0000

Author: danydb
Date: 2013-12-20 10:34:35 +0100 (Fri, 20 Dec 2013)
New Revision: 627

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
Log:
Documentation

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-18 01:35:35 UTC (rev 626)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-20 09:34:35 UTC (rev 627)
@@ -73,7 +73,11 @@
         $cn->commit();
         return array($file_to_parse, $dirname, $type);
     }
-
+    /**
+     * Generate the document, open the file and replace all the tags,
+     * by the found value.
+     * Load the file into the db
+     */
     function generate_document()
     {
         global $cn;
@@ -116,7 +120,14 @@
=20
         $this->load_document($dirname . DIRECTORY_SEPARATOR . $file_to_s=
ave);
     }
-
+    /**
+     * Replace into the file, the tags from the DB
+     * @param $p_dir path
+     * @param $p_filename filename (modele)
+     * @param $p_type mimetype of the file (OOo)=20
+     * @throws Exception when the type from the DB is not a date, a text=
 or a=20
+     * numeric
+     */
     private function parse_document($p_dir, $p_filename, $p_type)
     {
         global $cn;
@@ -208,7 +219,13 @@
         }
         unlink($oname);
     }
-
+    /**
+     * Replace special tags (PERIODE_DECLARATION, TITRE, DOSSIER, NAME..=
.=20
+     * into the file
+     * @param $p_dir path
+     * @param $p_filename filename (modele)
+     * @param $p_type mimetype of the file (OOo)=20
+     */
     private function special_tag($p_dir, $p_filename, $p_type)
     {
         global $cn, $g_parameter;
@@ -281,6 +298,20 @@
         }
         unlink($oname);
     }
+    /**
+     * Replace into the file the history tags
+     *     -  Code _DATE date of operation
+     *     -  Code _ECH limit date of operation
+     *     -  Code _MONTANT_OPERATION amount of operation
+     *     -  Code _PIECE Receipt number
+     *     -  Code _INTERNAL Internal number of op
+     *     -  Code _HTVA amount without VAT
+     *     -  Code _TVA amount VAT
+     *     -  Code _TOTAL amount HVAT + TVA
+    * @param $p_dir path
+     * @param $p_filename filename (modele)
+     * @param $p_type mimetype of the file (OOo)=20
+     */
     private function histo($p_dir, $p_filename, $p_type)
     {
         global $cn, $g_parameter;
@@ -429,6 +460,9 @@
         }
         unlink($oname);
     }
+    /**
+     * Load the document into DB
+     */
     private function load_document($p_file)
     {
         global $cn;
@@ -446,6 +480,10 @@
         $this->update();
         $cn->commit();
     }
+    /**
+     * Create a PDF if GENERATE_PDF is different of NO and load it into
+     * DB
+     */
     function create_pdf()
     {
         global $cn;
@@ -470,13 +508,14 @@
        =20
     }
     /**
-     *=20
-     * @global type $cn
-     * @param type $p_from
-     * @param type $p_subject
-     * @param type $p_message
-     * @param type $p_attach
-     * @return type
+     * Send email
+     * @param $p_from email sender
+     * @param $p_subject subject=20
+     * @param $p_message message
+     * @param $p_attach=20
+     *      - 0 no attach
+     *      - 1 PDF document
+     *      - 2 document from db
      */
     function send_mail($p_from, $p_subject, $p_message, $p_attach)
     {
@@ -564,6 +603,12 @@
             return $result;
         }
     }
+    /**
+     * Include into FOLLOW
+     * @param type $p_array=20
+     * @see Follow_Up::fromArray
+     * @return string with result
+     */
     function include_follow($p_array)
     {
         global $cn;



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


From MAILER-DAEMON Fri Dec 20 05:41:06 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtxVy-0002Mf-Tm
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 05:41:06 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 11:29:20 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143870.1387536065.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5600 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 10:41:05 -0000

Author: danydb
Date: 2013-12-20 11:29:20 +0100 (Fri, 20 Dec 2013)
New Revision: 5600

Modified:
   phpcompta/trunk/include/class_document.php
Log:
insert_existing_document : copy existing lob into table document

Modified: phpcompta/trunk/include/class_document.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_document.php	2013-12-18 19:46:27 UTC (r=
ev 5599)
+++ phpcompta/trunk/include/class_document.php	2013-12-20 10:29:20 UTC (r=
ev 5600)
@@ -380,6 +380,22 @@
         $this->db->commit();
=20
     }
+    /**
+     * Copy a existing OID (LOB) into the table document
+     * @param type $p_ag_id Follow_Up::ag_id
+     * @param type $p_lob oid of existing document
+     * @param type $p_filename filename of existing document
+     * @param type $p_mimetype mimetype of existing document
+     * @param type $p_description Description of existing document (defa=
ult empty)
+     */
+    static function insert_existing_document($p_ag_id, $p_lob, $p_filena=
me, $p_mimetype, $p_description =3D "")
+    {
+        global $cn;
+        // insert into  the table
+        $sql =3D "insert into document (ag_id, d_lob,d_filename,d_mimety=
pe,d_number,d_description) values ($1,$2,$3,$4,$5,$6)";
+        $cn->exec_sql($sql, array($p_ag_id, $p_lob, $p_filename, $p_mime=
type, 1, $p_description));
+    }
+
     /*! a_ref
      * \brief create and compute a string for reference the doc <A ...>
      *



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


From MAILER-DAEMON Fri Dec 20 05:42:02 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtxWs-0002To-CY
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 05:42:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 11:30:17 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143871.1387536122.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5601 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 10:42:01 -0000

Author: danydb
Date: 2013-12-20 11:30:17 +0100 (Fri, 20 Dec 2013)
New Revision: 5601

Modified:
   phpcompta/trunk/include/class_document.php
Log:
insert_existing_document : copy existing lob into table document=20
Add documentation

Modified: phpcompta/trunk/include/class_document.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_document.php	2013-12-20 10:29:20 UTC (r=
ev 5600)
+++ phpcompta/trunk/include/class_document.php	2013-12-20 10:30:17 UTC (r=
ev 5601)
@@ -382,6 +382,7 @@
     }
     /**
      * Copy a existing OID (LOB) into the table document
+     * @note  use of global variable $cn which is the db connx to the cu=
rrent folder
      * @param type $p_ag_id Follow_Up::ag_id
      * @param type $p_lob oid of existing document
      * @param type $p_filename filename of existing document



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


From MAILER-DAEMON Fri Dec 20 05:44:09 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtxYv-0002iF-7P
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 05:44:09 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 11:32:23 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143874.1387536248.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r628 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 10:44:07 -0000

Author: danydb
Date: 2013-12-20 11:32:23 +0100 (Fri, 20 Dec 2013)
New Revision: 628

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
Log:
Task #947 Sauver l'envoi par email dans le suivi et y copier la pi?\195?\=
168ce.
Task #947 - Sauver le r?\195?\169sultat de l'envoi dans le suivi

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-20 09:34:35 UTC (rev 627)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-20 10:32:23 UTC (rev 628)
@@ -475,7 +475,9 @@
         }
         $this->lf_size =3D filesize($p_file);
         $date =3D date('ymd-Hi');
-        $this->lf_filename =3D $date . '-' . $this->listing_compute->lis=
ting->data->l_filename;
+        $fiche =3D new Fiche($cn, $this->f_id);
+        $qcode=3D$fiche->strAttribut(ATTR_DEF_QUICKCODE);
+        $this->lf_filename =3D $qcode.'-'.$date . '-' . $this->listing_c=
ompute->listing->data->l_filename;
         $this->lf_mimetype=3D $this->listing_compute->listing->data->l_m=
imetype;
         $this->update();
         $cn->commit();
@@ -623,6 +625,8 @@
         $action->qcode_dest=3D$fiche->strAttribut(ATTR_DEF_QUICKCODE);
         $_POST['nb_item']=3D0;
         $action->save();
+        /** Copy the document in Follow_UP */
+        Document::insert_existing_document($action->ag_id, $this->lf_lob=
, $this->lf_filename, $this->lf_mimetype);
         return $fiche->strAttribut(ATTR_DEF_QUICKCODE).' inclus dans Sui=
vi';
     }
=20



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


From MAILER-DAEMON Fri Dec 20 06:36:11 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtyNH-0008Cd-4t
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 06:36:11 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 12:24:24 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143907.1387539369.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r629 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 11:36:09 -0000

Author: danydb
Date: 2013-12-20 12:24:24 +0100 (Fri, 20 Dec 2013)
New Revision: 629

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/raw.php
Log:
Task #0000944: Listing : Propose de t?\195?\169l?\195?\169charger tous le=
s documents dans un ZIP
Task #944 - Listing : Propose de  t?\195?\169l?\195?\169charger tous les =
documents dans un ZIP

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
20 10:32:23 UTC (rev 628)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
20 11:24:24 UTC (rev 629)
@@ -451,4 +451,41 @@
         $cn->commit();
         return $a_result;
     }
+    function create_zip()
+    {
+        global $cn;
+        $ofiche =3D new RAPAV_Listing_Compute_Fiche();
+        $r_fiche =3D $ofiche->seek(" where=20
+                coalesce(lf_filename,'') <> ''=20
+                and lc_id =3D $1", array($this->data->lc_id));
+        $nb_fiche =3D Database::num_row($r_fiche);
+        // -- no doc to download
+        if ($nb_fiche =3D=3D 0)
+            return "";
+
+        $dirname =3D tempnam($_ENV['TMP'],'download_');
+        unlink($dirname);
+        mkdir($dirname);
+
+        /* For each card */
+        $cn->start();
+        for ($i =3D 0; $i < $nb_fiche; $i++)
+        {
+            $fiche =3D $ofiche->next($r_fiche, $i);
+            $file =3D $dirname . '/' . $fiche->lf_filename;
+            $cn->lo_export($fiche->lf_lob, $file);
+        }
+        $zip =3D new Zip_Extended;
+        $file_download =3D $_ENV['TMP'].'/all_document-' . microtime(tru=
e) . ".zip";
+        $res =3D $zip->open($file_download, ZipArchive::CREATE);
+        if ($res !=3D=3D TRUE)
+        {
+            echo __FILE__ . ":" . __LINE__ . "cannot recreate zip";
+            exit;
+        }
+        $zip->add_recurse_folder($dirname . DIRECTORY_SEPARATOR);
+        $zip->close();
+        $cn->commit();
+        return $file_download;
+    }
 }

Modified: trunk/rapport_avance/raw.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/raw.php	2013-12-20 10:32:23 UTC (rev 628)
+++ trunk/rapport_avance/raw.php	2013-12-20 11:24:24 UTC (rev 629)
@@ -233,5 +233,26 @@
=20
 	$cn->commit();
 }
+if ($act =3D=3D 'export_download_all')
+{
+    $compute =3D new RAPAV_Listing_compute();
+    $compute->load($_GET['lc_id']);
+    $filename =3D $compute->create_zip();
+    if ($filename =3D=3D "") exit();
+    ini_set('zlib.output_compression', 'Off');
+    header("Pragma: public");
+    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+    header("Cache-Control: must-revalidate");
+    header('Content-type: application/zip');
+    header('Content-Disposition: attachment;filename=3D"' . $filename.'"=
' , FALSE);
+    header("Accept-Ranges: bytes");
+    $file =3D fopen($filename, 'r');
+    while (!feof($file))
+        echo fread($file, 8192);
=20
+    fclose($file);
+
+    unlink($filename);
+}
 ?>



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


From MAILER-DAEMON Fri Dec 20 07:11:30 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtyvS-0008Hj-4T
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 07:11:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 12:59:41 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143950.1387541489.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r630 - in trunk/rapport_avance: . include sql
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 12:11:28 -0000

Author: danydb
Date: 2013-12-20 12:59:41 +0100 (Fri, 20 Dec 2013)
New Revision: 630

Added:
   trunk/rapport_avance/sql/upgrade5.sql
Modified:
   trunk/rapport_avance/include/declaration.inc.php
   trunk/rapport_avance/include/liste.inc.php
   trunk/rapport_avance/rapav_constant.php
   trunk/rapport_avance/rapav_javascript.js
   trunk/rapport_avance/sql/3-parametre.sql
Log:
Task #0000951 : make pre-release
Task #951 - Make release

Modified: trunk/rapport_avance/include/declaration.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/declaration.inc.php	2013-12-20 11:24:24 =
UTC (rev 629)
+++ trunk/rapport_avance/include/declaration.inc.php	2013-12-20 11:59:41 =
UTC (rev 630)
@@ -316,7 +316,6 @@
         /**
          * @todo to adapt to listing
          */
-        console.log("in validate_listing");
         if (check_date_id('<?php echo $date_start_listing->id ?>') =3D=3D=
 false) {
             alert('Date de d=C3=A9but incorrecte');
             $('<?php echo $date_start_listing->id ?>').style.borderColor=
 =3D 'red';

Modified: trunk/rapport_avance/include/liste.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/liste.inc.php	2013-12-20 11:24:24 UTC (r=
ev 629)
+++ trunk/rapport_avance/include/liste.inc.php	2013-12-20 11:59:41 UTC (r=
ev 630)
@@ -4,7 +4,6 @@
      * @file
      * @brief manage the listing
      */
-    var_dump($_POST);
     require_once 'class_rapav_listing.php';
     global $cn;
     $listing =3D new Rapav_Listing();

Modified: trunk/rapport_avance/rapav_constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_constant.php	2013-12-20 11:24:24 UTC (rev =
629)
+++ trunk/rapport_avance/rapav_constant.php	2013-12-20 11:59:41 UTC (rev =
630)
@@ -12,5 +12,5 @@
 global $cn,$rapav_version,$errcode;
=20
 $cn=3Dnew Database (dossier::id());
-$rapav_version=3D4;
+$rapav_version=3D5;
 ?>

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-20 11:24:24 UTC (rev=
 629)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-20 11:59:41 UTC (rev=
 630)
@@ -466,7 +466,6 @@
  */
 function listing_modify(json)
 {
-    console.log(json)
     try {
         var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_modify' + "&cin=3D=
" + json.cin + '&cout=3D' + json.cout + '&id=3D' + json.id;
         waiting_box();
@@ -492,8 +491,7 @@
                             add_div({'id': json.cout, 'cssclass': 'inner=
_box', 'drag': 1, 'style': position});
                             $(json.cout).innerHTML =3D code_html;
                         } catch (e) {
-                            console.log(e);
-                            console.log(code_html);
+                            alert(e.message);
                         }
                     }
                 }
@@ -530,7 +528,6 @@
  */
 function listing_remove_modele(json)
 {
-    console.log(json)
     try {
         var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_remove_modele' + "=
&cin=3D" + json.cin + '&cout=3D' + json.cout + '&id=3D' + json.id;
         waiting_box();
@@ -552,11 +549,9 @@
                             remove_waiting_box();
                             var code_html =3D getNodeText(html[0]);
                             code_html =3D unescape_xml(code_html);
-                            console.log(code_html);
                             $(json.cout).innerHTML =3D code_html;
                         } catch (e) {
-                            console.log(e);
-                            console.log(code_html);
+                            alert(e.message);
                         }
                     }
                 }
@@ -582,7 +577,6 @@
  */
 function listing_definition(json)
 {
-    console.log(json)
     try {
         var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_display_definition=
' + "&cin=3D" + json.cin + '&cout=3D' + json.cout + '&id=3D' + json.id;
         waiting_box();
@@ -604,11 +598,9 @@
                             remove_waiting_box();
                             var code_html =3D getNodeText(html[0]);
                             code_html =3D unescape_xml(code_html);
-                            console.log(code_html);
                             $(json.cout).innerHTML =3D code_html;
                         } catch (e) {
-                            console.log(e);
-                            console.log(code_html);
+                            alert(e.message);
                         }
                     }
                 }
@@ -632,7 +624,6 @@
  */
 function listing_param_add(json)
 {
-    console.log(json);
     try {
         var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_param_add' + "&cin=
=3D" + json.cin + '&id=3D' + json.id;
         waiting_box();
@@ -654,16 +645,13 @@
                             remove_waiting_box();
                             var code_html =3D getNodeText(html[0]);
                             code_html =3D unescape_xml(code_html);
-                            console.log(code_html);
                             var position =3D fixed_position(451, 217) + =
';width:50%';
                             add_div({'id': json.cin, 'cssclass': 'inner_=
box', 'drag': 1, 'style': position});
                             $(json.cin).innerHTML =3D code_html;
                          =20
                         } catch (e) {
-                            console.log(e);
-                            console.log(code_html);
+                            alert(e.message);
                         }
-                        console.log('trying to execute javascript');
                         code_html.evalScripts();
                     }
                 }
@@ -785,12 +773,10 @@
                            =20
                             if (code =3D=3D 'ok')
                             {
-                                console.log('tr_'+id);
                                 var row=3D$('tr_'+id);
                                 row.style.color=3D"red";
                                 row.style.textDecoration=3D'line-through=
';
                                 row.cells[row.cells.length-1].innerHTML=3D=
"";
-                                console.log(row.length);
=20
                             }
                             if (code =3D=3D 'nok')
@@ -931,7 +917,6 @@
                         remove_waiting_box();
                         var code_html =3D getNodeText(html[0]);
                         code_html =3D unescape_xml(code_html);
-                        console.log(code_html);
                         var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
                         add_div({'id': 'parameter_send_mail_input', 'css=
class': 'inner_box', 'drag': 1, 'style': position});
                         $('parameter_send_mail_input').innerHTML =3D cod=
e_html;
@@ -972,7 +957,6 @@
                         remove_waiting_box();
                         var code_html =3D getNodeText(html[0]);
                         code_html =3D unescape_xml(code_html);
-                        console.log(code_html);
                         var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
                         add_div({'id': 'parameter_send_mail_result', 'cs=
sclass': 'inner_box', 'drag': 1, 'style': position});
                         remove_waiting_box();
@@ -1011,7 +995,6 @@
                         remove_waiting_box();
                         var code_html =3D getNodeText(html[0]);
                         code_html =3D unescape_xml(code_html);
-                        console.log(code_html);
                         var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
                         add_div({'id': 'include_follow_result', 'cssclas=
s': 'inner_box', 'drag': 1, 'style': position});
                         $('include_follow_result').innerHTML =3D code_ht=
ml;
@@ -1049,7 +1032,6 @@
                         remove_waiting_box();
                         var code_html =3D getNodeText(html[0]);
                         code_html =3D unescape_xml(code_html);
-                        console.log(code_html);
                         var position =3D fixed_position(451, 217) + ';wi=
dth:50%';
                         add_div({'id': 'include_follow_save_result', 'cs=
sclass': 'inner_box', 'drag': 1, 'style': position});
                         remove_waiting_box();

Modified: trunk/rapport_avance/sql/3-parametre.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/3-parametre.sql	2013-12-20 11:24:24 UTC (rev=
 629)
+++ trunk/rapport_avance/sql/3-parametre.sql	2013-12-20 11:59:41 UTC (rev=
 630)
@@ -3,4 +3,4 @@
     param_code text primary key,
     param_value text=20
 );
-insert into rapport_advanced.rapav_parameter values ('FROM','phpcompta@l=
ocalhost'), ('SMTP','localhost'),('PORT','25');
\ No newline at end of file
+insert into rapport_advanced.rapav_parameter values ('FROM','phpcompta@l=
ocalhost');
\ No newline at end of file

Added: trunk/rapport_avance/sql/upgrade5.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/sql/upgrade5.sql	                        (rev 0)
+++ trunk/rapport_avance/sql/upgrade5.sql	2013-12-20 11:59:41 UTC (rev 63=
0)
@@ -0,0 +1,267 @@
+begin;
+
+create table rapport_advanced.listing
+(
+    l_id    serial primary key,
+    l_name text check (length(trim(l_name)) > 0 and l_name is not null),
+    l_description   text,
+    l_lob oid,
+    l_filename text,
+    l_mimetype text,
+    l_size bigint default 0,
+    fd_id bigint references fiche_def (fd_id) on update cascade on delet=
e set null
+);
+CREATE TABLE rapport_advanced.listing_param
+(
+  lp_id serial NOT NULL,
+  l_id bigint,
+  lp_code text NOT NULL,
+  lp_comment text,
+  l_order integer,
+  ad_id bigint,
+  lp_card_saldo character(1),
+  lp_with_card character(1),
+  tmp_val account_type,
+  tva_id integer,
+  fp_formula text,
+  fp_signed integer,
+  jrn_def_type character(3),
+  tt_id integer,
+  with_tmp_val account_type,
+  type_sum_account bigint,
+  operation_pcm_val account_type,
+  jrn_def_id bigint,
+  date_paid integer DEFAULT 0,
+  type_detail text,
+  lp_paid text, -- used by Listing_Compute_Historique
+  lp_histo integer DEFAULT 0, -- 0 : no history...
+  CONSTRAINT listing_param_pkey PRIMARY KEY (lp_id ),
+  CONSTRAINT fk_listing_param_detail_attr_def FOREIGN KEY (ad_id)
+      REFERENCES attr_def (ad_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION,
+  CONSTRAINT fk_listing_param_listing FOREIGN KEY (l_id)
+      REFERENCES rapport_advanced.listing (l_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT listing_param_jrn_def_id_fkey FOREIGN KEY (jrn_def_id)
+      REFERENCES jrn_def (jrn_def_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED=
,
+  CONSTRAINT listing_param_tt_id_fkey FOREIGN KEY (tt_id)
+      REFERENCES rapport_advanced.total_type (tt_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION,
+  CONSTRAINT listing_param_tva_id_fkey FOREIGN KEY (tva_id)
+      REFERENCES tva_rate (tva_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION,
+  CONSTRAINT listing_param_type_sum_account_fkey FOREIGN KEY (type_sum_a=
ccount)
+      REFERENCES rapport_advanced.total_type_account (tt_id) MATCH SIMPL=
E
+      ON UPDATE SET NULL ON DELETE SET NULL,
+  CONSTRAINT c_lp_code CHECK (length(btrim(lp_code)) > 0),
+  CONSTRAINT ck_type_detail CHECK (type_detail =3D ANY (ARRAY['ATTR'::te=
xt, 'COMP'::text, 'FORM'::text, 'SALDO'::text, 'ACCOUNT'::text])),
+  CONSTRAINT listing_param_lp_card_saldo_check CHECK (lp_card_saldo =3D =
ANY (ARRAY['C'::bpchar, 'D'::bpchar, 'S'::bpchar, NULL::bpchar])),
+  CONSTRAINT listing_param_lp_with_card_check CHECK (lp_with_card =3D AN=
Y (ARRAY['Y'::bpchar, 'N'::bpchar]))
+);
+COMMENT ON COLUMN rapport_advanced.listing_param.lp_paid IS 'used by Lis=
ting_Compute_Historique';
+COMMENT ON COLUMN rapport_advanced.listing_param.lp_histo IS '0 : no his=
tory
+1 : with history';
+
+CREATE OR REPLACE FUNCTION rapport_advanced.formulaire_param_detail_jrn_=
def_id_ins_upd()
+  RETURNS trigger AS
+$BODY$
+declare
+	jrn_def_id integer;
+begin
+	if NEW.jrn_def_id =3D -1 then
+		jrn_def_id=3DNULL;
+		NEW.jrn_def_id :=3D jrn_def_id;
+	end if;
+	return NEW;
+end;
+$BODY$
+  LANGUAGE plpgsql ;
+
+
+CREATE OR REPLACE FUNCTION rapport_advanced.listing_param_code_transform=
()
+ RETURNS trigger
+    AS $function$
+    declare
+        sResult text;
+    begin
+        sResult :=3D lower(NEW.lp_code);
+
+        sResult :=3D translate(sResult,E'=C3=A9=C3=A8=C3=AA=C3=AB=C3=A0=C3=
=A2=C3=A4=C3=AF=C3=AE=C3=BC=C3=BB=C3=B9=C3=B6=C3=B4=C3=A7','eeeeaaaiiuuuo=
oc');
+        sResult :=3D translate(sResult,E' $=E2=82=AC=C2=B5=C2=A3%.+-/\\!=
(){}(),;_&|"#''^<>*','');
+
+        NEW.lp_code=3Dupper(sResult);
+
+return NEW;
+
+end;
+$function$
+ LANGUAGE plpgsql;
+
+-- Trigger: listing_param_code_transform_trg on rapport_advanced.listing=
_param
+
+
+CREATE TRIGGER listing_param_code_transform_trg
+  BEFORE INSERT OR UPDATE OF lp_code
+  ON rapport_advanced.listing_param
+  FOR EACH ROW
+  EXECUTE PROCEDURE rapport_advanced.listing_param_code_transform();
+
+-- Trigger: listing_param_trg on rapport_advanced.listing_param
+
+
+CREATE TRIGGER listing_param_trg
+  BEFORE INSERT OR UPDATE OF jrn_def_id
+  ON rapport_advanced.listing_param
+  FOR EACH ROW
+  EXECUTE PROCEDURE rapport_advanced.formulaire_param_detail_jrn_def_id_=
ins_upd();
+
+
+CREATE TABLE rapport_advanced.listing_compute
+(
+  lc_id bigserial NOT NULL, -- PK
+  l_name text, -- Description or note
+  l_description text, -- Description or note
+  l_id bigint, -- FK to listing
+  l_start date, -- start data
+  l_end date, -- end_date
+  l_keep character(1) NOT NULL DEFAULT 'N'::bpchar, -- If yes, it is kee=
ped with N it will deleted
+  l_timestamp timestamp without time zone DEFAULT now(),
+  CONSTRAINT listing_compute_pkey PRIMARY KEY (lc_id ),
+  CONSTRAINT listing_fk FOREIGN KEY (l_id)
+      REFERENCES rapport_advanced.listing (l_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+COMMENT ON TABLE rapport_advanced.listing_compute  IS 'Parent of listing=
_compute_detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute.lc_id IS 'PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_id IS 'FK to listin=
g';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_name IS 'Title';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_description IS 'Des=
cription or note';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_start IS 'start dat=
a';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_end IS 'end_date';
+COMMENT ON COLUMN rapport_advanced.listing_compute.l_keep IS 'If yes, it=
 is keeped with N it will deleted';
+
+
+CREATE OR REPLACE FUNCTION rapport_advanced.listing_compute_trg()=20
+ returns trigger=20
+ as=20
+$_BODY_$
+declare=20
+begin
+ NEW.l_timestamp=3Dnow() ;
+return NEW;
+end;
+$_BODY_$ LANGUAGE plpgsql;
+CREATE TRIGGER listing_compute_trg
+ BEFORE=20
+ INSERT OR UPDATE=20
+ on rapport_advanced.listing_compute
+ FOR EACH ROW EXECUTE PROCEDURE rapport_advanced.listing_compute_trg();
+
+
+begin;
+-- Table: rapport_advanced.listing_compute_detail
+CREATE TABLE rapport_advanced.listing_compute_detail
+(
+  ld_id bigserial NOT NULL, -- PK
+  lc_id bigint, -- fk to listing_compute
+  ld_value_date date, -- Used when computed value is a date
+  ld_value_numeric numeric(20,4), -- Used when computed value is numeric
+  ld_value_text text, -- Used when computed value is a text
+  lp_id bigint, -- fk to listing_param, used for the condition
+  lf_id bigint, -- FK to listing_compute_fiche
+  lc_code text,
+  lc_comment text,
+  lc_order bigint,
+  lc_histo integer DEFAULT 0,
+  CONSTRAINT listing_compute_detail_pkey PRIMARY KEY (ld_id ),
+  CONSTRAINT listing_compute_detail_lc_id_fkey FOREIGN KEY (lc_id)
+      REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT listing_compute_detail_lp_id_fkey FOREIGN KEY (lp_id) REFER=
ENCES rapport_advanced.listing_param (lp_id) MATCH SIMPLE ON UPDATE SET N=
ULL ON DELETE SET NULL);
+COMMENT ON TABLE rapport_advanced.listing_compute_detail  IS 'Detail of =
computing listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_id IS 'PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_id IS 'fk t=
o listing_compute';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_date =
IS 'Used when computed value is a date';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_numer=
ic IS 'Used when computed value is numeric';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.ld_value_text =
IS 'Used when computed value is a text';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lp_id IS 'fk t=
o listing_param, used for the condition';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lf_id IS 'FK t=
o listing_compute_fiche';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_code IS 'co=
de from listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_comment IS =
'comment from listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_order IS 'o=
rder from listing_param';
+COMMENT ON COLUMN rapport_advanced.listing_compute_detail.lc_histo IS '0=
 : no history 1 : with history';
+
+CREATE INDEX fki_listing_compute_fiche_lf_id2_fk
+  ON rapport_advanced.listing_compute_detail
+  USING btree
+  (lf_id );
+
+-- Index: rapport_advanced.fki_listing_compute_fiche_lf_id_fk
+
+CREATE INDEX fki_listing_compute_fiche_lf_id_fk
+  ON rapport_advanced.listing_compute_detail
+  USING btree
+  (lf_id );
+
+CREATE TABLE rapport_advanced.listing_compute_fiche
+(
+  lf_id serial NOT NULL, -- PK
+  f_id bigint NOT NULL, -- FK to fiche
+  lf_lob oid, -- Generated file if any
+  lf_pdf oid, -- Generated file if any
+  lf_filename text, -- Name of the generated file. It should be based on=
 the name of the template + unique id
+  lf_pdf_filename text, -- Generated file if any
+  lf_mimetype text, -- Same mimetype as in table listing
+  lc_id bigint,
+  lf_action_included text,
+  lf_email_send_date timestamp,
+  lf_email_send_result text,
+  CONSTRAINT listing_compute_fiche_pkey PRIMARY KEY (lf_id ),
+  CONSTRAINT fk_listing_compute_lc_id FOREIGN KEY (lc_id)
+      REFERENCES rapport_advanced.listing_compute (lc_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT listing_compute_fiche_f_id_fkey FOREIGN KEY (f_id)
+      REFERENCES fiche (f_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+);
+COMMENT ON TABLE rapport_advanced.listing_compute_fiche  IS 'Content :ca=
rd document to generate';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_id IS 'PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.f_id IS 'FK to =
fiche';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_lob IS 'Gene=
rated file if any';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_pdf IS 'PDF =
File';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_filename IS =
'Name of the generated file. It should be based on the name of the templa=
te + unique id';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_pdf_filename=
 IS 'Name of the PDF file.base of lf_filename';
+COMMENT ON COLUMN rapport_advanced.listing_compute_fiche.lf_mimetype IS =
'Same mimetype as in table listing';
+
+COMMENT ON COLUMN rapport_advanced.listing_param.lp_paid IS 'used by Lis=
ting_Compute_Historique';
+
+CREATE TABLE rapport_advanced.listing_compute_historique
+(
+  lh_id bigserial NOT NULL, -- PK
+  ld_id bigint, -- FK to listing_compute_detail
+  jr_id bigint, -- FK to jrn
+  CONSTRAINT listing_compute_historique_pkey PRIMARY KEY (lh_id ),
+  CONSTRAINT listing_compute_historique_jr_id_fkey FOREIGN KEY (jr_id)
+      REFERENCES jrn (jr_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT listing_compute_historique_ld_id_fkey FOREIGN KEY (ld_id)
+      REFERENCES rapport_advanced.listing_compute_detail (ld_id) MATCH S=
IMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE
+);
+COMMENT ON TABLE rapport_advanced.listing_compute_historique  IS 'Conten=
t : history of operation for a detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.lh_id IS '=
PK';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.ld_id IS '=
FK to listing_compute_detail';
+COMMENT ON COLUMN rapport_advanced.listing_compute_historique.jr_id IS '=
FK to jrn';
+
+create table rapport_advanced.rapav_parameter
+(
+    param_code text primary key,
+    param_value text=20
+);
+insert into rapport_advanced.rapav_parameter values ('FROM','phpcompta@l=
ocalhost');
+
+insert into rapport_advanced.version(version_id,version_note) values (5,=
'Ajout des listings');
+
+commit;



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


From MAILER-DAEMON Fri Dec 20 07:23:50 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vtz7O-0003A1-HI
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 07:23:50 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 13:12:04 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143962.1387542229.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r631 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 12:23:49 -0000

Author: danydb
Date: 2013-12-20 13:12:04 +0100 (Fri, 20 Dec 2013)
New Revision: 631

Modified:
   trunk/rapport_avance/include/historique.inc.php
Log:
bug order=20

Modified: trunk/rapport_avance/include/historique.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/historique.inc.php	2013-12-20 11:59:41 U=
TC (rev 630)
+++ trunk/rapport_avance/include/historique.inc.php	2013-12-20 12:12:04 U=
TC (rev 631)
@@ -42,7 +42,7 @@
 		l_description,l_timestamp,
 		to_char(l_start,'YYMMDD') as fmt_start,
 		to_char(l_end,'YYMMDD') as fmt_end,
-		to_char(l_end,'YYMMDDHH24MI') as fmt_order_generated,
+		to_char(l_timestamp,'YYMMDDHH24MI') as fmt_order_generated,
                 2
 		from rapport_advanced.listing_compute
 order by d_start,d_title");
@@ -81,11 +81,11 @@
 	</tr>
 	<?php for ($i=3D0;$i<count($data);$i++) :?>
 	<tr id=3D"tr_<?php echo $data[$i]['d_id']?>">
-		<td sortable_customkey=3D"<?php echo $data[$i]['fmt_start']?>">
+		<td sorttable_customkey=3D"<?php echo $data[$i]['fmt_start']?>">
=20
 			<?php echo format_date($data[$i]['d_start'])?>
 		</td>
-		<td sortable_customkey=3D"<?php echo $data[$i]['fmt_end']?>">
+		<td sorttable_customkey=3D"<?php echo $data[$i]['fmt_end']?>">
 			<?php echo format_date($data[$i]['d_end'])?>
 		</td>
 		<td>
@@ -94,7 +94,7 @@
 		<td>
 			<?php echo h($data[$i]['d_description'])?>
 		</td>
-		<td sortable_customkey=3D"<?php echo $data[$i]['fmt_order_generated']?=
>">
+		<td sorttable_customkey=3D"<?php echo $data[$i]['fmt_order_generated']=
?>">
 			<?php echo h($data[$i]['fmt_generated'])?>
 		</td>
 <?php if  ($data[$i]['type']=3D=3D1): ?>



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


From MAILER-DAEMON Fri Dec 20 07:35:56 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VtzJ6-0006Ov-Ey
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 07:35:56 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 13:24:10 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.143969.1387542955.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r632 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 12:35:55 -0000

Author: danydb
Date: 2013-12-20 13:24:10 +0100 (Fri, 20 Dec 2013)
New Revision: 632

Modified:
   trunk/rapport_avance/include/historique.inc.php
Log:
highlight odd row

Modified: trunk/rapport_avance/include/historique.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/historique.inc.php	2013-12-20 12:12:04 U=
TC (rev 631)
+++ trunk/rapport_avance/include/historique.inc.php	2013-12-20 12:24:10 U=
TC (rev 632)
@@ -80,7 +80,8 @@
 		</th>
 	</tr>
 	<?php for ($i=3D0;$i<count($data);$i++) :?>
-	<tr id=3D"tr_<?php echo $data[$i]['d_id']?>">
+        <?php $class=3D($i%2=3D=3D0)?'class=3D"even"':' class=3D"odd" ';=
 ?>
+	<tr id=3D"tr_<?php echo $data[$i]['d_id']?>" <?php echo $class;?> >
 		<td sorttable_customkey=3D"<?php echo $data[$i]['fmt_start']?>">
=20
 			<?php echo format_date($data[$i]['d_start'])?>



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


From MAILER-DAEMON Fri Dec 20 08:23:21 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu02z-000053-JU
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 08:23:21 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 14:11:34 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144002.1387545800.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r633 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 13:23:19 -0000

Author: danydb
Date: 2013-12-20 14:11:34 +0100 (Fri, 20 Dec 2013)
New Revision: 633

Modified:
   trunk/rapport_avance/ajax_rapav_listing_display.php
   trunk/rapport_avance/include/class_rapav_listing_compute.php
Log:
Sort table

Modified: trunk/rapport_avance/ajax_rapav_listing_display.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-20 12:24:=
10 UTC (rev 632)
+++ trunk/rapport_avance/ajax_rapav_listing_display.php	2013-12-20 13:11:=
34 UTC (rev 633)
@@ -22,5 +22,5 @@
=20
 echo HtmlInput::button_action("Retour","$('declaration_list_div').show()=
; $('declaration_display_div').hide();",'rt'.$_GET['d_id'],'smallbutton')=
;
 echo '</div>';
-
+echo create_script('sorttable.makeSortable($("_tb"))');
 ?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
20 12:24:10 UTC (rev 632)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
20 13:11:34 UTC (rev 633)
@@ -182,10 +182,10 @@
                 }
                 $col_range=3Dimplode(",",$col);
                 echo "Filtre ".HtmlInput::filter_table($form_name."_tb",=
 $col_range, 1);
-                echo '<table id=3D"'.$form_name.'_tb" style=3D"min-width=
:100%" class=3D"result">';
+                echo '<table id=3D"'.$form_name.'_tb" style=3D"min-width=
:100%" class=3D"sortable">';
                 echo '<tr>';
                 if ( $with_sel ) {
-                    echo '<TH><INPUT TYPE=3D"CHECKBOX" onclick=3D"toggle=
_checkbox(\''.$form_name.'\')"></TH>';
+                    echo '<TH sorttable_customkey=3D"1" ><INPUT TYPE=3D"=
CHECKBOX" onclick=3D"toggle_checkbox(\''.$form_name.'\')">'.HtmlInput::in=
fobulle(17).'</TH>';
                 }
                 for ($e=3D0;$e<$nb_detail;$e++)
                 {
@@ -208,11 +208,11 @@
                 if ($e=3D=3D0 && $with_sel)
                 {
                      $check_box=3Dnew ICheckBox("selected_card[]", $fich=
e->lf_id);
-                     echo td($check_box->input());
+                     echo td($check_box->input(),' sorttable_customkey=3D=
"1" ');
                 }
                 echo (($detail->ld_value_numeric !=3D=3D null)?td(nbm($d=
etail->ld_value_numeric),'class=3D"num"'):"");
                 echo (($detail->ld_value_text !=3D=3D null)?td($detail->=
ld_value_text):"");
-                echo (($detail->ld_value_date!=3D=3D null)?td($detail->l=
d_value_date):"");
+                echo (($detail->ld_value_date!=3D=3D null)?td($detail->l=
d_value_date,' sorttable_customkey=3D"'.$detail->ld_value_date.'"'):"");
             }
             if ( $fiche->lf_filename !=3D "")
             {



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


From MAILER-DAEMON Fri Dec 20 08:25:19 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu04t-0000xF-UT
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 08:25:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 14:13:35 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144003.1387545919.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5602 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 13:25:19 -0000

Author: danydb
Date: 2013-12-20 14:13:34 +0100 (Fri, 20 Dec 2013)
New Revision: 5602

Modified:
   phpcompta/trunk/include/ac_common.php
Log:
documentation

Modified: phpcompta/trunk/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ac_common.php	2013-12-20 10:30:17 UTC (rev 56=
01)
+++ phpcompta/trunk/include/ac_common.php	2013-12-20 13:13:34 UTC (rev 56=
02)
@@ -71,7 +71,8 @@
 {
     return '<h1 ' . $p_class . '>' . htmlspecialchars($p_string) . '</h1=
>';
 }
-/**\brief surround the string with td
+/**
+ * \brief surround the string with td
  * \param $p_string string to surround by TD
  * \param $p_extra extra info (class, style, javascript...)
  * \return string surrounded by td



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


From MAILER-DAEMON Fri Dec 20 09:24:45 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu10P-0007QH-En
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 09:24:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 15:12:59 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144076.1387549484.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r634 - trunk/rapport_avance
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 14:24:44 -0000

Author: danydb
Date: 2013-12-20 15:12:58 +0100 (Fri, 20 Dec 2013)
New Revision: 634

Modified:
   trunk/rapport_avance/ajax_parameter_send_mail.php
Log:
Add copy to the sender

Modified: trunk/rapport_avance/ajax_parameter_send_mail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_parameter_send_mail.php	2013-12-20 13:11:34=
 UTC (rev 633)
+++ trunk/rapport_avance/ajax_parameter_send_mail.php	2013-12-20 14:12:58=
 UTC (rev 634)
@@ -24,6 +24,7 @@
             array('value'=3D>1,'label'=3D>_('Document en PDF')),
             array('value'=3D>2,'label'=3D>_('Document g=C3=A9n=C3=A9r=C3=
=A9'))
     );
+    $copy=3Dnew ICheckBox('copy');
     require_once 'include/template/parameter_send_mail_input.php';
    =20
 }



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


From MAILER-DAEMON Fri Dec 20 10:20:31 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu1sM-0002dR-Pu
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 10:20:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:08:43 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144154.1387552828.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r635 - trunk/rapport_avance
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 15:20:28 -0000

Author: danydb
Date: 2013-12-20 16:08:42 +0100 (Fri, 20 Dec 2013)
New Revision: 635

Modified:
   trunk/rapport_avance/ajax_send_mail.php
Log:
Add copy to the sender

Modified: trunk/rapport_avance/ajax_send_mail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_send_mail.php	2013-12-20 14:12:58 UTC (rev =
634)
+++ trunk/rapport_avance/ajax_send_mail.php	2013-12-20 15:08:42 UTC (rev =
635)
@@ -4,7 +4,9 @@
 ob_start();
 $listing=3Dnew RAPAV_Listing_Compute();
 $listing->load($lc_id);
-$a_result=3D$listing->send_mail($p_from,$p_subject,$p_message,$p_attach)=
;
+$tcopy=3D(isset($copy))?1:0;
+
+$a_result=3D$listing->send_mail($p_from,$p_subject,$p_message,$p_attach,=
$tcopy);
 echo HtmlInput::title_box(_('R=C3=A9sultat'),'parameter_send_mail_result=
');
 echo '<ol>';
 for ($i=3D0;$i<count($a_result);$i++)



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


From MAILER-DAEMON Fri Dec 20 10:20:50 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu1sg-0002ej-CK
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 10:20:50 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:09:04 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144155.1387552849.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r636 - in trunk/rapport_avance/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 15:20:49 -0000

Author: danydb
Date: 2013-12-20 16:09:04 +0100 (Fri, 20 Dec 2013)
New Revision: 636

Modified:
   trunk/rapport_avance/include/class_rapav_listing_compute.php
   trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
   trunk/rapport_avance/include/template/parameter_send_mail_input.php
Log:
Add copy to the sender

Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
20 15:08:42 UTC (rev 635)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php	2013-12-=
20 15:09:04 UTC (rev 636)
@@ -295,7 +295,7 @@
             $fiche->generate_document();
         }
     }
-    function send_mail($p_from,$p_subject,$p_message,$p_attach)
+    function send_mail($p_from,$p_subject,$p_message,$p_attach,$p_copy)
     {
         global $cn;
         $ofiche=3Dnew RAPAV_Listing_Compute_Fiche();
@@ -306,7 +306,7 @@
         for ($i =3D 0;$i < $nb_fiche;$i++)
         {
             $fiche=3D$ofiche->next($r_fiche,$i);
-            $a_result[]=3D$fiche->send_mail($p_from,$p_subject,$p_messag=
e,$p_attach);
+            $a_result[]=3D$fiche->send_mail($p_from,$p_subject,$p_messag=
e,$p_attach,$p_copy);
         }
         return $a_result;
     }

Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-20 15:08:42 UTC (rev 635)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php	20=
13-12-20 15:09:04 UTC (rev 636)
@@ -518,8 +518,11 @@
      *      - 0 no attach
      *      - 1 PDF document
      *      - 2 document from db
+     * @param $p_copy=20
+     *      - 0 no copy to the sender
+     *      - 1 copy to the sender
      */
-    function send_mail($p_from, $p_subject, $p_message, $p_attach)
+    function send_mail($p_from, $p_subject, $p_message, $p_attach,$p_cop=
y)
     {
         global $cn;
         $fiche =3D new Fiche($cn, $this->f_id);
@@ -541,6 +544,9 @@
         $mail->set_from($p_from);
         $mail->set_message($p_message);
         $mail->set_subject($p_subject);
+        if ($p_copy =3D=3D 1 ) {
+            $email.=3D','.$p_from;
+        }
         $mail->mailto($email);
         switch ($p_attach)
         {

Modified: trunk/rapport_avance/include/template/parameter_send_mail_input=
.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/parameter_send_mail_input.php	2=
013-12-20 15:08:42 UTC (rev 635)
+++ trunk/rapport_avance/include/template/parameter_send_mail_input.php	2=
013-12-20 15:09:04 UTC (rev 636)
@@ -16,6 +16,9 @@
 <p>
     <label>Attache</label><?php echo $attach->input();?>
 </p>
+<p>
+    <label>Copie pour l'exp=C3=A9diteur</label><?php echo $copy->input()=
;?>
+</p>
 <?php
 echo HtmlInput::submit("send_mail", _('Envoi'), '', 'smallbutton');
 echo HtmlInput::button_close('parameter_send_mail_input');



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


From MAILER-DAEMON Fri Dec 20 10:21:05 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu1sv-0002fi-Ic
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 10:21:05 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:09:20 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144156.1387552865.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r637 - trunk/rapport_avance/doc
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 15:21:04 -0000

Author: danydb
Date: 2013-12-20 16:09:20 +0100 (Fri, 20 Dec 2013)
New Revision: 637

Modified:
   trunk/rapport_avance/doc/rapav.odt
Log:
add documentation

Modified: trunk/rapport_avance/doc/rapav.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)



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


From MAILER-DAEMON Fri Dec 20 10:53:27 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu2OE-00059q-UU
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 10:53:26 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:41:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144181.1387554804.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5603 - phpcompta/trunk/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 15:53:24 -0000

Author: danydb
Date: 2013-12-20 16:41:38 +0100 (Fri, 20 Dec 2013)
New Revision: 5603

Modified:
   phpcompta/trunk/include/template/dashboard.php
Log:
cosmetic

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-20 13:13:34 UT=
C (rev 5602)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-20 15:41:38 UT=
C (rev 5603)
@@ -119,7 +119,7 @@
 <fieldset> <legend><?php echo _('Pense-B=C3=AAte')?></legend>
=20
 <?php
-echo HtmlInput::button('add',_('Ajout'),'onClick=3D"add_todo()"');
+echo HtmlInput::button('add',_('Ajout'),'onClick=3D"add_todo()"',' small=
button');
 if ( ! empty ($array) )  {
   echo '<table id=3D"table_todo" class=3D"sortable" width=3D"100%">';
   echo '<tr><th class=3D" sorttable_sorted_reverse">Date <span id=3D"sor=
ttable_sortrevind">&nbsp;&blacktriangle;</span></th><th>Titre</th><th></t=
h>';



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


From MAILER-DAEMON Fri Dec 20 11:01:04 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu2Vc-00005v-De
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 11:01:04 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:49:18 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144213.1387555263.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5604 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 16:01:02 -0000

Author: danydb
Date: 2013-12-20 16:49:17 +0100 (Fri, 20 Dec 2013)
New Revision: 5604

Modified:
   phpcompta/trunk/include/class_ibutton.php
Log:
cosmetic

Modified: phpcompta/trunk/include/class_ibutton.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_ibutton.php	2013-12-20 15:41:38 UTC (re=
v 5603)
+++ phpcompta/trunk/include/class_ibutton.php	2013-12-20 15:49:17 UTC (re=
v 5604)
@@ -28,17 +28,18 @@
 {
     var $label;
     /*!\brief show the html  input of the widget*/
-    public function input($p_name=3Dnull,$p_value=3Dnull)
+    public function input($p_name=3Dnull,$p_value=3Dnull,$p_class=3D"")
     {
         $this->name=3D($p_name=3D=3Dnull)?$this->name:$p_name;
         $this->value=3D($p_value=3D=3Dnull)?$this->value:$p_value;
 		$this->label=3D(trim($this->label) !=3D '')?$this->label:$this->value;
+        $class=3D($p_class=3D"")?" button ":$this->class;
         if ( $this->readOnly=3D=3Dtrue) return $this->display();
         $extra=3D ( isset($this->extra))?$this->extra:"";
         $this->id=3D($this->id=3D=3D"")?$this->name:$this->id;
 		$tab=3D(isset($this->tabindex))?' tabindex=3D"'.$this->tabindex.'"':""=
;
         $r=3D'<input type=3D"BUTTON" name=3D"'.$this->name.'"'.
-           ' class=3D"button" '.
+           ' class=3D"'.$class.'" '.
                 $this->extra.
 				$tab.
            ' id=3D"'.$this->id.'"'.



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


From MAILER-DAEMON Fri Dec 20 11:01:45 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu2WH-0000xl-LR
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 11:01:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:50:01 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144216.1387555304.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5605 - in phpcompta/trunk:
	dev/manage-code/create-file html html/admin html/image include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 16:01:44 -0000

Author: danydb
Date: 2013-12-20 16:50:00 +0100 (Fri, 20 Dec 2013)
New Revision: 5605

Added:
   phpcompta/trunk/html/image/spirale2.gif
Modified:
   phpcompta/trunk/dev/manage-code/create-file/
   phpcompta/trunk/html/admin/setup.php
   phpcompta/trunk/html/image/orange_flower.gif
   phpcompta/trunk/html/style-color.css
   phpcompta/trunk/html/style-light.css
   phpcompta/trunk/html/user_login.php
   phpcompta/trunk/include/class_filetosend.php
   phpcompta/trunk/include/constant.php
Log:
Style-color=20


Property changes on: phpcompta/trunk/dev/manage-code/create-file
___________________________________________________________________
Name: svn:ignore
   - .menu_ref_struct.txt.swp
.class_menu_ref_sql.php.swp
.create_config.py.swp
.create_phpclass.py.swp
.profile_struct.txt.swp
.profile_menu_struct.txt.swp
.create_config.py.kate-swp
.create_phpclass.py.kate-swp
.create_phpclass2.py.kate-swp
.class_Jrnx_sql_SQL.php.swo

   + .menu_ref_struct.txt.swp
.class_menu_ref_sql.php.swp
.create_config.py.swp
.create_phpclass.py.swp
.profile_struct.txt.swp
.profile_menu_struct.txt.swp
.create_config.py.kate-swp
.create_phpclass.py.kate-swp
.create_phpclass2.py.kate-swp
.class_Jrnx_sql_SQL.php.swo
.class_listing_compute_sql.php.kate-swp


Modified: phpcompta/trunk/html/admin/setup.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/setup.php	2013-12-20 15:49:17 UTC (rev 560=
4)
+++ phpcompta/trunk/html/admin/setup.php	2013-12-20 15:50:00 UTC (rev 560=
5)
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN"><HTML><HEAD>
-    <TITLE>PhpCompta - Mise =C3=A0 jour</TITLE>
+    <TITLE>Noaliss - Mise =C3=A0 jour</TITLE>
     <META http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUT=
F8">
     </title>
 <head>
@@ -11,7 +11,7 @@
 </head>
 <body>
 <p align=3D"center">
-  <IMG SRC=3D"../image/logo7.png" alt=3D"Logo PhpCompta">
+  <IMG SRC=3D"../image/logo7.png" alt=3D"Logo noaliss">
 </p>
 <?php
=20

Modified: phpcompta/trunk/html/image/orange_flower.gif
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)

Added: phpcompta/trunk/html/image/spirale2.gif
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)


Property changes on: phpcompta/trunk/html/image/spirale2.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: phpcompta/trunk/html/style-color.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-color.css	2013-12-20 15:49:17 UTC (rev 560=
4)
+++ phpcompta/trunk/html/style-color.css	2013-12-20 15:50:00 UTC (rev 560=
5)
@@ -1,12 +1,16 @@
 /* <style type=3D"text/css"> */
=20
 BODY {
-    background-color:#EDF3FF;
+    background-color:wheat;
+    background-image: url('image/spirale2.gif');
     font-family:arial,verdana,sans-serif,helvetica;
     padding: 0px 0px 0px 0px ;
     margin:0;
-    color:blue;
-    font-size:0.90em;
+    color:brown;
+    font-size:0.85em;
+    background-repeat:no-repeat;
+    background-attachment:fixed;
+    background-position:bottom;=20
 }
 .notice {
     color:red;
@@ -14,7 +18,7 @@
 }
=20
 table.sortable, table.table_large, table.result  ,table.resultfooter {
-    color:blue;
+    color:brown;
     /* border:blue solid 1px; */
     width:100%;
     border-spacing:  0px;
@@ -29,11 +33,9 @@
 table.sortable th,  table.table_large th,table.result th {
     font-weight:bold;
     font-family:arial,verdana,sans-serif,helvetica;
-    border-bottom:1px solid blue;
+    border-bottom:1px solid #7C2A1F;
     border-top:0;
     font-size:0.75em;;
-
-    color:#25238F;
     text-align: left;
     font-style: italic;
=20
@@ -42,7 +44,7 @@
 h2 {
     font-family:arial,verdana,sans-serif,helvetica;
     font-size:1.35em;
-    color:grey;
+    color:brown;
     margin:1px;
     padding:1px;
     font-style: italic;
@@ -70,15 +72,24 @@
     padding:0px;
     margin:0px;
 }
-h2.info {
-    background-color:#879ed4;
-    color:white;
+h2.info,h2.title{
     font-size:1.34em;
     text-align:center;
     padding:0px;
     margin:0px;
-
+    border-bottom: #CBD9F4 groove 2px;
+    background-color: #F7D9A5;
+    color:#7C2A1F;
 }
+div.welcome h2.info {
+    background-color: inherit;
+    color:inherit;
+    font-size:1.50em;
+    text-align:center;
+    padding:0px;
+    margin:0px;
+    border-bottom: solid 1px #FF0000;
+}
=20
=20
 h3.info {
@@ -89,7 +100,7 @@
 }
=20
 h2.info2 {
-    color:blue;
+    color:red;
     font-size:1em;;
     text-align:center;
=20
@@ -137,16 +148,16 @@
 td.tool a.mtitle {
     text-decoration:none;
     display:inline;
-    color: blue;
+    color: brown;
     font-size:0.75em;
    =20
 }
 td.tool a.mtitle:hover {
     text-decoration:none;
     display:inline;
-    font-size:0.75em;;
-    color: darkblue;
-    background-color:#5D90CD;
+    font-size:0.75em;
+    color: brown;
+    background-color:white;
=20
 }
 #top {
@@ -260,7 +271,8 @@
=20
 table.mtitle {
     border:0;
-    text-align:center
+    text-align:center;
+    min-width: 50%;
 }
 td.mshort {
     height:15px;
@@ -272,12 +284,15 @@
 }
 td.mtitle {
     text-align:center;
-    width:95px;
     height :30px;
     font-size:0.75em;;
-    background-color:#DDE6FF;
-    border:1px solid #99B1DF;
-    border-radius:5px;
+    font-weight: bolder;
+    border:1px dashed #e08000;
+    border-collapse: collapse;
+    padding: 0;
+    margin: 0;
+    border-spacing: 0px;
+    background-color: transparent;
 }
 td.msubtitle {
     text-align:center;
@@ -301,7 +316,7 @@
 }
=20
 tr.odd {
-    background-color:#DDE6FF;
+    background-color:#FCFFCC;
     font-size:0.87em;;
 }
 tr.highlight {
@@ -313,7 +328,7 @@
   font-size:0.87em;;
 }
 td.odd{
-    background-color:#DDE6FF ;
+
 }
 td.even{
     border:0px;
@@ -324,28 +339,23 @@
    =20
 }
 td.selectedcell{
-    border-style:inset;
-    border-color:blue;
-    border-width:1pt ;
     font-size:1.2em;
     font-weight: bold;
-    background:#5D90CD ;
-    color:white;
+    color:red;
     text-align:center;
-    width:120px;
-    border-radius:5px;
+    border-bottom: solid 4px #e08000;
+    background-color: wheat;
 }
-a.mtitle {
+a.mtitle,a.mtitle:visited{
+    color:brown;
     text-decoration:none;
     display:inline;
-    color: blue;
-
 }
 a.mtitle:hover {
     text-decoration:none;
     display:inline;
=20
-    color: darkblue;
+    color: brown;
     background-color:#5D90CD;
=20
 }
@@ -353,13 +363,12 @@
     font-size:0.75em;;
     text-decoration:none;
     display:block;
-    color:white;
 }
 a.dossier {
     font-size:0.75em;;
     text-decoration:none;
     display:block;
-    color: #202267;
+    color: brown;
=20
 }
 tr.odd:hover td
@@ -376,8 +385,10 @@
 }
 td.mtitle:hover,td.mtitle:hover a
 {
-    background-color:#a9d6e4;
-    color:white;
+    background-color:#FCFFCC;
+    color:brown;=20
+    border: solid 1px #e08000;
+   =20
 }
 td.msubtitle:hover,td.msubtitle:hover a
 {
@@ -387,20 +398,24 @@
 a.cell {
     text-decoration:none;
     display:block;
-    color:blue;
-    background-color:white;
     font-size:0.75em;;
+    color:brown;
 }
+a.cell:visited {
+    font-size:0.75em;;
+    color:brown;
+    text-decoration:none;
+    display:block;
+}
=20
 a.cell:hover {
     font-size:0.75em;;
-    color:white;
-    background-color:#5D90CD;
+    color:yellow;
+    background-color:#7C2A1F;
     text-decoration:none;
     display:block;
 }
=20
-
 a.one:link {
     text-decoration:none;
     color:#3010FF
@@ -484,7 +499,7 @@
     display:inline;
=20
=20
-    color:black;
+    color:#CC5343;
=20
 }
=20
@@ -492,14 +507,14 @@
     text-decoration:none;
     display:inline;
     color:white;
-    background-color:darkblue;
+    background-color:brown;
=20
=20
 }
 div.content a.mtitle {
     text-decoration:none;
     display:inline;
-    color:blue;
+    color:#CC5343;
=20
=20
=20
@@ -508,7 +523,7 @@
 div.content a.mtitle:hover {
     text-decoration:none;
     display:inline;
-    background-color:darkblue;
+    background-color:brown;
     color:white;
=20
=20
@@ -520,7 +535,7 @@
     border-style:solid;
     background-color:orange;
     border-width:1px;
-    color:blue;
+    color:brown;
 }
 div.content input.text {
     font-family:arial,verdana,sans-serif,helvetica;
@@ -561,11 +576,11 @@
 .input_text_ro {
     border:solid 1px blue;
     background:#EDEDED;
-    color:blue;
+    color:brown;
     margin:1px;
 }
 .input_text {
-    border:groove 1px blue;
+    border:solid 1px brown;
     margin:1px;
 }
 .input_text:hover {
@@ -584,7 +599,7 @@
     color:grey;
 }
 select {
-    border: 1px solid blue;
+    border: 1px solid brown;
     margin:2px;
     background-color:white;
=20
@@ -798,7 +813,7 @@
 }
=20
 div.pc_calendar td.weekend {
-    background-color:#cce0e6;
+    background-color:#FCFFCC;
=20
 }
 div.pc_calendar td.workday{
@@ -826,42 +841,13 @@
     cursor:inherit;
 }
=20
-a#anchorbutton, .button, a.button,div.content a.button {
+a#anchorbutton, .button, a.button,div.content a.button,a#smallanchorbutt=
on, .smallbutton, a.smallbutton,div.content a.smallbutton {
     color:white;
     font-weight: bold;
-    font-size:0.87em;
-    text-decoration:none;
-    font-family: arial,verdana,sans-serif,helvetica;
-    background-image: url("image/bg-submit2.gif");
-    background-repeat: repeat-x;
-    background-position: left;
-
-    border-style:  outset ;
-    border-color:  blue ;
-    border-width:0px;
-    padding:8px;
-    margin-top:3px;
-    cursor:pointer;
-    margin:1 2 1 2;
-    border-radius: 5px;
-    moz-border-radius:5px;
-
-}
-a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover  {
-    cursor:pointer;
-    background-color:white;
-    border-style:  inset ;
-    color:red;
-    margin:1 2 1 2;
-
-}
-a#smallanchorbutton, .smallbutton, a.smallbutton,div.content a.smallbutt=
on {
-    color:white;
-    font-weight: bold;
     font-size:0.75em;
     text-decoration:none;
     font-family: arial,verdana,sans-serif,helvetica;
-    background-image: url("image/bg-submit2.gif");
+    background-image: url("image/bg-submit4.gif");
     background-repeat: repeat-x;
     background-position: left;
=20
@@ -875,11 +861,9 @@
     margin-top:3px;
     cursor:pointer;
     margin:1 2 1 2;
-    border-radius: 2px;
-    moz-border-radius:2px;
=20
 }
-a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,div.co=
ntent a.smallbutton:hover  {
+a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover,a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,d=
iv.content a.smallbutton:hover  {
     cursor:pointer;
     background-color:white;
     border-style:  inset ;
@@ -889,17 +873,16 @@
 }
 td.tool {
     border: solid 1px gray;
-    background-color: white;
-    border-bottom-width: 2px;
+    border-bottom-width: 3px;
     text-align:center;
-    border-radius:2px;
+   =20
 }
 div.topmenu {
=20
 }
=20
 #dossier h2{
-    color:darkblue;
+    color:brown;
     display:inline;
     font-size:2em;
     margin:0px;
@@ -934,16 +917,12 @@
     width: 40%;
 }
 body.op_detail_frame,div.op_detail_frame  {
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
     height:100%; width:100%;
--moz-box-shadow: 10px 10px 5px #888;
--webkit-box-shadow: 10px 10px 5px #888;
-box-shadow: 10px 10px 5px #888;
=20
-
 }
 div.inner_box  {
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
     font-family:arial,verdana,sans-serif,helvetica;
     padding:0;
     margin:0;
@@ -952,9 +931,7 @@
     position:absolute;
     left:10%;
     border:1px solid darkblue;
--moz-box-shadow: 10px 10px 5px #888;
--webkit-box-shadow: 10px 10px 5px #888;
-box-shadow: 10px 10px 5px #888;
+
 }
 div.op_detail_title {
     background-color:grey;
@@ -963,13 +940,8 @@
=20
 }
 div#div_jrn{
-    position:absolute;
     border:1px solid black;
-    top:15%;left:100;
-    visibility:hidden;
-    z-index:2;
-    width:50em;
-    background-color:#EDF3FF;
+    background-color:#FCEED4;
=20
 }
 div#div_cat{
@@ -995,7 +967,7 @@
     z-index:2;
     width:50%;
     display:none;
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
 -moz-box-shadow: 10px 10px 5px #888;
 -webkit-box-shadow: 10px 10px 5px #888;
 box-shadow: 10px 10px 5px #888;
@@ -1016,7 +988,7 @@
 }
 h2#jrn_name
 {
-    color:blue;
+    color:brown;
     font-size:2.74em;
     margin-right:30%;
     float: right;
@@ -1096,7 +1068,7 @@
    font-size:0.87em;
     text-decoration:underline;
     display:inline;
-    color: #0000ff;
+    color: #CC5343;
 }
 a.line:hover,div_content a.line
 {
@@ -1108,8 +1080,8 @@
 }
 #close_div
 {
-    background-color:white;
-    color:blue;
+    background-color:brown;
+    color:yellow;
     text-decoration:none;
     border:1px solid blue;
     margin-left: 2px;
@@ -1123,8 +1095,8 @@
 }
 #popmeout
 {
-    background-color:white;
-    color:blue;
+    background-color:brown;
+    color:yellow;
     text-decoration:none;
     border:1px solid blue;
     margin-left: 2px;
@@ -1187,15 +1159,6 @@
     font-size:0.87em;
     font-style: italic;
 }
-h2.title {
-    background-color:#879ed4;
-    color:white;
-    font-size:1.34em;
-    text-align:center;
-    padding:0.24%;
-    border:1px solid darkblue;
-
-}
 h3.title {
     color: blue;
     font-size:0.87em;
@@ -1261,7 +1224,7 @@
 }
 div#modele_op_div{
     display: none;
-    background-color:#e4e7ed;
+    background-color:#FCEED4;
     font-family:arial,verdana,sans-serif,helvetica;
     padding:0;
     margin:0;
@@ -1294,14 +1257,14 @@
     float:right;
     height:10px;
     display:block;
-    margin-top:0.48%;
+    margin-top:0.28%;
     margin-right:0.48%;
 }
 div.inner_box tr.odd {
-    background:  #CBD9F4;
+    background:  #FCFFCC;
 }
 #modele_op_tab tr.odd {
-    background:  #CBD9F4;
+    background:  #FCFFCC;
 }
 div#bookmark_div {
     background-color:#e4e7ed;
@@ -1360,6 +1323,6 @@
 }
 input.inum {
     text-align:right;
-    border:1px solid blue;
+    border:1px solid brown;
     margin:2px
 }
\ No newline at end of file

Modified: phpcompta/trunk/html/style-light.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-light.css	2013-12-20 15:49:17 UTC (rev 560=
4)
+++ phpcompta/trunk/html/style-light.css	2013-12-20 15:50:00 UTC (rev 560=
5)
@@ -1,16 +1,12 @@
 /* <style type=3D"text/css"> */
=20
 BODY {
-    background-color:wheat;
-    background-image: url('image/orange_flower.gif');
+    background-color:#EDF3FF;
     font-family:arial,verdana,sans-serif,helvetica;
     padding: 0px 0px 0px 0px ;
     margin:0;
-    color:brown;
-    font-size:0.85em;
-    background-repeat:no-repeat;
-    background-attachment:fixed;
-    background-position:center;=20
+    color:blue;
+    font-size:0.90em;
 }
 .notice {
     color:red;
@@ -18,7 +14,7 @@
 }
=20
 table.sortable, table.table_large, table.result  ,table.resultfooter {
-    color:brown;
+    color:blue;
     /* border:blue solid 1px; */
     width:100%;
     border-spacing:  0px;
@@ -33,9 +29,11 @@
 table.sortable th,  table.table_large th,table.result th {
     font-weight:bold;
     font-family:arial,verdana,sans-serif,helvetica;
-    border-bottom:1px solid #7C2A1F;
+    border-bottom:1px solid blue;
     border-top:0;
     font-size:0.75em;;
+
+    color:#25238F;
     text-align: left;
     font-style: italic;
=20
@@ -44,7 +42,7 @@
 h2 {
     font-family:arial,verdana,sans-serif,helvetica;
     font-size:1.35em;
-    color:brown;
+    color:grey;
     margin:1px;
     padding:1px;
     font-style: italic;
@@ -72,24 +70,15 @@
     padding:0px;
     margin:0px;
 }
-h2.info,h2.title{
+h2.info {
+    background-color:#879ed4;
+    color:white;
     font-size:1.34em;
     text-align:center;
     padding:0px;
     margin:0px;
-    border-bottom: #CBD9F4 groove 2px;
-    background-color: #F7D9A5;
-    color:#7C2A1F;
+
 }
-div.welcome h2.info {
-    background-color: inherit;
-    color:inherit;
-    font-size:1.50em;
-    text-align:center;
-    padding:0px;
-    margin:0px;
-    border-bottom: solid 1px #FF0000;
-}
=20
=20
 h3.info {
@@ -100,7 +89,7 @@
 }
=20
 h2.info2 {
-    color:red;
+    color:blue;
     font-size:1em;;
     text-align:center;
=20
@@ -157,7 +146,7 @@
     display:inline;
     font-size:0.75em;;
     color: darkblue;
-    background-color:white;
+    background-color:#5D90CD;
=20
 }
 #top {
@@ -271,8 +260,7 @@
=20
 table.mtitle {
     border:0;
-    text-align:center;
-    min-width: 50%;
+    text-align:center
 }
 td.mshort {
     height:15px;
@@ -284,14 +272,12 @@
 }
 td.mtitle {
     text-align:center;
+    width:95px;
     height :30px;
     font-size:0.75em;;
-    border-bottom:1px dashed #e08000;
-    border-collapse: collapse;
-    padding: 0;
-    margin: 0;
-    border-spacing: 0px;
-    background-color: wheat;
+    background-color:#DDE6FF;
+    border:1px solid #99B1DF;
+    border-radius:5px;
 }
 td.msubtitle {
     text-align:center;
@@ -315,7 +301,7 @@
 }
=20
 tr.odd {
-    background-color:#FCFFCC;
+    background-color:#DDE6FF;
     font-size:0.87em;;
 }
 tr.highlight {
@@ -327,7 +313,7 @@
   font-size:0.87em;;
 }
 td.odd{
-
+    background-color:#DDE6FF ;
 }
 td.even{
     border:0px;
@@ -338,18 +324,22 @@
    =20
 }
 td.selectedcell{
+    border-style:inset;
+    border-color:blue;
+    border-width:1pt ;
     font-size:1.2em;
     font-weight: bold;
-    color:red;
+    background:#5D90CD ;
+    color:white;
     text-align:center;
+    width:120px;
     border-radius:5px;
-    border-bottom: solid 4px #e08000;
-    background-color: wheat;
 }
-a.mtitle,a.mtitle:visited{
-    color:orangered;
+a.mtitle {
     text-decoration:none;
     display:inline;
+    color: blue;
+
 }
 a.mtitle:hover {
     text-decoration:none;
@@ -363,6 +353,7 @@
     font-size:0.75em;;
     text-decoration:none;
     display:block;
+    color:white;
 }
 a.dossier {
     font-size:0.75em;;
@@ -385,10 +376,8 @@
 }
 td.mtitle:hover,td.mtitle:hover a
 {
-    background-color:#FCFFCC;
-    color:brown;=20
-    border: solid 1px #e08000;
-   =20
+    background-color:#a9d6e4;
+    color:white;
 }
 td.msubtitle:hover,td.msubtitle:hover a
 {
@@ -410,14 +399,8 @@
     text-decoration:none;
     display:block;
 }
-a.cell:visited {
-    font-size:0.75em;;
-    color:white;
-    background-color:#5D90CD;
-    text-decoration:none;
-    display:block;
-}
=20
+
 a.one:link {
     text-decoration:none;
     color:#3010FF
@@ -501,7 +484,7 @@
     display:inline;
=20
=20
-    color:#CC5343;
+    color:black;
=20
 }
=20
@@ -509,14 +492,14 @@
     text-decoration:none;
     display:inline;
     color:white;
-    background-color:brown;
+    background-color:darkblue;
=20
=20
 }
 div.content a.mtitle {
     text-decoration:none;
     display:inline;
-    color:#CC5343;
+    color:blue;
=20
=20
=20
@@ -525,7 +508,7 @@
 div.content a.mtitle:hover {
     text-decoration:none;
     display:inline;
-    background-color:brown;
+    background-color:darkblue;
     color:white;
=20
=20
@@ -537,7 +520,7 @@
     border-style:solid;
     background-color:orange;
     border-width:1px;
-    color:brown;
+    color:blue;
 }
 div.content input.text {
     font-family:arial,verdana,sans-serif,helvetica;
@@ -578,11 +561,11 @@
 .input_text_ro {
     border:solid 1px blue;
     background:#EDEDED;
-    color:brown;
+    color:blue;
     margin:1px;
 }
 .input_text {
-    border:solid 1px brown;
+    border:groove 1px blue;
     margin:1px;
 }
 .input_text:hover {
@@ -601,7 +584,7 @@
     color:grey;
 }
 select {
-    border: 1px solid brown;
+    border: 1px solid blue;
     margin:2px;
     background-color:white;
=20
@@ -815,7 +798,7 @@
 }
=20
 div.pc_calendar td.weekend {
-    background-color:#FCFFCC;
+    background-color:#cce0e6;
=20
 }
 div.pc_calendar td.workday{
@@ -843,13 +826,42 @@
     cursor:inherit;
 }
=20
-a#anchorbutton, .button, a.button,div.content a.button,a#smallanchorbutt=
on, .smallbutton, a.smallbutton,div.content a.smallbutton {
+a#anchorbutton, .button, a.button,div.content a.button {
     color:white;
     font-weight: bold;
+    font-size:0.87em;
+    text-decoration:none;
+    font-family: arial,verdana,sans-serif,helvetica;
+    background-image: url("image/bg-submit2.gif");
+    background-repeat: repeat-x;
+    background-position: left;
+
+    border-style:  outset ;
+    border-color:  blue ;
+    border-width:0px;
+    padding:8px;
+    margin-top:3px;
+    cursor:pointer;
+    margin:1 2 1 2;
+    border-radius: 5px;
+    moz-border-radius:5px;
+
+}
+a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover  {
+    cursor:pointer;
+    background-color:white;
+    border-style:  inset ;
+    color:red;
+    margin:1 2 1 2;
+
+}
+a#smallanchorbutton, .smallbutton, a.smallbutton,div.content a.smallbutt=
on {
+    color:white;
+    font-weight: bold;
     font-size:0.75em;
     text-decoration:none;
     font-family: arial,verdana,sans-serif,helvetica;
-    background-image: url("image/bg-submit4.gif");
+    background-image: url("image/bg-submit2.gif");
     background-repeat: repeat-x;
     background-position: left;
=20
@@ -863,9 +875,11 @@
     margin-top:3px;
     cursor:pointer;
     margin:1 2 1 2;
+    border-radius: 2px;
+    moz-border-radius:2px;
=20
 }
-a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover,a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,d=
iv.content a.smallbutton:hover  {
+a#smallanchorbutton:hover, .smallbutton:hover,a.smallbutton:hover,div.co=
ntent a.smallbutton:hover  {
     cursor:pointer;
     background-color:white;
     border-style:  inset ;
@@ -875,17 +889,17 @@
 }
 td.tool {
     border: solid 1px gray;
-    background-color: #F7F5C0;
-    border-bottom-width: 3px;
+    background-color: white;
+    border-bottom-width: 2px;
     text-align:center;
-   =20
+    border-radius:2px;
 }
 div.topmenu {
=20
 }
=20
 #dossier h2{
-    color:brown;
+    color:darkblue;
     display:inline;
     font-size:2em;
     margin:0px;
@@ -920,12 +934,16 @@
     width: 40%;
 }
 body.op_detail_frame,div.op_detail_frame  {
-    background-color:#FCEED4;
+    background-color:#e4e7ed;
     height:100%; width:100%;
+-moz-box-shadow: 10px 10px 5px #888;
+-webkit-box-shadow: 10px 10px 5px #888;
+box-shadow: 10px 10px 5px #888;
=20
+
 }
 div.inner_box  {
-    background-color:#FCEED4;
+    background-color:#e4e7ed;
     font-family:arial,verdana,sans-serif,helvetica;
     padding:0;
     margin:0;
@@ -934,7 +952,9 @@
     position:absolute;
     left:10%;
     border:1px solid darkblue;
-
+-moz-box-shadow: 10px 10px 5px #888;
+-webkit-box-shadow: 10px 10px 5px #888;
+box-shadow: 10px 10px 5px #888;
 }
 div.op_detail_title {
     background-color:grey;
@@ -943,8 +963,13 @@
=20
 }
 div#div_jrn{
+    position:absolute;
     border:1px solid black;
-    background-color:#FCEED4;
+    top:15%;left:100;
+    visibility:hidden;
+    z-index:2;
+    width:50em;
+    background-color:#EDF3FF;
=20
 }
 div#div_cat{
@@ -970,7 +995,7 @@
     z-index:2;
     width:50%;
     display:none;
-    background-color:#FCEED4;
+    background-color:#e4e7ed;
 -moz-box-shadow: 10px 10px 5px #888;
 -webkit-box-shadow: 10px 10px 5px #888;
 box-shadow: 10px 10px 5px #888;
@@ -991,7 +1016,7 @@
 }
 h2#jrn_name
 {
-    color:brown;
+    color:blue;
     font-size:2.74em;
     margin-right:30%;
     float: right;
@@ -1071,7 +1096,7 @@
    font-size:0.87em;
     text-decoration:underline;
     display:inline;
-    color: #CC5343;
+    color: #0000ff;
 }
 a.line:hover,div_content a.line
 {
@@ -1162,6 +1187,15 @@
     font-size:0.87em;
     font-style: italic;
 }
+h2.title {
+    background-color:#879ed4;
+    color:white;
+    font-size:1.34em;
+    text-align:center;
+    padding:0.24%;
+    border:1px solid darkblue;
+
+}
 h3.title {
     color: blue;
     font-size:0.87em;
@@ -1227,7 +1261,7 @@
 }
 div#modele_op_div{
     display: none;
-    background-color:#FCEED4;
+    background-color:#e4e7ed;
     font-family:arial,verdana,sans-serif,helvetica;
     padding:0;
     margin:0;
@@ -1264,10 +1298,10 @@
     margin-right:0.48%;
 }
 div.inner_box tr.odd {
-    background:  #FCFFCC;
+    background:  #CBD9F4;
 }
 #modele_op_tab tr.odd {
-    background:  #FCFFCC;
+    background:  #CBD9F4;
 }
 div#bookmark_div {
     background-color:#e4e7ed;
@@ -1326,6 +1360,6 @@
 }
 input.inum {
     text-align:right;
-    border:1px solid brown;
+    border:1px solid blue;
     margin:2px
 }
\ No newline at end of file

Modified: phpcompta/trunk/html/user_login.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/user_login.php	2013-12-20 15:49:17 UTC (rev 5604=
)
+++ phpcompta/trunk/html/user_login.php	2013-12-20 15:50:00 UTC (rev 5605=
)
@@ -147,7 +147,7 @@
     $result.=3D"<TD  class=3D\"tool\" ><A class=3D\"cell\" HREF=3D\"admi=
n_repo.php\"> Administration  </A></TD>";
 }
 $result.=3D'<TD class=3D"tool">';
-$result.=3D'<a onclick=3D"set_preference(0)" title=3D"Pr=C3=A9f=C3=A9ren=
ce" href=3D"javascript:void(0)" class=3D"mtitle">Pr=C3=A9f=C3=A9rence</a>=
';
+$result.=3D'<a onclick=3D"set_preference(0)" title=3D"Pr=C3=A9f=C3=A9ren=
ce" href=3D"javascript:void(0)" class=3D"cell">Pr=C3=A9f=C3=A9rence</a>';
 $result.=3D '</TD>';
 $result.=3D'<TD  class=3D"tool" ><A class=3D"cell" HREF=3D"logout.php" >=
'._('Deconnexion').'</a></TD>';
 $result.=3D"</TR>";

Modified: phpcompta/trunk/include/class_filetosend.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_filetosend.php	2013-12-20 15:49:17 UTC =
(rev 5604)
+++ phpcompta/trunk/include/class_filetosend.php	2013-12-20 15:50:00 UTC =
(rev 5605)
@@ -7,9 +7,21 @@
  */
 class FileToSend
 {
+    /**=20
+     * @brief name of the file without path
+     */
     var $filename;
+    /**
+     *@brief mimetype of the file
+     */
     var $type;
+    /**
+     * path
+     */
     var $path;
+    /**
+     * Path to filename + filename
+     */
     var $full_name;
     function __construct($p_filename,$p_type=3D"")
     {
@@ -25,7 +37,10 @@
            =20
         }
     }
-    function guess_type()
+    /**
+     * set the $this->type to the mimetype, called from __construct
+     */
+    private function guess_type()
     {
         $ext_pos=3D  strrpos($this->filename,'.');
         if ( $ext_pos =3D=3D false ) {
@@ -52,5 +67,12 @@
         }
        =20
     }
+    /**
+     * Compute properly the filename
+     */
+    function compute_name($p_filename)
+    {
+       =20
+    }
  =20
 }

Modified: phpcompta/trunk/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/constant.php	2013-12-20 15:49:17 UTC (rev 560=
4)
+++ phpcompta/trunk/include/constant.php	2013-12-20 15:50:00 UTC (rev 560=
5)
@@ -60,9 +60,9 @@
 $g_failed=3D"<span style=3D\"font-size:18px;color:red\">&#x2716;</span>"=
;
 $g_succeed=3D"<span style=3D\"font-size:18px;color:green\">&#x2713;</spa=
n>";
 /* uncomment for development */
-// define ('SVNINFO',5900);
-// define ("DEBUG",true);
-define ("DEBUG",false);
+ define ('SVNINFO',5995);
+define ("DEBUG",true);
+//define ("DEBUG",false);
=20
 $version_phpcompta=3DSVNINFO;
 // If you don't want to be notified of the update
@@ -183,7 +183,7 @@
  * libreoffice --headless --accept=3D"socket,host=3D127.0.0.1,port=3D200=
2;urp;" --nofirststartwizard=20
  */
 define ('OFFICE','unoconv ');
-define ('GENERATE_PDF','NO');
+define ('GENERATE_PDF','YES');
=20
 define ('JS_INFOBULLE','
         <DIV id=3D"bulle" class=3D"infobulle"></DIV>



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


From MAILER-DAEMON Fri Dec 20 11:02:28 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vu2Wy-0001aq-A2
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 11:02:28 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Dec 2013 16:50:39 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144219.1387555347.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5606 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Dec 2013 16:02:26 -0000

Author: danydb
Date: 2013-12-20 16:50:39 +0100 (Fri, 20 Dec 2013)
New Revision: 5606

Modified:
   phpcompta/trunk/include/class_ibutton.php
Log:
cosmetic

Modified: phpcompta/trunk/include/class_ibutton.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_ibutton.php	2013-12-20 15:50:00 UTC (re=
v 5605)
+++ phpcompta/trunk/include/class_ibutton.php	2013-12-20 15:50:39 UTC (re=
v 5606)
@@ -33,7 +33,7 @@
         $this->name=3D($p_name=3D=3Dnull)?$this->name:$p_name;
         $this->value=3D($p_value=3D=3Dnull)?$this->value:$p_value;
 		$this->label=3D(trim($this->label) !=3D '')?$this->label:$this->value;
-        $class=3D($p_class=3D"")?" button ":$this->class;
+        $class=3D($p_class=3D=3D"")?" button ":$this->class;
         if ( $this->readOnly=3D=3Dtrue) return $this->display();
         $extra=3D ( isset($this->extra))?$this->extra:"";
         $this->id=3D($this->id=3D=3D"")?$this->name:$this->id;



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


From MAILER-DAEMON Fri Dec 20 19:19:50 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuAIH-0006tw-Uf
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 19:19:49 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 01:08:02 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144600.1387585189.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5607 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 00:19:48 -0000

Author: danydb
Date: 2013-12-21 01:08:02 +0100 (Sat, 21 Dec 2013)
New Revision: 5607

Modified:
   phpcompta/trunk/include/class_supplier.php
Log:
Use of __construct

Modified: phpcompta/trunk/include/class_supplier.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_supplier.php	2013-12-20 15:50:39 UTC (r=
ev 5606)
+++ phpcompta/trunk/include/class_supplier.php	2013-12-21 00:08:02 UTC (r=
ev 5607)
@@ -46,7 +46,7 @@
=20
     /*! \brief Constructor
     /* only a db connection is needed */
-    function Supplier($p_cn,$p_id=3D0)
+    function __construct($p_cn,$p_id=3D0)
     {
         $this->fiche_def_ref=3DFICHE_TYPE_FOURNISSEUR;
         parent::__construct($p_cn,$p_id) ;



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


From MAILER-DAEMON Fri Dec 20 19:55:40 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuAqy-0002NC-6F
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 19:55:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 01:43:52 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144605.1387587338.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5608 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 00:55:37 -0000

Author: danydb
Date: 2013-12-21 01:43:52 +0100 (Sat, 21 Dec 2013)
New Revision: 5608

Added:
   phpcompta/trunk/include/class_manager.php
   phpcompta/trunk/include/manager.inc.php
Modified:
   phpcompta/trunk/include/constant.php
Log:
Use of __construct
Task #950 - Ajout d'un onglet Administrateur

Added: phpcompta/trunk/include/class_manager.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_manager.php	                        (re=
v 0)
+++ phpcompta/trunk/include/class_manager.php	2013-12-21 00:43:52 UTC (re=
v 5608)
@@ -0,0 +1,62 @@
+<?php
+/*
+ *   This file is part of PhpCompta.
+ *
+ *   PhpCompta is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published b=
y
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   PhpCompta is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with PhpCompta; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-130=
7  USA
+*/
+
+// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
+require_once("constant.php");
+require_once('class_database.php');
+require_once("class_acc_parm_code.php");
+require_once('class_periode.php');
+require_once('class_fiche.php');
+require_once('class_acc_account_ledger.php');
+require_once('user_common.php');
+/*! \file
+ * \brief Derived from class fiche Supplier are a specific kind of card
+ */
+/*!
+ * \brief  class  Supplier are a specific kind of card
+ */
+
+// Use the view vw_supplier
+//
+class Manager extends Fiche
+{
+
+    var $poste;      /*!< $poste poste comptable */
+    var $name;        /*!< $name name of the company */
+    var $first_name;
+    var $street;      /*!< $street Street */
+    var $country;     /*!< $country Country */
+    var $cp;          /*!< $cp Zip code */
+    var $vat_number;  /*!< $vat_number vat number */
+
+    /*! \brief Constructor
+    /* only a db connection is needed */
+    function __construct($p_cn,$p_id=3D0)
+    {
+        $this->fiche_def_ref=3DFICHE_TYPE_EMPL;
+        parent::__construct($p_cn,$p_id) ;
+
+    }
+   =20
+
+
+
+}
+
+?>

Modified: phpcompta/trunk/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/constant.php	2013-12-21 00:08:02 UTC (rev 560=
7)
+++ phpcompta/trunk/include/constant.php	2013-12-21 00:43:52 UTC (rev 560=
8)
@@ -71,7 +71,7 @@
 define ("SITE_UPDATE_PLUGIN",'http://www.phpcompta.eu/plugin_last_versio=
n.txt');
=20
=20
-define ("DBVERSION",111);
+define ("DBVERSION",112);
 define ("MONO_DATABASE",25);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');

Added: phpcompta/trunk/include/manager.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/manager.inc.php	                        (rev =
0)
+++ phpcompta/trunk/include/manager.inc.php	2013-12-21 00:43:52 UTC (rev =
5608)
@@ -0,0 +1,149 @@
+<?php
+/*
+ *   This file is part of PhpCompta.
+ *
+ *   PhpCompta is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published b=
y
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   PhpCompta is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with PhpCompta; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-130=
7  USA
+ */
+/* $Revision: 5380 $ */
+// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
+/* !\brief include from supplier.inc.php and concerned only the supplier=
 card and
+ * the supplier category
+ */
+if (!defined('ALLOWED'))
+    die('Appel direct ne sont pas permis');
+require_once("class_iselect.php");
+require_once("class_ihidden.php");
+require_once("class_manager.php");
+require_once("class_ibutton.php");
+require_once('class_iaction.php');
+require_once('class_fiche_def.php');
+require_once('class_iaction.php');
+require_once('class_fiche_def.php');
+
+global $g_user;
+
+$low_action =3D (isset($_REQUEST['sb'])) ? $_REQUEST['sb'] : "list";
+/* ! \file
+ * \brief Called from the module "Gestion" to manage the supplier
+ */
+$href =3D basename($_SERVER['PHP_SELF']);
+
+// by default open liste
+if ($low_action =3D=3D "")
+    $low_action =3D "list";
+
+
+//-----------------------------------------------------
+// Remove a card
+//-----------------------------------------------------
+if (isset($_POST['delete_card']))
+{
+    if ($g_user->check_action(FICADD) =3D=3D 0)
+    {
+        alert('Vous  ne pouvez pas enlever de fiche');
+        return;
+    }
+
+    $f_id =3D $_REQUEST['f_id'];
+
+    $fiche =3D new Manager($cn, $f_id);
+    $fiche->remove();
+    $low_action =3D "list";
+}
+
+//-----------------------------------------------------
+//    list of Manager / employeed
+//-----------------------------------------------------
+if ($low_action =3D=3D "list")
+{
+    ?>
+    <div class=3D"content">
+        <div>
+            <form method=3D"get" action=3D"<?php echo $href; ?>">
+                <?php
+                echo '<h2>' . "Exercice " . $g_user->get_exercice() . '<=
/h2>';
+                echo dossier::hidden();
+                $a =3D (isset($_GET['query'])) ? $_GET['query'] : "";
+                printf(_('Recherche') . ' <input class=3D"input_text" ty=
pe=3D"text" name=3D"query" value=3D"%s">', $a);
+                $sel_card =3D new ISelect('cat');
+                $sel_card->value =3D $cn->make_array('select fd_id, fd_l=
abel from fiche_def ' .
+                        ' where  frd_id=3D' . FICHE_TYPE_EMPL .
+                        ' order by fd_label ', 1);
+                $sel_card->selected =3D (isset($_GET['cat'])) ? $_GET['c=
at'] : -1;
+                $sel_card->javascript =3D ' onchange=3D"submit(this);"';
+                echo _('Cat=C3=A9gorie :') . $sel_card->input();
+                $nooperation =3D new ICheckBox('noop');
+                $nooperation->selected =3D (isset($_GET['noop'])) ? true=
 : false;
+                echo _('Inclure les employ=C3=A9s sans op=C3=A9ration :'=
) . $nooperation->input();
+                ?>
+                <input type=3D"submit" class=3D"button" name=3D"submit_q=
uery" value=3D"<?php echo _('recherche') ?>">
+                <input type=3D"hidden" name=3D"ac" value=3D"<?php echo $=
_REQUEST['ac'] ?>">
+            </form>
+        </div>
+    <?php
+    $supplier =3D new Manager($cn);
+    $search =3D (isset($_GET['query'])) ? $_GET['query'] : "";
+    $sql =3D "";
+    if (isset($_GET['cat']))
+    {
+        if ($_GET['cat'] !=3D -1)
+            $sql =3D sprintf(" and fd_id =3D %d", $_GET['cat']);
+    }
+    $noop =3D (isset($_GET['noop'])) ? false : true;
+
+    echo '<div class=3D"content">';
+    echo $supplier->Summary($search, 'manager', $sql, $noop);
+
+
+    echo '<br>';
+    echo '<br>';
+    echo '<br>';
+    if ($g_user->check_action(FICADD) =3D=3D 1)
+    {
+        /* Add button */
+        $f_add_button =3D new IButton('add_card');
+        $f_add_button->label =3D _('Cr=C3=A9er une nouvelle fiche');
+        $f_add_button->set_attribute('win_refresh', 'yes');
+
+        $f_add_button->set_attribute('type_cat', FICHE_TYPE_EMPL);
+        $f_add_button->javascript =3D " select_card_type(this);";
+        echo $f_add_button->input();
+
+        $f_cat_button =3D new IButton('add_cat');
+        $f_cat_button->set_attribute('type_cat', FICHE_TYPE_EMPL);
+        $f_cat_button->set_attribute('ipopup', 'ipop_cat');
+        $f_cat_button->label =3D _('Ajout d\'une cat=C3=A9gorie');
+        $f_cat_button->javascript =3D 'add_category(this)';
+        echo $f_cat_button->input();
+    }
+
+    echo '</div>';
+    echo '</div>';
+}
+/* ---------------------------------------------------------------------=
-
+ * Detail for a card, Suivi, Contact, Operation,... *
+ * cc stands for supplier card
+ * ---------------------------------------------------------------------=
- */
+if ($low_action =3D=3D 'detail')
+{
+    /* Menu */
+    require_once('category_card.inc.php');
+    exit();
+}
+
+
+
+html_page_stop();
+?>



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


From MAILER-DAEMON Fri Dec 20 19:56:16 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuArY-0002Ot-E0
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 19:56:16 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 01:44:30 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144606.1387587375.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5609 - phpcompta/trunk/html/admin/sql/patch
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 00:56:15 -0000

Author: danydb
Date: 2013-12-21 01:44:30 +0100 (Sat, 21 Dec 2013)
New Revision: 5609

Added:
   phpcompta/trunk/html/admin/sql/patch/upgrade111.sql
Log:
task #950 ajout onglet Administrateur/employ?\195?\169
Task #950 - Ajout d'un onglet Administrateur

Added: phpcompta/trunk/html/admin/sql/patch/upgrade111.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/sql/patch/upgrade111.sql	                 =
       (rev 0)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade111.sql	2013-12-21 00:44:=
30 UTC (rev 5609)
@@ -0,0 +1,15 @@
+begin;
+
+insert into menu_ref(me_code,me_menu,me_file, me_url,me_description,me_p=
arameter,me_javascript,me_type,me_description_etendue)
+values
+('MANAGER','Administrateur','manager.inc.php',null,'Suivi des g=C3=A9ran=
ts, administrateurs et salari=C3=A9s',null,null,'ME','Suivi de vos salari=
=C3=A9s, managers ainsi que des administrateurs, pour les documents et le=
s op=C3=A9rations comptables');
+
+insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_displ=
ay,pm_default)=20
+values
+('MANAGER','GESTION',1,25,'E',0), ('MANAGER','GESTION',2,25,'E',0);
+
+update menu_ref set me_file=3D'customer.inc.php' where me_code =3D'CUST'=
;
+
+update version set val=3D112;
+
+commit;
\ No newline at end of file



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


From MAILER-DAEMON Fri Dec 20 19:59:15 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuAuQ-0002li-RP
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 19:59:14 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 01:47:27 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144607.1387587554.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5610 - in phpcompta/trunk/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 00:59:14 -0000

Author: danydb
Date: 2013-12-21 01:47:27 +0100 (Sat, 21 Dec 2013)
New Revision: 5610

Modified:
   phpcompta/trunk/include/action.common.inc.php
   phpcompta/trunk/include/template/action_button.php
   phpcompta/trunk/include/template/action_other_action.php
   phpcompta/trunk/include/template/action_search.php
Log:
esthetique small button

Modified: phpcompta/trunk/include/action.common.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/action.common.inc.php	2013-12-21 00:44:30 UTC=
 (rev 5609)
+++ phpcompta/trunk/include/action.common.inc.php	2013-12-21 00:47:27 UTC=
 (rev 5610)
@@ -229,7 +229,7 @@
 	echo HtmlInput::request_to_hidden(array("closed_action","remind_date_en=
d","remind_date","sag_ref", "remind_date","only_internal", "state", "gDos=
sier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query",
 		"tdoc",   "query","date_start","date_end","hsstate","searchtag"));
 	echo HtmlInput::hidden("act", "CSV:ActionGestion");
-	echo HtmlInput::submit("follow_up_csv", "Export CSV");
+	echo HtmlInput::submit("follow_up_csv", "Export CSV",'','smallbutton');
 	echo "</form>";
 	Follow_Up::show_action_list($cn, $base);
 }

Modified: phpcompta/trunk/include/template/action_button.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_button.php	2013-12-21 00:44:3=
0 UTC (rev 5609)
+++ phpcompta/trunk/include/template/action_button.php	2013-12-21 00:47:2=
7 UTC (rev 5610)
@@ -32,11 +32,11 @@
 		<form  method=3D"get" style=3D"display:inline" action=3D"do.php">
 			<?php echo dossier::hidden();
 			?>
-			<input type=3D"submit" class=3D"button" name=3D"submit_query" value=3D=
"<?php echo  _("Ajout Action")?>">
+			<input type=3D"submit" class=3D"smallbutton" name=3D"submit_query" va=
lue=3D"<?php echo  _("Ajout Action")?>">
 			<input type=3D"hidden" name=3D"ac" value=3D"<?php echo  $_REQUEST['ac=
']?>">
 			<input type=3D"hidden" name=3D"sa" value=3D"add_action">
 			<?php echo  $supl_hidden?>
-			<input id=3D"bt_search" type=3D"button" class=3D"button" onclick=3D"$=
('search_action').style.display=3D'block'" value=3D"<?php echo  _('Recher=
che')?>">
+			<input id=3D"bt_search" type=3D"button" class=3D"smallbutton" onclick=
=3D"$('search_action').style.display=3D'block'" value=3D"<?php echo  _('R=
echerche')?>">
=20
=20
=20

Modified: phpcompta/trunk/include/template/action_other_action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_other_action.php	2013-12-21 0=
0:44:30 UTC (rev 5609)
+++ phpcompta/trunk/include/template/action_other_action.php	2013-12-21 0=
0:47:27 UTC (rev 5610)
@@ -1,7 +1,7 @@
=20
    =20
 <?php               =20
-    echo HtmlInput::button("other_bt", "Autres actions", 'onclick=3D"$(\=
'other_div\').style.display=3D\'block\';action_show_checkbox();"', "butto=
n");=20
+    echo HtmlInput::button("other_bt", "Autres actions", 'onclick=3D"$(\=
'other_div\').style.display=3D\'block\';action_show_checkbox();"', "small=
button");=20
     $radio=3Dnew IRadio("othact");
   =20
 /*

Modified: phpcompta/trunk/include/template/action_search.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_search.php	2013-12-21 00:44:3=
0 UTC (rev 5609)
+++ phpcompta/trunk/include/template/action_search.php	2013-12-21 00:47:2=
7 UTC (rev 5610)
@@ -135,7 +135,7 @@
 				</td>
 			</tr>
 		</table>
-		<input type=3D"submit" class=3D"button" name=3D"submit_query" value=3D=
"<?php echo  _('recherche')?>">
+		<input type=3D"submit" class=3D"smallbutton" name=3D"submit_query" val=
ue=3D"<?php echo  _('recherche')?>">
 		<input type=3D"hidden" name=3D"sa" value=3D"list">
=20
 		<?php echo  $supl_hidden?>



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


From MAILER-DAEMON Fri Dec 20 19:59:45 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuAuv-0002ph-7F
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 19:59:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 01:47:59 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144608.1387587584.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5611 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 00:59:43 -0000

Author: danydb
Date: 2013-12-21 01:47:59 +0100 (Sat, 21 Dec 2013)
New Revision: 5611

Added:
   phpcompta/trunk/include/customer.inc.php
Removed:
   phpcompta/trunk/include/client.inc.php
Modified:
   phpcompta/trunk/include/class_customer.php
Log:
Change client.inc.php by customer.inc.php

Modified: phpcompta/trunk/include/class_customer.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_customer.php	2013-12-21 00:47:27 UTC (r=
ev 5610)
+++ phpcompta/trunk/include/class_customer.php	2013-12-21 00:47:59 UTC (r=
ev 5611)
@@ -46,7 +46,7 @@
=20
     /*! \brief Constructor
     /* only a db connection is needed */
-    function Customer($p_cn,$p_id=3D0)
+    function __construct($p_cn,$p_id=3D0)
     {
         $this->fiche_def_ref=3DFICHE_TYPE_CLIENT;
         parent::__construct($p_cn,$p_id) ;

Deleted: phpcompta/trunk/include/client.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/client.inc.php	2013-12-21 00:47:27 UTC (rev 5=
610)
+++ phpcompta/trunk/include/client.inc.php	2013-12-21 00:47:59 UTC (rev 5=
611)
@@ -1,144 +0,0 @@
-<?php
-/*
- *   This file is part of PhpCompta.
- *
- *   PhpCompta is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published b=
y
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   PhpCompta is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with PhpCompta; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-130=
7  USA
- */
-/* $Revision$ */
-// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-/**
- * \brief include from client.inc.php and concerned only the customer ca=
rd and
- * the customer category
- */
-if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
-require_once("class_iselect.php");
-require_once("class_ihidden.php");
-require_once("class_customer.php");
-require_once("class_ibutton.php");
-require_once('class_fiche_def.php');
-
-
-
-$low_action =3D (isset($_REQUEST['sb'])) ? $_REQUEST['sb'] : "list";
-/** \file
- * \brief Called from the module "Gestion" to manage the customer
- */
-$href=3Dbasename($_SERVER['PHP_SELF']);
-
-// by default open liste
-if ($low_action =3D=3D "")
-    $low_action =3D "list";
-
-
-//-----------------------------------------------------
-// Remove a card
-//-----------------------------------------------------
-if (isset($_POST['delete_card']))
-{
-    if ($g_user->check_action(FICADD) =3D=3D 0)
-    {
-	alert(j(_('Vous  ne pouvez pas enlever de fiche')));
-	return;
-    }
-
-    $f_id =3D $_REQUEST['f_id'];
-
-    $fiche =3D new Customer($cn, $f_id);
-    $fiche->remove();
-    $low_action =3D "list";
-}
-
-//-----------------------------------------------------
-//    list of customer
-//-----------------------------------------------------
-if ($low_action =3D=3D "list")
-{
-    ?>
-    <div class=3D"content">
-        <div>
-    	<form method=3D"get" action=3D"<?php echo $href;?>">
-		<?php
-		echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
-		echo dossier::hidden();
-		$a =3D (isset($_GET['query'])) ? $_GET['query'] : "";
-		printf(_('Recherche') . ' <input class=3D"input_text" type=3D"text" na=
me=3D"query" value=3D"%s">', $a);
-		$sel_card =3D new ISelect('cat');
-		$sel_card->value =3D $cn->make_array('select fd_id, fd_label from fich=
e_def ' .
-			' where  frd_id=3D' . FICHE_TYPE_CLIENT .
-			' order by fd_label ', 1);
-		$sel_card->selected =3D (isset($_GET['cat'])) ? $_GET['cat'] : -1;
-		$sel_card->javascript =3D ' onchange=3D"submit(this);"';
-		echo _('Cat=C3=A9gorie :') . $sel_card->input();
-		$nooperation =3D new ICheckBox('noop');
-		$nooperation->selected =3D (isset($_GET['noop'])) ? true : false;
-
-		echo _('Inclure les clients sans op=C3=A9ration :') . $nooperation->in=
put();
-		?>
-    	    <input type=3D"submit" class=3D"button" name=3D"submit_query" v=
alue=3D"<?php echo  _('recherche')?>">
-    	    <input type=3D"hidden" name=3D"ac" value=3D"<?php echo  $_REQUE=
ST['ac']?>">
-    	</form>
-        </div>
-	<?php
-	$client =3D new Customer($cn);
-	$search =3D (isset($_GET['query'])) ? $_GET['query'] : "";
-	$sql =3D "";
-	if (isset($_GET['cat']))
-	{
-	    if ($_GET['cat'] !=3D -1)
-		$sql =3D sprintf(" and fd_id =3D %d", $_GET['cat']);
-	}
-	$noop =3D (isset($_GET['noop'])) ? false : true;
-	echo '<div class=3D"content">';
-	echo $client->Summary($search, 'client', $sql, $noop);
-
-
-	echo '<br>';
-	echo '<br>';
-	echo '<br>';
-	/* Add button */
-	$f_add_button =3D new IButton('add_card');
-	$f_add_button->label =3D _('Cr=C3=A9er une nouvelle fiche');
-	$f_add_button->set_attribute('ipopup', 'ipop_newcard');
-	$f_add_button->set_attribute('win_refresh', 'yes');
-// $list=3D$cn->make_list("select fd_id from fiche_def where frd_id=3D$1=
",array(FICHE_TYPE_CLIENT));
-	$f_add_button->set_attribute('type_cat', FICHE_TYPE_CLIENT);
-	$f_add_button->javascript =3D " select_card_type(this);";
-	echo $f_add_button->input();
-
-    $f_cat_button=3Dnew IButton('add_cat');
-    $f_cat_button->set_attribute('ipopup','ipop_cat');
-    $f_cat_button->set_attribute('type_cat',FICHE_TYPE_CLIENT);
-    $f_cat_button->label=3D_('Ajout d\'une cat=C3=A9gorie');
-    $f_cat_button->javascript=3D'add_category(this)';
-    echo $f_cat_button->input();
-
-	echo '</div>';
-    echo '</div>';
-
-
-}
-/*----------------------------------------------------------------------
- * Detail for a card, Suivi, Contact, Operation,... *
- * cc stands for customer card
- *----------------------------------------------------------------------=
*/
-if ( $low_action =3D=3D 'detail')
-{
-    /* Menu */
-    require_once('category_card.inc.php');
-    exit();
-}
-
-    html_page_stop();
-?>

Copied: phpcompta/trunk/include/customer.inc.php (from rev 5595, phpcompt=
a/trunk/include/client.inc.php)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/customer.inc.php	                        (rev=
 0)
+++ phpcompta/trunk/include/customer.inc.php	2013-12-21 00:47:59 UTC (rev=
 5611)
@@ -0,0 +1,145 @@
+<?php
+/*
+ *   This file is part of PhpCompta.
+ *
+ *   PhpCompta is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published b=
y
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   PhpCompta is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with PhpCompta; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-130=
7  USA
+ */
+/* $Revision$ */
+// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
+/**
+ * \brief include from client.inc.php and concerned only the customer ca=
rd and
+ * the customer category
+ */
+if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+require_once("class_iselect.php");
+require_once("class_ihidden.php");
+require_once("class_customer.php");
+require_once("class_ibutton.php");
+require_once('class_fiche_def.php');
+
+
+
+$low_action =3D (isset($_REQUEST['sb'])) ? $_REQUEST['sb'] : "list";
+/** \file
+ * \brief Called from the module "Gestion" to manage the customer
+ */
+$href=3Dbasename($_SERVER['PHP_SELF']);
+
+// by default open liste
+if ($low_action =3D=3D "")
+    $low_action =3D "list";
+
+
+//-----------------------------------------------------
+// Remove a card
+//-----------------------------------------------------
+if (isset($_POST['delete_card']))
+{
+    if ($g_user->check_action(FICADD) =3D=3D 0)
+    {
+	alert(j(_('Vous  ne pouvez pas enlever de fiche')));
+	return;
+    }
+
+    $f_id =3D $_REQUEST['f_id'];
+
+    $fiche =3D new Customer($cn, $f_id);
+    $fiche->remove();
+    $low_action =3D "list";
+}
+
+//-----------------------------------------------------
+//    list of customer
+//-----------------------------------------------------
+if ($low_action =3D=3D "list")
+{
+    ?>
+    <div class=3D"content">
+        <div>
+    	<form method=3D"get" action=3D"<?php echo $href;?>">
+		<?php
+		echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
+		echo dossier::hidden();
+		$a =3D (isset($_GET['query'])) ? $_GET['query'] : "";
+		printf(_('Recherche') . ' <input class=3D"input_text" type=3D"text" na=
me=3D"query" value=3D"%s">', $a);
+		$sel_card =3D new ISelect('cat');
+		$sel_card->value =3D $cn->make_array('select fd_id, fd_label from fich=
e_def ' .
+			' where  frd_id=3D' . FICHE_TYPE_CLIENT .
+			' order by fd_label ', 1);
+		$sel_card->selected =3D (isset($_GET['cat'])) ? $_GET['cat'] : -1;
+		$sel_card->javascript =3D ' onchange=3D"submit(this);"';
+		echo _('Cat=C3=A9gorie :') . $sel_card->input();
+		$nooperation =3D new ICheckBox('noop');
+		$nooperation->selected =3D (isset($_GET['noop'])) ? true : false;
+
+		echo _('Inclure les clients sans op=C3=A9ration :') . $nooperation->in=
put();
+		?>
+    	    <input type=3D"submit" class=3D"button" name=3D"submit_query" v=
alue=3D"<?php echo  _('recherche')?>">
+    	    <input type=3D"hidden" name=3D"ac" value=3D"<?php echo  $_REQUE=
ST['ac']?>">
+    	</form>
+        </div>
+	<?php
+	$client =3D new Customer($cn);
+	$search =3D (isset($_GET['query'])) ? $_GET['query'] : "";
+	$sql =3D "";
+	if (isset($_GET['cat']))
+	{
+	    if ($_GET['cat'] !=3D -1)
+		$sql =3D sprintf(" and fd_id =3D %d", $_GET['cat']);
+	}
+	$noop =3D (isset($_GET['noop'])) ? false : true;
+	echo '<div class=3D"content">';
+	echo $client->Summary($search, 'client', $sql, $noop);
+
+
+	echo '<br>';
+	echo '<br>';
+	echo '<br>';
+	/* Add button */
+	$f_add_button =3D new IButton('add_card');
+        $f_add_button->class=3D"smallbutton";
+	$f_add_button->label =3D _('Cr=C3=A9er une nouvelle fiche');
+	$f_add_button->set_attribute('ipopup', 'ipop_newcard');
+	$f_add_button->set_attribute('win_refresh', 'yes');
+// $list=3D$cn->make_list("select fd_id from fiche_def where frd_id=3D$1=
",array(FICHE_TYPE_CLIENT));
+	$f_add_button->set_attribute('type_cat', FICHE_TYPE_CLIENT);
+	$f_add_button->javascript =3D " select_card_type(this);";
+	echo $f_add_button->input();
+
+    $f_cat_button=3Dnew IButton('add_cat');
+    $f_cat_button->set_attribute('ipopup','ipop_cat');
+    $f_cat_button->set_attribute('type_cat',FICHE_TYPE_CLIENT);
+    $f_cat_button->label=3D_('Ajout d\'une cat=C3=A9gorie');
+    $f_cat_button->javascript=3D'add_category(this)';
+    echo $f_cat_button->input();
+
+	echo '</div>';
+    echo '</div>';
+
+
+}
+/*----------------------------------------------------------------------
+ * Detail for a card, Suivi, Contact, Operation,... *
+ * cc stands for customer card
+ *----------------------------------------------------------------------=
*/
+if ( $low_action =3D=3D 'detail')
+{
+    /* Menu */
+    require_once('category_card.inc.php');
+    exit();
+}
+
+    html_page_stop();
+?>



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


From MAILER-DAEMON Fri Dec 20 20:01:34 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuAwg-0002yu-HP
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 20:01:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 01:49:48 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144613.1387587694.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5612 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 01:01:33 -0000

Author: danydb
Date: 2013-12-21 01:49:48 +0100 (Sat, 21 Dec 2013)
New Revision: 5612

Modified:
   phpcompta/trunk/include/constant.php
Log:
prod constant.php

Modified: phpcompta/trunk/include/constant.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/constant.php	2013-12-21 00:47:59 UTC (rev 561=
1)
+++ phpcompta/trunk/include/constant.php	2013-12-21 00:49:48 UTC (rev 561=
2)
@@ -60,8 +60,8 @@
 $g_failed=3D"<span style=3D\"font-size:18px;color:red\">&#x2716;</span>"=
;
 $g_succeed=3D"<span style=3D\"font-size:18px;color:green\">&#x2713;</spa=
n>";
 /* uncomment for development */
- define ('SVNINFO',5995);
-define ("DEBUG",true);
+ //define ('SVNINFO',5995);
+define ("DEBUG",false);
 //define ("DEBUG",false);
=20
 $version_phpcompta=3DSVNINFO;



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


From MAILER-DAEMON Fri Dec 20 21:35:33 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuCPd-0001NY-Cq
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 21:35:33 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 03:23:45 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144646.1387593332.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5613 - in phpcompta/trunk/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 02:35:32 -0000

Author: danydb
Date: 2013-12-21 03:23:44 +0100 (Sat, 21 Dec 2013)
New Revision: 5613

Modified:
   phpcompta/trunk/include/action.common.inc.php
   phpcompta/trunk/include/action.inc.php
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_follow_up.php
   phpcompta/trunk/include/compta_ven.inc.php
   phpcompta/trunk/include/template/action_other_action.php
   phpcompta/trunk/include/template/action_search.php
   phpcompta/trunk/include/template/detail-action.php
Log:
task #952 Transforme une action en facture
Et correction d'un bug dans la recherche
Task #952 - Transform une action en facture

Modified: phpcompta/trunk/include/action.common.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/action.common.inc.php	2013-12-21 00:49:48 UTC=
 (rev 5612)
+++ phpcompta/trunk/include/action.common.inc.php	2013-12-21 02:23:44 UTC=
 (rev 5613)
@@ -227,7 +227,7 @@
 	// Add a button to export to Csv
 	echo '<form method=3D"GET" style=3D"display:inline;" ACTION=3D"export.p=
hp">';
 	echo HtmlInput::request_to_hidden(array("closed_action","remind_date_en=
d","remind_date","sag_ref", "remind_date","only_internal", "state", "gDos=
sier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query",
-		"tdoc",   "query","date_start","date_end","hsstate","searchtag"));
+		"tdoc",   "action_query","date_start","date_end","hsstate","searchtag"=
));
 	echo HtmlInput::hidden("act", "CSV:ActionGestion");
 	echo HtmlInput::submit("follow_up_csv", "Export CSV",'','smallbutton');
 	echo "</form>";

Modified: phpcompta/trunk/include/action.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/action.inc.php	2013-12-21 00:49:48 UTC (rev 5=
612)
+++ phpcompta/trunk/include/action.inc.php	2013-12-21 02:23:44 UTC (rev 5=
613)
@@ -25,7 +25,7 @@
 require_once('class_ipopup.php');
 global $g_user;
 $retour=3DHtmlInput::button_anchor(_('Retour liste'),
-	HtmlInput::request_to_string(array("closed_action","remind_date_end","r=
emind_date","sag_ref","only_internal","state","ac","gDossier","qcode","ag=
_dest_query","query","tdoc","date_start","date_end","hsstate","searchtag"=
)));
+	HtmlInput::request_to_string(array("closed_action","remind_date_end","r=
emind_date","sag_ref","only_internal","state","ac","gDossier","qcode","ag=
_dest_query","action_query","tdoc","date_start","date_end","hsstate","sea=
rchtag")));
 //-----------------------------------------------------
 // Follow_Up
 //-----------------------------------------------------

Modified: phpcompta/trunk/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_ledger.php	2013-12-21 00:49:48 UTC =
(rev 5612)
+++ phpcompta/trunk/include/class_acc_ledger.php	2013-12-21 02:23:44 UTC =
(rev 5613)
@@ -3677,6 +3677,44 @@
 		$array=3D$this->get_operation_date(Date('d.m.Y'), 'VEN', '<');
 		return $array;
 	}
+        function convert_from_follow($p_ag_id)
+        {
+            if (isNumber($p_ag_id)=3D=3D0) return null;
+           =20
+            $array=3Darray();
+           =20
+            // retrieve info from action_gestion
+            $tiers_id=3D$this->db->get_value('select f_id_dest from acti=
on_gestion where ag_id=3D$1',array($p_ag_id));
+            if ( $this->db->size() !=3D0 )
+                $qcode=3D$this->db->get_value('select j_qcode from vw_po=
ste_qcode where f_id=3D$1',array($tiers_id));
+            else
+                $qcode=3D"";
+           =20
+            $comment=3D$this->db->get_value('select ag_title from action=
_gestion where ag_id=3D$1',array($p_ag_id));
+            $array['e_client']=3D$qcode;
+            $array['e_comm']=3D$comment;
+           =20
+            // retrieve info from action_detail
+            $a_item=3D$this->db->get_array('select f_id,ad_text,ad_pu,ad=
_quant,ad_tva_id,ad_tva_amount,j_qcode=20
+                    from=20
+                  action_detail=20
+                  left join vw_poste_qcode using(f_id)
+                  where
+                    ag_id=3D$1',array($p_ag_id));
+            $array['nb_item']=3D$this->db->size();
+            for ($i=3D0;$i<$array['nb_item'];$i++)
+            {
+                $array['e_march'.$i]=3D$a_item[$i]['j_qcode'];
+                $array['e_march'.$i.'_label']=3D$a_item[$i]['ad_text'];
+                $array['e_march'.$i.'_price']=3D$a_item[$i]['ad_pu'];
+                $array['e_march'.$i.'_tva_id']=3D$a_item[$i]['ad_tva_id'=
];
+                $array['e_march'.$i.'_tva_amount']=3D$a_item[$i]['ad_tva=
_amount'];
+                $array['e_quant'.$i]=3D$a_item[$i]['ad_quant'];
+               =20
+            }
+            return $array;
+                      =20
+        }
=20
 }
 ?>
\ No newline at end of file

Modified: phpcompta/trunk/include/class_follow_up.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_follow_up.php	2013-12-21 00:49:48 UTC (=
rev 5612)
+++ phpcompta/trunk/include/class_follow_up.php	2013-12-21 02:23:44 UTC (=
rev 5613)
@@ -519,7 +519,7 @@
 		/* add the number of item */
 		$Hid =3D new IHidden();
 		$r.=3D$Hid->input("nb_item", $article_count);
-		$r.=3DHtmlInput::request_to_hidden(array("closed_action","remind_date_=
end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_qu=
ery", "query", "tdoc", "date_start", "date_end", "hsstate","searchtag"));
+		$r.=3DHtmlInput::request_to_hidden(array("closed_action","remind_date_=
end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_qu=
ery", "action_query", "tdoc", "date_start", "date_end", "hsstate","search=
tag"));
                 $a_tag=3D$this->tag_get();
 		/* get template */
 		ob_start();
@@ -693,7 +693,7 @@
 	function myList($p_base, $p_filter =3D "", $p_search =3D "")
 	{
 		// for the sort
-		$url =3D HtmlInput::get_to_string(array("closed_action","remind_date_e=
nd","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_que=
ry", "query", "tdoc", "date_start", "date_end", "hsstate","searchtag")) .=
 '&' . $p_base;
+		$url =3D HtmlInput::get_to_string(array("closed_action","remind_date_e=
nd","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_que=
ry", "action_query", "tdoc", "date_start", "date_end", "hsstate","searcht=
ag")) . '&' . $p_base;
=20
 		$table =3D new Sort_Table();
 		$table->add('Date Doc.', $url, 'order by ag_timestamp asc', 'order by =
ag_timestamp desc', 'da', 'dd');
@@ -772,7 +772,7 @@
 		//show the sub_action
 		foreach ($a_row as $row)
 		{
-			$href =3D '<A class=3D"document" HREF=3D"do.php?'  . $p_base .HtmlInp=
ut::get_to_string(array("closed_action","remind_date_end","remind_date","=
sag_ref","only_internal","state","gDossier", "qcode", "ag_dest_query", "q=
uery", "tdoc", "date_start", "date_end", "hsstate", "searchtag","ac"),"&"=
) . '&sa=3Ddetail&ag_id=3D' . $row['ag_id'] . '">';
+			$href =3D '<A class=3D"document" HREF=3D"do.php?'  . $p_base .HtmlInp=
ut::get_to_string(array("closed_action","remind_date_end","remind_date","=
sag_ref","only_internal","state","gDossier", "qcode", "ag_dest_query", "a=
ction_query", "tdoc", "date_start", "date_end", "hsstate", "searchtag","a=
c"),"&") . '&sa=3Ddetail&ag_id=3D' . $row['ag_id'] . '">';
 			$i++;
 			$tr =3D ($i % 2 =3D=3D 0) ? 'even' : 'odd';
 			if ($row['ag_priority'] < 2)
@@ -1140,7 +1140,7 @@
 	 */
 	static function display_search($cn, $inner =3D false)
 	{
-		$a =3D (isset($_GET['query'])) ? $_GET['query'] : "";
+		$a =3D (isset($_GET['action_query'])) ? $_GET['action_query'] : "";
 		$qcode =3D (isset($_GET['qcode'])) ? $_GET['qcode'] : "";
=20
 		$supl_hidden =3D '';
@@ -1286,15 +1286,15 @@
 			$p_array =3D $_GET;
=20
 		extract($p_array);
-		$query =3D "";
+		$action_query =3D "";
=20
=20
-        if (isset($_REQUEST['query']))
+        if (isset($_REQUEST['action_query']))
 		{
 			// if a query is request build the sql stmt
-			$query =3D "and (ag_title ~* '" . sql_string($_REQUEST['query']) . "'=
 " .
-					"or ag_ref =3D'" . trim(sql_string($_REQUEST['query'])) .
-					"' or ag_id in (select ag_id from action_gestion_comment where agc_=
comment ~* '" . trim(sql_string($_REQUEST['query'])) . "')" .
+			$action_query =3D "and (ag_title ~* '" . sql_string($_REQUEST['action=
_query']) . "' " .
+					"or ag_ref =3D'" . trim(sql_string($_REQUEST['action_query'])) .
+					"' or ag_id in (select ag_id from action_gestion_comment where agc_=
comment ~* '" . trim(sql_string($_REQUEST['action_query'])) . "')" .
 					")";
 		}
=20
@@ -1316,15 +1316,15 @@
 		}
 		if (isset($tdoc) && $tdoc !=3D -1)
 		{
-			$query .=3D ' and dt_id =3D ' . sql_string($tdoc);
+			$action_query .=3D ' and dt_id =3D ' . sql_string($tdoc);
 		}
 		if (isset($state) && $state!=3D -1)
 		{
-			$query .=3D ' and ag_state=3D ' . sql_string($state);
+			$action_query .=3D ' and ag_state=3D ' . sql_string($state);
 		}
         if (isset($hsstate) && $hsstate!=3D -1)
 		{
-			$query .=3D ' and ag_state <> ' . sql_string($hsstate);
+			$action_query .=3D ' and ag_state <> ' . sql_string($hsstate);
 		}
 		if (isset($sag_ref) && trim($sag_ref) !=3D "")
 		{
@@ -1332,46 +1332,46 @@
 		}
=20
 		if (isset($_GET['only_internal']))
-			$query .=3D ' and f_id_dest=3D0 ';
+			$action_query .=3D ' and f_id_dest=3D0 ';
=20
 		if (isset($date_start) && isDate($date_start) !=3D null)
 		{
-			$query.=3D" and ag_timestamp >=3D to_date('$date_start','DD.MM.YYYY')=
";
+			$action_query.=3D" and ag_timestamp >=3D to_date('$date_start','DD.MM=
.YYYY')";
 		}
 		if (isset($date_end) && isDate($date_end) !=3D null)
 		{
-			$query.=3D" and ag_timestamp <=3D to_date('$date_end','DD.MM.YYYY')";
+			$action_query.=3D" and ag_timestamp <=3D to_date('$date_end','DD.MM.Y=
YYY')";
 		}
 		if (isset($ag_dest_query) && $ag_dest_query !=3D -2 )
 		{
-                    $query.=3D " and ((ag_dest =3D " . sql_string($ag_de=
st_query)." and ".self::sql_security_filter($cn, "R").") or ".
+                    $action_query.=3D " and ((ag_dest =3D " . sql_string=
($ag_dest_query)." and ".self::sql_security_filter($cn, "R").") or ".
 				" ag_owner=3D'" . $_SESSION['g_user'] . "')";
 		}
 		else
 		{
-			$query .=3D" and (ag_owner=3D'" . $_SESSION['g_user'] . "' or ".self:=
:sql_security_filter($cn, "R")." or ag_dest=3D-1 )";
+			$action_query .=3D" and (ag_owner=3D'" . $_SESSION['g_user'] . "' or =
".self::sql_security_filter($cn, "R")." or ag_dest=3D-1 )";
 		}
=20
=20
 		if (isNumber($ag_id) =3D=3D 1 && $ag_id !=3D 0)
 		{
-			$query =3D " and ag_id=3D " . sql_string($ag_id);
+			$action_query =3D " and ag_id=3D " . sql_string($ag_id);
 		}
 		if ( isset($remind_date) && $remind_date !=3D "" && isDate($remind_dat=
e)=3D=3D$remind_date)
 		{
-			$query .=3D " and to_date('".sql_string($remind_date)."','DD.MM.YYYY'=
)<=3D ag_remind_date";
+			$action_query .=3D " and to_date('".sql_string($remind_date)."','DD.M=
M.YYYY')<=3D ag_remind_date";
 		}
 		if ( isset($remind_date_end) && $remind_date_end !=3D "" && isDate($re=
mind_date_end)=3D=3D$remind_date_end)
 		{
-			$query .=3D " and to_date('".sql_string($remind_date_end)."','DD.MM.Y=
YYY')>=3D ag_remind_date";
+			$action_query .=3D " and to_date('".sql_string($remind_date_end)."','=
DD.MM.YYYY')>=3D ag_remind_date";
 		}
 		if ( ! isset ($closed_action)) {
-			$query.=3D" and s_status is null ";
+			$action_query.=3D" and s_status is null ";
 		}
                 if ( isset ($searchtag)) {
-                    $query .=3D Follow_Up::filter_by_tag($cn,$p_array);
+                    $action_query .=3D Follow_Up::filter_by_tag($cn,$p_a=
rray);
                 }
-		return $query . $str;
+		return $action_query . $str;
 	}
=20
 	/**

Modified: phpcompta/trunk/include/compta_ven.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/compta_ven.inc.php	2013-12-21 00:49:48 UTC (r=
ev 5612)
+++ phpcompta/trunk/include/compta_ven.inc.php	2013-12-21 02:23:44 UTC (r=
ev 5613)
@@ -207,6 +207,20 @@
         echo 'compute_all_ledger();';
         echo '</script>';
     }
+    else if ( isset ($_GET['create_invoice']))
+    {
+        $array=3D$Ledger->convert_from_follow($_GET ['ag_id']);
+        echo HtmlInput::hidden("ledger_type","VEN");
+	echo HtmlInput::hidden("ac",$_REQUEST['ac']);
+        echo HtmlInput::hidden("sa","p");
+        echo $Ledger->input($array);
+        echo '<div class=3D"content">';
+        echo $Ledger->input_paid();
+        echo '</div>';
+        echo '<script>';
+        echo 'compute_all_ledger();';
+        echo '</script>';
+    }
     else
     {
         echo HtmlInput::hidden("ledger_type","VEN");

Modified: phpcompta/trunk/include/template/action_other_action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_other_action.php	2013-12-21 0=
0:49:48 UTC (rev 5612)
+++ phpcompta/trunk/include/template/action_other_action.php	2013-12-21 0=
2:23:44 UTC (rev 5613)
@@ -8,7 +8,7 @@
  * Hidden values for a previous search
  */
 echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end=
","remind_date","sag_ref", "remind_date","only_internal", "state", "gDoss=
ier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query",
-		"tdoc",   "query","date_start","date_end","hsstate","searchtag"));
+		"tdoc",   "action_query","date_start","date_end","hsstate","searchtag"=
));
 ?>
 <div id=3D"other_div" class=3D"inner_box" style=3D"width:40%;display: no=
ne">
     <?php echo HtmlInput::title_box('Actions sur plusieurs documents','o=
ther_div', 'hide') ?>

Modified: phpcompta/trunk/include/template/action_search.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_search.php	2013-12-21 00:49:4=
8 UTC (rev 5612)
+++ phpcompta/trunk/include/template/action_search.php	2013-12-21 02:23:4=
4 UTC (rev 5613)
@@ -108,7 +108,7 @@
 				<td><?php echo  $hsExcptype_state->input()?></td>
 			</tr>
 			<td style=3D"text-align:right"><?php printf(_('contenant le mot'))?><=
/td>
-			<td ><input class=3D"input_text" style=3D"width:100%" type=3D"text" n=
ame=3D"query" value=3D"<?php echo  $a?>"></td>
+			<td ><input class=3D"input_text" style=3D"width:100%" type=3D"text" n=
ame=3D"action_query" value=3D"<?php echo  $a?>"></td>
 			</tr>
 			<tr>
 				<td style=3D"text-align:right"><?php echo  _('Type de document')?></=
td>

Modified: phpcompta/trunk/include/template/detail-action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/detail-action.php	2013-12-21 00:49:4=
8 UTC (rev 5612)
+++ phpcompta/trunk/include/template/detail-action.php	2013-12-21 02:23:4=
4 UTC (rev 5613)
@@ -351,12 +351,25 @@
     <br>Total TVA
     <br>Total TVAC
  </div>
-<div>
+
  <?php if ( ! $readonly ) :  ?>
-    <input name=3D"act" id=3D"act_bt" class=3D"button" value=3D"<?php ec=
ho _('Actualiser')?>" onclick=3D"compute_all_ledger();" type=3D"button">
-     <input type=3D"button" class=3D"button" onclick=3D"gestion_add_row(=
)" value=3D"Ajouter une ligne">
+    <div  style=3D"position:float;float:right">
+    <input name=3D"act" id=3D"act_bt" class=3D"smallbutton" value=3D"<?p=
hp echo _('Actualiser')?>" onclick=3D"compute_all_ledger();" type=3D"butt=
on">
+     <input type=3D"button" class=3D"smallbutton" onclick=3D"gestion_add=
_row()" value=3D"Ajouter une ligne">
+     </div>
+    =20
 <?php endif; ?>        =20
 </div>
+<?php if ( $this->ag_id !=3D 0 && ! $readonly) : ?>
+     <div  style=3D"position:float;float:left">
+         <p>
+         <?php
+         $query=3D  http_build_query(array('gDossier'=3D>Dossier::id(),'=
ag_id'=3D>$this->ag_id,'create_invoice'=3D>1,'ac'=3D>'VEN'));
+            echo HtmlInput::button_anchor("Transformer en facture","do.p=
hp?".$query,"create_invoice", "","button");
+         ?>
+         </p>
+      </div>
+     <?php endif; ?>
 <?php endif; ?>
 </fieldset>
 <?php endif; ?>



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


From MAILER-DAEMON Fri Dec 20 21:39:47 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuCTj-0001oI-8y
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Dec 2013 21:39:47 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 03:28:00 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144647.1387593586.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5614 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 02:39:45 -0000

Author: danydb
Date: 2013-12-21 03:28:00 +0100 (Sat, 21 Dec 2013)
New Revision: 5614

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
Log:
task #952 Transforme une action en facture

Ajout s?\195?\169curit?\195?\169 : v?\195?\169rifie que l'action est acce=
ssible ?\195?\160 l'utilisateur
Task #952 - Transform une action en facture

Modified: phpcompta/trunk/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_ledger.php	2013-12-21 02:23:44 UTC =
(rev 5613)
+++ phpcompta/trunk/include/class_acc_ledger.php	2013-12-21 02:28:00 UTC =
(rev 5614)
@@ -3679,8 +3679,9 @@
 	}
         function convert_from_follow($p_ag_id)
         {
+            global $g_user;
             if (isNumber($p_ag_id)=3D=3D0) return null;
-           =20
+            if (! $g_user->can_read_action($p_ag_id)) die ('Action non a=
ccessible');
             $array=3Darray();
            =20
             // retrieve info from action_gestion



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


From MAILER-DAEMON Sat Dec 21 07:57:40 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuM7g-0000aR-K7
	for mharc-phpcompta-dev@gnu.org; Sat, 21 Dec 2013 07:57:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 13:45:52 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144949.1387630660.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5615 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 12:57:39 -0000

Author: danydb
Date: 2013-12-21 13:45:51 +0100 (Sat, 21 Dec 2013)
New Revision: 5615

Modified:
   phpcompta/trunk/include/ac_common.php
Log:
Accept row for function h2 and h1


Modified: phpcompta/trunk/include/ac_common.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ac_common.php	2013-12-21 02:28:00 UTC (rev 56=
14)
+++ phpcompta/trunk/include/ac_common.php	2013-12-21 12:45:51 UTC (rev 56=
15)
@@ -63,11 +63,11 @@
     return '<h2 class=3D"info">' . htmlspecialchars($p_string) . '</h2>'=
;
 }
=20
-function h2($p_string, $p_class)
+function h2($p_string, $p_class=3D"",$raw=3D"")
 {
-    return '<h2 ' . $p_class . '>' . htmlspecialchars($p_string) . '</h2=
>';
+    return '<h2 ' . $p_class . '>' . $raw.htmlspecialchars($p_string) . =
'</h2>';
 }
-function h1($p_string, $p_class)
+function h1($p_string, $p_class=3D"")
 {
     return '<h1 ' . $p_class . '>' . htmlspecialchars($p_string) . '</h1=
>';
 }



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


From MAILER-DAEMON Sat Dec 21 08:00:09 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuMA4-0001Go-VL
	for mharc-phpcompta-dev@gnu.org; Sat, 21 Dec 2013 08:00:08 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 13:48:20 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144950.1387630808.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5616 - in phpcompta/trunk: html/admin/sql/patch
	include include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 13:00:08 -0000

Author: danydb
Date: 2013-12-21 13:48:19 +0100 (Sat, 21 Dec 2013)
New Revision: 5616

Added:
   phpcompta/trunk/include/class_default_menu.php
   phpcompta/trunk/include/class_default_menu_sql.php
   phpcompta/trunk/include/default_menu.inc.php
Modified:
   phpcompta/trunk/html/admin/sql/patch/upgrade111.sql
   phpcompta/trunk/include/ajax_view_action.php
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_follow_up.php
   phpcompta/trunk/include/class_phpcompta_sql.php
   phpcompta/trunk/include/template/detail-action.php
Log:
Configure default menu

Modified: phpcompta/trunk/html/admin/sql/patch/upgrade111.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/sql/patch/upgrade111.sql	2013-12-21 12:45:=
51 UTC (rev 5615)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade111.sql	2013-12-21 12:48:=
19 UTC (rev 5616)
@@ -8,6 +8,22 @@
 values
 ('MANAGER','GESTION',1,25,'E',0), ('MANAGER','GESTION',2,25,'E',0);
=20
+insert into menu_ref(me_code,me_menu,me_file, me_url,me_description,me_p=
arameter,me_javascript,me_type,me_description_etendue)
+values
+('CFGDEFMENU','Menu par d=C3=A9faut','default_menu.inc.php',null,'Config=
uration des menus par d=C3=A9faut',null,null,'ME','Configuration des menu=
s par d=C3=A9faut, ces menus sont appel=C3=A9s par des actions dans d''au=
tres menus');
+
+insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_displ=
ay,pm_default)=20
+values
+('CFGDEFMENU','MOD',1,30,'E',0);
+
+
+create table menu_default
+(
+    md_id   serial primary key,
+    md_code text not null unique ,
+    me_code text not null
+);
+insert into menu_default (md_code,me_code) values ('code_invoice','COMPT=
A/VENMENU/VEN'),('code_follow','GESTION/FOLLOW');
 update menu_ref set me_file=3D'customer.inc.php' where me_code =3D'CUST'=
;
=20
 update version set val=3D112;

Modified: phpcompta/trunk/include/ajax_view_action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ajax_view_action.php	2013-12-21 12:45:51 UTC =
(rev 5615)
+++ phpcompta/trunk/include/ajax_view_action.php	2013-12-21 12:48:19 UTC =
(rev 5616)
@@ -29,14 +29,18 @@
 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
 ob_start();
 require_once 'class_follow_up.php';
+require_once 'class_default_menu.php';
+
 echo HtmlInput::title_box(_("D=C3=A9tail action"), $div);
 $act =3D new Follow_Up($cn);
 $act->ag_id =3D $ag_id;
 $act->get();
 if ($g_user->can_write_action($ag_id) =3D=3D true || $g_user->can_read_a=
ction($ag_id) =3D=3D true || $act->ag_dest =3D=3D -1)
-{
+{  =20
+        $menu=3Dnew Default_Menu();
 	echo $act->Display('READ', false, "ajax", "");
-	$action=3DHtmlInput::array_to_string(array("gDossier","ag_id"), $_GET).=
"&ac=3DFOLLOW&sa=3Ddetail";
+	//$action=3DHtmlInput::array_to_string(array("gDossier","ag_id"), $_GET=
)."&ac=3DFOLLOW&sa=3Ddetail";
+        $action=3D  "do.php?".http_build_query(array("gDossier"=3D>Dossi=
er::id(),"ag_id"=3D>$ag_id,"ac"=3D>$menu->get('code_follow'),"sa"=3D>"det=
ail"));
 	if ( $_GET['mod']=3D=3D 1) :
 	?>
 <a href=3D"<?php echo $action?>" target=3D"_blank" class=3D"button">Modi=
fier </a>

Modified: phpcompta/trunk/include/class_acc_ledger.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_acc_ledger.php	2013-12-21 12:45:51 UTC =
(rev 5615)
+++ phpcompta/trunk/include/class_acc_ledger.php	2013-12-21 12:48:19 UTC =
(rev 5616)
@@ -3702,8 +3702,9 @@
                   left join vw_poste_qcode using(f_id)
                   where
                     ag_id=3D$1',array($p_ag_id));
-            $array['nb_item']=3D$this->db->size();
-            for ($i=3D0;$i<$array['nb_item'];$i++)
+           =20
+            $array['nb_item']=3D($this->nb > count($a_item))?$this->nb:c=
ount($a_item);
+            for ($i=3D0;$i<count($a_item);$i++)
             {
                 $array['e_march'.$i]=3D$a_item[$i]['j_qcode'];
                 $array['e_march'.$i.'_label']=3D$a_item[$i]['ad_text'];

Added: phpcompta/trunk/include/class_default_menu.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_default_menu.php	                      =
  (rev 0)
+++ phpcompta/trunk/include/class_default_menu.php	2013-12-21 12:48:19 UT=
C (rev 5616)
@@ -0,0 +1,141 @@
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Prop=
erties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of class_default_menu
+ *
+ * @author dany
+ */
+require_once 'class_default_menu_sql.php';
+require_once 'class_itext.php';
+
+class Default_Menu
+{
+
+    /**
+     * $a_menu_def is an array of Default_Menu_SQL
+     */
+    private $a_menu_def;
+
+    /**
+     * Possible value
+     */
+    private $code;
+
+    function __construct()
+    {
+        global $cn;
+        $menu =3D new Default_Menu_SQL($cn);
+        $ret =3D $menu->seek();
+        for ($i =3D 0; $i < Database::num_row($ret); $i++)
+        {
+            $tmenu =3D $menu->next($ret, $i);
+            $idx =3D $tmenu->getp('md_code');
+            $this->a_menu_def[$idx] =3D $tmenu->getp('me_code');
+        }
+        $this->code =3D explode(',', 'code_follow,code_invoice');
+    }
+
+    function input_value()
+    {
+        $code_invoice =3D new IText('code_invoice', $this->a_menu_def['c=
ode_invoice']);
+        $code_follow =3D new IText('code_follow', $this->a_menu_def['cod=
e_follow']);
+        echo '<p>' . _('Code pour cr=C3=A9ation facture depuis gestion')=
 . $code_invoice->input() . '</p>';
+        echo '<p>' . _('Code pour appel gestion') . $code_follow->input(=
) . '</p>';
+    }
+
+    private function check_code($p_string)
+    {
+        global $cn;
+        $count =3D $cn->get_value('select count(*) from v_menu_descripti=
on_favori where '
+                . 'code =3D $1', array($p_string));
+        if ($count =3D=3D 0)
+        {
+            throw new Exception('code_inexistant');
+        }
+    }
+
+    function verify()
+    {
+        foreach ($this->code as $code)
+        {
+            $this->check_code($this->a_menu_def[$code]);
+        }
+    }
+
+    function set($p_string, $p_value)
+    {
+        if (in_array($p_string, $this->code) =3D=3D false)
+        {
+            throw new Exception("code_invalid");
+        }
+        $this->a_menu_def[$p_string] =3D $p_value;
+    }
+    function get ($p_string)
+    {
+        return $this->a_menu_def[$p_string];
+    }
+
+    function save()
+    {
+        global $cn;
+        try
+        {
+            $this->verify();
+            foreach ($this->code as $key =3D> $value)
+            {
+                $cn->exec_sql('update menu_default set me_code=3D$1 wher=
e
+                        md_code =3D$2', array($value,$this->a_menu_def[$=
value]));
+            }
+        } catch (Exception $e)
+        {
+            $e->getTraceAsString();
+            throw $e;
+        }
+    }
+
+    static function test_me()
+    {
+        global $cn, $g_user, $g_succeed, $g_failed;
+
+        echo h2('Constructor', '');
+        $a =3D new Default_Menu();
+        echo $g_succeed . 'constructor';
+        if (count($a->a_menu_def) !=3D 2)
+            echo $g_failed;
+        else
+            echo $g_succeed;
+        echo h2("input_value", "");
+        $a->input_value();
+        echo h2('verify');
+        $a->verify();
+        try {
+            echo h2('Verify must failed');
+            $a->set('code_follow', 'MEMNU/MEMEM/');
+            $a->verify();  =20
+        } catch (Exception $e) {
+            echo $g_succeed. " OK ";
+        }
+        echo h2('Verify must succeed');
+        try {
+            $a->set('code_follow', 'GESTION/FOLLOW');
+            $a->verify();
+            echo $g_succeed. " OK ";
+        } catch (Exception $e)
+        {
+            echo $g_failed."NOK";
+        }
+        echo h2('Save');
+        $a->save();
+        echo h2('GET');
+        echo ( assert($a->get('code_follow')=3D=3D'GESTION/FOLLOW') )?$g=
_succeed.$a->get('code_follow'):$g_failed.$a->get('code_follow');
+        echo ( assert($a->get('code_invoice')=3D=3D'COMPTA/VENMENU/VEN')=
 )?$g_succeed.$a->get('code_invoice'):$g_failed.$a->get('code_invoice');
+        echo $a->get('code_invoice');
+    }
+
+}

Added: phpcompta/trunk/include/class_default_menu_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_default_menu_sql.php	                  =
      (rev 0)
+++ phpcompta/trunk/include/class_default_menu_sql.php	2013-12-21 12:48:1=
9 UTC (rev 5616)
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Prop=
erties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of class_default_menu_sql
+ *
+ * @author dany
+ */
+require_once 'class_phpcompta_sql.php';
+
+class Default_Menu_SQL extends Phpcompta_SQL
+{
+    var $md_id;
+    var $md_code;
+    var $me_code;
+
+    function __construct(&$p_cn, $p_id =3D -1)
+    {
+        $this->table =3D "public.menu_default";
+        $this->primary_key =3D "md_id";
+
+        $this->name =3D array(
+            "md_id"=3D>"md_id",
+            "md_code" =3D> "md_code",
+            "me_code" =3D> "me_code"
+        );
+        $this->type =3D array(
+            "md_id"=3D>"md_id"
+            ,"md_code" =3D> "text"
+            , "me_code" =3D> "text"
+        );
+        $this->default =3D array(
+            "md_id"
+        );
+        global $cn;
+
+        parent::__construct($cn, $p_id);
+    }
+
+}

Modified: phpcompta/trunk/include/class_follow_up.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_follow_up.php	2013-12-21 12:45:51 UTC (=
rev 5615)
+++ phpcompta/trunk/include/class_follow_up.php	2013-12-21 12:48:19 UTC (=
rev 5616)
@@ -38,7 +38,7 @@
 require_once 'class_sort_table.php';
 require_once 'class_irelated_action.php';
 require_once 'class_tag.php';
-
+require_once 'class_default_menu.php';
 /**
  * \file
  * \brief class_action for manipulating actions
@@ -521,6 +521,7 @@
 		$r.=3D$Hid->input("nb_item", $article_count);
 		$r.=3DHtmlInput::request_to_hidden(array("closed_action","remind_date_=
end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_qu=
ery", "action_query", "tdoc", "date_start", "date_end", "hsstate","search=
tag"));
                 $a_tag=3D$this->tag_get();
+                $menu=3Dnew Default_Menu();
 		/* get template */
 		ob_start();
 		require  'template/detail-action.php';

Modified: phpcompta/trunk/include/class_phpcompta_sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_phpcompta_sql.php	2013-12-21 12:45:51 U=
TC (rev 5615)
+++ phpcompta/trunk/include/class_phpcompta_sql.php	2013-12-21 12:48:19 U=
TC (rev 5616)
@@ -71,7 +71,7 @@
  * @endcode
  *
  */
-class phpcompta_sql
+class Phpcompta_SQL
 {
=20
 	function __construct(&$p_cn, $p_id =3D -1)

Added: phpcompta/trunk/include/default_menu.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/default_menu.inc.php	                        =
(rev 0)
+++ phpcompta/trunk/include/default_menu.inc.php	2013-12-21 12:48:19 UTC =
(rev 5616)
@@ -0,0 +1,28 @@
+<?php
+if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+require_once 'class_default_menu.php';
+
+global $cn,$g_failed,$g_succeed;
+
+$a_default=3Dnew Default_Menu();
+
+if ( isset($_POST['save_menu_default']) ) {
+    $a_default->set('code_follow',$_POST['code_follow']);
+    $a_default->set('code_invoice',$_POST['code_invoice']);
+    try
+    {
+        $a_default->save();
+        echo h2("Sauv=C3=A9",'class=3D"notice"',$g_succeed);
+    } catch (Exception $ex)
+    {
+        echo h2("Code menu invalide",'class=3D"notice"',$g_failed);
+    }
+}
+
+echo '<form method=3D"POST">';
+echo HtmlInput::hidden('ac',$_REQUEST['ac']);
+echo Dossier::hidden();
+$a_default->input_value();
+echo HtmlInput::submit('save_menu_default', "Sauver");
+echo '</form>';
+?>
\ No newline at end of file

Modified: phpcompta/trunk/include/template/detail-action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/detail-action.php	2013-12-21 12:45:5=
1 UTC (rev 5615)
+++ phpcompta/trunk/include/template/detail-action.php	2013-12-21 12:48:1=
9 UTC (rev 5616)
@@ -1,4 +1,3 @@
-
 <fieldset>
   <legend>
 <?php echo _('Informations g=C3=A9n=C3=A9rales')?>
@@ -364,8 +363,8 @@
      <div  style=3D"position:float;float:left">
          <p>
          <?php
-         $query=3D  http_build_query(array('gDossier'=3D>Dossier::id(),'=
ag_id'=3D>$this->ag_id,'create_invoice'=3D>1,'ac'=3D>'VEN'));
-            echo HtmlInput::button_anchor("Transformer en facture","do.p=
hp?".$query,"create_invoice", "","button");
+            $query=3D  http_build_query(array('gDossier'=3D>Dossier::id(=
),'ag_id'=3D>$this->ag_id,'create_invoice'=3D>1,'ac'=3D>$menu->get('code_=
invoice')));
+            echo HtmlInput::button_anchor("Transformer en facture","do.p=
hp?".$query,"create_invoice", '  target=3D"_blank" ',"button");
          ?>
          </p>
       </div>



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


From MAILER-DAEMON Sat Dec 21 08:00:55 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuMAp-0001Tl-7L
	for mharc-phpcompta-dev@gnu.org; Sat, 21 Dec 2013 08:00:55 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 13:49:07 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144957.1387630854.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5617 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 13:00:53 -0000

Author: danydb
Date: 2013-12-21 13:49:07 +0100 (Sat, 21 Dec 2013)
New Revision: 5617

Modified:
   phpcompta/trunk/html/test.php
Log:
Unit test : rewriting



Modified: phpcompta/trunk/html/test.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/test.php	2013-12-21 12:48:19 UTC (rev 5616)
+++ phpcompta/trunk/html/test.php	2013-12-21 12:49:07 UTC (rev 5617)
@@ -25,12 +25,13 @@
 * if the $_REQUEST[test_select] is not set, so set it .=20
 */
 include_once("ac_common.php");
+include_once("constant.php");
 require_once('class_database.php');
 require_once ('class_dossier.php');
 require_once('class_html_input.php');
 require_once ('function_javascript.php');
 load_all_script();
-
+global $cn,$g_user,$g_succeed,$g_failed;
 if ( ! file_exists('authorized_debug') )
 {
     echo "Pour pouvoir utiliser ce fichier vous devez creer un fichier n=
omme authorized_debug
@@ -48,351 +49,13 @@
     echo "L'url aurait du etre test.php?gDossier=3Dxx";
     exit();
 }
-$array=3Darray(
-           array(1,'Plan Analytic'),
-           array(2,'Poste Analytic'),
-           array(3,'Op=C3=A9ration Analytic'),
-           array(11,'Periode'),
-           array(12,'verif.inc.php'),
-           array(13,'Rapport(class_acc_report'),
-           array(14,'Tva(class_acc_tav'),
-           array(15,'Compute(class_acc_compute'),
-           array(16,'widget'),
-           array(17,'Ledger info(class_acc_ledger_info'),
-           array(18,'Toddo list(class_todo'),
-           array(19,'Payment (class_acc_payment'),
-           array(20,'Form Acc_Ledger_Sold'),
-           array(21,'Javascript') ,
-           array(22,'DIV IPopup'),
-           array(23,'D=C3=A9tection Navigateur')	,
-           array(24,'Search Card'),
-           array(25,'Search Ledger'),
-           array(26,'Gettext'),
-           array(27,'Card (class_fiche)'),
-           array(28,'Extension'),
-           array(29,'ITVA popup'),
-           array(30,'Ereg and preg_match'),
-           array(31,'IBOX'),
-           array(32,'Acc_Operation & children'),
-           array(33,'Ledger : reverse op'),
-           array(34,'Reconciliation'),
-           array(35,'Bilan'),
-	   array(36,'SQL2Table'),
-	   array(37,'balance')
-       );
-$r=3D'<form method=3D"get">';
-$r.=3D'<select name=3D"test_select" >';
-foreach ($array as $value)
-{
-    $sel=3D"";
-    if ( isset($_REQUEST['test_select']) && $_REQUEST['test_select']=3D=3D=
$value[0])
-        $sel=3D' selected ';
-    $r.=3D'<option value=3D"'.$value[0].'" '.$sel.'>'.$value[1];
-}
-$r.=3D'</select>';
-$r.=3D Dossier::hidden();
-$r.=3D'<input type=3D"submit" value=3D"Testons">';
-$r.=3D'</form>';
+$cn=3Dnew Database($_GET['gDossier']);
=20
-echo $r;
+$a_route[]=3Darray('desc'=3D>'test sur les menus par d=C3=A9fauts','file=
'=3D>'class_default_menu.php','function'=3D>'Default_Menu::test_me');
=20
-if ( ! isset($_REQUEST['test_select']))
-    exit();
-
-$act=3D$_REQUEST['test_select'];
-
-switch ($act)
+for ($i=3D0;$i< count($a_route);$i++)
 {
-case 1:
-        require_once('class_anc_plan.php');
-    Anc_Plan::test_me();
-    break;
-
-case 2:
-    require_once("class_anc_account.php");
-    Anc_Account::test_me();
-    break;
-case 3:
-    require_once ('class_anc_operation.php');
-    Anc_Operation::test_me();
-    break;
-case 11:
-    require_once ('class_periode.php');
-    Periode::test_me();
-    break;
-case 13:
-    require_once('class_acc_report.php');
-    Acc_Report::test_me();
-    require_once('class_acc_report_row.php');
-    Acc_Report_Row::test_me();
-    break;
-case 14:
-    require_once('class_acc_tva.php');
-    Acc_Tva::test_me();
-    break;
-case 15:
-    require('class_acc_compute.php');
-    Acc_Compute::test_me();
-    break;
-case 16:
-    echo HtmlInput::button_anchor("On y va",'login.php');
-    require_once('constant.php');
-    require_once('class_icard.php');
-    ICard::test_me();
-    break;
-case 17:
-    require_once('class_acc_ledger_info.php');
-    Acc_Ledger_Info::test_me();
-    break;
-case 18:
-    require_once('class_todo_list.php');
-    require_once ('constant.php');
-    Todo_List::test_me();
-    echo '<script src=3D"js/todo_list.js"></script>';
-    echo '<form method=3D"get">';
-    echo dossier::hidden();
-    echo 'title : <input type=3D"text" id=3D"p_title"><br>';
-    echo 'desc : <input type=3D"text" id=3D"p_desc"><br>';
-    echo 'date : <input type=3D"text" id=3D"p_date"><br>';
-    echo '<input type=3D"button" onClick=3D"todo_list_add();return false=
;">';
-    echo '</form>';
-    break;
-case 19:
-    require_once('class_acc_payment.php');
-    Acc_Payment::test_me();
-    break;
-case 20:
-    require_once('class_acc_ledger_sold.php');
-    Acc_Ledger_Sold::test_me();
-    break;
-case 21:
-    test_javascript();
-    break;
-case 22:
-    require_once('class_ipopup.php');
-    IPopup::test_me();
-    break;
-case 23:
-    $browser=3D $_SERVER['HTTP_USER_AGENT'];
-    echo $browser;
-    if ( strpos ($browser,'MSIE 6.0') !=3D 0 )
-    {
-        echo "Vous ne pouvez pas utiliser Internet Explorer 6";
-    }
-    break;
-case 24:
-    require_once('class_icard.php');
-    require_once ('constant.php');
-    ICard::test_me();
-    break;
-case 25:
-    require_once('class_acc_ledger.php');
-
-    Acc_Ledger::test_me('search');
-    break;
-case 26:
-    /* gettext */
-    $dir=3D"";
-    if ( isset($_REQUEST['l']))
-    {
-        $dir=3Dsetlocale(LC_MESSAGES,$_REQUEST['l']);
-    }
-    else
-    {
-        $dir=3Dsetlocale(LC_MESSAGES,"fr_FR.utf8");
-    }
-    print_r("dir =3D[$dir]");
-    if ( $dir =3D=3D "")
-    {
-        echo '<h2 class=3D"error">D=C3=A9sol=C3=A9 mais ce domaine n\'es=
t pas support=C3=A9</h2>';
-    }
-    echo '<br>';
-    bindtextdomain('messages','./lang');
-    textdomain('messages');
-    bind_textdomain_codeset('messages','UTF8');
-    echo _('Bienvenu sur mon site');
-    echo _('Essayer de vous y amuser');
-    echo '<form method=3D"GET">';
-    echo dossier::hidden();
-    echo HtmlInput::hidden('test_select',$act);
-    echo _('Choississez votre langue');
-    $aLang=3Darray(array(_('Fran=C3=A7ais'),'fr_FR.utf8'),
-                 array(_('Anglais'),'en_US.utf8'),
-                 array(_('N=C3=A9erlandais'),'nl_NL.utf8'),
-                );
-    echo '<select name=3D"l" id=3D"l">';
-    for ($i =3D0;$i < count($aLang);$i++)
-    {
-        printf('<option value=3D"%s">%s</option>',
-               $aLang[$i][1],$aLang[$i][0]);
-
-    }
-    echo '</select>';
-    echo '<input type=3D"submit" value=3D"'._('Change de langue').'">';
-    echo '</form>';
-    echo "Div 5/10 =3D ";
-    echo 5/10;
-    echo '<br>';
-    $test_num=3D10000/3;
-    echo 'Div num '.$test_num;
-    echo '<br>';
-    echo _('Fin de programme');
-    break;
-case 27:
-    require_once('class_fiche.php');
-    Fiche::test_me();
-    break;
-case 28:
-    require_once('class_extension.php');
-    Extension::test_me();
-    break;
-case 29:
-    require_once('class_itva_popup.php');
-    echo js_include('scripts.js');
-    echo js_include('scriptaculous.js');
-    echo js_include('effects.js');
-    echo js_include("controls.js");
-    echo js_include('dragdrop.js');
-    ITva_Popup::test_me();
-    break;
-case 30:
-    // Test on ereg and preg_match
-    $aString=3Darray('[7%]','[67%]','[7%]-[6%]+[67%]','[7%]-[6%]','[55%]=
 FROM=3D00.000');
-    echo '<h2> EREG </h2>';
-    foreach ($aString as $str)
-    {
-        echo $str." =3D=3D=3D=3D>";
-        @ereg ("^(\\$[a-zA-Z]*[0-9]*=3D){0,1}((\[{0,1}[0-9]+\.*[0-9]*%{0=
,1}\]{0,1})+*([+-\*/]){0,1} *(\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})*)*(([+=
-\*/])*\\$([a-zA-Z])+[0-9]*([+-\*/])*)* *( *FROM=3D[0-9][0-0].20[0-9][0-9=
]){0,1}$",$str,$p_result);
-        var_dump($p_result);
-    }
-    echo '<h2> EREG </h2>';
-    foreach ($aString as $str)
-    {
-        echo $str." =3D=3D=3D=3D>";
-        /// $a=3D70%+60%+... FROM=3D00.000
-        preg_match("/^(\\$[a-zA-Z]+[0-9]*=3D){0,1}(\[{0,1}[0-9]+\.*[0-9]=
*%{0,1}\]{0,1})(+|-|\*|\/)*/",$str,$p_result);
-        //    preg_match ("/^(\\$[a-zA-Z]+[0-9]*=3D){0,1}((\[{0,1}[0-9]+=
\.*[0-9]*%{0,1}\]{0,1})+ *([+-\*/])* *(\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1=
})*)*(([+-\*/])*\\$([a-zA-Z])+[0-9]*([+-\*/])*)* *( *FROM=3D[0-9][0-0].20=
[0-9][0-9]){0,1}\$/",$str,$p_result);
-        var_dump($p_result);
-    }
-case 31:
-    require_once('class_ibox.php');
-    IBox::test_me();
-    break;
-case 32:
-    require_once('class_acc_operation.php');
-    Acc_Operation::test_me();
-    break;
-case 33:
-    require_once('class_acc_ledger.php');
-    Acc_Ledger::test_me('reverse');
-    break;
-case 34:
-    require_once('class_acc_reconciliation.php');
-    Acc_Reconciliation::test_me();
-    break;
-case 35:
-  require_once('class_acc_bilan.php');
-  Acc_Bilan::test_me();
-  break;
-case 36:
-  require_once('class_html_table.php');
-  Html_Table::test_me();
-  break;
-case 37:
-    require 'class_acc_balance.php';
-    Acc_Balance::test_me();
-}
-
-
-function test_javascript()
-{
-  echo <<<JS
-    <script language=3D"Javascript" src=3D"js/scripts.js"></script>
-    <script language=3D"javascript">
-    function ajax_post()
-    {
-      a=3Dnew Ajax();
-      a.createAjax('test.php','a=3D1&b=3D2');
-      a.postPage();
-      a.onSuccess(show);
-    }
-  function ajax_get()
-  {
-    a=3Dnew Ajax();
-    a.createAjax('test.php','a=3D1&b=3D2');
-    a.getPage();
-    a.onSuccess(show);
-  }
-  function ajax_get_obj()
-  {
-    a=3Dnew Ajax();
-    var param=3D{"reponse":"oui"
-	       ,"valeur":"pas des masses"
-	       ,"gDossier":"13"
-    };
-    str_param=3DencodeJSON(param);
-    a.createAjax('test.php',str_param);
-    a.getPage();
-    a.onSuccess(show);
-  }
-  function ajax_post_obj()
-  {
-    var a=3Dnew Ajax();
-    var param=3D{"reponse":"oui"
-	       ,"valeur":"pas des masses"
-	       ,"gDossier":"13"
-    };
-    str_param=3DencodeJSON(param);
-    a.createAjax('test.php',str_param);
-    a.postPage();
-  }
-  function show(p)
-  {
-    alert('return ok');
-  }
-
-  </script>
-      <h1> Ajax get - post </h1>
-      <div>
-      <input type=3D"button" onclick=3D"ajax_post()" value=3D"Ajax POST"=
>
-      <input type=3D"button" onclick=3D"ajax_get()" value=3D"Ajax GET">
-      </div>
-      <h1> encodeParameter</h1>
-      <div>
-      <p>
-      obj =3D
-      { "a":"1000"
-	,"b":"seconde valeur"
-      }
-  </p>
-      <p>
-      <input type=3D"button" onclick=3D'x=3D120;obj =3D  { "a":"1000","b=
":"seconde valeur","c":x} ;a=3DencodeJSON(obj);alert(a);' value=3D"encode=
Parameter">
-      <input type=3D"button" onclick=3D"ajax_get_obj()" value=3D"Ajax GE=
T + object">
-      <input type=3D"button" onclick=3D"ajax_post_obj()" value=3D"Ajax P=
OST + object">
-      </p>
-      </div>
-
-      <h1>set_value</h1>
-      <div>
-      <p id=3D"p_id">p_id</p>
-      <span id=3D"p_span">p_span</span>
-      <textarea id=3D"p_txtarea">
-      p_txtarea
-      </textarea>
-      <input type=3D"text" value=3D"toto" id=3D"p_input_text">
-      <input type=3D"button" onclick=3D"set_all()" value=3D"set_all()">
-
-      <script>
-      function set_all()
-      {
-	set_value('p_id',"Ceci est un paragraphe");
-	set_value('p_span',"Ceci est un SPAN");
-	set_value('p_txtarea',"Ceci est un tr=C3=A8s grand textarea vraiemnt");
-	set_value('p_input_text','normalement nous sommes dans l\'input');
-      }
-
-
-  </script>
-      </div>
-JS;
-}
+    echo '<h1>'.$a_route[$i]['desc'].'</h1>';
+    require $a_route[$i]['file'];
+    call_user_func($a_route[$i]['function']);
+}
\ No newline at end of file



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


From MAILER-DAEMON Sat Dec 21 08:10:42 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuMKI-0002sC-O6
	for mharc-phpcompta-dev@gnu.org; Sat, 21 Dec 2013 08:10:42 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 13:58:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144960.1387631442.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5618 - phpcompta/trunk/doc
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 13:10:41 -0000

Author: danydb
Date: 2013-12-21 13:58:55 +0100 (Sat, 21 Dec 2013)
New Revision: 5618

Modified:
   phpcompta/trunk/doc/manuel-fr.odt
   phpcompta/trunk/doc/manuel-fr.pdf
Log:
update documentation

Modified: phpcompta/trunk/doc/manuel-fr.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)

Modified: phpcompta/trunk/doc/manuel-fr.pdf
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)



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


From MAILER-DAEMON Sat Dec 21 08:15:24 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VuMOq-0003Ta-Co
	for mharc-phpcompta-dev@gnu.org; Sat, 21 Dec 2013 08:15:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 21 Dec 2013 14:03:37 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.144961.1387631723.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5619 - phpcompta/trunk/doc
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Dec 2013 13:15:22 -0000

Author: danydb
Date: 2013-12-21 14:03:36 +0100 (Sat, 21 Dec 2013)
New Revision: 5619

Modified:
   phpcompta/trunk/doc/manuel-fr.odt
   phpcompta/trunk/doc/manuel-fr.pdf
Log:
update documentation

Modified: phpcompta/trunk/doc/manuel-fr.odt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)

Modified: phpcompta/trunk/doc/manuel-fr.pdf
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)



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


From MAILER-DAEMON Thu Dec 26 18:25:53 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VwKJN-0001Jj-MN
	for mharc-phpcompta-dev@gnu.org; Thu, 26 Dec 2013 18:25:53 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 27 Dec 2013 00:13:57 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.148591.1388100352.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5620 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Dec 2013 23:25:51 -0000

Author: danydb
Date: 2013-12-27 00:13:56 +0100 (Fri, 27 Dec 2013)
New Revision: 5620

Modified:
   phpcompta/trunk/include/class_contact.php
Log:

Task #955 - CONTACT : liste

Modified: phpcompta/trunk/include/class_contact.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_contact.php	2013-12-21 13:03:36 UTC (re=
v 5619)
+++ phpcompta/trunk/include/class_contact.php	2013-12-26 23:13:56 UTC (re=
v 5620)
@@ -109,7 +109,7 @@
         $back_url=3Durlencode($_SERVER['REQUEST_URI']);
         if ( sizeof ($step_contact ) =3D=3D 0 )
             return $r;
-
+        $idx=3D0;
         foreach ($step_contact as $contact )
         {
             $l_company=3Dnew Fiche($this->cn);
@@ -121,7 +121,9 @@
             {
 				$l_company_name=3DHtmlInput::card_detail($contact->strAttribut(ATTR_=
DEF_COMPANY),$l_company_name,'style=3D"text-decoration:underline;"');
             }
-            $r.=3D"<TR>";
+            $tr=3D($idx%2=3D=3D0)?' <tr class=3D"odd">':'<tr class=3D"ev=
en">';
+            $idx++;
+            $r.=3D$tr;
             $qcode=3D$contact->strAttribut(ATTR_DEF_QUICKCODE);
             $r.=3D'<TD>'.HtmlInput::card_detail($qcode)."</TD>";
             $r.=3D"<TD>".$contact->strAttribut(ATTR_DEF_NAME)."</TD>";



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


From MAILER-DAEMON Thu Dec 26 18:41:08 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VwKY8-000424-Tr
	for mharc-phpcompta-dev@gnu.org; Thu, 26 Dec 2013 18:41:08 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 27 Dec 2013 00:29:10 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.148634.1388101268.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5621 - phpcompta/trunk/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Dec 2013 23:41:07 -0000

Author: danydb
Date: 2013-12-27 00:29:09 +0100 (Fri, 27 Dec 2013)
New Revision: 5621

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
Recherche par Nom, pr?\195?\169nom, quickcode, num?\195?\169ro TVA et num=
?\195?\169ro client
Task #954 - CUST, SUPPLIER... Recherche par quick code ne fonctionne pas

Modified: phpcompta/trunk/include/class_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_fiche.php	2013-12-26 23:13:56 UTC (rev =
5620)
+++ phpcompta/trunk/include/class_fiche.php	2013-12-26 23:29:09 UTC (rev =
5621)
@@ -310,7 +310,6 @@
         }
=20
         $Ret=3D$this->cn->exec_sql($sql);
-
         if ( ($Max=3DDatabase::num_row($Ret)) =3D=3D 0 )
             return ;
         $all[0]=3Dnew Fiche($this->cn);
@@ -1536,7 +1535,7 @@
=20
         if ( $p_amount) $filter_amount=3D' and f_id in (select f_id from=
 jrnx where  '.$filter_year.')';
=20
-        $all_tiers=3D$this->count_by_modele($this->fiche_def_ref,$p_sear=
ch,$p_sql.$filter_amount);
+        $all_tiers=3D$this->count_by_modele($this->fiche_def_ref,"",$p_s=
ql.$filter_amount);
         // Get offset and page variable
         $offset=3D( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0=
;
         $page=3D(isset($_REQUEST['page']))?$_REQUEST['page']:1;
@@ -1553,9 +1552,9 @@
         if ( trim($p_search) !=3D "" )
         {
             $search.=3D" and f_id in
-                     (select f_id from fiche_detail
+                     (select distinct f_id from fiche_detail
                      where
-                     ad_id=3D1 and ad_value ~* '$p_search')";
+                     ad_id in (1,32,30,23,18,13) and ad_value ~* '$p_sea=
rch')";
         }
         // Get The result Array
         $step_tiers=3D$this->GetAll($offset,$search.$filter_amount,'name=
');



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


From MAILER-DAEMON Thu Dec 26 18:49:12 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VwKfv-0006CC-Un
	for mharc-phpcompta-dev@gnu.org; Thu, 26 Dec 2013 18:49:11 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 27 Dec 2013 00:37:17 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.148670.1388101750.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5622 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Dec 2013 23:49:10 -0000

Author: danydb
Date: 2013-12-27 00:37:16 +0100 (Fri, 27 Dec 2013)
New Revision: 5622

Modified:
   phpcompta/trunk/html/style-color.css
   phpcompta/trunk/html/style.css
Log:
update style=20

Modified: phpcompta/trunk/html/style-color.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style-color.css	2013-12-26 23:29:09 UTC (rev 562=
1)
+++ phpcompta/trunk/html/style-color.css	2013-12-26 23:37:16 UTC (rev 562=
2)
@@ -442,7 +442,7 @@
     font-family:arial,verdana,sans-serif,helvetica;
     text-decoration: none;
     display: block;
-    color: blue;
+    color: brown;
 }
=20
 a.detail:hover
@@ -463,7 +463,7 @@
     font-family:arial,verdana,sans-serif,helvetica;
     text-decoration: none;
     display: block;
-    color: blue;
+    color: brown;
=20
 }
=20
@@ -479,7 +479,7 @@
     font-family:arial,verdana,sans-serif,helvetica;
     text-decoration: none;
     display: block;
-    color: blue;
+    color: brown;
     padding: 0;
=20
 }

Modified: phpcompta/trunk/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style.css	2013-12-26 23:29:09 UTC (rev 5621)
+++ phpcompta/trunk/html/style.css	2013-12-26 23:37:16 UTC (rev 5622)
@@ -275,9 +275,7 @@
     width:95px;
     height :30px;
     font-size:0.75em;;
-    background-color:#DDE6FF;
     border:1px solid #99B1DF;
-    border-radius:5px;
 }
 td.msubtitle {
     text-align:center;
@@ -325,13 +323,12 @@
 }
 td.selectedcell{
     border-color:blue;
-    border-width:1pt ;
+    border-width:1px ;
+    border-style:solid;
     font-weight: bold;
-    background:#5D90CD ;
-    color:white;
     text-align:center;
     width:120px;
-    border-radius:5px;
+    background-color:whitesmoke;
 }
 a.mtitle {
     text-decoration:none;
@@ -348,10 +345,11 @@
=20
 }
 td.selectedcell a.mtitle,div.content td.selectedcell a.mtitle {
-    font-size:0.75em;;
+    background-color:whitesmoke;
+    font-size:0.75em;
     text-decoration:none;
     display:block;
-    color:white;
+    color:black;
 }
 a.dossier {
     font-size:0.75em;;
@@ -837,12 +835,10 @@
     border-style:  outset ;
     border-color:  blue ;
     border-width:0px;
-    padding:8px;
+    padding:4px;
     margin-top:3px;
     cursor:pointer;
     margin:1 2 1 2;
-    border-radius: 5px;
-    moz-border-radius:5px;
=20
 }
 a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover  {



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


From MAILER-DAEMON Thu Dec 26 18:49:56 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VwKge-0006G7-6B
	for mharc-phpcompta-dev@gnu.org; Thu, 26 Dec 2013 18:49:56 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 27 Dec 2013 00:38:01 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.148671.1388101795.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5623 - in phpcompta/trunk/include: . ext/dummy
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Dec 2013 23:49:54 -0000

Author: danydb
Date: 2013-12-27 00:38:01 +0100 (Fri, 27 Dec 2013)
New Revision: 5623

Modified:
   phpcompta/trunk/include/class_contact.php
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_fiche_def.php
   phpcompta/trunk/include/ext/dummy/dummy.php
   phpcompta/trunk/include/fiche.inc.php
Log:
refactor : rename function

Modified: phpcompta/trunk/include/class_contact.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_contact.php	2013-12-26 23:37:16 UTC (re=
v 5622)
+++ phpcompta/trunk/include/class_contact.php	2013-12-26 23:38:01 UTC (re=
v 5623)
@@ -75,7 +75,7 @@
                     ad_id=3D1 and ad_value ~* '$p_search') ";
         }
         // Get The result Array
-        $step_contact=3D$this->GetAll($offset,$search.$extra_sql.$p_sql)=
;
+        $step_contact=3D$this->get_by_category($offset,$search.$extra_sq=
l.$p_sql);
=20
 		if ( $all_contact =3D=3D 0 ) return "";
         $r=3D$bar;

Modified: phpcompta/trunk/include/class_fiche.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_fiche.php	2013-12-26 23:37:16 UTC (rev =
5622)
+++ phpcompta/trunk/include/class_fiche.php	2013-12-26 23:38:01 UTC (rev =
5623)
@@ -396,7 +396,7 @@
      *\exception Exception if the cat of card doesn't exist, Exception.g=
etCode()=3D1
      *\see fiche::insert()
      */
-    function toArray($pfd_id)
+    function to_array($pfd_id)
     {
         $sql=3D"select 'av_text'||to_char(ad_id,'9999') as key,".
              " ad_text ".
@@ -426,7 +426,7 @@
     {
         // array =3D array of attribute object sorted on ad_id
         $f=3Dnew Fiche_Def($this->cn,$p_fiche_def);
-        $f->Get();
+        $f->get();
         $array=3D$f->getAttribut();
         $r=3Dh2('Cat=C3=A9gorie '.$f->label,"");
         $r.=3D'<table style=3D"width:98%;margin:1%">';
@@ -995,7 +995,7 @@
         // Get the fiche_def.fd_id from fiche.f_id
         $this->Get();
         $fiche_def=3Dnew Fiche_Def($this->cn,$this->fiche_def);
-        $fiche_def->Get();
+        $fiche_def->get();
=20
         // if the card is used do not removed it
         $qcode=3D$this->strAttribut(ATTR_DEF_QUICKCODE);
@@ -1051,7 +1051,7 @@
      * \param $p_search sql condition
      * \return array of fiche object
      */
-    function GetAll($p_offset=3D-1,$p_search=3D"",$p_order=3D'')
+    function get_by_category($p_offset=3D-1,$p_search=3D"",$p_order=3D''=
)
     {
         return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search,=
$p_order);
     }
@@ -1557,7 +1557,7 @@
                      ad_id in (1,32,30,23,18,13) and ad_value ~* '$p_sea=
rch')";
         }
         // Get The result Array
-        $step_tiers=3D$this->GetAll($offset,$search.$filter_amount,'name=
');
+        $step_tiers=3D$this->get_by_category($offset,$search.$filter_amo=
unt,'name');
=20
         if ( $all_tiers =3D=3D 0 || count($step_tiers)=3D=3D0 ) return "=
";
         $r=3D"";
@@ -1912,7 +1912,7 @@
         echo '</form>';
         if ( isset ($_GET['go_card']))
         {
-            $empty=3D$a->toArray($_GET['fd_id']);
+            $empty=3D$a->to_array($_GET['fd_id']);
             print_r($empty);
         }
     }

Modified: phpcompta/trunk/include/class_fiche_def.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_fiche_def.php	2013-12-26 23:37:16 UTC (=
rev 5622)
+++ phpcompta/trunk/include/class_fiche_def.php	2013-12-26 23:38:01 UTC (=
rev 5623)
@@ -102,7 +102,7 @@
     * \brief  Get attribut of the fiche_def
     *
     */
-    function Get()
+    function get()
     {
         if ( $this->id =3D=3D 0 )
             return 0;
@@ -127,7 +127,7 @@
      *
      * \return an array of fiche_def object
      */
-    function GetAll()
+    function get_all()
     {
         $sql=3D"select * from fiche_def ";
=20
@@ -368,7 +368,7 @@
      */
     function myList()
     {
-        $this->Get();
+        $this->get();
         echo '<H2 class=3D"info">'.$this->id." ".$this->label.'</H2>';
=20
         $step=3D$_SESSION['g_pagesize'];
@@ -759,7 +759,7 @@
 		$r =3D "";
 		// Save the label
=20
-		$this->Get();
+		$this->get();
 		$this->GetAttribut();
 		$r.=3D '<H2 class=3D"info">' . $this->id . " " . h($this->label) . '</=
H2>';
 		$r.=3D'<fieldset><legend>Donn=C3=A9es g=C3=A9n=C3=A9rales</legend>';

Modified: phpcompta/trunk/include/ext/dummy/dummy.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/ext/dummy/dummy.php	2013-12-26 23:37:16 UTC (=
rev 5622)
+++ phpcompta/trunk/include/ext/dummy/dummy.php	2013-12-26 23:38:01 UTC (=
rev 5623)
@@ -42,7 +42,7 @@
 // get parce qu'on interroge
 if ( isset($_GET['display_prop'])){
 	$a=3Dnew Fiche($cn);
-	$prop=3D$a->toArray($_GET['fd_id']);
+	$prop=3D$a->to_array($_GET['fd_id']);
 	foreach ($prop as $key=3D>$value) 	echo "Index : $key valeur $value <br=
/>";
 =09
 	echo '<form method=3D"POST" action=3D"extension.php"  enctype=3D"multip=
art/form-data">';
@@ -70,7 +70,7 @@
 	// On r=C3=A9cup=C3=A8re les propri=C3=A9t=C3=A9s de cette cat=C3=A9gor=
ie de fiche
 	$client=3Dnew Fiche($cn);
 	// $array contient toutes les valeurs n=C3=A9cessaires =C3=A0 Fiche::in=
sert,
-	$array=3D$client->toArray($_POST['fd_id']);
+	$array=3D$client->to_array($_POST['fd_id']);
 	=09
 	while ( ($data=3Dfgetcsv($f))=3D=3Dtrue) {
 		// remarque : on a =C3=A9limin=C3=A9 les traitements d'erreur

Modified: phpcompta/trunk/include/fiche.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/fiche.inc.php	2013-12-26 23:37:16 UTC (rev 56=
22)
+++ phpcompta/trunk/include/fiche.inc.php	2013-12-26 23:38:01 UTC (rev 56=
23)
@@ -127,7 +127,7 @@
 $allcard =3D (isset($_GET['allcard'])) ? 1 : 0;
 if ( $allcard =3D=3D 0 ){
 	$fiche_def=3Dnew Fiche_Def($cn,$_GET['cat']);
-	$fiche_def->Get();
+	$fiche_def->get();
 	echo h1($fiche_def->label,"");
 	echo h2($fiche_def->fd_description,"");
 }



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


From MAILER-DAEMON Thu Dec 26 18:58:44 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VwKpA-0007oD-Ot
	for mharc-phpcompta-dev@gnu.org; Thu, 26 Dec 2013 18:58:44 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 27 Dec 2013 00:46:50 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.148672.1388102324.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5624 - in phpcompta/trunk/html: . js
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Dec 2013 23:58:43 -0000

Author: danydb
Date: 2013-12-27 00:46:50 +0100 (Fri, 27 Dec 2013)
New Revision: 5624

Modified:
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/html/style.css
Log:
esthetic

Modified: phpcompta/trunk/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/scripts.js	2013-12-26 23:38:01 UTC (rev 5623)
+++ phpcompta/trunk/html/js/scripts.js	2013-12-26 23:46:50 UTC (rev 5624)
@@ -680,7 +680,7 @@
 function waiting_box()
 {
     obj =3D {
-        id: 'wait_box', html: loading()
+        id: 'wait_box', html: '<h2 class=3D"title">Chargement</h2>'+load=
ing()
     };
     var y =3D calcy(posY);
     obj.style =3D fixed_position(posX, y) + ";width:200px";
@@ -688,7 +688,7 @@
         removeDiv('wait_box');
     }
     add_div(obj);
-    $('info_div').innerHTML =3D "Un instant";
+    $('info_div').innerHTML =3D 'Un instant';
     $('info_div').style.display =3D "block";
=20
 }

Modified: phpcompta/trunk/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style.css	2013-12-26 23:38:01 UTC (rev 5623)
+++ phpcompta/trunk/html/style.css	2013-12-26 23:46:50 UTC (rev 5624)
@@ -349,7 +349,6 @@
     font-size:0.75em;
     text-decoration:none;
     display:block;
-    color:black;
 }
 a.dossier {
     font-size:0.75em;;
@@ -1058,7 +1057,6 @@
 }
 #wait_box h2
 {
-    color:black;
     text-align:center;
 }
 div#div_jrnsearch_op{



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


From MAILER-DAEMON Sat Dec 28 22:38:11 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vx7Cd-0003Mx-14
	for mharc-phpcompta-dev@gnu.org; Sat, 28 Dec 2013 22:38:11 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun, 29 Dec 2013 04:26:12 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.149648.1388288290.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5625 - phpcompta/trunk/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Dec 2013 03:38:09 -0000

Author: danydb
Date: 2013-12-29 04:26:11 +0100 (Sun, 29 Dec 2013)
New Revision: 5625

Modified:
   phpcompta/trunk/html/style.css
Log:
Hover white -> darkblue

Modified: phpcompta/trunk/html/style.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/style.css	2013-12-26 23:46:50 UTC (rev 5624)
+++ phpcompta/trunk/html/style.css	2013-12-29 03:26:11 UTC (rev 5625)
@@ -349,6 +349,7 @@
     font-size:0.75em;
     text-decoration:none;
     display:block;
+    color:darkblue;
 }
 a.dossier {
     font-size:0.75em;;



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


From MAILER-DAEMON Sat Dec 28 22:42:38 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vx7Gw-00044Z-SK
	for mharc-phpcompta-dev@gnu.org; Sat, 28 Dec 2013 22:42:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun, 29 Dec 2013 04:30:41 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.149649.1388288557.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5626 - phpcompta/trunk/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Dec 2013 03:42:37 -0000

Author: danydb
Date: 2013-12-29 04:30:41 +0100 (Sun, 29 Dec 2013)
New Revision: 5626

Modified:
   phpcompta/trunk/include/template/dashboard.php
Log:
dashboard : max-width:50%

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-29 03:26:11 UT=
C (rev 5625)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-29 03:30:41 UT=
C (rev 5626)
@@ -1,5 +1,5 @@
 <!-- left div -->
-<div style=3D"float:right;width: 49%">
+<div style=3D"float:right;max-width: 49%">
=20
 <?php
=20
@@ -252,7 +252,7 @@
 </div>
=20
 </div>
-<div style=3D"float:right;width: 49%">
+<div style=3D"float:right;max-width: 49%">
    =20
 <div style=3D"float:left;width: 100%">
 <fieldset >



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


From MAILER-DAEMON Mon Dec 30 09:48:57 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vxe9J-0005BD-3A
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 09:48:57 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 15:36:56 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150324.1388414936.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5627 - in phpcompta/trunk/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 14:48:56 -0000

Author: danydb
Date: 2013-12-30 15:36:56 +0100 (Mon, 30 Dec 2013)
New Revision: 5627

Added:
   phpcompta/trunk/include/calendar.inc.php
Modified:
   phpcompta/trunk/include/class_calendar.php
   phpcompta/trunk/include/template/dashboard.php
Log:
Agenda de base
Task #957 - Agenda

Added: phpcompta/trunk/include/calendar.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/calendar.inc.php	                        (rev=
 0)
+++ phpcompta/trunk/include/calendar.inc.php	2013-12-30 14:36:56 UTC (rev=
 5627)
@@ -0,0 +1,16 @@
+<?php
+/**
+ * @file
+ * @brief show the calendar
+ */
+if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
+
+require_once 'class_calendar.php';
+$cal=3Dnew Calendar();
+$cal->default_periode=3D(isset ($_GET['in']))?$_GET['in']:$g_user->get_p=
eriode();
+
+?>
+<div id=3D"calendar_zoom_div">
+   =20
+<?php echo $cal->display('long'); ?>
+</div>
\ No newline at end of file

Modified: phpcompta/trunk/include/class_calendar.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_calendar.php	2013-12-29 03:30:41 UTC (r=
ev 5626)
+++ phpcompta/trunk/include/class_calendar.php	2013-12-30 14:36:56 UTC (r=
ev 5627)
@@ -147,12 +147,16 @@
         }
     }
     /*!\brief display a calendar after a call to Calendar::fill
-     *\param none
+     *\param $p_type long or short
+     *=20
      *\return HTML String
      */
-    function display()
+    function display($p_type)
     {
         global $g_user;
+        if  ($p_type !=3D 'long' && $p_type !=3D 'short') {
+            throw new Exception("Calendar::display, unknow type");
+        }
         $exercice_user=3D$g_user->get_exercice();
         /* day */
         $cell=3Darray();
@@ -164,17 +168,18 @@
         /* weekday */
         $week=3Darray(_('Dimanche'),_('Lundi'),_('Mardi'),_('Mercredi'),=
_('Jeudi'),_('Vendredi'),_('Samedi'));
=20
-        $this->fill_from_action($cell,"short");
-        $this->fill_from_todo($cell,"short");
+        $this->fill_from_action($cell,$p_type);
+        $this->fill_from_todo($cell,$p_type);
         $wMonth=3Dnew ISelect('per');
         $cn=3Dnew Database(dossier::id());
         $wMonth->value=3D$cn->make_array("select p_id,to_char(p_start,'M=
M/YYYY') from parm_periode where p_exercice =3D '$exercice_user' order by=
 p_start");
         $wMonth->selected=3D$this->default_periode;
         $wMonth->javascript=3D"onchange=3Dchange_month(this)";
         $wMonth->set_attribute('gDossier',dossier::id());
+        $wMonth->set_attribute('type_display',$p_type);
         $month_year=3D$wMonth->input().$wMonth->get_js_attr();
         ob_start();
-        $zoom=3D0;
+        $zoom=3D($p_type=3D=3D'short')?0:1;
         require_once('template/calendar.php');
=20
 		if (count($this->action_div) > 0)

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-29 03:30:41 UT=
C (rev 5626)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-30 14:36:56 UT=
C (rev 5627)
@@ -259,7 +259,7 @@
 <legend><?php echo _('Calendrier')?>
 </legend>
 <?php echo HtmlInput::calendar_zoom($obj); ?>
-<?php echo $cal->display(); ?>
+<?php echo $cal->display('short'); ?>
 </fieldset>
 </div>
 <!-- Mini rapport -->



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


From MAILER-DAEMON Mon Dec 30 09:49:51 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxeAB-0006X3-9k
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 09:49:51 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 15:37:49 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150325.1388414990.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5628 - in phpcompta/trunk/html: . admin/sql/patch
	js
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 14:49:49 -0000

Author: danydb
Date: 2013-12-30 15:37:49 +0100 (Mon, 30 Dec 2013)
New Revision: 5628

Modified:
   phpcompta/trunk/html/admin/sql/patch/upgrade111.sql
   phpcompta/trunk/html/ajax_misc.php
   phpcompta/trunk/html/js/scripts.js
Log:
Agenda de base
Task #957 - Agenda

Modified: phpcompta/trunk/html/admin/sql/patch/upgrade111.sql
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/admin/sql/patch/upgrade111.sql	2013-12-30 14:36:=
56 UTC (rev 5627)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade111.sql	2013-12-30 14:37:=
49 UTC (rev 5628)
@@ -16,7 +16,14 @@
 values
 ('CFGDEFMENU','MOD',1,30,'E',0);
=20
+insert into menu_ref(me_code,me_menu,me_file, me_url,me_description,me_p=
arameter,me_javascript,me_type,me_description_etendue)
+values
+('AGENDA','Agenda','calendar.inc.php',null,'Agenda',null,null,'ME','Agen=
da, pr=C3=A9sentation du suivi sous forme d''agenda ');
=20
+insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_displ=
ay,pm_default)=20
+values
+('AGENDA','NULL',1,410,'M',0),('AGENDA','NULL',2,410,'M',0);
+
 create table menu_default
 (
     md_id   serial primary key,

Modified: phpcompta/trunk/html/ajax_misc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/ajax_misc.php	2013-12-30 14:36:56 UTC (rev 5627)
+++ phpcompta/trunk/html/ajax_misc.php	2013-12-30 14:37:49 UTC (rev 5628)
@@ -126,7 +126,7 @@
 		$cal->set_periode($per);
=20
 		$html =3D "";
-		$html =3D $cal->display();
+		$html =3D $cal->display($_GET['t']);
 		$html =3D escape_xml($html);
 		header('Content-type: text/xml; charset=3DUTF-8');
 		echo <<<EOF

Modified: phpcompta/trunk/html/js/scripts.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/html/js/scripts.js	2013-12-30 14:36:56 UTC (rev 5627)
+++ phpcompta/trunk/html/js/scripts.js	2013-12-30 14:37:49 UTC (rev 5628)
@@ -342,7 +342,7 @@
  */
 function change_month(obj)
 {
-    var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Dcal" + "&p=
er=3D" + obj.value;
+    var queryString =3D "gDossier=3D" + obj.gDossier + "&op=3Dcal" + "&p=
er=3D" + obj.value+"&t=3D"+obj.type_display;
     var action =3D new Ajax.Request(
             "ajax_misc.php", {method: 'get', parameters: queryString, on=
Failure: ajax_misc_failure, onSuccess: success_misc}
     );



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


From MAILER-DAEMON Mon Dec 30 09:50:36 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxeAt-0007V8-R2
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 09:50:36 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 15:38:36 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150328.1388415034.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5629 - phpcompta/trunk/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 14:50:34 -0000

Author: danydb
Date: 2013-12-30 15:38:36 +0100 (Mon, 30 Dec 2013)
New Revision: 5629

Modified:
   phpcompta/trunk/include/template/action_other_action.php
Log:
Traduction

Modified: phpcompta/trunk/include/template/action_other_action.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_other_action.php	2013-12-30 1=
4:37:49 UTC (rev 5628)
+++ phpcompta/trunk/include/template/action_other_action.php	2013-12-30 1=
4:38:36 UTC (rev 5629)
@@ -54,7 +54,7 @@
     </ul>
        =20
 <?php
-    echo HtmlInput::submit("other_action_bt", "Valider");
+    echo HtmlInput::submit("other_action_bt", _("Valider"));
 ?>
 </div>
 <script>



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


From MAILER-DAEMON Mon Dec 30 10:03:09 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxeN3-0002xF-1I
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:03:09 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 15:51:07 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150333.1388415787.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5630 - phpcompta/tags
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:03:06 -0000

Author: danydb
Date: 2013-12-30 15:51:07 +0100 (Mon, 30 Dec 2013)
New Revision: 5630

Added:
   phpcompta/tags/rel671/
Log:
New release


Copied: phpcompta/tags/rel671 (from rev 5629, phpcompta/trunk)



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


From MAILER-DAEMON Mon Dec 30 10:08:14 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxeRy-0005FA-Sm
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:08:14 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 15:56:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150350.1388416094.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5631 - phpcompta/trunk
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:08:14 -0000

Author: danydb
Date: 2013-12-30 15:56:15 +0100 (Mon, 30 Dec 2013)
New Revision: 5631

Modified:
   phpcompta/trunk/
Log:
Removed merge tracking for "svnmerge" for=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel670



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-blocked
   - /phpcompta/tags/rel670:5540 /phpcompta/trunk:1917,2460,2501,2508,256=
9,2610
   + /phpcompta/trunk:1917,2460,2501,2508,2569,2610
Name: svnmerge-integrated
   - /phpcompta/tags/rel670:1-5539,5541-5585



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


From MAILER-DAEMON Mon Dec 30 10:09:05 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxeSn-0005H3-4e
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:09:05 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 15:57:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150351.1388416144.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5632 - phpcompta/trunk
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:09:04 -0000

Author: danydb
Date: 2013-12-30 15:57:05 +0100 (Mon, 30 Dec 2013)
New Revision: 5632

Modified:
   phpcompta/trunk/
Log:
Initialized merge tracking via "svnmerge" with revisions "1-5631" from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel671



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   + /phpcompta/tags/rel671:1-5631



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


From MAILER-DAEMON Mon Dec 30 10:25:17 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxeiS-0005JC-Up
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:25:17 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 16:13:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150356.1388417116.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5633 - in phpcompta/tags/rel671/include: . template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:25:15 -0000

Author: danydb
Date: 2013-12-30 16:13:16 +0100 (Mon, 30 Dec 2013)
New Revision: 5633

Modified:
   phpcompta/tags/rel671/include/class_filetosend.php
   phpcompta/tags/rel671/include/config_file.php
   phpcompta/tags/rel671/include/template/dashboard.php
Log:
Final bug

Modified: phpcompta/tags/rel671/include/class_filetosend.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel671/include/class_filetosend.php	2013-12-30 14:57:0=
5 UTC (rev 5632)
+++ phpcompta/tags/rel671/include/class_filetosend.php	2013-12-30 15:13:1=
6 UTC (rev 5633)
@@ -63,7 +63,7 @@
                 $this->type=3D"application/zip";
                 break;
             default:
-                $this->type=3D"application/octect";
+                $this->type=3D"application/octet";
         }
        =20
     }

Modified: phpcompta/tags/rel671/include/config_file.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel671/include/config_file.php	2013-12-30 14:57:05 UTC=
 (rev 5632)
+++ phpcompta/tags/rel671/include/config_file.php	2013-12-30 15:13:16 UTC=
 (rev 5633)
@@ -62,7 +62,7 @@
         /* default value */
         $ctmp=3D($os=3D=3D1)?'/tmp':'c:/tmp';
         $cpath=3D($os=3D=3D1)?'/usr/bin':'c:/phpcompta/postgresql/bin';
-        $cuser=3D'phpcompta';
+        $cuser=3D'phpcompta_sql';
         $cpasswd=3D'dany';
         $cport=3D5432;
         $cdomain=3D'';

Modified: phpcompta/tags/rel671/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel671/include/template/dashboard.php	2013-12-30 14:57=
:05 UTC (rev 5632)
+++ phpcompta/tags/rel671/include/template/dashboard.php	2013-12-30 15:13=
:16 UTC (rev 5633)
@@ -1,8 +1,71 @@
 <!-- left div -->
-<div style=3D"float:right;max-width: 49%">
+<div style=3D"float:left;max-width: 49%">
+   =20
+<div style=3D"float:left;width: 100%">
+<fieldset >
+<legend><?php echo _('Calendrier')?>
+</legend>
+<?php echo HtmlInput::calendar_zoom($obj); ?>
+<?php echo $cal->display('short'); ?>
+</fieldset>
+</div>
+<!-- Mini rapport -->
+<div style=3D"float:left;width: 100%">
+<?php
+/*
+ * Mini Report
+ */
+$report=3D$g_user->get_mini_report();
=20
+$rapport=3Dnew Acc_Report($cn);
+$rapport->id=3D$report;
+if ( $rapport->exist() =3D=3D false ) {
+  $g_user->set_mini_report(0);
+  $report=3D0;
+}
+
+if ( $report !=3D 0 ) : ?>
+<fieldset style=3D"min-height:50%;"><legend><?php echo $rapport->get_nam=
e()?></legend>
+<?php   =20
+  $exercice=3D$g_user->get_exercice();
+  if ( $exercice =3D=3D 0 ) {
+    alert(_('Aucune periode par defaut'));
+  } else {
+    $periode=3Dnew Periode($cn);
+    $limit=3D$periode->limit_year($exercice);
+
+    $result=3D$rapport->get_row($limit['start'],$limit['end'],'periode')=
;
+    $ix=3D0;
+    echo '<table border=3D"0" width=3D"100%">';
+    foreach ($result as $row) {
+      $ix++;
+	  $class=3D($ix%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
+      echo '<tr '.$class.'>';
+
+      echo '<td> '.$row['desc'].'</td>'.
+	'<td style=3D"text-align:right">'.nbm($row['montant'])." &euro;</td>";
+      echo '</tr>';
+    }
+    echo '</table>';
+  }
+  ?>
+  </fieldset>
 <?php
+  else :
+?>
+  <fieldset style=3D"height:50%;width:80%;background-color:white"><legen=
d><?php _('Aucun rapport d=C3=A9fini')?></legend>
+  <a href=3D"javascript:void(0)" class=3D"cell" onclick=3D"set_preferenc=
e('<?php echo dossier::id()?>')"><?php echo _('Cliquez ici pour mettre =C3=
=A0 jour vos pr=C3=A9f=C3=A9rences')?></a>
=20
+</fieldset>
+<?php
+endif;
+?>
+</div>
+</div>
+<div style=3D"float:left;max-width: 49%">
+
+<?php
+
 /*
  * Todo list
  */
@@ -252,71 +315,9 @@
 </div>
=20
 </div>
-<div style=3D"float:right;max-width: 49%">
-   =20
-<div style=3D"float:left;width: 100%">
-<fieldset >
-<legend><?php echo _('Calendrier')?>
-</legend>
-<?php echo HtmlInput::calendar_zoom($obj); ?>
-<?php echo $cal->display('short'); ?>
-</fieldset>
-</div>
-<!-- Mini rapport -->
-<div style=3D"float:left;width: 100%">
-<?php
-/*
- * Mini Report
- */
-$report=3D$g_user->get_mini_report();
=20
-$rapport=3Dnew Acc_Report($cn);
-$rapport->id=3D$report;
-if ( $rapport->exist() =3D=3D false ) {
-  $g_user->set_mini_report(0);
-  $report=3D0;
-}
=20
-if ( $report !=3D 0 ) : ?>
-<fieldset style=3D"min-height:50%;"><legend><?php echo $rapport->get_nam=
e()?></legend>
-<?php   =20
-  $exercice=3D$g_user->get_exercice();
-  if ( $exercice =3D=3D 0 ) {
-    alert(_('Aucune periode par defaut'));
-  } else {
-    $periode=3Dnew Periode($cn);
-    $limit=3D$periode->limit_year($exercice);
=20
-    $result=3D$rapport->get_row($limit['start'],$limit['end'],'periode')=
;
-    $ix=3D0;
-    echo '<table border=3D"0" width=3D"100%">';
-    foreach ($result as $row) {
-      $ix++;
-	  $class=3D($ix%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
-      echo '<tr '.$class.'>';
-
-      echo '<td> '.$row['desc'].'</td>'.
-	'<td style=3D"text-align:right">'.nbm($row['montant'])." &euro;</td>";
-      echo '</tr>';
-    }
-    echo '</table>';
-  }
-  ?>
-  </fieldset>
-<?php
-  else :
-?>
-  <fieldset style=3D"height:50%;width:80%;background-color:white"><legen=
d><?php _('Aucun rapport d=C3=A9fini')?></legend>
-  <a href=3D"javascript:void(0)" class=3D"cell" onclick=3D"set_preferenc=
e('<?php echo dossier::id()?>')"><?php echo _('Cliquez ici pour mettre =C3=
=A0 jour vos pr=C3=A9f=C3=A9rences')?></a>
-
-</fieldset>
-<?php
-endif;
-?>
-</div>
-</div>
-
-
 <div id=3D"add_todo_list" >
 	<script charset=3D"utf-8" type=3D"text/javascript" language=3D"javascri=
pt">
 		new Draggable($('add_todo_list'),{});



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


From MAILER-DAEMON Mon Dec 30 10:27:05 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxekD-0006Bw-NO
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:27:05 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 16:15:04 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150357.1388417224.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5634 - phpcompta/tags/rel671/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:27:03 -0000

Author: danydb
Date: 2013-12-30 16:15:04 +0100 (Mon, 30 Dec 2013)
New Revision: 5634

Modified:
   phpcompta/tags/rel671/include/class_filetosend.php
Log:
add todo

Modified: phpcompta/tags/rel671/include/class_filetosend.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel671/include/class_filetosend.php	2013-12-30 15:13:1=
6 UTC (rev 5633)
+++ phpcompta/tags/rel671/include/class_filetosend.php	2013-12-30 15:15:0=
4 UTC (rev 5634)
@@ -72,7 +72,9 @@
      */
     function compute_name($p_filename)
     {
-       =20
+        /**
+         * @todo compute a filename
+         */
     }
  =20
 }



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


From MAILER-DAEMON Mon Dec 30 10:27:57 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vxel3-000700-He
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:27:57 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 16:15:58 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150360.1388417276.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5635 - in phpcompta/trunk: . include
	include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:27:56 -0000

Author: danydb
Date: 2013-12-30 16:15:57 +0100 (Mon, 30 Dec 2013)
New Revision: 5635

Modified:
   phpcompta/trunk/
   phpcompta/trunk/include/class_filetosend.php
   phpcompta/trunk/include/config_file.php
   phpcompta/trunk/include/template/dashboard.php
Log:
Merged revisions 5633-5634 via svnmerge from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel671

........
  r5633 | danydb | 2013-12-30 16:13:16 +0100 (lun., 30 d?\195?\169c. 2013=
) | 1 line
 =20
  Final bug
........
  r5634 | danydb | 2013-12-30 16:15:04 +0100 (lun., 30 d?\195?\169c. 2013=
) | 1 line
 =20
  add todo
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel671:1-5631
   + /phpcompta/tags/rel671:1-5634

Modified: phpcompta/trunk/include/class_filetosend.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/class_filetosend.php	2013-12-30 15:15:04 UTC =
(rev 5634)
+++ phpcompta/trunk/include/class_filetosend.php	2013-12-30 15:15:57 UTC =
(rev 5635)
@@ -63,7 +63,7 @@
                 $this->type=3D"application/zip";
                 break;
             default:
-                $this->type=3D"application/octect";
+                $this->type=3D"application/octet";
         }
        =20
     }
@@ -72,7 +72,9 @@
      */
     function compute_name($p_filename)
     {
-       =20
+        /**
+         * @todo compute a filename
+         */
     }
  =20
 }

Modified: phpcompta/trunk/include/config_file.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/config_file.php	2013-12-30 15:15:04 UTC (rev =
5634)
+++ phpcompta/trunk/include/config_file.php	2013-12-30 15:15:57 UTC (rev =
5635)
@@ -62,7 +62,7 @@
         /* default value */
         $ctmp=3D($os=3D=3D1)?'/tmp':'c:/tmp';
         $cpath=3D($os=3D=3D1)?'/usr/bin':'c:/phpcompta/postgresql/bin';
-        $cuser=3D'phpcompta';
+        $cuser=3D'phpcompta_sql';
         $cpasswd=3D'dany';
         $cport=3D5432;
         $cdomain=3D'';

Modified: phpcompta/trunk/include/template/dashboard.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/dashboard.php	2013-12-30 15:15:04 UT=
C (rev 5634)
+++ phpcompta/trunk/include/template/dashboard.php	2013-12-30 15:15:57 UT=
C (rev 5635)
@@ -1,8 +1,71 @@
 <!-- left div -->
-<div style=3D"float:right;max-width: 49%">
+<div style=3D"float:left;max-width: 49%">
+   =20
+<div style=3D"float:left;width: 100%">
+<fieldset >
+<legend><?php echo _('Calendrier')?>
+</legend>
+<?php echo HtmlInput::calendar_zoom($obj); ?>
+<?php echo $cal->display('short'); ?>
+</fieldset>
+</div>
+<!-- Mini rapport -->
+<div style=3D"float:left;width: 100%">
+<?php
+/*
+ * Mini Report
+ */
+$report=3D$g_user->get_mini_report();
=20
+$rapport=3Dnew Acc_Report($cn);
+$rapport->id=3D$report;
+if ( $rapport->exist() =3D=3D false ) {
+  $g_user->set_mini_report(0);
+  $report=3D0;
+}
+
+if ( $report !=3D 0 ) : ?>
+<fieldset style=3D"min-height:50%;"><legend><?php echo $rapport->get_nam=
e()?></legend>
+<?php   =20
+  $exercice=3D$g_user->get_exercice();
+  if ( $exercice =3D=3D 0 ) {
+    alert(_('Aucune periode par defaut'));
+  } else {
+    $periode=3Dnew Periode($cn);
+    $limit=3D$periode->limit_year($exercice);
+
+    $result=3D$rapport->get_row($limit['start'],$limit['end'],'periode')=
;
+    $ix=3D0;
+    echo '<table border=3D"0" width=3D"100%">';
+    foreach ($result as $row) {
+      $ix++;
+	  $class=3D($ix%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
+      echo '<tr '.$class.'>';
+
+      echo '<td> '.$row['desc'].'</td>'.
+	'<td style=3D"text-align:right">'.nbm($row['montant'])." &euro;</td>";
+      echo '</tr>';
+    }
+    echo '</table>';
+  }
+  ?>
+  </fieldset>
 <?php
+  else :
+?>
+  <fieldset style=3D"height:50%;width:80%;background-color:white"><legen=
d><?php _('Aucun rapport d=C3=A9fini')?></legend>
+  <a href=3D"javascript:void(0)" class=3D"cell" onclick=3D"set_preferenc=
e('<?php echo dossier::id()?>')"><?php echo _('Cliquez ici pour mettre =C3=
=A0 jour vos pr=C3=A9f=C3=A9rences')?></a>
=20
+</fieldset>
+<?php
+endif;
+?>
+</div>
+</div>
+<div style=3D"float:left;max-width: 49%">
+
+<?php
+
 /*
  * Todo list
  */
@@ -252,71 +315,9 @@
 </div>
=20
 </div>
-<div style=3D"float:right;max-width: 49%">
-   =20
-<div style=3D"float:left;width: 100%">
-<fieldset >
-<legend><?php echo _('Calendrier')?>
-</legend>
-<?php echo HtmlInput::calendar_zoom($obj); ?>
-<?php echo $cal->display('short'); ?>
-</fieldset>
-</div>
-<!-- Mini rapport -->
-<div style=3D"float:left;width: 100%">
-<?php
-/*
- * Mini Report
- */
-$report=3D$g_user->get_mini_report();
=20
-$rapport=3Dnew Acc_Report($cn);
-$rapport->id=3D$report;
-if ( $rapport->exist() =3D=3D false ) {
-  $g_user->set_mini_report(0);
-  $report=3D0;
-}
=20
-if ( $report !=3D 0 ) : ?>
-<fieldset style=3D"min-height:50%;"><legend><?php echo $rapport->get_nam=
e()?></legend>
-<?php   =20
-  $exercice=3D$g_user->get_exercice();
-  if ( $exercice =3D=3D 0 ) {
-    alert(_('Aucune periode par defaut'));
-  } else {
-    $periode=3Dnew Periode($cn);
-    $limit=3D$periode->limit_year($exercice);
=20
-    $result=3D$rapport->get_row($limit['start'],$limit['end'],'periode')=
;
-    $ix=3D0;
-    echo '<table border=3D"0" width=3D"100%">';
-    foreach ($result as $row) {
-      $ix++;
-	  $class=3D($ix%2=3D=3D0)?' class=3D"even" ':' class=3D"odd" ';
-      echo '<tr '.$class.'>';
-
-      echo '<td> '.$row['desc'].'</td>'.
-	'<td style=3D"text-align:right">'.nbm($row['montant'])." &euro;</td>";
-      echo '</tr>';
-    }
-    echo '</table>';
-  }
-  ?>
-  </fieldset>
-<?php
-  else :
-?>
-  <fieldset style=3D"height:50%;width:80%;background-color:white"><legen=
d><?php _('Aucun rapport d=C3=A9fini')?></legend>
-  <a href=3D"javascript:void(0)" class=3D"cell" onclick=3D"set_preferenc=
e('<?php echo dossier::id()?>')"><?php echo _('Cliquez ici pour mettre =C3=
=A0 jour vos pr=C3=A9f=C3=A9rences')?></a>
-
-</fieldset>
-<?php
-endif;
-?>
-</div>
-</div>
-
-
 <div id=3D"add_todo_list" >
 	<script charset=3D"utf-8" type=3D"text/javascript" language=3D"javascri=
pt">
 		new Draggable($('add_todo_list'),{});



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


From MAILER-DAEMON Mon Dec 30 10:33:43 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vxeqd-0002rs-KB
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:33:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 16:21:43 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150363.1388417622.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5636 - phpcompta/tags/rel671/include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:33:41 -0000

Author: danydb
Date: 2013-12-30 16:21:42 +0100 (Mon, 30 Dec 2013)
New Revision: 5636

Modified:
   phpcompta/tags/rel671/include/template/action_search.php
Log:
Esthetic

Modified: phpcompta/tags/rel671/include/template/action_search.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel671/include/template/action_search.php	2013-12-30 1=
5:15:57 UTC (rev 5635)
+++ phpcompta/tags/rel671/include/template/action_search.php	2013-12-30 1=
5:21:42 UTC (rev 5636)
@@ -139,7 +139,7 @@
 		<input type=3D"hidden" name=3D"sa" value=3D"list">
=20
 		<?php echo  $supl_hidden?>
-		<?php echo HtmlInput::button_anchor(_('Fermer'), 'javascript:void(0)',=
 'fsearch_form', 'onclick=3D"$(\'search_action\').style.display=3D\'none\=
';"');?>
+		<?php echo HtmlInput::button_anchor(_('Fermer'), 'javascript:void(0)',=
 'fsearch_form', 'onclick=3D"$(\'search_action\').style.display=3D\'none\=
';"','smallbutton');?>
 	</form>
 </div>
=20



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


From MAILER-DAEMON Mon Dec 30 10:34:01 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vxeqv-0002su-Qa
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:34:01 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 16:22:02 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150364.1388417640.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5637 - in phpcompta/trunk: . include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:34:00 -0000

Author: danydb
Date: 2013-12-30 16:22:02 +0100 (Mon, 30 Dec 2013)
New Revision: 5637

Modified:
   phpcompta/trunk/
   phpcompta/trunk/include/template/action_search.php
Log:
Merged revisions 5636 via svnmerge from=20
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel671

........
  r5636 | danydb | 2013-12-30 16:21:42 +0100 (lun., 30 d?\195?\169c. 2013=
) | 1 line
 =20
  Esthetic
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel671:1-5634
   + /phpcompta/tags/rel671:1-5636

Modified: phpcompta/trunk/include/template/action_search.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/trunk/include/template/action_search.php	2013-12-30 15:21:4=
2 UTC (rev 5636)
+++ phpcompta/trunk/include/template/action_search.php	2013-12-30 15:22:0=
2 UTC (rev 5637)
@@ -139,7 +139,7 @@
 		<input type=3D"hidden" name=3D"sa" value=3D"list">
=20
 		<?php echo  $supl_hidden?>
-		<?php echo HtmlInput::button_anchor(_('Fermer'), 'javascript:void(0)',=
 'fsearch_form', 'onclick=3D"$(\'search_action\').style.display=3D\'none\=
';"');?>
+		<?php echo HtmlInput::button_anchor(_('Fermer'), 'javascript:void(0)',=
 'fsearch_form', 'onclick=3D"$(\'search_action\').style.display=3D\'none\=
';"','smallbutton');?>
 	</form>
 </div>
=20



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


From MAILER-DAEMON Mon Dec 30 10:44:37 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vxf1B-0005xo-Lg
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 10:44:37 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 16:32:37 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150365.1388418277.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r5638 - phpcompta/tags/rel671/html
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 15:44:36 -0000

Author: danydb
Date: 2013-12-30 16:32:36 +0100 (Mon, 30 Dec 2013)
New Revision: 5638

Modified:
   phpcompta/tags/rel671/html/index.php
Log:
version

Modified: phpcompta/tags/rel671/html/index.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- phpcompta/tags/rel671/html/index.php	2013-12-30 15:22:02 UTC (rev 563=
7)
+++ phpcompta/tags/rel671/html/index.php	2013-12-30 15:32:36 UTC (rev 563=
8)
@@ -189,7 +189,7 @@
=20
 echo '
 <span style=3D"background-color:#879ed4;color:white;padding-left:4px;pad=
ding-right:4px;">
-version  6.7 SVNINFO - '.$my_domain.'
+version  6.7.1 SVNINFO - '.$my_domain.'
 </span>
 <BR>
 <BR>



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


From MAILER-DAEMON Mon Dec 30 16:42:28 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1VxkbU-0001WK-Iw
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 16:42:28 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 30 Dec 2013 22:30:26 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150550.1388439746.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r638 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Dec 2013 21:42:26 -0000

Author: danydb
Date: 2013-12-30 22:30:25 +0100 (Mon, 30 Dec 2013)
New Revision: 638

Added:
   trunk/rapport_avance/ajax_modify_param_detail.php
Modified:
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/ajax_save_param_detail.php
   trunk/rapport_avance/include/class_formulaire_param.php
   trunk/rapport_avance/include/class_formulaire_param_detail.php
   trunk/rapport_avance/include/class_rapav.php
   trunk/rapport_avance/rapav_javascript.js
Log:
Formulaire are done

Modified: trunk/rapport_avance/ajax.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax.php	2013-12-20 15:09:20 UTC (rev 637)
+++ trunk/rapport_avance/ajax.php	2013-12-30 21:30:25 UTC (rev 638)
@@ -10,7 +10,7 @@
         'listing_modify,listing_remove_modele,listing_display_definition=
,'.
         'listing_param_add,save_param_listing,listing_detail_remove,'.
         'listing_search_code,rapav_listing_display,parameter_send_mail,s=
end_mail,'
-        . 'include_follow,include_follow_save');
+        . 'include_follow,include_follow_save,modify_param_detail');
 if ( in_array($act,$a_action ) =3D=3D true )
 {
     include 'ajax_'.$act.'.php';

Added: trunk/rapport_avance/ajax_modify_param_detail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_modify_param_detail.php	                   =
     (rev 0)
+++ trunk/rapport_avance/ajax_modify_param_detail.php	2013-12-30 21:30:25=
 UTC (rev 638)
@@ -0,0 +1,88 @@
+<?php
+
+// require_once '.php';
+require_once 'include/class_formulaire_param_detail.php';
+$errcode =3D 0;
+$fp_id =3D HtmlInput::default_value_get('fp_id', -1);
+$title=3D"none";$comment=3D"";$tab=3D'none';
+if ($fp_id !=3D -1)
+{
+    $obj =3D new Formulaire_Param_Detail_SQL($fp_id);
+    switch ($obj->type_detail)
+    {
+        // --- Formula
+        case 1:
+            $obj =3D new Rapav_Formula($fp_id);
+            $title =3D "Formule";
+            $comment=3D'
+            <p>
+                Entrez une formule avec des postes comptables, la syntax=
e est la m=C3=AAme que celle des "rapports"
+            </p>
+            <p>
+                Exemple : [70%]*0.25+[71%]
+            </p>';
+            $tab=3D'formula';
+            break;
+        // -- Poste comptable et code
+        case 2:
+            $obj =3D new RAPAV_Account_Tva($fp_id);
+            $title =3D "Poste Comptable et code TVA";
+            $tab=3D'account_tva';
+            $comment=3D'<p>
+	Entrez un poste comptable et un code de TVA
+	</p>';
+            break;
+        // -- Calcul sur formulaire
+        case 3:
+            $obj =3D new RAPAV_Compute($fp_id);
+            $title =3D "Compute";
+            $tab=3D'compute_id';
+            $comment=3D'<p>
+	Entrez une formule avec des codes utilis=C3=A9s dans ce formulaire
+	</p>';
+            break;
+        // -- Poste comptable
+        case 4:
+            $obj =3D new RAPAV_Account($fp_id);
+            $comment=3D"";
+            $tab=3D'new_account_id';
+            $title =3D "Poste comptable";
+            break;
+        // -- operation reconciliee
+        case 5:
+            $comment=3D'';
+            $obj =3D new RAPAV_Reconcile($fp_id);
+            $title =3D "Op=C3=A9rations rapproch=C3=A9es";
+            $tab=3D"new_reconcile_id";
+            break;
+        default:
+            $errcode =3D 1;
+            echo HtmlInput::title_box('Erreur', 'param_detail_div');
+            echo "Erreur type formule inconnu";
+            break;
+    }
+} else
+{
+    $errcode =3D 2;
+    echo HtmlInput::title_box('Erreur', 'param_detail_div');
+    echo _('Param=C3=A8tre invalide');
+}
+
+if ($errcode =3D=3D 0)
+{
+  echo HtmlInput::title_box($title, 'param_detail_div');
+  echo '<div class=3D"content" style=3D"padding:10px">';
+  echo $comment;
+  echo '<form method=3D"post" onsubmit=3D"save_param_detail(\'modify_par=
am_detail_frm\');return false;" id=3D"modify_param_detail_frm">';
+  $obj->input();
+  echo HtmlInput::hidden('p_id',$obj->p_id);
+  echo HtmlInput::hidden('tab',$tab);
+  echo HtmlInput::hidden('fp_id',$obj->fp_id);
+  echo HtmlInput::hidden('ac',$_REQUEST['ac']);
+  echo HtmlInput::hidden('plugin_code',$_REQUEST['plugin_code']);
+  echo Dossier::hidden();
+  echo HtmlInput::submit('save_modify_param_detail','Sauve');
+  echo '</form>';
+  echo '</div>';
+}
+?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/ajax_save_param_detail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_save_param_detail.php	2013-12-20 15:09:20 U=
TC (rev 637)
+++ trunk/rapport_avance/ajax_save_param_detail.php	2013-12-30 21:30:25 U=
TC (rev 638)
@@ -31,11 +31,11 @@
  */
 require_once 'class_impress.php';
 require_once 'include/class_formulaire_param_detail.php';
-$fp_id =3D 0;
+$fp_id =3D HtmlInput::default_value_get('fp_id', '-1');
 switch ($tab)
 {
     case 'account_tva':
-        $acc_tva =3D new RAPAV_Account_Tva();
+        $acc_tva =3D new RAPAV_Account_Tva($fp_id);
         $acc_tva->tva_id =3D $code_tva;
         $acc_tva->tmp_val =3D $formtva;
         $acc_tva->jrn_def_type =3D $code_jrn;
@@ -50,7 +50,7 @@
             $html =3D "Erreur dans la formule " . $acc_tva->errcode;
         } else
         {
-            $acc_tva->insert();
+            $acc_tva->save();
             $code =3D 'ok';
             $fp_id =3D $acc_tva->fp_id;
             $html =3D '<td>';
@@ -59,14 +59,12 @@
             $html.=3Dob_get_contents();
             ob_end_clean();
             $html.=3D '</td>';
-            $html.=3D'<td id=3D"del_' . $acc_tva->fp_id . '">';
-            $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"delete_param_detail('%s','%s','%s','%s')\""
-                                    , $_REQUEST['plugin_code'], $_REQUES=
T['ac'], $_REQUEST['gDossier'], $acc_tva->fp_id));
-            $html.=3D '</td>';
+            $html.=3D$acc_tva->button_delete();
+            $html.=3D$acc_tva->button_modify();
         }
         break;
     case 'formula':
-        $acc_formula =3D new RAPAV_Formula();
+        $acc_formula =3D new RAPAV_Formula($fp_id);
         $acc_formula->fp_formula =3D $formula_new;
         $acc_formula->p_id =3D $p_id;
         $acc_formula->type_detail =3D 1;
@@ -78,7 +76,7 @@
             $html =3D $acc_formula->errcode;
         } else
         {
-            $acc_formula->insert();
+            $acc_formula->save();
             $fp_id =3D $acc_formula->fp_id;
             $code =3D 'ok';
             $html =3D '<td>';
@@ -87,14 +85,12 @@
             $html.=3Dob_get_contents();
             ob_end_clean();
             $html.=3D '</td>';
-            $html.=3D'<td id=3D"del_' . $acc_formula->fp_id . '">';
-            $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"delete_param_detail('%s','%s','%s','%s')\""
-                                    , $_REQUEST['plugin_code'], $_REQUES=
T['ac'], $_REQUEST['gDossier'], $acc_formula->fp_id));
-            $html.=3D'</td>';
+            $html.=3D$acc_formula->button_delete();
+            $html.=3D$acc_formula->button_modify();
         }
         break;
     case 'compute_id':
-        $acc_compute =3D new RAPAV_Compute();
+        $acc_compute =3D new RAPAV_Compute($fp_id);
         $acc_compute->fp_formula =3D $form_compute;
         $acc_compute->p_id =3D $p_id;
         $acc_compute->type_detail =3D 3;
@@ -105,7 +101,7 @@
             $html =3D $acc_compute->errcode;
         } else
         {
-            $acc_compute->insert();
+            $acc_compute->save();
             $fp_id =3D $acc_compute->fp_id;
             $code =3D 'ok';
             $html =3D '<td>';
@@ -114,14 +110,12 @@
             $html.=3Dob_get_contents();
             ob_end_clean();
             $html.=3D '</td>';
-            $html.=3D'<td id=3D"del_' . $acc_compute->fp_id . '">';
-            $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"delete_param_detail('%s','%s','%s','%s')\""
-                                    , $_REQUEST['plugin_code'], $_REQUES=
T['ac'], $_REQUEST['gDossier'], $acc_compute->fp_id));
-            $html.=3D'</td>';
+            $html.=3D$acc_compute->button_delete();
+            $html.=3D$acc_compute->button_modify();
         }
         break;
     case 'new_account_id':
-        $acc_account =3D new RAPAV_Account();
+        $acc_account =3D new RAPAV_Account($fp_id);
         $acc_account->tmp_val =3D $account_first;
         $acc_account->with_tmp_val =3D $account_second;
         $acc_account->p_id =3D $p_id;
@@ -135,7 +129,7 @@
             $html =3D $acc_account->errcode;
         } else
         {
-            $acc_account->insert();
+            $acc_account->save();
             $fp_id =3D $acc_account->fp_id;
             $code =3D 'ok';
             $html =3D '<td>';
@@ -144,15 +138,13 @@
             $html.=3Dob_get_contents();
             ob_end_clean();
             $html.=3D '</td>';
-            $html.=3D'<td id=3D"del_' . $acc_account->fp_id . '">';
-            $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"delete_param_detail('%s','%s','%s','%s')\""
-                                    , $_REQUEST['plugin_code'], $_REQUES=
T['ac'], $_REQUEST['gDossier'], $acc_account->fp_id));
-            $html.=3D'</td>';
+            $html.=3D$acc_account->button_delete();
+            $html.=3D$acc_account->button_modify();
         }
         break;
=20
     case 'new_reconcile_id':
-        $acc_account =3D new RAPAV_Reconcile();
+        $acc_account =3D new RAPAV_Reconcile($fp_id);
         $acc_account->tmp_val =3D $acrec_first;
         $acc_account->with_tmp_val =3D $acrec_second;
         $acc_account->operation_pcm_val =3D $acrec_third;
@@ -166,7 +158,7 @@
             $html =3D $acc_account->errcode;
         } else
         {
-            $acc_account->insert();
+            $acc_account->save();
             $fp_id =3D $acc_account->fp_id;
             $code =3D 'ok';
             $html =3D '<td>';
@@ -175,10 +167,8 @@
             $html.=3Dob_get_contents();
             ob_end_clean();
             $html.=3D '</td>';
-            $html.=3D'<td id=3D"del_' . $acc_account->fp_id . '">';
-            $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"delete_param_detail('%s','%s','%s','%s')\""
-                                    , $_REQUEST['plugin_code'], $_REQUES=
T['ac'], $_REQUEST['gDossier'], $acc_account->fp_id));
-            $html.=3D'</td>';
+            $html.=3D$acc_account->button_delete();
+            $html.=3D$acc_account->button_modify();
         }
         break;
 }

Modified: trunk/rapport_avance/include/class_formulaire_param.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_formulaire_param.php	2013-12-20 15=
:09:20 UTC (rev 637)
+++ trunk/rapport_avance/include/class_formulaire_param.php	2013-12-30 21=
:30:25 UTC (rev 638)
@@ -408,10 +408,8 @@
 			echo '<td>';
 			echo $formula->display_row();
 			echo '</td>';
-			echo "<td id=3D\"del_" . $formula->fp_id . "\">";
-			echo HtmlInput::anchor("Effacer", "", sprintf("onclick=3D\"delete_par=
am_detail('%s','%s','%s','%s')\""
-							, $_REQUEST['plugin_code'], $_REQUEST['ac'], $_REQUEST['gDossier'=
], $formula->fp_id));
-			echo '</td>';
+                        echo $formula->button_delete();
+                        echo $formula->button_modify();
 			echo '</tr>';
 		}
 		if ($max =3D=3D 0)

Modified: trunk/rapport_avance/include/class_formulaire_param_detail.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_formulaire_param_detail.php	2013-1=
2-20 15:09:20 UTC (rev 637)
+++ trunk/rapport_avance/include/class_formulaire_param_detail.php	2013-1=
2-30 21:30:25 UTC (rev 638)
@@ -43,6 +43,61 @@
         require_once 'template/param_detail_new.php';
     }
=20
+    function button_delete()
+    {
+        $html=3D'<td id=3D"del_' . $this->fp_id . '">';
+        $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D\"d=
elete_param_detail('%s','%s','%s','%s')\""
+                                , $_REQUEST['plugin_code'], $_REQUEST['a=
c'], $_REQUEST['gDossier'], $this->fp_id));
+        $html.=3D '</td>';
+        return $html;
+    }
+    function button_modify()
+    {
+        $html=3D'<td id=3D"mod_' . $this->fp_id . '">';
+        $html.=3DHtmlInput::anchor("Modifier", "", sprintf("onclick=3D\"=
modify_param_detail('%s','%s','%s','%s')\""
+                                , $_REQUEST['plugin_code'], $_REQUEST['a=
c'], $_REQUEST['gDossier'], $this->fp_id));
+        $html.=3D '</td>';
+        return $html;
+    }
+     /**
+     * display a choice of ledger
+     * @global cn
+     */
+    function input_ledger()
+    {
+        global $cn;
+        $select =3D new ISelect('p_ledger');
+        $a_ledger =3D $cn->make_array('select jrn_def_id,jrn_def_name fr=
om jrn_def order by 2', 1);
+        $a_ledger[0]['label'] =3D '-- Tous les journaux -- ';
+        $select->value =3D $a_ledger;
+        if ( $this->fp_id !=3D -1)
+        {
+            $select->selected=3D$this->jrn_def_id;
+        }
+
+        echo '<p> Filtrage par journal ' . $select->input() . '</p>';
+    }
+
+    /**
+     * Display a select for the date
+     */
+    function input_date_paiement()
+    {
+        $s_date =3D new ISelect('p_paid');
+        $s_date->value =3D array();
+        $s_date->value[] =3D array("value" =3D> 0, "label" =3D> 'Date d\=
'op=C3=A9ration');
+        $s_date->value[] =3D array("value" =3D> 1, "label" =3D> 'Date de=
 paiement');
+        $s_date->value[] =3D array("value" =3D> 2, "label" =3D> 'Date d\=
'=C3=A9ch=C3=A9ance');
+        echo '<p> Si la date donn=C3=A9e concerne la date de paiement ou=
 d\'=C3=A9cheance, cela limitera la recherche aux journaux VEN et ACH ';
+        echo HtmlInput::infobulle(36);
+        if ( $this->fp_id !=3D -1)
+        {
+            $s_date->selected=3D$this->date_paid;
+        }
+        echo $s_date->input();
+        echo '</p>';
+    }
+
 }
=20
 class RAPAV_Formula extends Formulaire_Param_Detail
@@ -55,9 +110,13 @@
         printf("R=C3=A9sultat de la formule %s utilisant $ledger %s", $t=
his->fp_formula, $paid);
     }
=20
-    static function new_row()
+    function input()
     {
         $account =3D new IPoste("formula_new", "", "form_id");
+        if ($this->fp_id !=3D -1)=20
+        {
+            $account->value=3D$this->fp_formula;
+        }
         $account->size =3D 50;
         $account->label =3D _("Recherche poste");
         $account->set_attribute('gDossier', dossier::id());
@@ -66,15 +125,19 @@
         $account->set_attribute('noquery', 1);
         $account->set_attribute('account', $account->id);
         echo $account->input();
-        RAPAV::input_date_paiement();
-        RAPAV::input_ledger();
+         $this->input_date_paiement();
+        $this->input_ledger();
     }
-
+    static function new_row()
+    {
+        $obj=3Dnew RAPAV_Formula();
+        $obj->input();
+    }
     function verify()
     {
         global $errcode;
         $ret =3D RAPAV::verify_compute($this->fp_formula);
-        $this->errocode=3D$errcode;
+        $this->errcode =3D $errcode;
         return $ret;
     }
=20
@@ -86,13 +149,13 @@
     function display_row()
     {
         global $cn;
-        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);;
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);
         $type_total =3D $cn->get_value("select tt_label from rapport_adv=
anced.total_type where tt_id=3D$1", array($this->tt_id));
         $paid =3D RAPAV::str_date_type($this->date_paid);
         printf("Poste comptable %s avec le code tva %s (%s) dans le jour=
nal de type %s [ %s ] $ledger %s", $this->tmp_val, $this->tva_id, $this->=
tva_id, $this->jrn_def_type, $type_total, $paid);
     }
=20
-    static function new_row()
+    function input()
     {
         global $cn;
         $account =3D new IPoste("formtva", "", "formtva_id");
@@ -101,17 +164,19 @@
         $account->set_attribute('gDossier', dossier::id());
         $account->set_attribute('noquery', 1);
         $account->set_attribute('account', $account->id);
+        $account->value=3D$this->tmp_val;
=20
         $tva =3D new ITva_Popup("code_tva");
         $tva->id =3D HtmlInput::generate_id("code_tva");
         $tva->set_attribute('gDossier', dossier::id());
-
+        $tva->value=3D$this->tva_id;
         // Jrn type
         $select =3D new ISelect('code_jrn');
         $select->value =3D array(
             array('value' =3D> 'VEN', 'label' =3D> 'journaux Vente'),
             array('value' =3D> 'ACH', 'label' =3D> 'journaux Achat')
         );
+        $select->selected=3D$this->jrn_def_type;
         echo '<table>';
         echo '<tr><td>Poste comptable</td>';
         echo td($account->input());
@@ -123,14 +188,19 @@
         echo '</tr>';
         $code_base =3D new ISelect('code_base');
         $code_base->value =3D $cn->make_array("select tt_id,tt_label fro=
m rapport_advanced.total_type order by 2");
+        $code_base->selected=3D$this->tt_id;
         echo td("Type de total");
         echo td($code_base->input());
         echo '</tr>';
         echo '</table>';
-        RAPAV::input_date_paiement();
-        RAPAV::input_ledger();
+        $this->input_date_paiement();
+        $this->input_ledger();
     }
-
+    static function new_row()
+    {
+        $obj=3Dnew RAPAV_Account_Tva();
+        $obj->input();
+    }
     function verify()
     {
         global $cn;
@@ -157,21 +227,27 @@
         printf("Total des codes du formulaire %s", $this->fp_formula);
     }
=20
-    static function new_row($p_id)
+    function input()
     {
         global $cn;
-        $f_id =3D $cn->get_value("select f_id from rapport_advanced.form=
ulaire_param where p_id=3D$1", array($p_id));
+        $f_id =3D $cn->get_value("select f_id from rapport_advanced.form=
ulaire_param where p_id=3D$1", array($this->p_id));
         $account =3D new IText("form_compute");
         $account->size =3D 50;
+        $account->value=3D$this->fp_formula;
         echo $account->input();
         echo HtmlInput::button('rapav_search_code_bt', 'Cherche codes', =
sprintf(" onclick=3D\"rapav_search_code('%s','%s','%s','%s')\"", $_REQUES=
T['ac'], $_REQUEST['plugin_code'], $_REQUEST['gDossier'], $f_id));
     }
-
+    static function new_row($p_id)
+    {
+        $obj=3Dnew RAPAV_Compute();
+        $obj->p_id=3D$p_id;
+        $obj->input();
+    }
     function verify()
     {
         global $errcode;
-        $ret =3D RAPAV::verify_compute($this->p_formula);
-        $this->errocode=3D$errcode;
+        $ret =3D RAPAV::verify_compute($this->fp_formula);
+        $this->errcode =3D $errcode;
         return $ret;
     }
=20
@@ -186,21 +262,22 @@
     function display_row()
     {
         global $cn;
-        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);;
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);
         $paid =3D RAPAV::str_date_type($this->date_paid);
         $total_type_account =3D $cn->get_value('select tt_label from rap=
port_advanced.total_type_account where tt_id=3D$1', array($this->type_sum=
_account));
         printf("Total %s poste comptable %s utilis=C3=A9 avec le poste c=
omptable %s utilisant $ledger %s", $total_type_account, $this->tmp_val, $=
this->with_tmp_val, $paid);
     }
=20
-    static function new_row($p_id)
+    function input()
     {
         global $cn;
         $sum_type =3D new ISelect('account_sum_type');
         $sum_type->value =3D $cn->make_array("select tt_id, tt_label fro=
m rapport_advanced.total_type_account ");
-
+        $sum_type->selected=3D$this->type_sum_account;
         $account =3D new IPoste("account_first", "", "account_first_id")=
;
         $account->size =3D 10;
         $account->label =3D _("Recherche poste");
+        $account->value=3D$this->tmp_val;
         $account->set_attribute('gDossier', dossier::id());
         $account->set_attribute('account', $account->id);
=20
@@ -209,6 +286,7 @@
         $account_second->label =3D _("Recherche poste");
         $account_second->set_attribute('gDossier', dossier::id());
         $account_second->set_attribute('account', $account_second->id);
+        $account_second->value=3D$this->with_tmp_val;
         echo '<p>';
         echo 'Calculer ';
         echo $sum_type->input();
@@ -221,10 +299,14 @@
         echo ' utilis=C3=A9 avec le poste comptable ' . HtmlInput::infob=
ulle(203);
         echo $account_second->input();
         echo '</p>';
-        RAPAV::input_date_paiement();
-        RAPAV::input_ledger();
+         $this->input_date_paiement();
+        $this->input_ledger();
     }
-
+    static function new_row()
+    {
+        $obj=3Dnew RAPAV_Account();
+        $obj->input();
+    }
     function verify()
     {
=20
@@ -248,34 +330,38 @@
     {
         global $cn;
         $total_type_account =3D $cn->get_value('select tt_label from rap=
port_advanced.total_type_account where tt_id=3D$1', array($this->type_sum=
_account));
-        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);;
+        $ledger =3D RAPAV::get_ledger_name($this->jrn_def_id);
         printf("Total %s poste comptable %s utilis=C3=A9 avec le poste c=
omptable %s rapproch=C3=A9e dans la p=C3=A9riode donn=C3=A9e
 			avec une op=C3=A9ration utilisant le poste comptable %s  utilisant $l=
edger", $total_type_account, $this->tmp_val, $this->with_tmp_val, $this->=
operation_pcm_val);
     }
=20
-    static function new_row($p_id)
+    function input()
     {
         global $cn;
         $sum_type =3D new ISelect('account_sum_type');
         $sum_type->value =3D $cn->make_array("select tt_id, tt_label fro=
m rapport_advanced.total_type_account ");
-
+        $sum_type->selected=3D$this->type_sum_account;
         $account =3D new IPoste("acrec_first", "", "acrec_first_id");
         $account->size =3D 10;
         $account->label =3D _("Recherche poste");
         $account->set_attribute('gDossier', dossier::id());
         $account->set_attribute('account', $account->id);
+        $account->value=3D$this->tmp_val;
=20
         $account_second =3D new IPoste("acrec_second", "", "acrec_second=
_id");
         $account_second->size =3D 10;
         $account_second->label =3D _("Recherche poste");
         $account_second->set_attribute('gDossier', dossier::id());
         $account_second->set_attribute('account', $account_second->id);
-
+        $account_second->value=3D$this->with_tmp_val;
+           =20
         $account_third =3D new IPoste("acrec_third", "", "acrec_third_id=
");
         $account_third->size =3D 10;
         $account_third->label =3D _("Recherche poste");
         $account_third->set_attribute('gDossier', dossier::id());
         $account_third->set_attribute('account', $account_third->id);
+        $account_third->value=3D$this->operation_pcm_val;
+       =20
         echo '<p>';
         echo 'Calculer ';
         echo $sum_type->input();
@@ -293,9 +379,13 @@
         echo $account_third->input();
=20
         echo '</p>';
-        RAPAV::input_ledger();
+        $this->input_ledger();
     }
-
+    static function new_row()
+    {
+        $obj=3Dnew RAPAV_Reconcile();
+        $obj->input();
+    }
     function verify()
     {
=20

Modified: trunk/rapport_avance/include/class_rapav.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav.php	2013-12-20 15:09:20 UTC =
(rev 637)
+++ trunk/rapport_avance/include/class_rapav.php	2013-12-30 21:30:25 UTC =
(rev 638)
@@ -34,38 +34,9 @@
         return $ledger;
     }
=20
-    /**
-     * display a choice of ledger
-     * @global cn
-     */
-    static function input_ledger()
-    {
-        global $cn;
-        $select =3D new ISelect('p_ledger');
-        $a_ledger =3D $cn->make_array('select jrn_def_id,jrn_def_name fr=
om jrn_def order by 2', 1);
-        $a_ledger[0]['label'] =3D '-- Tous les journaux -- ';
-        $select->value =3D $a_ledger;
+  =20
=20
-        echo '<p> Filtrage par journal ' . $select->input() . '</p>';
-    }
-
     /**
-     * Display a select for the date
-     */
-    static function input_date_paiement()
-    {
-        $s_date =3D new ISelect('p_paid');
-        $s_date->value =3D array();
-        $s_date->value[] =3D array("value" =3D> 0, "label" =3D> 'Date d\=
'op=C3=A9ration');
-        $s_date->value[] =3D array("value" =3D> 1, "label" =3D> 'Date de=
 paiement');
-        $s_date->value[] =3D array("value" =3D> 2, "label" =3D> 'Date d\=
'=C3=A9ch=C3=A9ance');
-        echo '<p> Si la date donn=C3=A9e concerne la date de paiement ou=
 d\'=C3=A9cheance, cela limitera la recherche aux journaux VEN et ACH ';
-        echo HtmlInput::infobulle(36);
-        echo $s_date->input();
-        echo '</p>';
-    }
-
-    /**
      * Compute the string to display for date
      * @param $p_type
      * @return string
@@ -151,10 +122,11 @@
=20
         // remove the valid
         preg_match_all("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i", $formula,=
 $e);
-        $formula =3D preg_replace("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)\]/i"=
, '', $formula);
+        $formula =3D preg_replace("/\[([A-Z]*[0-9]*)*([0-9]*[A-Z]*)%*\]/=
i", '', $formula);
         $formula =3D preg_replace('/([0-9]+.{0,1}[0.9]*)*(\+|-|\*|\/)*/'=
, '', $formula);
         $formula =3D preg_replace('/(\(|\))/', '', $formula);
         $formula =3D preg_replace('/\s/', '', $formula);
+        $formula =3D preg_replace('/FROM=3D/', '', $formula);
=20
         // if something remains it should be a mistake
         if ($formula !=3D '')

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-20 15:09:20 UTC (rev=
 637)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-30 21:30:25 UTC (rev=
 638)
@@ -113,6 +113,41 @@
         alert("add_param_detail" + e.message);
     }
 }
+function modify_param_detail(plugin_code,ac,dossier,fp_id)
+{
+    try
+    {
+        var querystring =3D 'plugin_code=3D' + plugin_code + '&ac=3D' + =
ac + '&gDossier=3D' + dossier + '&act=3Dmodify_param_detail' + "&fp_id=3D=
" + fp_id;
+        waiting_box();
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: querystring,
+                    onFailure: error_get_predef,
+                    onSuccess: function(req) {
+                        remove_waiting_box();
+                        removeDiv('param_detail_div');
+                        var nTop =3D calcy(90);
+                        var nLeft =3D "200px";
+                        var str_style =3D "top:" + nTop + "px;left:" + n=
Left + ";width:70em;height:auto";
+                        add_div({
+                            id: 'param_detail_div',
+                            style: str_style,
+                            cssclass: 'inner_box',
+                            drag: 1
+                        });
+                        $('param_detail_div').innerHTML =3D req.response=
Text;
+                        req.responseText.evalScripts();
+                    }
+                }
+        );
+
+    } catch (e)
+    {
+        alert("add_param_detail" + e.message);
+    }
+}
 /**
  *@brief display a popup and let you select an existing code
  */
@@ -292,12 +327,18 @@
                                 var afpid =3D answer.getElementsByTagNam=
e('fp_id');
                                 var fp_id =3D afpid[0].firstChild.nodeVa=
lue;
                                 var p_id =3D ap_id[0].firstChild.nodeVal=
ue;
-                                // Ajoute une ligne avec r=C3=A9sultat
-                                var mytable =3D g("table_" + p_id).tBodi=
es[0];
-                                var nNumberRow =3D mytable.rows.length;
-                                var oRow =3D mytable.insertRow(nNumberRo=
w);
-                                oRow.id =3D "tr_" + fp_id;
-                                oRow.innerHTML =3D code_html;
+                                var update=3D$('tr_'+fp_id);
+                                if ( update=3D=3D undefined )
+                                {
+                                    // Ajoute une ligne avec r=C3=A9sult=
at
+                                    var mytable =3D g("table_" + p_id).t=
Bodies[0];
+                                    var nNumberRow =3D mytable.rows.leng=
th;
+                                    var oRow =3D mytable.insertRow(nNumb=
erRow);
+                                    oRow.id =3D "tr_" + fp_id;
+                                    oRow.innerHTML =3D code_html;
+                                } else {
+                                    $(update).innerHTML=3Dcode_html;
+                                }
                                 removeDiv('param_detail_div');
=20
                             }



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


From MAILER-DAEMON Mon Dec 30 20:28:44 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vxo8S-0004GH-BG
	for mharc-phpcompta-dev@gnu.org; Mon, 30 Dec 2013 20:28:44 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 31 Dec 2013 02:16:40 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150593.1388453323.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r639 - in trunk/rapport_avance: . include
	include/template
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Dec 2013 01:28:42 -0000

Author: danydb
Date: 2013-12-31 02:16:39 +0100 (Tue, 31 Dec 2013)
New Revision: 639

Added:
   trunk/rapport_avance/ajax_listing_detail_add.php
   trunk/rapport_avance/ajax_listing_detail_modify.php
Removed:
   trunk/rapport_avance/ajax_listing_param_add.php
Modified:
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/ajax_save_param_listing.php
   trunk/rapport_avance/include/class_rapav_listing.php
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/include/class_rapav_listing_param.php
   trunk/rapport_avance/include/template/rapav_listing_definition.php
   trunk/rapport_avance/rapav_javascript.js
Log:
Formulaire are done and Listing
Task #958 - Permettre de modifier le d?\195?\169tail introduit

Modified: trunk/rapport_avance/ajax.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax.php	2013-12-30 21:30:25 UTC (rev 638)
+++ trunk/rapport_avance/ajax.php	2013-12-31 01:16:39 UTC (rev 639)
@@ -8,9 +8,9 @@
         'mod_form,add_row_definition,mod_param,add_param_detail,'.
         'rapav_search_code,save_param_detail,rapav_declaration_display,'=
.
         'listing_modify,listing_remove_modele,listing_display_definition=
,'.
-        'listing_param_add,save_param_listing,listing_detail_remove,'.
+        'listing_detail_add,save_param_listing,listing_detail_remove,'.
         'listing_search_code,rapav_listing_display,parameter_send_mail,s=
end_mail,'
-        . 'include_follow,include_follow_save,modify_param_detail');
+        . 'include_follow,include_follow_save,modify_param_detail,listin=
g_detail_modify');
 if ( in_array($act,$a_action ) =3D=3D true )
 {
     include 'ajax_'.$act.'.php';

Copied: trunk/rapport_avance/ajax_listing_detail_add.php (from rev 638, t=
runk/rapport_avance/ajax_listing_param_add.php)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_listing_detail_add.php	                    =
    (rev 0)
+++ trunk/rapport_avance/ajax_listing_detail_add.php	2013-12-31 01:16:39 =
UTC (rev 639)
@@ -0,0 +1,23 @@
+<?php
+/**
+ * @file
+ * @brief Ajax file
+ */
+require_once 'include/class_rapav_listing.php';
+
+ob_start();
+echo HtmlInput::title_box("Nouveau param=C3=A8tre", $cin);
+$obj=3Dnew RAPAV_Listing($id);
+$obj->add_parameter($id);
+$response =3D ob_get_contents();
+ob_end_clean();
+$html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl></ctl>
+<code>$html</code>
+</data>
+EOF;
+?>       =20
\ No newline at end of file

Added: trunk/rapport_avance/ajax_listing_detail_modify.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_listing_detail_modify.php	                 =
       (rev 0)
+++ trunk/rapport_avance/ajax_listing_detail_modify.php	2013-12-31 01:16:=
39 UTC (rev 639)
@@ -0,0 +1,90 @@
+<?php
+
+require_once 'include/class_rapav_listing_formula.php';
+$id=3DHtmlInput::default_value_get('id',-1);
+if ($id =3D=3D -1 )
+{
+    $id=3DHtmlInput::default_value_get('lp_id',-1);
+}
+if ($id !=3D-1)
+{
+   =20
+    ob_start();
+    $obj=3Dnew RAPAV_Listing_Param_SQL($id);
+    $formula=3DRAPAV_Listing_Formula::make_object($obj);
+    echo HtmlInput::title_box($obj->lp_code,'listing_param_input_div_id'=
);
+    echo h2($obj->lp_comment);
+    $code=3Dnew IText('code_id',$obj->lp_code);
+    $comment=3Dnew IText('comment',$obj->lp_comment);
+    $order=3Dnew INum('order',$obj->l_order);
+    $atab=3Darray(
+        'ATTR'=3D>'new_attribute_id',
+        'ACCOUNT'=3D>'new_account_id',
+        'COMP'=3D>'compute_id',
+        'FORM'=3D>'formula'
+    )
+    ?>
+<?php echo HtmlInput::hidden("listing_id", $obj->l_id); ?>
+    <form id=3D"common_frm">
+
+        <table >
+            <tr>
+                <td>
+                    <label>Code</label>=20
+                  =20
+                </td>
+                <td>
+                    <?php echo $code->input() ?>
+                </tD>
+                <td>
+                     <p id=3D"code_id_span" class=3D"error"></p>
+                </td>
+               =20
+               =20
+            </tr>
+            <tr>
+                <td>
+                    <label>Commentaire</label>
+                </td>
+                <td>
+                    <?php echo $comment->input(); ?>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    <label>Ordre d'apparition</label>
+                </td>
+                <td>
+                    <?php echo $order->input(); ?>
+                </td>
+            </tr>
+        </table>
+    </form>
+ <span class=3D"error" id=3D"info_listing_param_input_div_id"></span>
+<?php
+    echo '<form method=3D"POST" id=3D"listing_detail_modify_frm" onsubmi=
t=3D"save_param_listing(\'listing_detail_modify_frm\'); return false;">';
+    echo $formula->input();
+    echo HtmlInput::array_to_hidden(array('act','ac','plugin_code','gDos=
sier'),$_REQUEST);
+    echo HtmlInput::hidden('tab',$atab[$formula->sig]);
+    echo HtmlInput::hidden('listing_id',$obj->l_id);
+    echo HtmlInput::hidden('lp_id',$obj->lp_id);
+   =20
+    echo '<p>';
+    echo HtmlInput::submit('save_listing_detail_modify',_('Sauver'));
+    echo '</p>';
+    echo '</form>';
+    $response =3D ob_get_clean();
+    ob_end_clean();
+ } else {
+     $response=3D'invalide id';
+ }
+ $html =3D escape_xml($response);
+header('Content-type: text/xml; charset=3DUTF-8');
+echo <<<EOF
+<?xml version=3D"1.0" encoding=3D"UTF-8"?>
+<data>
+<ctl></ctl>
+<code>$html</code>
+</data>
+EOF;
+?>       =20
\ No newline at end of file

Deleted: trunk/rapport_avance/ajax_listing_param_add.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_listing_param_add.php	2013-12-30 21:30:25 U=
TC (rev 638)
+++ trunk/rapport_avance/ajax_listing_param_add.php	2013-12-31 01:16:39 U=
TC (rev 639)
@@ -1,23 +0,0 @@
-<?php
-/**
- * @file
- * @brief Ajax file
- */
-require_once 'include/class_rapav_listing.php';
-
-ob_start();
-echo HtmlInput::title_box("Nouveau param=C3=A8tre", $cin);
-$obj=3Dnew RAPAV_Listing($id);
-$obj->add_parameter($id);
-$response =3D ob_get_contents();
-ob_end_clean();
-$html =3D escape_xml($response);
-header('Content-type: text/xml; charset=3DUTF-8');
-echo <<<EOF
-<?xml version=3D"1.0" encoding=3D"UTF-8"?>
-<data>
-<ctl></ctl>
-<code>$html</code>
-</data>
-EOF;
-?>       =20
\ No newline at end of file

Modified: trunk/rapport_avance/ajax_save_param_listing.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/ajax_save_param_listing.php	2013-12-30 21:30:25 =
UTC (rev 638)
+++ trunk/rapport_avance/ajax_save_param_listing.php	2013-12-31 01:16:39 =
UTC (rev 639)
@@ -19,8 +19,10 @@
  */
 require_once 'class_impress.php';
 require_once 'include/class_rapav_listing_param.php';
-$formula =3D new RAPAV_Listing_Param_SQL();
+$lp_id =3D HtmlInput::default_value_get('lp_id', -1);
+$formula =3D new RAPAV_Listing_Param_SQL($lp_id);
=20
+$html =3D "";
 switch ($tab)
 {
     case 'formula':
@@ -49,6 +51,7 @@
             $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"listing_detail_remove('%s','%s','%s','%s')\""
                                     , $_REQUEST['gDossier'], $_REQUEST['=
plugin_code'], $_REQUEST['ac'], $lp_id));
             $html.=3D'</td>';
+        =20
         }
         break;
     case 'compute_id':
@@ -77,6 +80,7 @@
             $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"listing_detail_remove('%s','%s','%s','%s')\""
                                     , $_REQUEST['gDossier'], $_REQUEST['=
plugin_code'], $_REQUEST['ac'], $lp_id));
             $html.=3D'</td>';
+           =20
         }
         break;
     case 'new_account_id':
@@ -105,6 +109,7 @@
             $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D=
\"listing_detail_remove('%s','%s','%s','%s')\""
                                     , $_REQUEST['gDossier'], $_REQUEST['=
plugin_code'], $_REQUEST['ac'], $lp_id));
             $html.=3D'</td>';
+           =20
         }
         break;
     case 'new_attribute_id':
@@ -124,8 +129,17 @@
         $html.=3D'<td>';
         $html.=3DHtmlInput::anchor("Effacer", "", sprintf("onclick=3D\"l=
isting_detail_remove('%s','%s','%s','%s')\"", $_REQUEST['gDossier'], $_RE=
QUEST['plugin_code'], $_REQUEST['ac'], $lp_id));
         $html.=3D'</td>';
+      =20
+
         break;
 }
+ob_start();
+ echo '<td>';
+ $obj =3D new Rapav_Listing_Param($lp_id);
+$obj->button_modify();
+echo '</td>';
+$html.=3Dob_get_clean();
+ob_end_clean();
=20
 //echo $html;exit();
 $html =3D escape_xml($html);

Modified: trunk/rapport_avance/include/class_rapav_listing.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing.php	2013-12-30 21:30=
:25 UTC (rev 638)
+++ trunk/rapport_avance/include/class_rapav_listing.php	2013-12-31 01:16=
:39 UTC (rev 639)
@@ -268,7 +268,7 @@
             'pc' =3D> $_REQUEST['plugin_code'])
         );
         $arg =3D str_replace('"', "'", $arg);
-        $button->javascript =3D 'listing_param_add(' . $arg . ')';
+        $button->javascript =3D 'listing_detail_add(' . $arg . ')';
         echo $button->input();
     }
=20
@@ -306,6 +306,6 @@
         $cat =3D $cn->get_value('select fd_description from fiche_def wh=
ere fd_id=3D$1', array($this->data->getp('fiche_def_id')));
         return $cat;
     }
+   =20
=20
-
 }

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
30 21:30:25 UTC (rev 638)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
31 01:16:39 UTC (rev 639)
@@ -73,9 +73,6 @@
             case 'COMP':
                 $ret =3D new Rapav_Formula_Compute($obj);
                 break;
-            case 'COMP':
-                $ret =3D new Rapav_Formula_Histo($obj);
-                break;
             default:
                 throw new Exception('Object ' . var_export($obj, true) .=
 ' invalide ');
                 break;
@@ -113,12 +110,50 @@
         $this->fiche->f_id =3D $f_id;
     }
=20
-
     function filter_operation($param)
     {
         $this->type_operation =3D $param;
     }
=20
+    /**
+     * display a choice of ledger
+     * @global cn
+     */
+    function input_ledger()
+    {
+        global $cn;
+        $select =3D new ISelect('p_ledger');
+        $a_ledger =3D $cn->make_array('select jrn_def_id,jrn_def_name fr=
om jrn_def order by 2', 1);
+        $a_ledger[0]['label'] =3D '-- Tous les journaux -- ';
+        $select->value =3D $a_ledger;
+        if ($this->data->lp_id!=3D -1)
+        {
+            $select->selected =3D $this->data->jrn_def_id;
+        }
+
+        echo '<p> Filtrage par journal ' . $select->input() . '</p>';
+    }
+
+    /**
+     * Display a select for the date
+     */
+    function input_date_paiement()
+    {
+        $s_date =3D new ISelect('p_paid');
+        $s_date->value =3D array();
+        $s_date->value[] =3D array("value" =3D> 0, "label" =3D> 'Date d\=
'op=C3=A9ration');
+        $s_date->value[] =3D array("value" =3D> 1, "label" =3D> 'Date de=
 paiement');
+        $s_date->value[] =3D array("value" =3D> 2, "label" =3D> 'Date d\=
'=C3=A9ch=C3=A9ance');
+        echo '<p> Si la date donn=C3=A9e concerne la date de paiement ou=
 d\'=C3=A9cheance, cela limitera la recherche aux journaux VEN et ACH ';
+        echo HtmlInput::infobulle(36);
+        if ($this->data->lp_id !=3D -1)
+        {
+            $s_date->selected =3D $this->data->date_paid;
+        }
+        echo $s_date->input();
+        echo '</p>';
+    }
+
 }
=20
 ////////////////////////////////////////////////////////////////////////=
///////////////////////////
@@ -289,17 +324,17 @@
         switch ($this->type_operation)
         {
             case 0:
-                /*--all operation --*/
-                $sql_filter_operation=3D"";
+                /* --all operation -- */
+                $sql_filter_operation =3D "";
                 break;
             case '1':
-                /* -- only paid --*/
-                $sql_filter_operation=3D" and j_id in (select j_id from =
jrnx join=20
+                /* -- only paid -- */
+                $sql_filter_operation =3D " and j_id in (select j_id fro=
m jrnx join=20
                     jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'paid')=
";
                 break;
             case '2':
-                /*-- only unpaid --*/
-                $sql_filter_operation=3D" and j_id in (select j_id from =
jrnx join=20
+                /* -- only unpaid -- */
+                $sql_filter_operation =3D " and j_id in (select j_id fro=
m jrnx join=20
                     jrn on (j_grpt=3Djr_grpt_id)=20
                     join jrn_def on (jrn_def_id=3Djr_def_id)
                     where coalesce(jr_rapt,'')=3D'' and jrn_def_type in =
('ACH','VEN'))";
@@ -336,9 +371,10 @@
         $account->set_attribute('no_overwrite', 1);
         $account->set_attribute('noquery', 1);
         $account->set_attribute('account', "formula_input_id");
+        $account->value=3D$this->data->fp_formula;
         echo $account->input();
-        RAPAV::input_date_paiement();
-        RAPAV::input_ledger();
+        $this->input_date_paiement();
+        $this->input_ledger();
     }
=20
     function save($p_array)
@@ -447,18 +483,19 @@
                                 ld.lc_id=3D$1=20
                                 and lp.lp_code=3D$2
                                 and lf.f_id =3D $3
-                                ', array($this->detail->lc_id, $search,$=
this->fiche->f_id));
+                                ', array($this->detail->lc_id, $search, =
$this->fiche->f_id));
             $formula =3D str_replace($piece, $value, $formula);
         }
         /** Protect against division by zero */
-        if ( strpos("1".$formula,"/0.0000") !=3D 0)
+        if (strpos("1" . $formula, "/0.0000") !=3D 0)
         {
-            $amount=3D0;
-        } else {
+            $amount =3D 0;
+        } else
+        {
             eval('$amount =3D ' . $formula . ';');
         }
         //
-        $this->detail->ld_value_numeric=3D $amount;
+        $this->detail->ld_value_numeric =3D $amount;
     }
=20
     function input()
@@ -466,6 +503,7 @@
         global $cn;
         $f_id =3D $this->data->getp('listing_id');
         $account =3D new IText("form_compute");
+        $account->value=3D$this->data->fp_formula;
         $account->size =3D 50;
         echo $account->input();
         echo HtmlInput::button('listing_search_code_bt', 'Cherche codes'=
, sprintf(" onclick=3D\"listing_search_code('%s','%s','%s','%s')\"", $_RE=
QUEST['ac'], $_REQUEST['plugin_code'], $_REQUEST['gDossier'], $f_id));
@@ -555,20 +593,16 @@
     {
         $ledger =3D RAPAV::get_ledger_name($this->data->jrn_def_id);
         $paid =3D RAPAV::str_date_type($this->data->date_paid);
-        $a_sum=3Dexplode(',','invalid,D=C3=A9bit,Cr=C3=A9dit,D=C3=A9bit-=
Cr=C3=A9dit,Cr=C3=A9dit-D=C3=A9bit');
-        $sumof=3D($this->data->lp_card_saldo=3D=3D0)?" du poste comptabl=
e":"de la fiche";
-        $str =3D sprintf("%s %s %s utilisant $ledger %s",=20
-                $a_sum[$this->data->type_sum_account],
-                $sumof,
-                $this->data->fp_formula,=20
-                $paid);
+        $a_sum =3D explode(',', 'invalid,D=C3=A9bit,Cr=C3=A9dit,D=C3=A9b=
it-Cr=C3=A9dit,Cr=C3=A9dit-D=C3=A9bit');
+        $sumof =3D ($this->data->lp_card_saldo =3D=3D 0) ? " du poste co=
mptable" : "de la fiche";
+        $str =3D sprintf("%s %s %s utilisant $ledger %s", $a_sum[$this->=
data->type_sum_account], $sumof, $this->data->fp_formula, $paid);
         return $str;
     }
=20
     function compute($p_start, $p_end)
     {
         global $cn;
-        $this->histo=3Darray();
+        $this->histo =3D array();
         $filter_ledger =3D "";
         if ($this->data->jrn_def_id !=3D "")
         {
@@ -576,21 +610,21 @@
         }
=20
         $card_saldo =3D ($this->data->lp_card_saldo =3D=3D 0) ? "jrn1" :=
 "jrn2";
-        $sql_date =3D RAPAV::get_sql_date($this->data->date_paid,$card_s=
aldo);
-         switch ($this->type_operation)
+        $sql_date =3D RAPAV::get_sql_date($this->data->date_paid, $card_=
saldo);
+        switch ($this->type_operation)
         {
             case 0:
-                /*--all operation --*/
-                $sql_filter_operation=3D"";
+                /* --all operation -- */
+                $sql_filter_operation =3D "";
                 break;
             case '1':
-                /* -- only paid --*/
-                $sql_filter_operation=3D" and $card_saldo.j_id in (selec=
t j_id from jrnx join=20
+                /* -- only paid -- */
+                $sql_filter_operation =3D " and $card_saldo.j_id in (sel=
ect j_id from jrnx join=20
                     jrn on (j_grpt=3Djr_grpt_id) where jr_rapt=3D'paid')=
";
                 break;
             case '2':
-                /*-- only unpaid --*/
-                $sql_filter_operation=3D" and $card_saldo.j_id in (selec=
t j_id from jrnx join=20
+                /* -- only unpaid -- */
+                $sql_filter_operation =3D " and $card_saldo.j_id in (sel=
ect j_id from jrnx join=20
                     jrn on (j_grpt=3Djr_grpt_id)=20
                     join jrn_def on (jrn_def_id=3Djr_def_id)
                     where coalesce(jr_rapt,'')=3D'' and jrn_def_type in =
('ACH','VEN'))";
@@ -618,21 +652,20 @@
                                 $sql_filter_operation   =20
                                 ) as tv_amount
 							 ";
-                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
 ".$sql, array(
+                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
 " . $sql, array(
                     $this->data->fp_formula,
                     $p_start,
                     $p_end,
                     $this->fiche->f_id
                 ));
-                if ($this->data->lp_histo =3D=3D 1 )=20
+                if ($this->data->lp_histo =3D=3D 1)
                 {
-                    $this->histo=3D$cn->get_array("select distinct jr_id=
 from=20
-                        jrn join $sql on (j_grpt=3Djr_grpt_id) ",array (
+                    $this->histo =3D $cn->get_array("select distinct jr_=
id from=20
+                        jrn join $sql on (j_grpt=3Djr_grpt_id) ", array(
                         $this->data->fp_formula,
                         $p_start,
                         $p_end,
                         $this->fiche->f_id));
-
                 }
                 // if C-D is asked then reverse the result
                 if ($this->data->type_sum_account =3D=3D 2)
@@ -656,21 +689,20 @@
                                 $sql_filter_operation
                                 ) as tv_amount
 							 ";
-                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
".$sql, array(
+                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
" . $sql, array(
                     $this->data->fp_formula,
                     $p_start,
                     $p_end,
                     $this->fiche->f_id
                 ));
-               if ($this->data->lp_histo =3D=3D 1 )=20
+                if ($this->data->lp_histo =3D=3D 1)
                 {
-                    $this->histo=3D$cn->get_array("select distinct jr_id=
 from=20
-                        jrn join $sql on (j_grpt=3Djr_grpt_id) ",array (
+                    $this->histo =3D $cn->get_array("select distinct jr_=
id from=20
+                        jrn join $sql on (j_grpt=3Djr_grpt_id) ", array(
                         $this->data->fp_formula,
                         $p_start,
                         $p_end,
                         $this->fiche->f_id));
-
                 }
=20
                 break;
@@ -692,21 +724,20 @@
                                 $sql_filter_operation
                                 ) as tv_amount
 							 ";
-                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
 ".$sql, array(
+                $amount =3D $cn->get_value("select sum(jrnx_amount) from=
 " . $sql, array(
                     $this->data->fp_formula,
                     $p_start,
                     $p_end,
                     $this->fiche->f_id
                 ));
-               if ($this->data->lp_histo =3D=3D 1 )=20
+                if ($this->data->lp_histo =3D=3D 1)
                 {
-                    $this->histo=3D$cn->get_array("select distinct jr_id=
 from=20
-                        jrn join $sql on (j_grpt=3Djr_grpt_id) ",array (
+                    $this->histo =3D $cn->get_array("select distinct jr_=
id from=20
+                        jrn join $sql on (j_grpt=3Djr_grpt_id) ", array(
                         $this->data->fp_formula,
                         $p_start,
                         $p_end,
                         $this->fiche->f_id));
-
                 }
=20
                 break;
@@ -720,22 +751,24 @@
         /*
          * 4 possibilities with type_sum_account
          */
-        if ($amount=3D=3D"") $amount=3D0;
+        if ($amount =3D=3D "")
+            $amount =3D 0;
         $this->detail->ld_value_numeric =3D $amount;
     }
+
     function save_computed()
     {
         parent::save_computed();
         /*
          * Save history now
          */
-        if ($this->data->lp_histo =3D=3D 1 )=20
+        if ($this->data->lp_histo =3D=3D 1)
         {
-            for ($e=3D0;$e<  count($this->histo);$e++)
+            for ($e =3D 0; $e < count($this->histo); $e++)
             {
-                $histo=3Dnew RAPAV_Listing_Compute_Historique_SQL();
-                $histo->jr_id=3D$this->histo[$e]['jr_id'];
-                $histo->ld_id=3D$this->detail->ld_id;
+                $histo =3D new RAPAV_Listing_Compute_Historique_SQL();
+                $histo->jr_id =3D $this->histo[$e]['jr_id'];
+                $histo->ld_id =3D $this->detail->ld_id;
                 $histo->save();
                 unset($histo);
             }
@@ -745,30 +778,33 @@
     function input()
     {
         global $cn;
-        $histo_operation=3Dnew ICheckBox('histo');
+        $histo_operation =3D new ICheckBox('histo');
+        $histo_operation->set_check( $this->data->lp_histo);
         $account =3D new IPoste("p_formula", "", "formula_acc_input_id")=
;
         $account->label =3D _("Recherche poste");
         $account->set_attribute('gDossier', dossier::id());
         $account->set_attribute('account', "formula_acc_input_id");
+        $account->value=3D$this->data->fp_formula;
         echo "Poste comptable utilis=C3=A9e avec chaque fiche " . $accou=
nt->input();
         $sel_total_type_row =3D new ISelect('tt_id');
         $sel_total_type_row->value =3D $cn->make_array('select tt_id,tt_=
label from '
                 . ' rapport_advanced.total_type_account order by 2');
-
+        $sel_total_type_row->selected=3D$this->data->tt_id;
         echo '<p>';
         echo "Reprendre historique op=C3=A9ration: " . $histo_operation-=
>input();
         echo '</p>';
-       =20
+
         echo '<p>';
         echo "type de total : " . $sel_total_type_row->input();
         echo '</p>';
=20
         $ck =3D new ICheckBox('card_saldo');
+        $ck->set_check($this->data->lp_card_saldo);
         echo '<p>';
         echo 'Prendre le total de la fiche ' . $ck->input();
         echo '</p>';
-        RAPAV::input_date_paiement();
-        RAPAV::input_ledger();
+        $this->input_date_paiement();
+        $this->input_ledger();
     }
=20
     function save($p_array)

Modified: trunk/rapport_avance/include/class_rapav_listing_param.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_param.php	2013-12-30=
 21:30:25 UTC (rev 638)
+++ trunk/rapport_avance/include/class_rapav_listing_param.php	2013-12-31=
 01:16:39 UTC (rev 639)
@@ -92,4 +92,25 @@
         $attribute->set_listing($p_id);
         require 'template/listing_param_input.php';
     }
+    function button_delete()
+    {
+         $json =3D sprintf(" onclick=3D\"listing_detail_remove('%s','%s'=
,'%s','%s')\"",=20
+            Dossier::id(),=20
+            $_REQUEST['plugin_code'],=20
+            $_REQUEST['ac'],=20
+            $this->Param->getp('lp_id') );
+         echo HtmlInput::anchor("Effacer", "", $json);
+    }
+    function button_modify()
+    {
+        $json=3Djson_encode(array('pc'=3D>$_REQUEST['plugin_code'],
+            'ac'=3D>$_REQUEST['ac'],
+            'gDossier'=3D>Dossier::id(),
+            'id'=3D>$this->Param->getp('lp_id'),
+            'cin'=3D>'listing_param_input_div_id'));
+        $json=3D  str_replace('"', "'", $json);
+         $js =3D sprintf(" onclick=3D\"listing_detail_modify(%s)\"",=20
+                 $json             );
+         echo HtmlInput::anchor("Modifier", "", $js);
+    }
 }

Modified: trunk/rapport_avance/include/template/rapav_listing_definition.=
php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/template/rapav_listing_definition.php	20=
13-12-30 21:30:25 UTC (rev 638)
+++ trunk/rapport_avance/include/template/rapav_listing_definition.php	20=
13-12-31 01:16:39 UTC (rev 639)
@@ -57,14 +57,14 @@
             </td>
             <td>
     <?php
-    $json =3D sprintf(" onclick=3D\"listing_detail_remove('%s','%s','%s'=
,'%s')\"",=20
-            Dossier::id(),=20
-            $_REQUEST['plugin_code'],=20
-            $_REQUEST['ac'],=20
-            $this->a_detail[$i]->Param->getp('lp_id') );
-    echo HtmlInput::anchor("Effacer", "", $json)
+    echo $this->a_detail[$i]->button_delete();
     ?>
             </td>
+            <td>
+    <?php
+    echo $this->a_detail[$i]->button_modify();
+    ?>
+            </td>
=20
         </tr>
=20

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-30 21:30:25 UTC (rev=
 638)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-31 01:16:39 UTC (rev=
 639)
@@ -113,7 +113,7 @@
         alert("add_param_detail" + e.message);
     }
 }
-function modify_param_detail(plugin_code,ac,dossier,fp_id)
+function modify_param_detail(plugin_code, ac, dossier, fp_id)
 {
     try
     {
@@ -327,8 +327,8 @@
                                 var afpid =3D answer.getElementsByTagNam=
e('fp_id');
                                 var fp_id =3D afpid[0].firstChild.nodeVa=
lue;
                                 var p_id =3D ap_id[0].firstChild.nodeVal=
ue;
-                                var update=3D$('tr_'+fp_id);
-                                if ( update=3D=3D undefined )
+                                var update =3D $('tr_' + fp_id);
+                                if (update =3D=3D undefined)
                                 {
                                     // Ajoute une ligne avec r=C3=A9sult=
at
                                     var mytable =3D g("table_" + p_id).t=
Bodies[0];
@@ -337,7 +337,7 @@
                                     oRow.id =3D "tr_" + fp_id;
                                     oRow.innerHTML =3D code_html;
                                 } else {
-                                    $(update).innerHTML=3Dcode_html;
+                                    $(update).innerHTML =3D code_html;
                                 }
                                 removeDiv('param_detail_div');
=20
@@ -653,6 +653,47 @@
=20
     }
 }
+function listing_detail_modify(json)
+{
+    try {
+        var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_detail_modify' + "=
&cin=3D" + json.cin + '&id=3D' + json.id;
+        waiting_box();
+        var action =3D new Ajax.Request(
+                "ajax.php",
+                {
+                    method: 'get',
+                    parameters: querystring,
+                    onFailure: error_get_predef,
+                    onSuccess: function(req) {
+                        try {
+                            var answer =3D req.responseXML;
+                            var a =3D answer.getElementsByTagName('ctl')=
;
+                            var html =3D answer.getElementsByTagName('co=
de');
+                            if (a.length =3D=3D 0) {
+                                var rec =3D req.responseText;
+                                throw 'cannot find ctl element';
+                            }
+                            remove_waiting_box();
+                            var code_html =3D getNodeText(html[0]);
+                            code_html =3D unescape_xml(code_html);
+                            var position =3D fixed_position(451, 217) + =
';width:50%';
+                            add_div({'id': json.cin, 'cssclass': 'inner_=
box', 'drag': 1, 'style': position});
+                            $(json.cin).innerHTML =3D code_html;
+
+                        } catch (e) {
+                            alert(e.message);
+                        }
+                        code_html.evalScripts();
+                    }
+                }
+        );
+
+    } catch (e)
+    {
+        alert(e.message);
+
+    }
+}
 /**
  * @brief display a form for adding a parameter to the current listing
  * @param  json
@@ -663,10 +704,10 @@
  *     - ac       the AC code
  *     - pc       plugin_code
  */
-function listing_param_add(json)
+function listing_detail_add(json)
 {
     try {
-        var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_param_add' + "&cin=
=3D" + json.cin + '&id=3D' + json.id;
+        var querystring =3D 'plugin_code=3D' + json.pc + '&ac=3D' + json=
.ac + '&gDossier=3D' + json.gDossier + '&act=3Dlisting_detail_add' + "&ci=
n=3D" + json.cin + '&id=3D' + json.id;
         waiting_box();
         var action =3D new Ajax.Request(
                 "ajax.php",
@@ -689,7 +730,7 @@
                             var position =3D fixed_position(451, 217) + =
';width:50%';
                             add_div({'id': json.cin, 'cssclass': 'inner_=
box', 'drag': 1, 'style': position});
                             $(json.cin).innerHTML =3D code_html;
-                         =20
+
                         } catch (e) {
                             alert(e.message);
                         }
@@ -713,14 +754,14 @@
     /**
      * code_id can not be empty
      */
-    if ( $('code_id').value.trim()=3D=3D'') {
-       $('code_id').style.border=3D"solid 2px red";
-       $('code_id_span').innerHTML=3D' Code ne peut pas =C3=AAtre vide';
+    if ($('code_id').value.trim() =3D=3D '') {
+        $('code_id').style.border =3D "solid 2px red";
+        $('code_id_span').innerHTML =3D ' Code ne peut pas =C3=AAtre vid=
e';
         return false;
     }
     try
     {
-        var qs =3D $(p_form_id).serialize() + '&act=3Dsave_param_listing=
&'+$('common_frm').serialize();
+        var qs =3D $(p_form_id).serialize() + '&act=3Dsave_param_listing=
&' + $('common_frm').serialize();
         waiting_box();
         var action =3D new Ajax.Request(
                 "ajax.php",
@@ -728,13 +769,18 @@
                     method: 'get',
                     parameters: qs,
                     onFailure: error_get_predef,
-                    onSuccess: function (req, json) {
+                    onSuccess: function(req, json) {
                         try {
                             remove_waiting_box();
+                             console.log(775);
                             var answer =3D req.responseXML;
+                             console.log(777);
                             var acode =3D answer.getElementsByTagName('c=
ode');
+                             console.log(778);
                             var ap_id =3D answer.getElementsByTagName('l=
_id');
+                             console.log(779);
                             var html =3D answer.getElementsByTagName('ht=
ml');
+                             console.log(780);
=20
                             if (acode.length =3D=3D 0) {
                                 var rec =3D req.responseText;
@@ -745,15 +791,23 @@
                             var code_html =3D unescape_xml(code_xml);
                             if (code =3D=3D 'ok')
                             {
+                                console.log('ok');
                                 var afpid =3D answer.getElementsByTagNam=
e('lp_id');
                                 var fp_id =3D afpid[0].firstChild.nodeVa=
lue;
                                 var p_id =3D ap_id[0].firstChild.nodeVal=
ue;
-                                // Ajoute une ligne avec r=C3=A9sultat
-                                var mytable =3D g("definition_tb_id").tB=
odies[0];
-                                var nNumberRow =3D mytable.rows.length;
-                                var oRow =3D mytable.insertRow(nNumberRo=
w);
-                                oRow.id =3D "tr_" + fp_id;
-                                oRow.innerHTML =3D code_html;
+                                var update =3D $('tr_' + fp_id);
+                                if (update =3D=3D undefined)
+                                {
+                                    // Ajoute une ligne avec r=C3=A9sult=
at
+                                    var mytable =3D g("definition_tb_id"=
).tBodies[0];
+                                    var nNumberRow =3D mytable.rows.leng=
th;
+                                    var oRow =3D mytable.insertRow(nNumb=
erRow);
+                                    oRow.id =3D "tr_" + fp_id;
+                                    oRow.innerHTML =3D code_html;
+                                }
+                                else {
+                                    update.innerHTML =3D code_html;
+                                }
                                 removeDiv('listing_param_input_div_id');
=20
                             }
@@ -765,12 +819,15 @@
                         }
                         catch (e) {
                             alert("save_param_detail " + e.message);
+                            console.log(e.message);
+                            return false;
                         }
                         try {
                             code_html.evalScripts();
                         }
                         catch (e) {
                             alert("save_param_detail Impossible executer=
 script de la reponse\n" + e.message);
+                            console.log(e.message);
                         }
=20
                     }
@@ -780,18 +837,19 @@
     catch (e)
     {
         alert(e.message);
+        return false;
     }
=20
     return false;
 }
-function listing_detail_remove(dossier,plugin_code,ac,id)
+function listing_detail_remove(dossier, plugin_code, ac, id)
 {
-    if ( confirm('Confirmez-vous effacer ce d=C3=A9tail ?') =3D=3D false=
 )
+    if (confirm('Confirmez-vous effacer ce d=C3=A9tail ?') =3D=3D false)
     {
         return;
     }
     try {
-        var query=3D'plugin_code=3D' + plugin_code+ '&ac=3D' + ac+ '&gDo=
ssier=3D' +dossier+ '&act=3Dlisting_detail_remove' + "&id=3D"+id;
+        var query =3D 'plugin_code=3D' + plugin_code + '&ac=3D' + ac + '=
&gDossier=3D' + dossier + '&act=3Dlisting_detail_remove' + "&id=3D" + id;
         waiting_box();
         var action =3D new Ajax.Request(
                 "ajax.php",
@@ -799,7 +857,7 @@
                     method: 'get',
                     parameters: query,
                     onFailure: error_get_predef,
-                    onSuccess: function (req, json) {
+                    onSuccess: function(req, json) {
                         try {
                             remove_waiting_box();
                             var answer =3D req.responseXML;
@@ -811,13 +869,13 @@
                                 alert('erreur :' + rec);
                             }
                             var code =3D acode[0].firstChild.nodeValue;
-                           =20
+
                             if (code =3D=3D 'ok')
                             {
-                                var row=3D$('tr_'+id);
-                                row.style.color=3D"red";
-                                row.style.textDecoration=3D'line-through=
';
-                                row.cells[row.cells.length-1].innerHTML=3D=
"";
+                                var row =3D $('tr_' + id);
+                                row.style.color =3D "red";
+                                row.style.textDecoration =3D 'line-throu=
gh';
+                                row.cells[row.cells.length - 1].innerHTM=
L =3D "";
=20
                             }
                             if (code =3D=3D 'nok')
@@ -833,7 +891,7 @@
                     }
                 }
         );
-    } catch(e)
+    } catch (e)
     {
         alert(e.message);
     }
@@ -970,15 +1028,27 @@
     {
         alert(e.message);
         return false;
-       =20
+
     }
 }
 function send_email()
 {
-    if (trim($('p_from').value)=3D=3D"") { alert('champs obligatoire man=
quant'); $('p_from').style.border=3D"solid 2px red";return false;}
-    if (trim($('p_subject').value)=3D=3D"") { alert('champs obligatoire =
manquant'); $('p_subject').style.border=3D"solid 2px red";return false;}
-    if (trim($('p_attach').value)=3D=3D"") { alert('champs obligatoire m=
anquant'); $('p_attach').style.border=3D"solid 2px red";return false;}
-   try {
+    if (trim($('p_from').value) =3D=3D "") {
+        alert('champs obligatoire manquant');
+        $('p_from').style.border =3D "solid 2px red";
+        return false;
+    }
+    if (trim($('p_subject').value) =3D=3D "") {
+        alert('champs obligatoire manquant');
+        $('p_subject').style.border =3D "solid 2px red";
+        return false;
+    }
+    if (trim($('p_attach').value) =3D=3D "") {
+        alert('champs obligatoire manquant');
+        $('p_attach').style.border =3D "solid 2px red";
+        return false;
+    }
+    try {
         var qs =3D $('parameter_send_email_input_frm').serialize(false);
         waiting_box();
         var action =3D new Ajax.Request(
@@ -1011,12 +1081,12 @@
     {
         alert(e.message);
         return false;
-       =20
+
     }
 }
 function js_include_follow()
 {
-   try {
+    try {
         var qs =3D $('include_follow_frm').serialize(false);
         waiting_box();
         var action =3D new Ajax.Request(
@@ -1048,12 +1118,12 @@
     {
         alert(e.message);
         return false;
-       =20
+
     }
 }
 function js_include_follow_save()
 {
-   try {
+    try {
         var qs =3D $('include_follow_save_frm').serialize(false);
         waiting_box();
         var action =3D new Ajax.Request(
@@ -1086,6 +1156,6 @@
     {
         alert(e.message);
         return false;
-       =20
+
     }
 }
\ No newline at end of file



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


From MAILER-DAEMON Tue Dec 31 09:38:59 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vy0TD-0003ww-Dg
	for mharc-phpcompta-dev@gnu.org; Tue, 31 Dec 2013 09:38:59 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 31 Dec 2013 15:26:57 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150882.1388500738.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r640 - in trunk/rapport_avance: . include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Dec 2013 14:38:58 -0000

Author: danydb
Date: 2013-12-31 15:26:56 +0100 (Tue, 31 Dec 2013)
New Revision: 640

Modified:
   trunk/rapport_avance/include/class_rapav_listing_formula.php
   trunk/rapport_avance/rapav_javascript.js
Log:
remove debug + update doc

Modified: trunk/rapport_avance/include/class_rapav_listing_formula.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
31 01:16:39 UTC (rev 639)
+++ trunk/rapport_avance/include/class_rapav_listing_formula.php	2013-12-=
31 14:26:56 UTC (rev 640)
@@ -172,11 +172,11 @@
     var $data;
=20
     /**
-     * < RAPAV_Listing_Compute_SQL object */
+     * < RAPAV_Listing_Compute_Fiche_SQL object */
     var $fiche;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Detail_SQL object */
     var $detail;
=20
     /**
@@ -287,7 +287,7 @@
     var $data;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Fiche_SQL object */
     var $fiche;
=20
     /**
@@ -296,7 +296,7 @@
     var $sig;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Detail_SQL object */
     var $detail;
=20
     function __construct(RAPAV_Listing_Param_SQL $obj, $p_cat_id =3D 0)
@@ -429,7 +429,7 @@
     var $data;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Fiche_SQL object */
     var $fiche;
=20
     /**
@@ -438,7 +438,7 @@
     var $sig;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Detail_SQL object */
     var $detail;
=20
     function __construct(RAPAV_Listing_Param_SQL $obj)
@@ -557,7 +557,8 @@
  *   - fp_formula
  *   - jrn_def_id
  *   - date_paid
- *   - tt
+ *   - lp_card_saldo
+ *   - type_sum_account
  * =20
  */
 class RAPAV_Formula_Account extends RAPAV_Listing_Formula
@@ -568,7 +569,7 @@
     var $data;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Fiche_SQL */
     var $fiche;
=20
     /**
@@ -577,7 +578,7 @@
     var $sig;
=20
     /**
-     * < RAPAV_Listing_Detail_SQL object */
+     * < RAPAV_Listing_Compute_Detail_SQL object */
     var $detail;
=20
     function __construct(RAPAV_Listing_Param_SQL $obj)
@@ -789,7 +790,7 @@
         $sel_total_type_row =3D new ISelect('tt_id');
         $sel_total_type_row->value =3D $cn->make_array('select tt_id,tt_=
label from '
                 . ' rapport_advanced.total_type_account order by 2');
-        $sel_total_type_row->selected=3D$this->data->tt_id;
+        $sel_total_type_row->selected=3D$this->data->type_sum_account;
         echo '<p>';
         echo "Reprendre historique op=C3=A9ration: " . $histo_operation-=
>input();
         echo '</p>';

Modified: trunk/rapport_avance/rapav_javascript.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/rapav_javascript.js	2013-12-31 01:16:39 UTC (rev=
 639)
+++ trunk/rapport_avance/rapav_javascript.js	2013-12-31 14:26:56 UTC (rev=
 640)
@@ -772,15 +772,10 @@
                     onSuccess: function(req, json) {
                         try {
                             remove_waiting_box();
-                             console.log(775);
                             var answer =3D req.responseXML;
-                             console.log(777);
                             var acode =3D answer.getElementsByTagName('c=
ode');
-                             console.log(778);
                             var ap_id =3D answer.getElementsByTagName('l=
_id');
-                             console.log(779);
                             var html =3D answer.getElementsByTagName('ht=
ml');
-                             console.log(780);
=20
                             if (acode.length =3D=3D 0) {
                                 var rec =3D req.responseText;
@@ -791,7 +786,6 @@
                             var code_html =3D unescape_xml(code_xml);
                             if (code =3D=3D 'ok')
                             {
-                                console.log('ok');
                                 var afpid =3D answer.getElementsByTagNam=
e('lp_id');
                                 var fp_id =3D afpid[0].firstChild.nodeVa=
lue;
                                 var p_id =3D ap_id[0].firstChild.nodeVal=
ue;
@@ -819,7 +813,6 @@
                         }
                         catch (e) {
                             alert("save_param_detail " + e.message);
-                            console.log(e.message);
                             return false;
                         }
                         try {
@@ -827,7 +820,6 @@
                         }
                         catch (e) {
                             alert("save_param_detail Impossible executer=
 script de la reponse\n" + e.message);
-                            console.log(e.message);
                         }
=20
                     }



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


From MAILER-DAEMON Tue Dec 31 09:58:40 2013
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Vy0mG-0000bD-BO
	for mharc-phpcompta-dev@gnu.org; Tue, 31 Dec 2013 09:58:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 31 Dec 2013 15:46:33 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 91.121.80.190
Message-ID: <mailman.150891.1388501919.10747.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r641 - trunk/rapport_avance/include
X-BeenThere: phpcompta-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: phpcompta-dev@nongnu.org
List-Id: <phpcompta-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/phpcompta-dev>
List-Post: <mailto:phpcompta-dev@nongnu.org>
List-Help: <mailto:phpcompta-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/phpcompta-dev>,
	<mailto:phpcompta-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Dec 2013 14:58:39 -0000

Author: danydb
Date: 2013-12-31 15:46:33 +0100 (Tue, 31 Dec 2013)
New Revision: 641

Modified:
   trunk/rapport_avance/include/historique.inc.php
Log:
remove debug + update doc
purge table
Task #951 - Make release

Modified: trunk/rapport_avance/include/historique.inc.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/rapport_avance/include/historique.inc.php	2013-12-31 14:26:56 U=
TC (rev 640)
+++ trunk/rapport_avance/include/historique.inc.php	2013-12-31 14:46:33 U=
TC (rev 641)
@@ -28,6 +28,7 @@
  */
 global $cn;
 $cn->exec_sql("delete from rapport_advanced.declaration where to_keep=3D=
'N' and d_generated < now() - interval '5 hours'");
+$cn->exec_sql("delete from rapport_advanced.listing_compute where l_keep=
=3D'N' and l_timestamp < now() - interval '5 hours'");
 $data=3D$cn->get_array("select d_id,d_title,
 		d_start,d_end,to_char(d_generated,'DD/MM/YY HH24:MI') as fmt_generated=
,
 		d_description,d_generated,



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


