From MAILER-DAEMON Sun Jan 01 18:14:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RhUbf-00086s-GR
	for mharc-phpcompta-dev@gnu.org; Sun, 01 Jan 2012 18:14:23 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  2 Jan 2012 00:16:45 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.63087.1325459662.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4659 -
	phpcompta/tags/rel560_syndic/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, 01 Jan 2012 23:14:21 -0000

Author: danydb
Date: 2012-01-02 00:16:43 +0100 (Mon, 02 Jan 2012)
New Revision: 4659

Modified:
   phpcompta/tags/rel560_syndic/include/template/ledger_detail_bottom.php
Log:
cosmetic : rapprochement detail journaux

Modified: phpcompta/tags/rel560_syndic/include/template/ledger_detail_bot=
tom.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/rel560_syndic/include/template/ledger_detail_bottom.ph=
p	2011-12-29 00:45:00 UTC (rev 4658)
+++ phpcompta/tags/rel560_syndic/include/template/ledger_detail_bottom.ph=
p	2012-01-01 23:16:43 UTC (rev 4659)
@@ -1,7 +1,8 @@
 <fieldset>
 <legend>
+<?echo _('Rapprochement');?>
+</legend>
 <?
-echo _('Rapprochement');
 $oRap=3Dnew Acc_Reconciliation($cn);
 $oRap->jr_id=3D$jr_id;
 $aRap=3D$oRap->get();
@@ -34,7 +35,7 @@
   echo '</table>';
 }
 ?>
-</legend>
+
 <?
 if ( $access=3D=3D'W') {
   $search=3D'<INPUT TYPE=3D"BUTTON" class=3D"button" VALUE=3D"Cherche" O=
nClick=3D"SearchJrn('.$gDossier.",'rapt".$div."','".$obj->det->jr_montant=
."')\">";



From MAILER-DAEMON Tue Jan 03 11:29:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri7FF-0006hF-EL
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Jan 2012 11:29:49 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Jan 2012 17:31:56 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.66231.1325608187.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4660 - 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: Tue, 03 Jan 2012 16:29:46 -0000

Author: danydb
Date: 2012-01-03 17:31:56 +0100 (Tue, 03 Jan 2012)
New Revision: 4660

Modified:
   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_itext.php
   phpcompta/trunk/include/template/ledger_detail_ach.php
   phpcompta/trunk/include/template/ledger_detail_misc.php
   phpcompta/trunk/include/template/ledger_detail_ven.php
Log:
Cosmetic CSS Size  for IText, for updatable label (VEN, ACH,ODS)

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	2012-01-01 23:16:43 UTC =
(rev 4659)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-03 16:31:56 UTC =
(rev 4660)
@@ -1575,7 +1575,7 @@
         $ret.=3D '<tr><td >'._('Libell=C3=A9');
         $wDescription=3Dnew IText('desc');
         $wDescription->readonly=3D$p_readonly;
-        $wDescription->size=3D100;
+        $wDescription->css_size=3D"100%";
         $wDescription->value=3D(isset($desc))?$desc:'';
         $ret.=3D'<td colspan=3D"2" style=3D"width:auto">';
         $ret.=3D$wDescription->input();

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	2012-01-01 23:1=
6:43 UTC (rev 4659)
+++ phpcompta/trunk/include/class_acc_ledger_purchase.php	2012-01-03 16:3=
1:56 UTC (rev 4660)
@@ -1152,7 +1152,7 @@
             if ( $g_parameter->MY_UPDLAB =3D=3D 'Y')
             {
                 $Span=3Dnew IText("e_march".$i."_label");
-                $Span->size=3D45;
+                $Span->css_size=3D"100%";
             } else
             {
                 $Span=3Dnew ISpan("e_march".$i."_label");

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	2012-01-01 23:16:43=
 UTC (rev 4659)
+++ phpcompta/trunk/include/class_acc_ledger_sold.php	2012-01-03 16:31:56=
 UTC (rev 4660)
@@ -1257,7 +1257,8 @@
             if ( $g_parameter->MY_UPDLAB =3D=3D 'Y')
             {
                 $Span=3Dnew IText("e_march".$i."_label");
-                $Span->size=3D45;
+               =20
+                $Span->css_size=3D"100%";
             } else
             {
                 $Span=3Dnew ISpan("e_march".$i."_label");

Modified: phpcompta/trunk/include/class_itext.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_itext.php	2012-01-01 23:16:43 UTC (rev =
4659)
+++ phpcompta/trunk/include/class_itext.php	2012-01-03 16:31:56 UTC (rev =
4660)
@@ -43,11 +43,21 @@
         $extra=3D(isset($this->extra))?$this->extra:"";
=20
         $this->value=3Dstr_replace('"','',$this->value);
+        if ( ! isset ($this->css_size))
+        {
         $r=3D'<INPUT '.$this->style.' TYPE=3D"TEXT" id=3D"'.
            $this->name.'"'.$t.
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
            'SIZE=3D"'.$this->size.'" '.$this->javascript."  $this->extra=
 >";
         /* add tag for column if inside a table */
+        } else {
+           $r=3D'<INPUT '.$this->style.' TYPE=3D"TEXT" id=3D"'.
+           $this->name.'"'.$t.
+           'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
+           ' style=3D"width:'.$this->csswidth.';" '.$this->javascript." =
 $this->extra >";
+
+        }           =20
+       =20
         if ( $this->table =3D=3D 1 )		  $r=3D'<td>'.$r.'</td>';
=20
         return $r;
@@ -63,10 +73,18 @@
         $readonly=3D" readonly ";
         $style=3D'style=3D"border:solid 1px blue;color:black;background:=
#EDEDED"';
         $this->value=3Dstr_replace('"','',$this->value);
+         if ( ! isset ($this->css_size))
+        {
         $r=3D'<INPUT '.$style.' TYPE=3D"TEXT" id=3D"'.
            $this->name.'"'.$t.
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
            'SIZE=3D"'.$this->size.'" '.$this->javascript." $readonly $th=
is->extra >";
+        } else {
+               $r=3D'<INPUT '.$style.' TYPE=3D"TEXT" id=3D"'.
+           $this->name.'"'.$t.
+           'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
+           ' style=3D"width:'.$this->csswidth.'" '.$this->javascript." $=
readonly  $this->extra >";
+        }
=20
         /* add tag for column if inside a table */
         if ( $this->table =3D=3D 1 )		  $r=3D'<td>'.$r.'</td>';

Modified: phpcompta/trunk/include/template/ledger_detail_ach.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_detail_ach.php	2012-01-01 23:=
16:43 UTC (rev 4659)
+++ phpcompta/trunk/include/template/ledger_detail_ach.php	2012-01-03 16:=
31:56 UTC (rev 4660)
@@ -154,6 +154,7 @@
         $l_lib =3D ($q['j_text'] =3D=3D '') ? $fiche->strAttribut(ATTR_D=
EF_NAME) : $q['j_text'];
         $hidden =3D HtmlInput::hidden("j_id[]", $q['j_id']);
         $input =3D new IText("e_march" . $q['j_id'] . "_label", $l_lib);
+        $input->css_size=3D"100%";
     }
     else
     {

Modified: phpcompta/trunk/include/template/ledger_detail_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/include/template/ledger_detail_misc.php	2012-01-01 23=
:16:43 UTC (rev 4659)
+++ phpcompta/trunk/include/template/ledger_detail_misc.php	2012-01-03 16=
:31:56 UTC (rev 4660)
@@ -136,6 +136,7 @@
     {
         $hidden =3D HtmlInput::hidden("j_id[]", $q[$e]['j_id']);
         $input =3D new IText("e_march" . $q[$e]['j_id'] . "_label", $l_l=
ib);
+        $input->css_size=3D"100%";
     }
     else
     {

Modified: phpcompta/trunk/include/template/ledger_detail_ven.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_detail_ven.php	2012-01-01 23:=
16:43 UTC (rev 4659)
+++ phpcompta/trunk/include/template/ledger_detail_ven.php	2012-01-03 16:=
31:56 UTC (rev 4660)
@@ -144,6 +144,7 @@
         $l_lib =3D ($q['j_text'] =3D=3D '') ? $fiche->strAttribut(ATTR_D=
EF_NAME) : $q['j_text'];
         $hidden =3D HtmlInput::hidden("j_id[]", $q['j_id']);
         $input =3D new IText("e_march" . $q['j_id'] . "_label", $l_lib);
+        $input->css_size=3D"100%";
     }
     else
     {



From MAILER-DAEMON Tue Jan 03 11:43:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri7Sm-0002bV-1F
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Jan 2012 11:43:48 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Jan 2012 17:46:07 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.66266.1325609027.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4661 - 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 Jan 2012 16:43:47 -0000

Author: danydb
Date: 2012-01-03 17:46:07 +0100 (Tue, 03 Jan 2012)
New Revision: 4661

Modified:
   phpcompta/trunk/include/class_itext.php
Log:
Cosmetic CSS Size  for IText, for updatable label (VEN, ACH,ODS)

Typo csswidth instead of css_size

Modified: phpcompta/trunk/include/class_itext.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_itext.php	2012-01-03 16:31:56 UTC (rev =
4660)
+++ phpcompta/trunk/include/class_itext.php	2012-01-03 16:46:07 UTC (rev =
4661)
@@ -54,7 +54,7 @@
            $r=3D'<INPUT '.$this->style.' TYPE=3D"TEXT" id=3D"'.
            $this->name.'"'.$t.
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
-           ' style=3D"width:'.$this->csswidth.';" '.$this->javascript." =
 $this->extra >";
+           ' style=3D"width:'.$this->css_size.';" '.$this->javascript." =
 $this->extra >";
=20
         }           =20
        =20
@@ -83,7 +83,7 @@
                $r=3D'<INPUT '.$style.' TYPE=3D"TEXT" id=3D"'.
            $this->name.'"'.$t.
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
-           ' style=3D"width:'.$this->csswidth.'" '.$this->javascript." $=
readonly  $this->extra >";
+           ' style=3D"width:'.$this->css_size.'" '.$this->javascript." $=
readonly  $this->extra >";
         }
=20
         /* add tag for column if inside a table */



From MAILER-DAEMON Tue Jan 03 14:12:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri9ma-0002Rp-MH
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Jan 2012 14:12:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Jan 2012 20:14:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.66472.1325617943.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r219 - in trunk/amortis/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 Jan 2012 19:12:22 -0000

Author: danydb
Date: 2012-01-03 20:14:44 +0100 (Tue, 03 Jan 2012)
New Revision: 219

Modified:
   trunk/amortis/include/class_am_generate.php
   trunk/amortis/include/template/util_generate.php
Log:
Bug mantis #502 erreur quand g?\195?\169n?\195?\168re ?\195?\169criture

Modified: trunk/amortis/include/class_am_generate.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amortis/include/class_am_generate.php	2011-12-28 20:01:25 UTC (=
rev 218)
+++ trunk/amortis/include/class_am_generate.php	2012-01-03 19:14:44 UTC (=
rev 219)
@@ -216,6 +216,7 @@
 	    $val=3D($val=3D=3D'')?0:$val;
 	    $h=3D$cn->get_value('select ha_id from amortissement.amortissement_=
histo where a_id=3D$1 and h_year=3D$2',
 			      array($p_array['a_id'][$i],$p_array['p_year']));
+		if ( $cn->count() =3D=3D 0 ) continue;
 	    $n->ha_id=3D$h;
 	    $n->load();
 	    $n->h_amount=3D$val;

Modified: trunk/amortis/include/template/util_generate.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amortis/include/template/util_generate.php	2011-12-28 20:01:25 =
UTC (rev 218)
+++ trunk/amortis/include/template/util_generate.php	2012-01-03 19:14:44 =
UTC (rev 219)
@@ -21,7 +21,7 @@
 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
=20
 /*!\file
- * \brief select the mat. to amortize, the ledger and the year=20
+ * \brief select the mat. to amortize, the ledger and the year
  */
  ?>
 <form id=3D"gen_amort" method=3D"post">
@@ -49,7 +49,7 @@
 </tr>
 </table>
=20
-Cochez ce qu'il faut amortir=20
+Cochez ce qu'il faut amortir
 <table class=3D"result">
 <tr>
 	<th>Selection</th>
@@ -62,12 +62,12 @@
  * get all the material
  */
 $am=3Dnew Amortissement_Sql($cn);
-$array=3D$am->seek ("where a_visible=3D'Y'");
+$array=3D$am->seek ("where a_visible=3D'Y' ");
 for ( $i =3D0;$i<count($array);$i++):
 	echo HtmlInput::hidden('a_id[]',$array[$i]->a_id);
 	$ck=3Dnew ICheckBox('p_ck'.$i);
 	$fiche=3Dnew Fiche($cn,$array[$i]->f_id);
-=09
+
 ?>
 <tr>
 <?



From MAILER-DAEMON Tue Jan 03 14:19:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ri9t4-00052E-NS
	for mharc-phpcompta-dev@gnu.org; Tue, 03 Jan 2012 14:19:06 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue,  3 Jan 2012 20:21:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.66487.1325618346.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r220 - trunk/amortis/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 Jan 2012 19:19:06 -0000

Author: danydb
Date: 2012-01-03 20:21:29 +0100 (Tue, 03 Jan 2012)
New Revision: 220

Modified:
   trunk/amortis/include/template/listing_year.php
Log:
Bug erreur arrondi=20

Modified: trunk/amortis/include/template/listing_year.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/amortis/include/template/listing_year.php	2012-01-03 19:14:44 U=
TC (rev 219)
+++ trunk/amortis/include/template/listing_year.php	2012-01-03 19:21:29 U=
TC (rev 220)
@@ -17,7 +17,7 @@
   <th style=3D"text-align:right">Reste =C3=A0 amortir</th>
 </tr>
 <?
-$tot_amort=3D0;$tot_net=3D0;
+$tot_amort=3D0;$tot_net=3D0;bcscale(2);
 for ($i=3D0;$i < count($array) ; $i++):
 	echo '<tr>';
 	$fiche=3Dnew Fiche($cn,$array[$i]['f_id']);



From MAILER-DAEMON Wed Jan 04 05:53:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiOTL-0003uN-Uk
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 05:53:31 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 11:55:43 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68029.1325674411.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4662 - 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, 04 Jan 2012 10:53:30 -0000

Author: danydb
Date: 2012-01-04 11:55:43 +0100 (Wed, 04 Jan 2012)
New Revision: 4662

Modified:
   phpcompta/trunk/include/class_user.php
Log:
Improve audit :  add folder + call to audit if check failed (can_request,=
 can_print, check_dossier)

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	2012-01-03 16:46:07 UTC (rev 4=
661)
+++ phpcompta/trunk/include/class_user.php	2012-01-04 10:55:43 UTC (rev 4=
662)
@@ -690,6 +690,7 @@
 	{
 		if ($this->check_action($p_action) =3D=3D 0)
 		{
+                        $this->audit('FAIL');
 			if ($p_js =3D=3D 1)
 			{
 				echo "<script>";
@@ -737,6 +738,7 @@
 	{
 		if ($this->check_print($p_action) =3D=3D 0)
 		{
+                    $this->audit('FAIL');
 			if ($p_js =3D=3D 1)
 			{
 				echo "<script>";
@@ -855,6 +857,7 @@
 		$dossier =3D ($dossier =3D=3D '') ? 'X' : $dossier;
 		if ($dossier =3D=3D 'X')
 		{
+                    $this->audit('FAIL',"Access folder ");
 			if (!$silent)
 			{
 				alert(_('Dossier non accessible'));
@@ -984,26 +987,28 @@
 		}
 		return $array;
 	}
-	function audit($action=3D'AUDIT',$p_module=3D"")
-	{
-		global $audit;
-                if ($p_module=3D=3D"")
+	function audit($action=3D'AUDIT', $p_module=3D"")
+        {
+            global $audit;
+            if ($audit)
+            {
+                if ($p_module =3D=3D "" && isset ($_REQUEST['ac']))
                 {
-                    $p_module=3D$_REQUEST['ac'];
+                    $p_module =3D $_REQUEST['ac'];
                 }
-		$cn =3D new Database();
-		$sql =3D "insert into audit_connect (ac_user,ac_ip,ac_module,ac_url,ac=
_state) values ($1,$2,$3,$4,$5)";
-		if ($audit)
-		{
-				$cn->exec_sql($sql,
-                                        array(
-                                            $_SESSION['g_user'],
-                                            $_SERVER["REMOTE_ADDR"],
-                                            $p_module,
-                                            $_SERVER['REQUEST_URI'],
-                                            $action));
-		}
-	}
+                $cn =3D new Database();
+                if (isset($_REQUEST['gDossier']))
+                    $p_module.=3D "dossier : " . $_REQUEST['gDossier'];
+                $sql =3D "insert into audit_connect (ac_user,ac_ip,ac_mo=
dule,ac_url,ac_state) values ($1,$2,$3,$4,$5)";
+
+                $cn->exec_sql($sql, array(
+                    $_SESSION['g_user'],
+                    $_SERVER["REMOTE_ADDR"],
+                    $p_module,
+                    $_SERVER['REQUEST_URI'],
+                    $action));
+            }
+        }  =20
 	function save_profile($p_id)
 	{
 		$count=3D$this->db->get_value("select count(*) from profile_user where=
 user_name=3D$1",  array($this->login));



From MAILER-DAEMON Wed Jan 04 06:38:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiPAh-0006ph-NS
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 06:38:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 12:40:33 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68100.1325677099.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4663 - 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, 04 Jan 2012 11:38:18 -0000

Author: danydb
Date: 2012-01-04 12:40:33 +0100 (Wed, 04 Jan 2012)
New Revision: 4663

Modified:
   phpcompta/trunk/include/fiche.inc.php
Log:
Cosmetic : fiche div mal plac?\195?\169

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	2012-01-04 10:55:43 UTC (rev 46=
62)
+++ phpcompta/trunk/include/fiche.inc.php	2012-01-04 11:40:33 UTC (rev 46=
63)
@@ -354,7 +354,7 @@
     // Search a card
     if ( $action =3D=3D "search" )
     {
-        echo '<DIV class=3D"redcontent" style=3D"float:top;width:auto;">=
';
+        echo '<DIV class=3D"redcontent" style=3D"width:auto;">';
         ShowRecherche();
         $sql=3D"select distinct f_id,fd_id from fiche join fiche_detail =
using (f_id)
                  where
@@ -423,7 +423,7 @@
 {
     $g_user->can_request(FIC);
     ShowRecherche();
-    echo '<DIV class=3D"redcontent">';
+    echo '<DIV class=3D"redcontent" style=3D"width:auto">';
     if ( $write =3D=3D0)
         echo "<h2 class=3D\"error\"> Pas d'acc=C3=A8s </h2>";
     else
@@ -444,13 +444,13 @@
     $g_user->can_request(FICADD);
     if ( $write =3D=3D0)
     {
-        echo '<DIV class=3D"redcontent">';
+        echo '<DIV class=3D"redcontent" style=3D"width:auto">';
         echo "<h2 class=3D\"error\"> Pas d'acc=C3=A8s </h2>";
     }
     else
     {
         ShowRecherche();
-        echo '<DIV class=3D"redcontent">';
+        echo '<DIV class=3D"redcontent" style=3D"width:auto">';
         $fiche=3Dnew Fiche($cn);
         $fiche->Save($_REQUEST['fiche']);
         $fiche_def=3Dnew Fiche_Def($cn,$_GET['fiche']);
@@ -466,7 +466,7 @@
 if ( isset ($_POST["update_fiche"])  )
 {
     $g_user->can_request(FIC);
-    echo '<DIV class=3D"redcontent">';
+    echo '<DIV class=3D"redcontent" style=3D"width:auto">';
     if ( $write =3D=3D0)
         echo "<h2 class=3D\"error\"> Pas d'acc=C3=A8s </h2>";
     else
@@ -489,7 +489,7 @@
 // Move a card to a new category
 if ( isset($_POST['move']))
 {
-    echo '<DIV class=3D"redcontent">';
+    echo '<DIV class=3D"redcontent" style=3D"width:auto">';
     $fiche=3Dnew Fiche($cn,$_POST['f_id']);
     $fiche->move_to($_POST['move_to']);
     $fiche_def=3Dnew Fiche_Def($cn,$_GET['fiche']);



From MAILER-DAEMON Wed Jan 04 06:39:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiPBt-0006rb-Vs
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 06:39:33 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 12:41:53 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68105.1325677173.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r221 - trunk/coprop/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, 04 Jan 2012 11:39:32 -0000

Author: danydb
Date: 2012-01-04 12:41:53 +0100 (Wed, 04 Jan 2012)
New Revision: 221

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
journal appel fond

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-03 19:21:29 UTC =
(rev 220)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-04 11:41:53 UTC =
(rev 221)
@@ -32,9 +32,10 @@
=20
 		<td>Journal pour l'appel de fond</td>
 		<td>
-			<?=3D$f_categorie_appel_bt?>
-			<?=3D$categorie_appel->input()?>
+			<?=3D$led_appel_fond->input()?>
 		</td>
+        </tr>
+        <tr>
 		<td><?=3D$f_categorie_appel_label?></td>
 		<td><?=3D$str_add_appel?></td>
 	</tr>



From MAILER-DAEMON Wed Jan 04 07:38:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQ6V-0002fG-LN
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 07:38:03 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 13:40:21 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68242.1325680683.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r222 - in trunk/coprop: . 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, 04 Jan 2012 12:38:02 -0000

Author: danydb
Date: 2012-01-04 13:40:21 +0100 (Wed, 04 Jan 2012)
New Revision: 222

Added:
   trunk/coprop/include/budget.inc.php
Modified:
   trunk/coprop/index.php
Log:
ajout budget

Added: trunk/coprop/include/budget.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/coprop/include/budget.inc.php	                        (rev 0)
+++ trunk/coprop/include/budget.inc.php	2012-01-04 12:40:21 UTC (rev 222)
@@ -0,0 +1,6 @@
+<?php
+
+/**
+ * @file maintient des budgets
+ */
+?>

Modified: trunk/coprop/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/coprop/index.php	2012-01-04 11:41:53 UTC (rev 221)
+++ trunk/coprop/index.php	2012-01-04 12:40:21 UTC (rev 222)
@@ -41,6 +41,7 @@
          array($url.'&sa=3Dlot',_('Lot'),_('Listes des lots et liaison c=
opro'),1),
          array($url.'&sa=3Dcle',_('Clef de r=C3=A9partition'),_('Clef de=
 r=C3=A9partition'),2),
          array($url.'&sa=3Daf',_('Appel de fond'),_('Cr=C3=A9ation d=C3=A9=
compte pour appel de fond'),3),
+         array($url.'&sa=3Daf',_('Budget'),_('budgets'),5),
          array($url.'&sa=3Dpa',_('Param=C3=A8tre'),_('Configuration et p=
aram=C3=A8tre'),4)
        );
=20
@@ -115,5 +116,9 @@
     require_once('include/appel_fond.inc.php');
     exit();
   }
-
+if ($def=3D=3D5)
+  {
+    require_once('include/budget.inc.php');
+    exit();
+  }
 ?>



From MAILER-DAEMON Wed Jan 04 07:39:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQ7p-0002wl-Qm
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 07:39:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 13:41:45 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68249.1325680764.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r223 - trunk/coprop
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, 04 Jan 2012 12:39:24 -0000

Author: danydb
Date: 2012-01-04 13:41:45 +0100 (Wed, 04 Jan 2012)
New Revision: 223

Modified:
   trunk/coprop/index.php
Log:
ajout extension::check

Modified: trunk/coprop/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/coprop/index.php	2012-01-04 12:40:21 UTC (rev 222)
+++ trunk/coprop/index.php	2012-01-04 12:41:45 UTC (rev 223)
@@ -29,7 +29,7 @@
  */
=20
 require_once 'class_acc_ledger.php';
-
+Extension::check_version(4600);
 ob_start();
 require_once('coprop-javascript.js');
 $j=3Dob_get_contents();



From MAILER-DAEMON Wed Jan 04 07:50:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQIN-0004iC-B3
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 07:50:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 13:52:36 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68260.1325681418.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r224 - in trunk/coprop/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, 04 Jan 2012 12:50:18 -0000

Author: danydb
Date: 2012-01-04 13:52:36 +0100 (Wed, 04 Jan 2012)
New Revision: 224

Modified:
   trunk/coprop/include/ajax_mod_copro_lot.php
   trunk/coprop/include/class_copro_lot.php
   trunk/coprop/include/lot.inc.php
   trunk/coprop/include/template/coprop_lot_add.php
   trunk/coprop/include/template/coprop_lot_list.php
   trunk/coprop/include/template/coprop_lot_mod.php
Log:

Enlever pourcentage lot=20
Ajout description


Modified: trunk/coprop/include/ajax_mod_copro_lot.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_copro_lot.php	2012-01-04 12:41:45 UTC (=
rev 223)
+++ trunk/coprop/include/ajax_mod_copro_lot.php	2012-01-04 12:52:36 UTC (=
rev 224)
@@ -42,14 +42,14 @@
 $acurrent=3D$cn->get_array("select lot.l_id   ,l_fiche_id,
 			(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
1) as fiche_name,
 			(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
23) as fiche_qcode,
-			l_part
+			(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
9) as fiche_desc
 			from coprop.lot where coprop_fk=3D$1",
 		array($coprop_id));
=20
 $not_assigned=3D$cn->get_array("select a.f_id,
 			(select ad_value from fiche_detail as e where e.f_id=3Da.f_id and ad_=
id=3D1) as fiche_name,
 			(select ad_value from fiche_detail as f where f.f_id=3Da.f_id and ad_=
id=3D23) as fiche_qcode,
-			coalesce(l_part,0) as str_part
+                        (select ad_value from fiche_detail where f_id=3D=
l_fiche_id and ad_id=3D9) as fiche_desc
 			from coprop.lot
 			right join fiche as a on (l_fiche_id=3Da.f_id)
 			where

Modified: trunk/coprop/include/class_copro_lot.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_lot.php	2012-01-04 12:41:45 UTC (rev=
 223)
+++ trunk/coprop/include/class_copro_lot.php	2012-01-04 12:52:36 UTC (rev=
 224)
@@ -51,30 +51,11 @@
 				$flot=3Dnew Fiche($cn);
 				$flot->id=3D$lot[$i];
=20
-				$part=3D${'lot_per'.$lot[$i]};
-
-				if ( trim($part)<>'' && isNumber($part)=3D=3D0)
-				{
-					// avertissement et mettre =C3=A0 100%
-					$part=3D100;
-				}
 				// si w_lot pas inser=C3=A9 alors inserer
 				$cn->exec_sql("insert into coprop.lot(l_fiche_id,l_part,coprop_fk)".
-						" values ($1,$2,$3)",
-						array($flot->id,$part,$coprop->id));
+						" values ($1,$2)",
+						array($flot->id,$coprop->id));
=20
-				// si w_lot ins=C3=A9rer avec nouveau coprop. calculer somme jcl_par=
t si total de jcl_part > 100 alors
-				// avertissement
-				$tot=3D$cn->get_value("select sum(l_part) from coprop.lot where l_fi=
che_id=3D$1",
-							array($flot->id));
-				if ($tot > 100 )
-				{
-					// avertisement affect=C3=A9 =C3=A0 +100%
-				} elseif ($tot < 100 )
-				{
-					// avertisement affect=C3=A9 =C3=A0 - 100%
-
-				}
 			}
 		}
 		catch (Exception $e)
@@ -105,30 +86,11 @@
 				$flot=3Dnew Fiche($cn);
 				$flot->id=3D$lot[$i];
=20
-				$part=3D${'Part'.$lot[$i]};
-
-				if ( trim($part)<>'' && isNumber($part)=3D=3D0)
-				{
-					// avertissement et mettre =C3=A0 100%
-					$part=3D100;
-				}
 				// si w_lot pas inser=C3=A9 alors inserer
 				$cn->exec_sql("insert into coprop.lot(l_fiche_id,l_part,coprop_fk)".
-						" values ($1,$2,$3)",
-						array($flot->id,$part,$coprop->id));
+						" values ($1,$2)",
+						array($flot->id,$coprop->id));
=20
-				// si w_lot ins=C3=A9rer avec nouveau coprop. calculer somme jcl_par=
t si total de jcl_part > 100 alors
-				// avertissement
-				$tot=3D$cn->get_value("select sum(l_part) from coprop.lot where l_fi=
che_id=3D$1",
-							array($flot->id));
-				if ($tot > 100 )
-				{
-					// avertisement affect=C3=A9 =C3=A0 +100%
-				} elseif ($tot < 100 )
-				{
-					// avertisement affect=C3=A9 =C3=A0 - 100%
-
-				}
 			}
 		}
 		catch (Exception $e)
@@ -142,52 +104,9 @@
 	}
 	function update_lot($p_array)
 	{
-		global $cn;
-		extract($p_array);
-		try
-		{
-			$lot=3D$cn->get_array("select l_id,l_fiche_id,l_part from coprop.lot =
where coprop_fk=3D$1 ",
-					array($copro_id));
-			// Find the lot.
-			$str_warning=3D"";$n_warning=3D0;
-			for ($i=3D0;$i<count($lot);$i++)
-			{
-				$flot=3Dnew Fiche($cn);
-				$flot->id=3D$lot[$i]['l_fiche_id'];
+	=09
+            return;
=20
-				$part=3D${'num'.$lot[$i]['l_id']};
-
-				if ( trim($part)<>'' && isNumber($part)=3D=3D0)
-				{
-					// avertissement et mettre =C3=A0 100%
-					$part=3D100;
-				}
-				// si w_lot pas inser=C3=A9 alors inserer
-				$cn->exec_sql("update coprop.lot set l_part=3D$1 where l_id=3D$2",
-						array($part,$lot[$i]['l_id']));
-
-				// si w_lot ins=C3=A9rer avec nouveau coprop. calculer somme jcl_par=
t si total de jcl_part > 100 alors
-				// avertissement
-				$tot=3D$cn->get_value("select sum(l_part) from coprop.lot where l_fi=
che_id=3D$1",
-							array($flot->id));
-				if ($tot > 100 )
-				{
-					// avertisement affect=C3=A9 =C3=A0 +100%
-				} elseif ($tot < 100 )
-				{
-					// avertisement affect=C3=A9 =C3=A0 - 100%
-
-				}
-			}
-		}
-		catch (Exception $e)
-		{
-			echo $e->getMessage();
-			echo $e->getTraceAsString();
-
-		}
-
-
 	}
=20
=20

Modified: trunk/coprop/include/lot.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/coprop/include/lot.inc.php	2012-01-04 12:41:45 UTC (rev 223)
+++ trunk/coprop/include/lot.inc.php	2012-01-04 12:52:36 UTC (rev 224)
@@ -96,7 +96,8 @@
 $a_copro=3D$cn->get_array($sql);
=20
 $sql_lot=3D$cn->prepare ("lot","select coprop_fk, (select ad_value from =
fiche_detail where f_id=3Dl_fiche_id and ad_id=3D1) as lot_name,
-	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
23) as lot_qcode,l_part
+	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
23) as lot_qcode,
+        (select ad_value from fiche_detail where f_id=3Dl_fiche_id and a=
d_id=3D9) as lot_desc
 	from coprop.lot where coprop_fk=3D$1");
=20
 echo $f_add_button->input();

Modified: trunk/coprop/include/template/coprop_lot_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/coprop/include/template/coprop_lot_add.php	2012-01-04 12:41:45 =
UTC (rev 223)
+++ trunk/coprop/include/template/coprop_lot_add.php	2012-01-04 12:52:36 =
UTC (rev 224)
@@ -69,6 +69,7 @@
 $alot=3D$cn->get_array("select f_id,
 		(select ad_value from fiche_Detail as e where ad_id=3D1 and e.f_id=3Da=
.f_id) as fname,
 		(select ad_value from fiche_Detail as f where ad_id=3D23 and f.f_id=3D=
a.f_id) as fqcode
+		(select ad_value from fiche_Detail as f where ad_id=3D9 and f.f_id=3Da=
.f_id) as fdesc
 		from fiche as a
 		where
 		fd_id=3D$1
@@ -81,13 +82,12 @@
 <table>
 	<tr>
 		<th>Lot</th>
-		<th>Pourcentage</th>
+		<th>Description</th>
 	</tr>
 <?
 for ($i=3D0;$i<count($alot);$i++):
=20
 // Search button for card
-  $num=3Dnew INum("lot_per".$i);
   $ck=3Dnew ICheckBox("lot[]");
   $ck->value=3D$alot[$i]['f_id'];
 ?>
@@ -99,7 +99,7 @@
 		<?=3DHtmlInput::card_detail($alot[$i]['fqcode'],$alot[$i]['fname'],' c=
lass=3D"line" ')?>
 	</td>
 	<td>
-		<?=3D$num->input()?>
+		<?=3D$alot[$i]['fdesc']?>
 	</td>
 </tr>
 <? endfor;?>

Modified: trunk/coprop/include/template/coprop_lot_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_list.php	2012-01-04 12:41:45=
 UTC (rev 223)
+++ trunk/coprop/include/template/coprop_lot_list.php	2012-01-04 12:52:36=
 UTC (rev 224)
@@ -48,8 +48,8 @@
 			$sp=3D"";
 			for ($e=3D0;$e<$max;$e++):
 				$row=3DDatabase::fetch_array($rlot,$e);
-				$js_lot=3DHtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],=
' class=3D"line"');
-				echo $sp.$js_lot.nb($row['l_part']);
+				$js_lot=3DHtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],=
$row['lot_desc'],' class=3D"line"');
+				echo $sp.$js_lot;
 				$sp=3D" , ";
 			endfor;
 		?>

Modified: trunk/coprop/include/template/coprop_lot_mod.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_mod.php	2012-01-04 12:41:45 =
UTC (rev 223)
+++ trunk/coprop/include/template/coprop_lot_mod.php	2012-01-04 12:52:36 =
UTC (rev 224)
@@ -40,7 +40,7 @@
 			Lot
 		</th>
 		<th>
-			Pourcentage
+			Description
 		</th>
 	</tr>
 <? for ($i=3D0;$i<count($acurrent);$i++): ?>
@@ -49,11 +49,7 @@
 			<?=3D$acurrent[$i]['fiche_name']?>
 		</td>
 		<td>
-			<?
-				$num=3Dnew INum("num".$acurrent[$i]['l_id']);
-				$num->value=3D$acurrent[$i]['l_part'];
-				echo $num->input();
-			?>
+                    <?=3D$acurrent[$i]['fiche_desc']?>
 		</td>
 		<td id=3D"col<?=3D$acurrent[$i]['l_id']?>">
 			<?
@@ -85,10 +81,7 @@
 			<?=3D$not_assigned[$i]['fiche_name']?>
 		</td>
 		<td>
-			<?
-			$par=3Dnew Inum("Part".$not_assigned[$i]['f_id']);
-			echo $par->input();
-			?>
+                    <?=3D$not_assigned[$i]['fiche_name']?>
 		</td>
 		<td>
 			<?



From MAILER-DAEMON Wed Jan 04 08:11:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQce-0002Bb-Nx
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 08:11:16 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 14:13:25 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68318.1325682673.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r225 - trunk/coprop/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, 04 Jan 2012 13:11:12 -0000

Author: danydb
Date: 2012-01-04 14:13:25 +0100 (Wed, 04 Jan 2012)
New Revision: 225

Modified:
   trunk/coprop/include/template/coprop_lot_list.php
Log:
Enlever pourcentage lot=20
Ajout description

Modified: trunk/coprop/include/template/coprop_lot_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_list.php	2012-01-04 12:52:36=
 UTC (rev 224)
+++ trunk/coprop/include/template/coprop_lot_list.php	2012-01-04 13:13:25=
 UTC (rev 225)
@@ -48,7 +48,8 @@
 			$sp=3D"";
 			for ($e=3D0;$e<$max;$e++):
 				$row=3DDatabase::fetch_array($rlot,$e);
-				$js_lot=3DHtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],=
$row['lot_desc'],' class=3D"line"');
+				$js_lot=3DHtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],=
' class=3D"line"');
+                                $js_lot.=3D$row['lot_desc'];
 				echo $sp.$js_lot;
 				$sp=3D" , ";
 			endfor;



From MAILER-DAEMON Wed Jan 04 08:14:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQfz-00033b-7J
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 08:14:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 14:16:59 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68327.1325682882.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r226 - trunk/coprop/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, 04 Jan 2012 13:14:42 -0000

Author: danydb
Date: 2012-01-04 14:16:58 +0100 (Wed, 04 Jan 2012)
New Revision: 226

Modified:
   trunk/coprop/include/template/coprop_lot_add.php
Log:
typo

Modified: trunk/coprop/include/template/coprop_lot_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/coprop/include/template/coprop_lot_add.php	2012-01-04 13:13:25 =
UTC (rev 225)
+++ trunk/coprop/include/template/coprop_lot_add.php	2012-01-04 13:16:58 =
UTC (rev 226)
@@ -68,7 +68,7 @@
 echo HtmlInput::hidden('ledger_type','ODS');
 $alot=3D$cn->get_array("select f_id,
 		(select ad_value from fiche_Detail as e where ad_id=3D1 and e.f_id=3Da=
.f_id) as fname,
-		(select ad_value from fiche_Detail as f where ad_id=3D23 and f.f_id=3D=
a.f_id) as fqcode
+		(select ad_value from fiche_Detail as f where ad_id=3D23 and f.f_id=3D=
a.f_id) as fqcode,
 		(select ad_value from fiche_Detail as f where ad_id=3D9 and f.f_id=3Da=
.f_id) as fdesc
 		from fiche as a
 		where



From MAILER-DAEMON Wed Jan 04 08:31:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQwN-0007qX-Cm
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 08:31:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 14:33:58 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68342.1325683899.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r227 - trunk/coprop/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, 04 Jan 2012 13:31:38 -0000

Author: danydb
Date: 2012-01-04 14:33:57 +0100 (Wed, 04 Jan 2012)
New Revision: 227

Modified:
   trunk/coprop/include/class_copro_lot.php
Log:
lot insert - update, remove col l_part

Modified: trunk/coprop/include/class_copro_lot.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_lot.php	2012-01-04 13:16:58 UTC (rev=
 226)
+++ trunk/coprop/include/class_copro_lot.php	2012-01-04 13:33:57 UTC (rev=
 227)
@@ -52,7 +52,7 @@
 				$flot->id=3D$lot[$i];
=20
 				// si w_lot pas inser=C3=A9 alors inserer
-				$cn->exec_sql("insert into coprop.lot(l_fiche_id,l_part,coprop_fk)".
+				$cn->exec_sql("insert into coprop.lot(l_fiche_id,coprop_fk)".
 						" values ($1,$2)",
 						array($flot->id,$coprop->id));
=20
@@ -87,7 +87,7 @@
 				$flot->id=3D$lot[$i];
=20
 				// si w_lot pas inser=C3=A9 alors inserer
-				$cn->exec_sql("insert into coprop.lot(l_fiche_id,l_part,coprop_fk)".
+				$cn->exec_sql("insert into coprop.lot(l_fiche_id,coprop_fk)".
 						" values ($1,$2)",
 						array($flot->id,$coprop->id));
=20



From MAILER-DAEMON Wed Jan 04 08:34:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiQyx-00082u-0T
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 08:34:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 14:36:34 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68343.1325684057.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r228 - trunk/coprop/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, 04 Jan 2012 13:34:17 -0000

Author: danydb
Date: 2012-01-04 14:36:34 +0100 (Wed, 04 Jan 2012)
New Revision: 228

Modified:
   trunk/coprop/include/template/coprop_lot_mod.php
Log:
coprop mod  add description

Modified: trunk/coprop/include/template/coprop_lot_mod.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_mod.php	2012-01-04 13:33:57 =
UTC (rev 227)
+++ trunk/coprop/include/template/coprop_lot_mod.php	2012-01-04 13:36:34 =
UTC (rev 228)
@@ -72,7 +72,7 @@
 			Lot
 		</th>
 		<th>
-			Pourcentage
+			Description
 		</th>
 	</tr>
 <? for ($i=3D0;$i<count($not_assigned);$i++): ?>
@@ -81,7 +81,7 @@
 			<?=3D$not_assigned[$i]['fiche_name']?>
 		</td>
 		<td>
-                    <?=3D$not_assigned[$i]['fiche_name']?>
+                    <?=3D$not_assigned[$i]['fiche_desc']?>
 		</td>
 		<td>
 			<?



From MAILER-DAEMON Wed Jan 04 08:36:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiR0u-0000Pn-Ep
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 08:36:20 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 14:38:39 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68344.1325684179.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r229 - trunk/coprop/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, 04 Jan 2012 13:36:19 -0000

Author: danydb
Date: 2012-01-04 14:38:39 +0100 (Wed, 04 Jan 2012)
New Revision: 229

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
appel de fond

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-04 13:36:34 UTC =
(rev 228)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-04 13:38:39 UTC =
(rev 229)
@@ -36,6 +36,10 @@
 		</td>
         </tr>
         <tr>
+            <td> Fiche pour l'appel</td>
+            <td><?=3D$categorie_appel->input()?></td>
+        </tr>
+        <tr>
 		<td><?=3D$f_categorie_appel_label?></td>
 		<td><?=3D$str_add_appel?></td>
 	</tr>



From MAILER-DAEMON Wed Jan 04 08:38:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiR2X-0000Zy-Ki
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 08:38:01 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 14:40:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68349.1325684280.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r230 - trunk/coprop/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, 04 Jan 2012 13:37:59 -0000

Author: danydb
Date: 2012-01-04 14:40:16 +0100 (Wed, 04 Jan 2012)
New Revision: 230

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
appel de fond ; bouton search

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-04 13:38:39 UTC =
(rev 229)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-04 13:40:16 UTC =
(rev 230)
@@ -37,9 +37,8 @@
         </tr>
         <tr>
             <td> Fiche pour l'appel</td>
-            <td><?=3D$categorie_appel->input()?></td>
-        </tr>
-        <tr>
+           =20
+            <td><?=3D$f_categorie_appel_bt?><?=3D$categorie_appel->input=
()?></td>
 		<td><?=3D$f_categorie_appel_label?></td>
 		<td><?=3D$str_add_appel?></td>
 	</tr>



From MAILER-DAEMON Wed Jan 04 09:47:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiS7f-0008KE-UX
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 09:47:23 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 15:49:30 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68473.1325688442.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r231 - trunk/coprop/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, 04 Jan 2012 14:47:22 -0000

Author: danydb
Date: 2012-01-04 15:49:30 +0100 (Wed, 04 Jan 2012)
New Revision: 231

Modified:
   trunk/coprop/include/template/coprop_lot_mod.php
Log:
#505 consulter d?\195?\169tail lot lors de la modif

Modified: trunk/coprop/include/template/coprop_lot_mod.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_mod.php	2012-01-04 13:40:16 =
UTC (rev 230)
+++ trunk/coprop/include/template/coprop_lot_mod.php	2012-01-04 14:49:30 =
UTC (rev 231)
@@ -34,7 +34,7 @@
 <h2>Lot affect=C3=A9 =C3=A0 ce copropri=C3=A9taire</h2>
 <form method=3D"post" onsubmit=3D"return confirm('Vous confirmez ?')">
 		<?=3DHtmlInput::hidden("copro_id",$copro->id)?>
-<table>
+<table class=3D"result">
 	<tr>
 		<th>
 			Lot
@@ -46,7 +46,7 @@
 <? for ($i=3D0;$i<count($acurrent);$i++): ?>
 	<tr id=3D"row<?=3D$acurrent[$i]['l_id']?>">
 		<td>
-			<?=3D$acurrent[$i]['fiche_name']?>
+			<?=3DHtmlInput::card_detail($acurrent[$i]['fiche_qcode'],$acurrent[$i=
]['fiche_name'],' class=3D"line"')?>
 		</td>
 		<td>
                     <?=3D$acurrent[$i]['fiche_desc']?>
@@ -66,7 +66,7 @@
 <h2>Autre lots</h2>
 <form method=3D"post" onsubmit=3D"return confirm('Vous confirmez ?')">
 	<?=3DHtmlInput::hidden("copro_id",$copro->id)?>
-<table>
+<table class=3D"result">
 	<tr>
 		<th>
 			Lot
@@ -78,7 +78,7 @@
 <? for ($i=3D0;$i<count($not_assigned);$i++): ?>
 	<tr >
 		<td>
-			<?=3D$not_assigned[$i]['fiche_name']?>
+                    		<?=3DHtmlInput::card_detail($not_assigned[$i]['fic=
he_qcode'],$not_assigned[$i]['fiche_name'],' class=3D"line"')?>
 		</td>
 		<td>
                     <?=3D$not_assigned[$i]['fiche_desc']?>



From MAILER-DAEMON Wed Jan 04 09:48:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiS8T-0008Ok-1r
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 09:48:13 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 15:50:22 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68474.1325688492.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r232 - trunk/coprop/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, 04 Jan 2012 14:48:12 -0000

Author: danydb
Date: 2012-01-04 15:50:21 +0100 (Wed, 04 Jan 2012)
New Revision: 232

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
Ajout fiche appel de fond : bouton search

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-04 14:49:30 UTC =
(rev 231)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-04 14:50:21 UTC =
(rev 232)
@@ -38,7 +38,7 @@
         <tr>
             <td> Fiche pour l'appel</td>
            =20
-            <td><?=3D$f_categorie_appel_bt?><?=3D$categorie_appel->input=
()?></td>
+            <td><?=3D$f_categorie_appel_bt?>$f_categorie_appel_bt<?=3D$c=
ategorie_appel->input()?></td>
 		<td><?=3D$f_categorie_appel_label?></td>
 		<td><?=3D$str_add_appel?></td>
 	</tr>



From MAILER-DAEMON Wed Jan 04 09:59:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSIu-0001ki-TA
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 09:59:00 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:01:13 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68492.1325689140.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r233 - in trunk/coprop/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, 04 Jan 2012 14:58:59 -0000

Author: danydb
Date: 2012-01-04 16:01:13 +0100 (Wed, 04 Jan 2012)
New Revision: 233

Modified:
   trunk/coprop/include/ajax_mod_key.php
   trunk/coprop/include/template/key_detail.php
Log:
Remove date from key

Modified: trunk/coprop/include/ajax_mod_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_key.php	2012-01-04 14:50:21 UTC (rev 23=
2)
+++ trunk/coprop/include/ajax_mod_key.php	2012-01-04 15:01:13 UTC (rev 23=
3)
@@ -26,17 +26,11 @@
  * @brief modifie clef
  *
  */
-$key=3D$cn->get_array("SELECT cr_name, cr_note, to_char(cr_start,'DD.MM.=
YYYY') as str_start,
-	to_char(cr_end,'DD.MM.YYYY') as str_end
+$key=3D$cn->get_array("SELECT cr_name, cr_note
   FROM coprop.clef_repartition where cr_id=3D$1",array($key_id));
=20
 $str_message=3D"Modification ".h($key[0]['cr_name']);
-$date_start=3Dnew IDate('cr_start');
-$date_start->value=3D$key[0]['str_start'];
=20
-$date_end=3Dnew IDate('cr_end');
-$date_end->value=3D$key[0]['str_end'];
-
 $note=3Dnew ITextarea('cr_note');
 $note->value=3D$key[0]['cr_note'];
=20

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 14:50:21 UTC =
(rev 232)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 15:01:13 UTC =
(rev 233)
@@ -34,28 +34,13 @@
 	<tr>
 		<td>
=20
-		Nom
+                        Nom
 		</td>
 		<td>
 			<?=3D$name->input()?>
 		</td>
 	</tr>
-	<tr>
-		<td>
-			Date d=C3=A9but
-		</td>
-		<td>
-			<?=3D$date_start->input()?>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			Date fin
-		</td>
-		<td>
-			<?=3D$date_end->input()?>
-		</td>
-	</tr>
+=09
 </table>
 Description
 <?=3D$note->input()?>



From MAILER-DAEMON Wed Jan 04 09:59:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSJ8-0001nb-VU
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 09:59:14 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:01:28 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68493.1325689153.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r234 - trunk/coprop/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, 04 Jan 2012 14:59:13 -0000

Author: danydb
Date: 2012-01-04 16:01:28 +0100 (Wed, 04 Jan 2012)
New Revision: 234

Modified:
   trunk/coprop/include/class_copro_key.php
Log:
add function verify

Modified: trunk/coprop/include/class_copro_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_key.php	2012-01-04 15:01:13 UTC (rev=
 233)
+++ trunk/coprop/include/class_copro_key.php	2012-01-04 15:01:28 UTC (rev=
 234)
@@ -28,6 +28,20 @@
  */
 class Copro_key
 {
+    function verify ($p_array,$b_dupl=3Dtrue)
+    {
+        global $cn;
+        extract ($p_array);
+        if (strlen(trim ($cr_name))=3D=3D0)=20
+            throw new Exception("Le nom est vide");
+        if ($b_dupl )
+        {
+            $dupl=3D$cn->count_sql("select * from copro.clef_repartition=
 where cr_name=3D$1",$cr_name);
+            if ( $dupl >0 )
+                throw new Exception("Une clef avec ce nom existe d=C3=A9=
ja");
+        }
+       =20
+    }
=20
 	function insert($p_array)
 	{
@@ -35,9 +49,10 @@
 		extract($p_array);
 		try
 		{
+                    $this->verify($p_array);
 			$cn->start();
-			$this->cr_id =3D $cn->get_value("insert into coprop.clef_repartition(=
cr_start,cr_end,cr_note,cr_name)
-				values(to_date($1,'DD.MM.YYYY'),to_date($2,'DD.MM.YYYY'),$3,$4) retu=
rning cr_id", array(strip_tags($cr_start), strip_tags($cr_end), strip_tag=
s($cr_note), strip_tags($cr_name)));
+			$this->cr_id =3D $cn->get_value("insert into coprop.clef_repartition(=
cr_note,cr_name)
+				values($1,$2) returning cr_id", array( strip_tags($cr_note), strip_t=
ags($cr_name)));
 			for ($i =3D 0; $i < count($f_id); $i++)
 			{
 				if (${"part" . $f_id[$i]} =3D=3D '')
@@ -59,12 +74,12 @@
 		extract($p_array);
 		try
 		{
+                    $this->verify($p_array,false);
 			$cn->start();
-			$cn->exec_sql("update coprop.clef_repartition set cr_start=3Dto_date(=
$1,'DD.MM.YYYY'),
-				cr_end=3Dto_date($2,'DD.MM.YYYY'),
+			$cn->exec_sql("update coprop.clef_repartition set=20
 				cr_note=3D$3,cr_name=3D$4
 				where cr_id=3D$5",
-					array(strip_tags($cr_start), strip_tags($cr_end), strip_tags($cr_no=
te), strip_tags($cr_name),$this->cr_id));
+					array( strip_tags($cr_note), strip_tags($cr_name),$this->cr_id));
 			$cn->exec_sql("delete from coprop.clef_repartition_detail where cr_id=
=3D$1",array($this->cr_id));
 			for ($i =3D 0; $i < count($f_id); $i++)
 			{



From MAILER-DAEMON Wed Jan 04 10:00:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSK1-0001ww-38
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:00:09 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:02:19 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68494.1325689208.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r235 - trunk/coprop/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, 04 Jan 2012 15:00:07 -0000

Author: danydb
Date: 2012-01-04 16:02:19 +0100 (Wed, 04 Jan 2012)
New Revision: 235

Modified:
   trunk/coprop/include/key.inc.php
Log:
remove date from key

Modified: trunk/coprop/include/key.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/coprop/include/key.inc.php	2012-01-04 15:01:28 UTC (rev 234)
+++ trunk/coprop/include/key.inc.php	2012-01-04 15:02:19 UTC (rev 235)
@@ -60,12 +60,6 @@
 		<th>
 			Note
 		</th>
-		<th>
-			Date d=C3=A9but
-		</th>
-		<th>
-			Date Fin
-		</th>
 	</tr>
 <?
 for ($i=3D0;$i < count($a_key);$i++):
@@ -80,11 +74,6 @@
 			<?=3D$a_key[$i]['cr_note']?>
 		</td>
 		<td>
-			<?=3Dformat_date($a_key[$i]['cr_start'])?>
-		</td>
-		<td>
-			<?=3Dformat_date($a_key[$i]['cr_end'])?>
-		</td>
 	</tr>
 <?
 endfor;



From MAILER-DAEMON Wed Jan 04 10:21:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSes-000895-OW
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:21:42 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:23:56 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68543.1325690502.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r236 - trunk/coprop/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, 04 Jan 2012 15:21:41 -0000

Author: danydb
Date: 2012-01-04 16:23:56 +0100 (Wed, 04 Jan 2012)
New Revision: 236

Modified:
   trunk/coprop/include/class_copro_key.php
Log:
remove date from key

Modified: trunk/coprop/include/class_copro_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_key.php	2012-01-04 15:02:19 UTC (rev=
 235)
+++ trunk/coprop/include/class_copro_key.php	2012-01-04 15:23:56 UTC (rev=
 236)
@@ -77,8 +77,8 @@
                     $this->verify($p_array,false);
 			$cn->start();
 			$cn->exec_sql("update coprop.clef_repartition set=20
-				cr_note=3D$3,cr_name=3D$4
-				where cr_id=3D$5",
+				cr_note=3D$1,cr_name=3D$2
+				where cr_id=3D$3",
 					array( strip_tags($cr_note), strip_tags($cr_name),$this->cr_id));
 			$cn->exec_sql("delete from coprop.clef_repartition_detail where cr_id=
=3D$1",array($this->cr_id));
 			for ($i =3D 0; $i < count($f_id); $i++)



From MAILER-DAEMON Wed Jan 04 10:29:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSmL-0003Mu-VC
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:29:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:31:33 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68554.1325690962.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r237 - in trunk/coprop: . 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, 04 Jan 2012 15:29:22 -0000

Author: danydb
Date: 2012-01-04 16:31:33 +0100 (Wed, 04 Jan 2012)
New Revision: 237

Added:
   trunk/coprop/include/ajax_remove_key.php
Modified:
   trunk/coprop/ajax.php
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/key.inc.php
Log:
remove key

Modified: trunk/coprop/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/coprop/ajax.php	2012-01-04 15:23:56 UTC (rev 236)
+++ trunk/coprop/ajax.php	2012-01-04 15:31:33 UTC (rev 237)
@@ -21,6 +21,8 @@
 	case 'modkey':
 		require_once 'include/ajax_mod_key.php';
 		break;
+        case 'removekey':
+            require_once 'include/ajax_remove_key.php';
=20
 	default:
=20

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-04 15:23:56 UTC (rev 236)
+++ trunk/coprop/coprop-javascript.js	2012-01-04 15:31:33 UTC (rev 237)
@@ -58,7 +58,7 @@
 					remove_waiting_box();
 					$("row"+lot_id).style.color=3D"red";
 					$("row"+lot_id).style.textDecoration=3D"line-through";
-					$("col"+lot_id).innerHTML=3D"Enlev=C3=A9";
+					$("col"+lot_id).innerHTML=3D"Effac=C3=A9";
=20
 					//response.responseText.evalScripts();
 				}
@@ -174,7 +174,40 @@
 		alert(e.message);
 	}
 }
-function del_key(plugin_code,ac,dossier,lot_id)
+
+function remove_key(plugin_code,ac,dossier,key_id)
 {
+	if (! confirm("Vous voulez effacer cette clef ?")) { return;}
+	waiting_box();
+	try
+	{
+		var queryString=3D"plugin_code=3D"+plugin_code+"&gDossier=3D"+dossier+=
"&key_id=3D"+key_id+'&ac=3D'+ac+"&act=3Dremovekey";
+		var action=3Dnew Ajax.Request ( 'ajax.php',
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:null,
+			onSuccess:function (response)
+			{
+				try
+				{
+					remove_waiting_box();
+					$("row"+key_id).style.color=3D"red";
+					$("row"+key_id).style.textDecoration=3D"line-through";
+					$("col"+key_id).innerHTML=3D"Effac=C3=A9";
=20
+					//response.responseText.evalScripts();
+				}
+				catch(e)
+				{
+					alert("R=C3=A9ponse Ajax =3D"+e.message);
+				}
+			}
+		}
+		);
+	}
+	catch(e)
+	{
+		alert(e.message);
+	}
 }
\ No newline at end of file

Added: trunk/coprop/include/ajax_remove_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_remove_key.php	                        (rev=
 0)
+++ trunk/coprop/include/ajax_remove_key.php	2012-01-04 15:31:33 UTC (rev=
 237)
@@ -0,0 +1,4 @@
+<?php
+global $cn;
+$cn->exec_sql("delete from copro.clef_repartition where cr_id=3D$1",arra=
y($key_id));
+?>

Modified: trunk/coprop/include/key.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/coprop/include/key.inc.php	2012-01-04 15:23:56 UTC (rev 236)
+++ trunk/coprop/include/key.inc.php	2012-01-04 15:31:33 UTC (rev 237)
@@ -60,20 +60,26 @@
 		<th>
 			Note
 		</th>
+                <th></th>
 	</tr>
 <?
 for ($i=3D0;$i < count($a_key);$i++):
 	$js=3Dsprintf("mod_key('%s','%s','%s','%s')",$gDossier,$_REQUEST['plugi=
n_code'],$_REQUEST['ac'],$a_key[$i]['cr_id']);
 	$mod_key=3DHtmlInput::anchor($a_key[$i]['cr_name'],"","onclick=3D\"$js\=
"");
 ?>
-	<tr>
+	<tr id=3D"row<?=3D$a_key[$i]['cr_id']?>">
 		<td>
 			<?=3D$mod_key?>
 		</td>
 		<td>
 			<?=3D$a_key[$i]['cr_note']?>
 		</td>
-		<td>
+		<td id=3D"col<?=3D$a_key[$i]['cr_id']?>">
+                    <?
+                    $js=3D"onclick=3Dremove_key('".$_REQUEST['plugin_cod=
e']."','".$_REQUEST['ac']."','".$_REQUEST['gDossier']."','".$a_key[$i]['c=
r_id']."')";
+			echo HtmlInput::anchor("enlever","",$js);
+                        ?>
+                </td>
 	</tr>
 <?
 endfor;



From MAILER-DAEMON Wed Jan 04 10:34:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSqp-0004I3-OG
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:34:03 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:36:18 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68564.1325691242.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r238 - trunk/coprop/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, 04 Jan 2012 15:34:02 -0000

Author: danydb
Date: 2012-01-04 16:36:18 +0100 (Wed, 04 Jan 2012)
New Revision: 238

Modified:
   trunk/coprop/include/ajax_add_key.php
Log:
remove clef_repartition.cr_start clef_repartition.cr_end

Modified: trunk/coprop/include/ajax_add_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_add_key.php	2012-01-04 15:31:33 UTC (rev 23=
7)
+++ trunk/coprop/include/ajax_add_key.php	2012-01-04 15:36:18 UTC (rev 23=
8)
@@ -26,8 +26,6 @@
  * @brief ajout clef repartition
  *
  */
-$date_start=3Dnew IDate('cr_start');
-$date_end=3Dnew IDate('cr_end');
 $note=3Dnew ITextarea('cr_note');
 $note->heigh=3D6;
 $note->width=3D80;



From MAILER-DAEMON Wed Jan 04 10:34:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSre-0004LF-S2
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:34:54 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:37:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68565.1325691294.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r239 - trunk/coprop/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, 04 Jan 2012 15:34:53 -0000

Author: danydb
Date: 2012-01-04 16:37:08 +0100 (Wed, 04 Jan 2012)
New Revision: 239

Modified:
   trunk/coprop/include/template/key_detail.php
Log:
remove decimal from key

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 15:36:18 UTC =
(rev 238)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 15:37:08 UTC =
(rev 239)
@@ -57,7 +57,7 @@
 		<td>
 			<?
 			$num=3Dnew INum('part'.$alot[$i]['f_id']);
-			$num->value=3D$alot[$i]['l_part'];
+			$num->value=3Dround($alot[$i]['l_part']);
 			echo $num->input();
 			?>
 		</td>



From MAILER-DAEMON Wed Jan 04 10:40:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiSx6-00074x-Kf
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:40:32 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:42:40 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68571.1325691632.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r240 - in trunk/coprop/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, 04 Jan 2012 15:40:31 -0000

Author: danydb
Date: 2012-01-04 16:42:40 +0100 (Wed, 04 Jan 2012)
New Revision: 240

Modified:
   trunk/coprop/include/ajax_add_key.php
   trunk/coprop/include/ajax_mod_key.php
   trunk/coprop/include/class_copro_key.php
   trunk/coprop/include/key.inc.php
   trunk/coprop/include/template/key_detail.php
Log:
add total tantieme

Modified: trunk/coprop/include/ajax_add_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_add_key.php	2012-01-04 15:37:08 UTC (rev 23=
9)
+++ trunk/coprop/include/ajax_add_key.php	2012-01-04 15:42:40 UTC (rev 24=
0)
@@ -32,6 +32,10 @@
 $note->style=3D'style=3D"border:solid blue 1px;vertical-align:text-top;"=
 ';
 $name=3Dnew IText('cr_name');
 $name->size=3D60;
+$tantieme=3Dnew INum('cr_tantieme');
+$tantieme->javascript=3D'onchange=3D"format_number(this,0);"';
+$tantieme->value=3D0;
+
 $str_message=3D"Ajout d'une clef de r=C3=A9partition";
 $alot=3D$cn->get_array("select f_id,vw_name as name,quick_code as qcode,=
 0 as l_part
 	from vw_fiche_attr where fd_id=3D$1",array($g_copro_parameter->categori=
e_lot));

Modified: trunk/coprop/include/ajax_mod_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_key.php	2012-01-04 15:37:08 UTC (rev 23=
9)
+++ trunk/coprop/include/ajax_mod_key.php	2012-01-04 15:42:40 UTC (rev 24=
0)
@@ -26,7 +26,7 @@
  * @brief modifie clef
  *
  */
-$key=3D$cn->get_array("SELECT cr_name, cr_note
+$key=3D$cn->get_array("SELECT cr_name, cr_note,cr_tantieme
   FROM coprop.clef_repartition where cr_id=3D$1",array($key_id));
=20
 $str_message=3D"Modification ".h($key[0]['cr_name']);
@@ -42,6 +42,10 @@
 $name->value=3D$key[0]['cr_name'];
 $name->size=3D60;
=20
+$tantieme=3Dnew INum('cr_tantieme');
+$tantieme->javascript=3D'onchange=3D"format_number(this,0);"';
+$tantieme->value=3Dround($key[0]['cr_tantieme']);
+
 $alot=3D$cn->get_array("select lot_fk as f_id,
 	(select ad_value from fiche_detail where f_id=3Dlot_fk and ad_id=3D1) a=
s name,
 	(select ad_value from fiche_detail where f_id=3Dlot_fk and ad_id=3D23) =
as qcode,

Modified: trunk/coprop/include/class_copro_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_key.php	2012-01-04 15:37:08 UTC (rev=
 239)
+++ trunk/coprop/include/class_copro_key.php	2012-01-04 15:42:40 UTC (rev=
 240)
@@ -51,8 +51,8 @@
 		{
                     $this->verify($p_array);
 			$cn->start();
-			$this->cr_id =3D $cn->get_value("insert into coprop.clef_repartition(=
cr_note,cr_name)
-				values($1,$2) returning cr_id", array( strip_tags($cr_note), strip_t=
ags($cr_name)));
+			$this->cr_id =3D $cn->get_value("insert into coprop.clef_repartition(=
cr_note,cr_name,cr_tantieme)
+				values($1,$2) returning cr_id", array( strip_tags($cr_note), strip_t=
ags($cr_name),$cr_tantieme));
 			for ($i =3D 0; $i < count($f_id); $i++)
 			{
 				if (${"part" . $f_id[$i]} =3D=3D '')
@@ -77,9 +77,9 @@
                     $this->verify($p_array,false);
 			$cn->start();
 			$cn->exec_sql("update coprop.clef_repartition set=20
-				cr_note=3D$1,cr_name=3D$2
-				where cr_id=3D$3",
-					array( strip_tags($cr_note), strip_tags($cr_name),$this->cr_id));
+				cr_note=3D$1,cr_name=3D$2,cr_tantieme=3D$3
+				where cr_id=3D$4",
+					array( strip_tags($cr_note), strip_tags($cr_name),$cr_tantieme,$thi=
s->cr_id));
 			$cn->exec_sql("delete from coprop.clef_repartition_detail where cr_id=
=3D$1",array($this->cr_id));
 			for ($i =3D 0; $i < count($f_id); $i++)
 			{

Modified: trunk/coprop/include/key.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/coprop/include/key.inc.php	2012-01-04 15:37:08 UTC (rev 239)
+++ trunk/coprop/include/key.inc.php	2012-01-04 15:42:40 UTC (rev 240)
@@ -45,7 +45,7 @@
 }
=20
=20
-$sql=3D"select cr_id,cr_name,cr_note,cr_start,cr_end from coprop.clef_re=
partition ";
+$sql=3D"select cr_id,cr_name,cr_note,cr_tantieme from coprop.clef_repart=
ition ";
 /**
  * @todo ajouter tri
  */
@@ -60,6 +60,9 @@
 		<th>
 			Note
 		</th>
+                <th>
+                    Tanti=C3=A8me=20
+                </th>
                 <th></th>
 	</tr>
 <?
@@ -80,6 +83,9 @@
 			echo HtmlInput::anchor("enlever","",$js);
                         ?>
                 </td>
+                <td>
+                    <?=3Dround($a_key[$i]['cr_tantieme'])?>
+                </td>
 	</tr>
 <?
 endfor;

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 15:37:08 UTC =
(rev 239)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 15:42:40 UTC =
(rev 240)
@@ -39,6 +39,14 @@
 		<td>
 			<?=3D$name->input()?>
 		</td>
+        </tr>
+        <tr>
+            <td>
+                Total tanti=C3=A8me=20
+            </td>
+                <td>
+                    <?=3D$tantieme->input()?>
+                </td>
 	</tr>
 =09
 </table>



From MAILER-DAEMON Wed Jan 04 10:45:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiT1h-0008Rz-SH
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 10:45:17 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 16:47:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68585.1325691916.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r241 - trunk/coprop/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, 04 Jan 2012 15:45:16 -0000

Author: danydb
Date: 2012-01-04 16:47:28 +0100 (Wed, 04 Jan 2012)
New Revision: 241

Modified:
   trunk/coprop/include/ajax_remove_key.php
Log:
schema is coprop

Modified: trunk/coprop/include/ajax_remove_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_remove_key.php	2012-01-04 15:42:40 UTC (rev=
 240)
+++ trunk/coprop/include/ajax_remove_key.php	2012-01-04 15:47:28 UTC (rev=
 241)
@@ -1,4 +1,4 @@
 <?php
 global $cn;
-$cn->exec_sql("delete from copro.clef_repartition where cr_id=3D$1",arra=
y($key_id));
+$cn->exec_sql("delete from coprop.clef_repartition where cr_id=3D$1",arr=
ay($key_id));
 ?>



From MAILER-DAEMON Wed Jan 04 11:08:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTOE-0007Te-8O
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:08:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:10:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68629.1325693312.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r242 - in trunk/coprop: . 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, 04 Jan 2012 16:08:31 -0000

Author: danydb
Date: 2012-01-04 17:10:44 +0100 (Wed, 04 Jan 2012)
New Revision: 242

Modified:
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/key.inc.php
Log:
cosmetic : col . order, change answer when removing

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-04 15:47:28 UTC (rev 241)
+++ trunk/coprop/coprop-javascript.js	2012-01-04 16:10:44 UTC (rev 242)
@@ -58,6 +58,7 @@
 					remove_waiting_box();
 					$("row"+lot_id).style.color=3D"red";
 					$("row"+lot_id).style.textDecoration=3D"line-through";
+                                        $("col"+lot_id).style.textDecora=
tion=3D"none";
 					$("col"+lot_id).innerHTML=3D"Effac=C3=A9";
=20
 					//response.responseText.evalScripts();
@@ -194,6 +195,7 @@
 					remove_waiting_box();
 					$("row"+key_id).style.color=3D"red";
 					$("row"+key_id).style.textDecoration=3D"line-through";
+                                        $("col"+key_id).style.textDecora=
tion=3D"none";
 					$("col"+key_id).innerHTML=3D"Effac=C3=A9";
=20
 					//response.responseText.evalScripts();

Modified: trunk/coprop/include/key.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/coprop/include/key.inc.php	2012-01-04 15:47:28 UTC (rev 241)
+++ trunk/coprop/include/key.inc.php	2012-01-04 16:10:44 UTC (rev 242)
@@ -77,15 +77,16 @@
 		<td>
 			<?=3D$a_key[$i]['cr_note']?>
 		</td>
+                <td>
+                    <?=3Dround($a_key[$i]['cr_tantieme'])?>
+                </td>
 		<td id=3D"col<?=3D$a_key[$i]['cr_id']?>">
                     <?
                     $js=3D"onclick=3Dremove_key('".$_REQUEST['plugin_cod=
e']."','".$_REQUEST['ac']."','".$_REQUEST['gDossier']."','".$a_key[$i]['c=
r_id']."')";
 			echo HtmlInput::anchor("enlever","",$js);
                         ?>
                 </td>
-                <td>
-                    <?=3Dround($a_key[$i]['cr_tantieme'])?>
-                </td>
+               =20
 	</tr>
 <?
 endfor;



From MAILER-DAEMON Wed Jan 04 11:11:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTQy-0007d5-Gf
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:11:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:13:42 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68634.1325693483.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r243 - in trunk/coprop/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, 04 Jan 2012 16:11:23 -0000

Author: danydb
Date: 2012-01-04 17:13:41 +0100 (Wed, 04 Jan 2012)
New Revision: 243

Modified:
   trunk/coprop/include/ajax_add_key.php
   trunk/coprop/include/ajax_mod_key.php
   trunk/coprop/include/template/key_detail.php
Log:
add description lot

Modified: trunk/coprop/include/ajax_add_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_add_key.php	2012-01-04 16:10:44 UTC (rev 24=
2)
+++ trunk/coprop/include/ajax_add_key.php	2012-01-04 16:13:41 UTC (rev 24=
3)
@@ -37,7 +37,7 @@
 $tantieme->value=3D0;
=20
 $str_message=3D"Ajout d'une clef de r=C3=A9partition";
-$alot=3D$cn->get_array("select f_id,vw_name as name,quick_code as qcode,=
 0 as l_part
+$alot=3D$cn->get_array("select f_id,vw_name as name,quick_code as qcode,=
 vw_description as desc, 0 as l_part
 	from vw_fiche_attr where fd_id=3D$1",array($g_copro_parameter->categori=
e_lot));
 echo '<form method=3D"post">';
 require_once 'template/key_detail.php';

Modified: trunk/coprop/include/ajax_mod_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_key.php	2012-01-04 16:10:44 UTC (rev 24=
2)
+++ trunk/coprop/include/ajax_mod_key.php	2012-01-04 16:13:41 UTC (rev 24=
3)
@@ -49,6 +49,7 @@
 $alot=3D$cn->get_array("select lot_fk as f_id,
 	(select ad_value from fiche_detail where f_id=3Dlot_fk and ad_id=3D1) a=
s name,
 	(select ad_value from fiche_detail where f_id=3Dlot_fk and ad_id=3D23) =
as qcode,
+	(select ad_value from fiche_detail where f_id=3Dlot_fk and ad_id=3D9) a=
s desc,
 	crd_amount as l_part
 	from
 		coprop.clef_repartition_detail

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 16:10:44 UTC =
(rev 242)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 16:13:41 UTC =
(rev 243)
@@ -62,6 +62,9 @@
 			<?=3DHtmlInput::card_detail($alot[$i]['qcode'],$alot[$i]['name'])?>
 			<?=3DHtmlInput::hidden('f_id[]',$alot[$i]['f_id'])?>
 		</td>
+                <td>
+                    <?=3D$a_lot[$i]['desc']?>
+                </td>
 		<td>
 			<?
 			$num=3Dnew INum('part'.$alot[$i]['f_id']);



From MAILER-DAEMON Wed Jan 04 11:17:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTXA-00011S-Ag
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:17:48 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:20:00 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68658.1325693867.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r244 - in trunk/coprop/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, 04 Jan 2012 16:17:46 -0000

Author: danydb
Date: 2012-01-04 17:20:00 +0100 (Wed, 04 Jan 2012)
New Revision: 244

Modified:
   trunk/coprop/include/ajax_add_key.php
   trunk/coprop/include/ajax_mod_key.php
   trunk/coprop/include/template/key_detail.php
Log:
show difference tantieme and computed tantieme

Modified: trunk/coprop/include/ajax_add_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_add_key.php	2012-01-04 16:13:41 UTC (rev 24=
3)
+++ trunk/coprop/include/ajax_add_key.php	2012-01-04 16:20:00 UTC (rev 24=
4)
@@ -39,6 +39,7 @@
 $str_message=3D"Ajout d'une clef de r=C3=A9partition";
 $alot=3D$cn->get_array("select f_id,vw_name as name,quick_code as qcode,=
 vw_description as desc, 0 as l_part
 	from vw_fiche_attr where fd_id=3D$1",array($g_copro_parameter->categori=
e_lot));
+$init_tantieme=3D0;
 echo '<form method=3D"post">';
 require_once 'template/key_detail.php';
 echo HtmlInput::submit("add_key","Ajouter",' onclick=3D"return confirm (=
\'Vous confirmez?\')"');

Modified: trunk/coprop/include/ajax_mod_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_key.php	2012-01-04 16:13:41 UTC (rev 24=
3)
+++ trunk/coprop/include/ajax_mod_key.php	2012-01-04 16:20:00 UTC (rev 24=
4)
@@ -59,6 +59,11 @@
 f_id,vw_name as name,quick_code as qcode, 0 as l_part
 	from vw_fiche_attr where fd_id=3D$2
 	and f_id not in (select lot_fk from coprop.clef_repartition_detail wher=
e cr_id=3D$1)",array($key_id,$g_copro_parameter->categorie_lot));
+
+$init_tantieme=3D$cn->get_value("select sum(crd_amount) from=20
+		coprop.clef_repartition_detail
+		where cr_id=3D$1",array($key_id));
+
 echo '<form method=3D"post">';
 echo HtmlInput::hidden('cr_id',$key_id);
 require_once 'template/key_detail.php';

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 16:13:41 UTC =
(rev 243)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 16:20:00 UTC =
(rev 244)
@@ -77,4 +77,17 @@
 	endfor;
 ?>
 </table>
+Total tanti=C3=A8me : <span id=3D"span_tantieme"><?=3Dinit_tantieme?></s=
pan>
+<?
+if ( bcsub ($init_tantieme,$tantieme->value) !=3D 0):
+?>
+<span id=3D"span_diff" style=3D"color:red"><?=3Dbcsub ($init_tantieme,$t=
antieme->value)?></span>
+<?
+else:
+    ?>
+<span id=3D"span_diff" style=3D"color:green"><?=3Dbcsub ($init_tantieme,=
$tantieme->value)?></span>
+<?
+endif;
+
+?>
 </div>
\ No newline at end of file



From MAILER-DAEMON Wed Jan 04 11:18:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTXh-00012w-Ds
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:18:21 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:20:36 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68660.1325693900.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r245 - trunk/coprop/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, 04 Jan 2012 16:18:19 -0000

Author: danydb
Date: 2012-01-04 17:20:36 +0100 (Wed, 04 Jan 2012)
New Revision: 245

Modified:
   trunk/coprop/include/template/key_detail.php
Log:
typo

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 16:20:00 UTC =
(rev 244)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 16:20:36 UTC =
(rev 245)
@@ -77,7 +77,7 @@
 	endfor;
 ?>
 </table>
-Total tanti=C3=A8me : <span id=3D"span_tantieme"><?=3Dinit_tantieme?></s=
pan>
+Total tanti=C3=A8mes : <span id=3D"span_tantieme"><?=3Dinit_tantieme?></=
span>
 <?
 if ( bcsub ($init_tantieme,$tantieme->value) !=3D 0):
 ?>



From MAILER-DAEMON Wed Jan 04 11:19:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTYd-0001Am-OY
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:19:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:21:28 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68663.1325693959.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r246 - trunk/coprop/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, 04 Jan 2012 16:19:18 -0000

Author: danydb
Date: 2012-01-04 17:21:28 +0100 (Wed, 04 Jan 2012)
New Revision: 246

Modified:
   trunk/coprop/include/template/key_detail.php
Log:
cosmetic difference & total

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 16:20:36 UTC =
(rev 245)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 16:21:28 UTC =
(rev 246)
@@ -77,7 +77,10 @@
 	endfor;
 ?>
 </table>
+<p>
 Total tanti=C3=A8mes : <span id=3D"span_tantieme"><?=3Dinit_tantieme?></=
span>
+</p>
+<p>
 <?
 if ( bcsub ($init_tantieme,$tantieme->value) !=3D 0):
 ?>
@@ -85,9 +88,10 @@
 <?
 else:
     ?>
+Diff=C3=A9rence
 <span id=3D"span_diff" style=3D"color:green"><?=3Dbcsub ($init_tantieme,=
$tantieme->value)?></span>
 <?
 endif;
-
 ?>
+</p>
 </div>
\ No newline at end of file



From MAILER-DAEMON Wed Jan 04 11:40:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTt1-0007Cu-BH
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:40:23 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:42:30 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68719.1325695222.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r247 - trunk/coprop/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, 04 Jan 2012 16:40:21 -0000

Author: danydb
Date: 2012-01-04 17:42:30 +0100 (Wed, 04 Jan 2012)
New Revision: 247

Modified:
   trunk/coprop/include/ajax_mod_key.php
Log:
bug : sql incorrect

Modified: trunk/coprop/include/ajax_mod_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_key.php	2012-01-04 16:21:28 UTC (rev 24=
6)
+++ trunk/coprop/include/ajax_mod_key.php	2012-01-04 16:42:30 UTC (rev 24=
7)
@@ -56,7 +56,7 @@
 		where cr_id=3D$1
 	union
 select
-f_id,vw_name as name,quick_code as qcode, 0 as l_part
+f_id,vw_name as name,quick_code as qcode,vw_description as desc, 0 as l_=
part
 	from vw_fiche_attr where fd_id=3D$2
 	and f_id not in (select lot_fk from coprop.clef_repartition_detail wher=
e cr_id=3D$1)",array($key_id,$g_copro_parameter->categorie_lot));
=20



From MAILER-DAEMON Wed Jan 04 11:45:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiTy6-0008CS-TR
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:45:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:47:51 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68732.1325695537.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r248 - trunk/coprop/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, 04 Jan 2012 16:45:36 -0000

Author: danydb
Date: 2012-01-04 17:47:50 +0100 (Wed, 04 Jan 2012)
New Revision: 248

Modified:
   trunk/coprop/include/template/key_detail.php
Log:
typo presentation modify key

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-04 16:42:30 UTC =
(rev 247)
+++ trunk/coprop/include/template/key_detail.php	2012-01-04 16:47:50 UTC =
(rev 248)
@@ -63,7 +63,7 @@
 			<?=3DHtmlInput::hidden('f_id[]',$alot[$i]['f_id'])?>
 		</td>
                 <td>
-                    <?=3D$a_lot[$i]['desc']?>
+                    <?=3D$alot[$i]['desc']?>
                 </td>
 		<td>
 			<?
@@ -78,17 +78,20 @@
 ?>
 </table>
 <p>
-Total tanti=C3=A8mes : <span id=3D"span_tantieme"><?=3Dinit_tantieme?></=
span>
+Total tanti=C3=A8mes : <span id=3D"span_tantieme"><?=3Dround($init_tanti=
eme)?></span>
 </p>
+
 <p>
+  Diff=C3=A9rence :
+
 <?
+ bcscale(0);
 if ( bcsub ($init_tantieme,$tantieme->value) !=3D 0):
 ?>
 <span id=3D"span_diff" style=3D"color:red"><?=3Dbcsub ($init_tantieme,$t=
antieme->value)?></span>
 <?
 else:
     ?>
-Diff=C3=A9rence
 <span id=3D"span_diff" style=3D"color:green"><?=3Dbcsub ($init_tantieme,=
$tantieme->value)?></span>
 <?
 endif;



From MAILER-DAEMON Wed Jan 04 11:50:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiU2M-0002dl-EC
	for mharc-phpcompta-dev@gnu.org; Wed, 04 Jan 2012 11:50:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed,  4 Jan 2012 17:52:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.68745.1325695801.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r249 - trunk/coprop/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, 04 Jan 2012 16:50:00 -0000

Author: danydb
Date: 2012-01-04 17:52:14 +0100 (Wed, 04 Jan 2012)
New Revision: 249

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
cosmetic


Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-04 16:47:50 UTC =
(rev 248)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-04 16:52:14 UTC =
(rev 249)
@@ -38,7 +38,7 @@
         <tr>
             <td> Fiche pour l'appel</td>
            =20
-            <td><?=3D$f_categorie_appel_bt?>$f_categorie_appel_bt<?=3D$c=
ategorie_appel->input()?></td>
+            <td><?=3D$f_categorie_appel_bt?><?=3D$categorie_appel->input=
()?></td>
 		<td><?=3D$f_categorie_appel_label?></td>
 		<td><?=3D$str_add_appel?></td>
 	</tr>



From MAILER-DAEMON Thu Jan 05 09:58:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiomL-0005nf-43
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 09:58:53 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 16:00:58 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71049.1325775532.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r250 - in trunk/coprop: . 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 Jan 2012 14:58:51 -0000

Author: danydb
Date: 2012-01-05 16:00:57 +0100 (Thu, 05 Jan 2012)
New Revision: 250

Added:
   trunk/coprop/include/ajax_bud_display.php
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/template/bud_detail.php
   trunk/coprop/include/template/budget_list.php
Modified:
   trunk/coprop/ajax.php
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/budget.inc.php
   trunk/coprop/index.php
Log:
Ajout budget

Modified: trunk/coprop/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/coprop/ajax.php	2012-01-04 16:52:14 UTC (rev 249)
+++ trunk/coprop/ajax.php	2012-01-05 15:00:57 UTC (rev 250)
@@ -23,7 +23,8 @@
 		break;
         case 'removekey':
             require_once 'include/ajax_remove_key.php';
-
+        case 'buddisplay':
+            require_once 'include/ajax_bud_display.php';
 	default:
=20
 		var_dump($_GET);

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-04 16:52:14 UTC (rev 249)
+++ trunk/coprop/coprop-javascript.js	2012-01-05 15:00:57 UTC (rev 250)
@@ -212,4 +212,36 @@
 	{
 		alert(e.message);
 	}
+}
+function budget_detail(plugin_code,ac,dossier,bud_id)
+{
+	waiting_box();
+	try
+	{
+		var queryString=3D"plugin_code=3D"+plugin_code+"&gDossier=3D"+dossier+=
"&bud_id=3D"+bud_id+'&ac=3D'+ac+"&act=3Dbuddisplay";
+		var action=3Dnew Ajax.Request ( 'ajax.php',
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:null,
+			onSuccess:function (response)
+			{
+				try
+				{
+                                    remove_waiting_box();
+                                    $('divbuddetail').innerHTML=3Drespon=
se.responseText;
+					//response.responseText.evalScripts();
+				}
+				catch(e)
+				{
+					alert("R=C3=A9ponse Ajax =3D"+e.message);
+				}
+			}
+		}
+		);
+	}
+	catch(e)
+	{
+		alert(e.message);
+	}
 }
\ No newline at end of file

Added: trunk/coprop/include/ajax_bud_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/coprop/include/ajax_bud_display.php	                        (re=
v 0)
+++ trunk/coprop/include/ajax_bud_display.php	2012-01-05 15:00:57 UTC (re=
v 250)
@@ -0,0 +1,11 @@
+<?php
+/**
+ * @file montre d=C3=A9tail budget pour mise =C3=A0 jour
+ */
+require_once 'class_budget.php';
+
+$bud=3Dnew Budget();
+$bud->b_id=3D$bud_id;
+
+$bud->detail();
+?>

Modified: trunk/coprop/include/budget.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/coprop/include/budget.inc.php	2012-01-04 16:52:14 UTC (rev 249)
+++ trunk/coprop/include/budget.inc.php	2012-01-05 15:00:57 UTC (rev 250)
@@ -1,6 +1,14 @@
 <?php
=20
 /**
- * @file maintient des budgets
+ * @file gestion des budgets
  */
-?>
+
+require_once 'class_budget.php';
+
+
+
+
+$bud=3Dnew Budget();
+
+$bud->to_list();
\ No newline at end of file

Added: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	                        (rev 0)
+++ trunk/coprop/include/class_budget.php	2012-01-05 15:00:57 UTC (rev 25=
0)
@@ -0,0 +1,57 @@
+<?php
+
+
+class Budget
+{
+    function to_list()
+    {
+        global $cn;
+       =20
+        $array=3D$cn->get_array("select b_id, b_name,
+                    to_char(b_start,'DD.MM.YYYY') as str_start,
+                    to_char(b_end,'DD.MM.YYYY') as str_end,
+                    b_amount
+                    from coprop.budget
+                    order by b_name
+                    ");
+       =20
+        require_once 'template/budget_list.php';
+
+    }
+    function detail()
+    {
+        global $cn;
+        try
+        {
+           =20
+            if ( ! isset ($this->b_id)|| trim($this->b_id)=3D=3D'')
+                    throw new Exception ("Aucun budget demand=C3=A9");
+            $array=3D$cn->get_array("select bt_id,bt_amount,f_id,vw_name=
,quick_code,cr_name,cr_id=20
+                from coprop.budget_detail
+                join coprop.clef_repartition using (cr_id)
+                where b_id=3D$1",array($this->b_id));
+            $a_input=3Darray();
+            for ($i=3D0;$i<count($array);$i++)
+            {
+                $card=3Dnew ICard('f_id[]');
+                $card->value=3D$array[$i]['quick_code'];
+                $amount=3Dnew INum("bt_amount[]");
+                $amount->value=3Dround($array[$i]['bt_amount'],2);
+                $hidden=3DHtmlInput::hidden("bt_id[]",$array[$i]["bt_id"=
]);
+                $a_input[$i]["amount"]=3D$amount->input();
+                $a_input[$i]["hidden"]=3D$hidden;
+                $a_input[$i]["card"]=3D$card->input();
+               =20
+            }
+            require_once 'template/bud_detail.php';
+        }
+        catch (Exception $e)
+        {
+            $e->getTraceAsString();
+        }
+    }
+}
+
+
+
+?>

Added: trunk/coprop/include/template/bud_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/coprop/include/template/bud_detail.php	                        =
(rev 0)
+++ trunk/coprop/include/template/bud_detail.php	2012-01-05 15:00:57 UTC =
(rev 250)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * @file montre les d=C3=A9tails d'un budget
+ */
+?>
+<table class=3D"result">
+    <tr>
+        <th>Fiche d=C3=A9pense</th>
+        <th>Clef de r=C3=A9partition </th>
+        <th>Montant</th>
+    </tr>
+<? for ($i=3D0;$i < count($a_input);$i++):?>
+    <tr>
+        <td>
+            <?=3D$a_input[$i]['card']?>
+        </td>
+        <td>
+            <?=3D$a_input[$i]['key']?>
+           =20
+        </td>
+        <td>
+            <?=3D$a_input[$i]['amount']?>
+           =20
+        </td>
+    </tr>=20
+   =20
+<? endfor?>
+   =20
+</table>

Added: trunk/coprop/include/template/budget_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/budget_list.php	                       =
 (rev 0)
+++ trunk/coprop/include/template/budget_list.php	2012-01-05 15:00:57 UTC=
 (rev 250)
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Liste tous les budgets inclus
+ * @see Budget::to_list
+ */
+?>
+
+<table class=3D"result">
+    <tr>
+        <th> Nom </th>
+        <th> Date d=C3=A9but </th>
+        <th> Date Fin </th>
+        <th> Montant </th>
+    </tr>
+<?
+for ($i=3D0;$i<count($array);$i++):
+    $class=3D($i%2=3D=3D0)?' class=3D"evend" ':' class=3D"odd" ';
+    $str_js=3Dsprintf(" onclick=3D\"budget_detail('%s','%s','%s','%s')\"=
 ",
+            $_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier=
'],$array[$i]['b_id']);
+    $js=3DHtmlInput::anchor("D=C3=A9tail",$str_js);
+?>
+    <tr <?=3D$class?> >
+        <td>
+            <?=3D$array[$i]['b_name']?>
+        </td>
+         <td>
+            <?=3D$array[$i]['str_start']?>
+        </td>
+        <td>
+            <?=3D$array[$i]['str_end']?>
+        </td>
+        <td>
+            <?=3Dnbm($array[$i]['b_amount'])?>
+        </td>
+        <td>
+            <?=3D$js?>
+        </td>
+    </tr> =20
+<?
+endfor;
+?>
+   =20
+</table>
+<div id=3D"divbuddetail">
+
+</div>
\ No newline at end of file

Modified: trunk/coprop/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/coprop/index.php	2012-01-04 16:52:14 UTC (rev 249)
+++ trunk/coprop/index.php	2012-01-05 15:00:57 UTC (rev 250)
@@ -41,7 +41,7 @@
          array($url.'&sa=3Dlot',_('Lot'),_('Listes des lots et liaison c=
opro'),1),
          array($url.'&sa=3Dcle',_('Clef de r=C3=A9partition'),_('Clef de=
 r=C3=A9partition'),2),
          array($url.'&sa=3Daf',_('Appel de fond'),_('Cr=C3=A9ation d=C3=A9=
compte pour appel de fond'),3),
-         array($url.'&sa=3Daf',_('Budget'),_('budgets'),5),
+         array($url.'&sa=3Dbu',_('Budget'),_('budgets'),5),
          array($url.'&sa=3Dpa',_('Param=C3=A8tre'),_('Configuration et p=
aram=C3=A8tre'),4)
        );
=20



From MAILER-DAEMON Thu Jan 05 10:15:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rip2Z-00071Y-36
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 10:15:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 16:17:45 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71103.1325776537.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r251 - trunk/coprop
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 Jan 2012 15:15:37 -0000

Author: danydb
Date: 2012-01-05 16:17:45 +0100 (Thu, 05 Jan 2012)
New Revision: 251

Modified:
   trunk/coprop/index.php
Log:
Budget pas appel?\195?\169

Modified: trunk/coprop/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/coprop/index.php	2012-01-05 15:00:57 UTC (rev 250)
+++ trunk/coprop/index.php	2012-01-05 15:17:45 UTC (rev 251)
@@ -61,6 +61,9 @@
   case 'pa':
     $def=3D4;
     break;
+  case 'bu':
+      $def=3D5;
+      break;
   }
=20
 $cn=3Dnew Database(dossier::id());



From MAILER-DAEMON Thu Jan 05 10:18:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rip5D-0000Ru-Dm
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 10:18:23 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 16:20:32 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71110.1325776702.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r252 - trunk/coprop/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 Jan 2012 15:18:21 -0000

Author: danydb
Date: 2012-01-05 16:20:32 +0100 (Thu, 05 Jan 2012)
New Revision: 252

Modified:
   trunk/coprop/include/template/budget_list.php
Log:
Budget : Detail ne fonctionne=20

Modified: trunk/coprop/include/template/budget_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/budget_list.php	2012-01-05 15:17:45 UTC=
 (rev 251)
+++ trunk/coprop/include/template/budget_list.php	2012-01-05 15:20:32 UTC=
 (rev 252)
@@ -17,7 +17,7 @@
     $class=3D($i%2=3D=3D0)?' class=3D"evend" ':' class=3D"odd" ';
     $str_js=3Dsprintf(" onclick=3D\"budget_detail('%s','%s','%s','%s')\"=
 ",
             $_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier=
'],$array[$i]['b_id']);
-    $js=3DHtmlInput::anchor("D=C3=A9tail",$str_js);
+    $js=3DHtmlInput::anchor("D=C3=A9tail","",$str_js);
 ?>
     <tr <?=3D$class?> >
         <td>



From MAILER-DAEMON Thu Jan 05 10:21:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rip7k-0002UF-Us
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 10:21:00 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 16:23:10 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71111.1325776860.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r253 - trunk/coprop/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 Jan 2012 15:21:00 -0000

Author: danydb
Date: 2012-01-05 16:23:10 +0100 (Thu, 05 Jan 2012)
New Revision: 253

Modified:
   trunk/coprop/include/class_budget.php
Log:
Budget : Detail ne fonctionne : erreur sql

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-05 15:20:32 UTC (rev 25=
2)
+++ trunk/coprop/include/class_budget.php	2012-01-05 15:23:10 UTC (rev 25=
3)
@@ -29,6 +29,7 @@
             $array=3D$cn->get_array("select bt_id,bt_amount,f_id,vw_name=
,quick_code,cr_name,cr_id=20
                 from coprop.budget_detail
                 join coprop.clef_repartition using (cr_id)
+                join vw_fiche_attr using (f_id)
                 where b_id=3D$1",array($this->b_id));
             $a_input=3Darray();
             for ($i=3D0;$i<count($array);$i++)



From MAILER-DAEMON Thu Jan 05 10:33:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RipJp-0006PN-Cr
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 10:33:29 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 16:35:42 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71134.1325777609.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r254 - trunk/coprop
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 Jan 2012 15:33:28 -0000

Author: danydb
Date: 2012-01-05 16:35:42 +0100 (Thu, 05 Jan 2012)
New Revision: 254

Modified:
   trunk/coprop/ajax.php
Log:
ajax.php oubli de break

Modified: trunk/coprop/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/coprop/ajax.php	2012-01-05 15:23:10 UTC (rev 253)
+++ trunk/coprop/ajax.php	2012-01-05 15:35:42 UTC (rev 254)
@@ -23,8 +23,10 @@
 		break;
         case 'removekey':
             require_once 'include/ajax_remove_key.php';
+            break;
         case 'buddisplay':
             require_once 'include/ajax_bud_display.php';
+            break;
 	default:
=20
 		var_dump($_GET);



From MAILER-DAEMON Thu Jan 05 11:18:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Riq1W-0000Up-Rm
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:18:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:20:40 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71224.1325780318.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r255 - trunk/coprop/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 Jan 2012 16:18:37 -0000

Author: danydb
Date: 2012-01-05 17:20:40 +0100 (Thu, 05 Jan 2012)
New Revision: 255

Modified:
   trunk/coprop/include/class_budget.php
Log:
budget fiche d?\195?\169pense

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-05 15:35:42 UTC (rev 25=
4)
+++ trunk/coprop/include/class_budget.php	2012-01-05 16:20:40 UTC (rev 25=
5)
@@ -32,10 +32,40 @@
                 join vw_fiche_attr using (f_id)
                 where b_id=3D$1",array($this->b_id));
             $a_input=3Darray();
+            $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D6");
             for ($i=3D0;$i<count($array);$i++)
             {
-                $card=3Dnew ICard('f_id[]');
+                $card=3Dnew ICard('f_id'.$i);
                 $card->value=3D$array[$i]['quick_code'];
+                $card->table=3D0;
+
+                 // name of the field to update with the name of the car=
d
+                $card->set_attribute('label','w_card_label'.$i);
+               =20
+                // Type of card : deb, cred,
+                $card->set_attribute('typecard',$fiche_dep);
+
+                $card->extra=3D$fiche_dep;
+
+                // Add the callback function to filter the card on the j=
rn
+                $card->set_callback('filter_card');
+                $card->set_attribute('ipopup','ipopcard');
+                // when value selected in the autcomplete
+                  $card->set_function('fill_data');
+
+                // when the data change
+
+                  $card->javascript=3Dsprintf(' onchange=3D"fill_data_on=
change(\'%s\');" ',
+                            $card->name);
+                  $card->set_dblclick("fill_ipopcard(this);");
+
+                  $card_label=3Dnew ISpan();
+                  $card_label->table=3D0;
+                  $f_card_label=3D$card_label->input("w_card_label".$i,"=
");
+
+                // Search button for card
+                $f_card_bt=3D$card->search();
+
                 $amount=3Dnew INum("bt_amount[]");
                 $amount->value=3Dround($array[$i]['bt_amount'],2);
                 $hidden=3DHtmlInput::hidden("bt_id[]",$array[$i]["bt_id"=
]);



From MAILER-DAEMON Thu Jan 05 11:21:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Riq3t-000136-B0
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:21:05 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:23:18 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71233.1325780464.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r256 - trunk/coprop/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 Jan 2012 16:21:03 -0000

Author: danydb
Date: 2012-01-05 17:23:18 +0100 (Thu, 05 Jan 2012)
New Revision: 256

Modified:
   trunk/coprop/include/class_budget.php
Log:
budget select clef

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-05 16:20:40 UTC (rev 25=
5)
+++ trunk/coprop/include/class_budget.php	2012-01-05 16:23:18 UTC (rev 25=
6)
@@ -33,6 +33,7 @@
                 where b_id=3D$1",array($this->b_id));
             $a_input=3Darray();
             $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D6");
+            $a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.=
clef_repartition order by cr_name");
             for ($i=3D0;$i<count($array);$i++)
             {
                 $card=3Dnew ICard('f_id'.$i);
@@ -69,9 +70,15 @@
                 $amount=3Dnew INum("bt_amount[]");
                 $amount->value=3Dround($array[$i]['bt_amount'],2);
                 $hidden=3DHtmlInput::hidden("bt_id[]",$array[$i]["bt_id"=
]);
+               =20
+                $ikey=3Dnew ISelect("key[]");
+                $ikey->value=3D$a_key;
+                $ikey->selected=3D$array[$i]['cr_id'];
+               =20
                 $a_input[$i]["amount"]=3D$amount->input();
                 $a_input[$i]["hidden"]=3D$hidden;
                 $a_input[$i]["card"]=3D$card->input();
+                $a_input[$i]['key']=3D$ikey->input();
                =20
             }
             require_once 'template/bud_detail.php';



From MAILER-DAEMON Thu Jan 05 11:21:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Riq49-00018g-Qq
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:21:21 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:23:33 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71234.1325780481.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r257 - trunk/coprop/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 Jan 2012 16:21:20 -0000

Author: danydb
Date: 2012-01-05 17:23:33 +0100 (Thu, 05 Jan 2012)
New Revision: 257

Modified:
   trunk/coprop/include/template/bud_detail.php
Log:
budget select clef

Modified: trunk/coprop/include/template/bud_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/coprop/include/template/bud_detail.php	2012-01-05 16:23:18 UTC =
(rev 256)
+++ trunk/coprop/include/template/bud_detail.php	2012-01-05 16:23:33 UTC =
(rev 257)
@@ -1,6 +1,7 @@
 <?php
 /**
  * @file montre les d=C3=A9tails d'un budget
+ * @see Budget::detail()
  */
 ?>
 <table class=3D"result">



From MAILER-DAEMON Thu Jan 05 11:26:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Riq8l-0002Hg-3y
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:26:07 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:28:18 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71249.1325780766.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r258 - in trunk/coprop/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 Jan 2012 16:26:06 -0000

Author: danydb
Date: 2012-01-05 17:28:18 +0100 (Thu, 05 Jan 2012)
New Revision: 258

Modified:
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/template/bud_detail.php
Log:
bug pas de fiche dep

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-05 16:23:33 UTC (rev 25=
7)
+++ trunk/coprop/include/class_budget.php	2012-01-05 16:28:18 UTC (rev 25=
8)
@@ -77,7 +77,9 @@
                =20
                 $a_input[$i]["amount"]=3D$amount->input();
                 $a_input[$i]["hidden"]=3D$hidden;
-                $a_input[$i]["card"]=3D$card->input();
+                $a_input[$i]["card"]=3D$card->input().$f_card_bt;
+                $a_input[$i]["card_label"]=3D$card_label->input();
+               =20
                 $a_input[$i]['key']=3D$ikey->input();
                =20
             }

Modified: trunk/coprop/include/template/bud_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/coprop/include/template/bud_detail.php	2012-01-05 16:23:33 UTC =
(rev 257)
+++ trunk/coprop/include/template/bud_detail.php	2012-01-05 16:28:18 UTC =
(rev 258)
@@ -16,9 +16,13 @@
             <?=3D$a_input[$i]['card']?>
         </td>
         <td>
+            <?=3D$a_input[$i]['card_label']?>
+        </td>
+        <td>
             <?=3D$a_input[$i]['key']?>
            =20
         </td>
+       =20
         <td>
             <?=3D$a_input[$i]['amount']?>
            =20



From MAILER-DAEMON Thu Jan 05 11:26:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Riq98-0002Sd-AF
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:26:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:28:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71250.1325780789.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r259 - trunk/coprop
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 Jan 2012 16:26:28 -0000

Author: danydb
Date: 2012-01-05 17:28:38 +0100 (Thu, 05 Jan 2012)
New Revision: 259

Modified:
   trunk/coprop/coprop-javascript.js
Log:
bug pas de fiche dep, javascript

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-05 16:28:18 UTC (rev 258)
+++ trunk/coprop/coprop-javascript.js	2012-01-05 16:28:38 UTC (rev 259)
@@ -230,7 +230,7 @@
 				{
                                     remove_waiting_box();
                                     $('divbuddetail').innerHTML=3Drespon=
se.responseText;
-					//response.responseText.evalScripts();
+                                    response.responseText.evalScripts();
 				}
 				catch(e)
 				{



From MAILER-DAEMON Thu Jan 05 11:50:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiqWZ-00017J-Ca
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:50:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:52:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71301.1325782242.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r260 - in trunk/coprop/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 Jan 2012 16:50:42 -0000

Author: danydb
Date: 2012-01-05 17:52:46 +0100 (Thu, 05 Jan 2012)
New Revision: 260

Modified:
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/template/bud_detail.php
Log:
bug fiche depense

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-05 16:28:38 UTC (rev 25=
9)
+++ trunk/coprop/include/class_budget.php	2012-01-05 16:52:46 UTC (rev 26=
0)
@@ -32,7 +32,8 @@
                 join vw_fiche_attr using (f_id)
                 where b_id=3D$1",array($this->b_id));
             $a_input=3Darray();
-            $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D6");
+            $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D2");
+	    var_dump($fiche_dep);
             $a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.=
clef_repartition order by cr_name");
             for ($i=3D0;$i<count($array);$i++)
             {
@@ -78,9 +79,10 @@
                 $a_input[$i]["amount"]=3D$amount->input();
                 $a_input[$i]["hidden"]=3D$hidden;
                 $a_input[$i]["card"]=3D$card->input().$f_card_bt;
-                $a_input[$i]["card_label"]=3D$card_label->input();
+                $a_input[$i]["card_label"]=3D$f_card_label;
                =20
                 $a_input[$i]['key']=3D$ikey->input();
+		var_dump($card);
                =20
             }
             require_once 'template/bud_detail.php';

Modified: trunk/coprop/include/template/bud_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/coprop/include/template/bud_detail.php	2012-01-05 16:28:38 UTC =
(rev 259)
+++ trunk/coprop/include/template/bud_detail.php	2012-01-05 16:52:46 UTC =
(rev 260)
@@ -7,6 +7,7 @@
 <table class=3D"result">
     <tr>
         <th>Fiche d=C3=A9pense</th>
+        <th>Label</th>
         <th>Clef de r=C3=A9partition </th>
         <th>Montant</th>
     </tr>



From MAILER-DAEMON Thu Jan 05 11:53:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiqZA-0001ND-NZ
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 11:53:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 17:55:37 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.71303.1325782403.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r261 - trunk/coprop/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 Jan 2012 16:53:23 -0000

Author: danydb
Date: 2012-01-05 17:55:37 +0100 (Thu, 05 Jan 2012)
New Revision: 261

Modified:
   trunk/coprop/include/template/bud_detail.php
Log:
budget fiche depense=20

Modified: trunk/coprop/include/template/bud_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/coprop/include/template/bud_detail.php	2012-01-05 16:52:46 UTC =
(rev 260)
+++ trunk/coprop/include/template/bud_detail.php	2012-01-05 16:55:37 UTC =
(rev 261)
@@ -3,6 +3,9 @@
  * @file montre les d=C3=A9tails d'un budget
  * @see Budget::detail()
  */
+global  $g_copro_parameter;
+
+echo HtmlInput::hidden('p_jrn',$g_copro_parameter->journal_appel);
 ?>
 <table class=3D"result">
     <tr>



From MAILER-DAEMON Thu Jan 05 16:05:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RiuUw-0002qQ-Jt
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 16:05:18 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 22:07:26 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.72108.1325797517.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r262 - trunk/coprop/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 Jan 2012 21:05:17 -0000

Author: danydb
Date: 2012-01-05 22:07:26 +0100 (Thu, 05 Jan 2012)
New Revision: 262

Modified:
   trunk/coprop/include/template/key_detail.php
Log:
Key without decimal

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-05 16:55:37 UTC =
(rev 261)
+++ trunk/coprop/include/template/key_detail.php	2012-01-05 21:07:26 UTC =
(rev 262)
@@ -42,13 +42,13 @@
         </tr>
         <tr>
             <td>
-                Total tanti=C3=A8me=20
+                Total tanti=C3=A8me
             </td>
                 <td>
                     <?=3D$tantieme->input()?>
                 </td>
 	</tr>
-=09
+
 </table>
 Description
 <?=3D$note->input()?>
@@ -68,7 +68,8 @@
 		<td>
 			<?
 			$num=3Dnew INum('part'.$alot[$i]['f_id']);
-			$num->value=3Dround($alot[$i]['l_part']);
+			$num->javascript=3D'onchange=3D"format_number(this,0);"';
+			$num->value=3Dround($alot[$i]['l_part'],0);
 			echo $num->input();
 			?>
 		</td>



From MAILER-DAEMON Thu Jan 05 17:20:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RivfK-0003An-QS
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 17:20:06 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu,  5 Jan 2012 23:22:17 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.72253.1325802005.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r263 - in trunk/coprop: . 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 Jan 2012 22:20:05 -0000

Author: danydb
Date: 2012-01-05 23:22:16 +0100 (Thu, 05 Jan 2012)
New Revision: 263

Modified:
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/ajax_add_key.php
   trunk/coprop/include/ajax_mod_key.php
   trunk/coprop/include/template/key_detail.php
Log:
0000498: CLEF : calculer le total des tanti?\195?\168mes lors de la saisi=
e

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-05 21:07:26 UTC (rev 262)
+++ trunk/coprop/coprop-javascript.js	2012-01-05 22:22:16 UTC (rev 263)
@@ -213,32 +213,33 @@
 		alert(e.message);
 	}
 }
-function budget_detail(plugin_code,ac,dossier,bud_id)
+function compute_key()
 {
-	waiting_box();
 	try
 	{
-		var queryString=3D"plugin_code=3D"+plugin_code+"&gDossier=3D"+dossier+=
"&bud_id=3D"+bud_id+'&ac=3D'+ac+"&act=3Dbuddisplay";
-		var action=3Dnew Ajax.Request ( 'ajax.php',
-		{
-			method:'get',
-			parameters:queryString,
-			onFailure:null,
-			onSuccess:function (response)
+		str=3D"";
+		var array=3D$("fkey").getInputs('text');
+		var tot=3D0;
+		for (i=3D0;i<array.length;i++)
 			{
-				try
+				if ( array[i].name.search(/part/) > -1)
 				{
-                                    remove_waiting_box();
-                                    $('divbuddetail').innerHTML=3Drespon=
se.responseText;
-                                    response.responseText.evalScripts();
+					if (! isNaN(array[i].value)) {
+						tot+=3DparseFloat(array[i].value);
+					}
 				}
-				catch(e)
-				{
-					alert("R=C3=A9ponse Ajax =3D"+e.message);
+			}
+		$("span_tantieme").innerHTML=3DMath.round(tot);
+		if ( ! isNaN($('cr_tantieme').value)) {
+			var difference=3DparseFloat($('cr_tantieme').value)-tot;
+			if ( difference !=3D 0 )	{
+					$('span_diff').style.color=3D"red";
+				} else {
+					$('span_diff').style.color=3D"green";
 				}
-			}
+			$('span_diff').innerHTML=3Ddifference;
 		}
-		);
+
 	}
 	catch(e)
 	{

Modified: trunk/coprop/include/ajax_add_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_add_key.php	2012-01-05 21:07:26 UTC (rev 26=
2)
+++ trunk/coprop/include/ajax_add_key.php	2012-01-05 22:22:16 UTC (rev 26=
3)
@@ -33,14 +33,14 @@
 $name=3Dnew IText('cr_name');
 $name->size=3D60;
 $tantieme=3Dnew INum('cr_tantieme');
-$tantieme->javascript=3D'onchange=3D"format_number(this,0);"';
+$tantieme->javascript=3D'onchange=3D"format_number(this,0);compute_key()=
;"';
 $tantieme->value=3D0;
=20
 $str_message=3D"Ajout d'une clef de r=C3=A9partition";
 $alot=3D$cn->get_array("select f_id,vw_name as name,quick_code as qcode,=
 vw_description as desc, 0 as l_part
 	from vw_fiche_attr where fd_id=3D$1",array($g_copro_parameter->categori=
e_lot));
 $init_tantieme=3D0;
-echo '<form method=3D"post">';
+echo '<form id=3D"fkey" method=3D"post">';
 require_once 'template/key_detail.php';
 echo HtmlInput::submit("add_key","Ajouter",' onclick=3D"return confirm (=
\'Vous confirmez?\')"');
 echo '</form>';

Modified: trunk/coprop/include/ajax_mod_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_key.php	2012-01-05 21:07:26 UTC (rev 26=
2)
+++ trunk/coprop/include/ajax_mod_key.php	2012-01-05 22:22:16 UTC (rev 26=
3)
@@ -43,7 +43,7 @@
 $name->size=3D60;
=20
 $tantieme=3Dnew INum('cr_tantieme');
-$tantieme->javascript=3D'onchange=3D"format_number(this,0);"';
+$tantieme->javascript=3D'onchange=3D"format_number(this,0);compute_key()=
;"';
 $tantieme->value=3Dround($key[0]['cr_tantieme']);
=20
 $alot=3D$cn->get_array("select lot_fk as f_id,
@@ -60,11 +60,11 @@
 	from vw_fiche_attr where fd_id=3D$2
 	and f_id not in (select lot_fk from coprop.clef_repartition_detail wher=
e cr_id=3D$1)",array($key_id,$g_copro_parameter->categorie_lot));
=20
-$init_tantieme=3D$cn->get_value("select sum(crd_amount) from=20
+$init_tantieme=3D$cn->get_value("select sum(crd_amount) from
 		coprop.clef_repartition_detail
 		where cr_id=3D$1",array($key_id));
=20
-echo '<form method=3D"post">';
+echo '<form id=3D"fkey" method=3D"post">';
 echo HtmlInput::hidden('cr_id',$key_id);
 require_once 'template/key_detail.php';
 echo HtmlInput::submit("mod_key","Modifier",' onclick=3D"return confirm =
(\'Vous confirmez?\')"');

Modified: trunk/coprop/include/template/key_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/coprop/include/template/key_detail.php	2012-01-05 21:07:26 UTC =
(rev 262)
+++ trunk/coprop/include/template/key_detail.php	2012-01-05 22:22:16 UTC =
(rev 263)
@@ -68,7 +68,7 @@
 		<td>
 			<?
 			$num=3Dnew INum('part'.$alot[$i]['f_id']);
-			$num->javascript=3D'onchange=3D"format_number(this,0);"';
+			$num->javascript=3D'onchange=3D"format_number(this,0);compute_key();"=
';
 			$num->value=3Dround($alot[$i]['l_part'],0);
 			echo $num->input();
 			?>
@@ -97,5 +97,6 @@
 <?
 endif;
 ?>
+
 </p>
 </div>
\ No newline at end of file



From MAILER-DAEMON Thu Jan 05 18:59:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RixD2-00057w-TE
	for mharc-phpcompta-dev@gnu.org; Thu, 05 Jan 2012 18:59:00 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 01:01:12 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.72394.1325807940.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4664 - 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, 05 Jan 2012 23:58:59 -0000

Author: danydb
Date: 2012-01-06 01:01:11 +0100 (Fri, 06 Jan 2012)
New Revision: 4664

Modified:
   phpcompta/trunk/include/param_pcmn.inc.php
Log:
cosmetic : longueur lib dans pcmn


Modified: phpcompta/trunk/include/param_pcmn.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/param_pcmn.inc.php	2012-01-04 11:40:33 UTC (r=
ev 4663)
+++ phpcompta/trunk/include/param_pcmn.inc.php	2012-01-06 00:01:11 UTC (r=
ev 4664)
@@ -46,7 +46,7 @@
 $val=3Dnew IText('p_valu');
 $parent=3Dnew IText('p_parentu');
 $lib=3Dnew IText('p_libu');
-$lib->size=3D50;
+$lib->css_size=3D"100%";
 $type=3Dnew ISelect('p_typeu');
 $type->value=3DAcc_Account::$type;
 echo '<table>';



From MAILER-DAEMON Fri Jan 06 06:01:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rj7YZ-0005PA-LY
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 06:01:55 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 12:03:57 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73115.1325847714.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4665 - in phpcompta/trunk: 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, 06 Jan 2012 11:01:53 -0000

Author: danydb
Date: 2012-01-06 12:03:56 +0100 (Fri, 06 Jan 2012)
New Revision: 4665

Modified:
   phpcompta/trunk/include/card_attr.inc.php
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_fiche_attr.php
   phpcompta/trunk/include/class_fiche_def.php
   phpcompta/trunk/sql/upgrade.sql
Log:
ajout de select dans les fiches

Modified: phpcompta/trunk/include/card_attr.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/card_attr.inc.php	2012-01-06 00:01:11 UTC (re=
v 4664)
+++ phpcompta/trunk/include/card_attr.inc.php	2012-01-06 11:03:56 UTC (re=
v 4665)
@@ -38,6 +38,7 @@
     $ad_text=3D$_POST['desc'];
     $ad_type=3D$_POST['type'];
     $ad_size=3D$_POST['size'];
+    $ad_extra=3D$_POST['extra'];
     try
     {
         $cn->start();
@@ -47,6 +48,7 @@
             $fa->set_parameter('desc',$ad_text[$e]);
             $fa->set_parameter('type',$ad_type[$e]);
             $fa->set_parameter('size',$ad_size[$e]);
+            $fa->set_parameter('extra',$ad_extra[$e]);
             if ( trim($ad_text[$e])!=3D'' && trim($ad_type[$e])!=3D'')
                 $fa->save();
         }
@@ -69,6 +71,7 @@
 $desc->size=3D50;
 $size=3Dnew INum('size[]');
 $size->size=3D5;
+$extra=3Dnew IText('extra[]');
=20
 $select_type->value=3Darray(
                         array('value'=3D>'text','label'=3D>'Texte'),
@@ -77,8 +80,7 @@
                         array('value'=3D>'zone','label'=3D>'Zone de text=
e'),
                         array('value'=3D>'poste','label'=3D>'Poste Compt=
able'),
                         array('value'=3D>'card','label'=3D>'Fiche'),
-
-
+                        array('value'=3D>'select','label'=3D>'Selection'=
)
                     );
 $remove=3Dnew IButton('rmfa');
 $remove->label=3D'Effacer';
@@ -108,6 +110,7 @@
         $r.=3Dtd($desc->input());
         $r.=3Dtd($select_type->input());
         $r.=3Dtd($size->input());
+        $r.=3Dtd($extra->input());
=20
         $remove->javascript=3Dsprintf('if ( confirm(\'Vous  confirmez ?\=
')) { removeCardAttribut(%d,%d,\'tb_rmfa\',this);}',
                                     $row->get_parameter('id'),$gDossier)=
;
@@ -119,10 +122,12 @@
         $select_type->readOnly=3Dtrue;
         $desc->readOnly=3Dtrue;
         $size->readOnly=3Dtrue;
+        $extra->readOnly=3Dtrue;
=20
         $r.=3Dtd($desc->input().HtmlInput::hidden('type[]',''));
         $r.=3Dtd($select_type->input());
         $r.=3Dtd($size->input());
+        $r.=3Dtd($extra->input());
         $r.=3Dtd("");
     }
=20
@@ -135,12 +140,14 @@
 $desc->readOnly=3Dfalse;
 $select_type->readOnly=3Dfalse;
 $size->readOnly=3Dfalse;
+$extra->readOnly=3Dfalse;
 $desc->value=3D'';
 $select_type->selected=3D-1;
 $r=3Dtd(HtmlInput::hidden('ad_id[]','0'));
 $r.=3Dtd($desc->input());
 $r.=3Dtd($select_type->input());
 $r.=3Dtd($size->input());
+$r.=3Dtd($extra->input());
 echo tr($r);
=20
 echo '</table>';

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	2012-01-06 00:01:11 UTC (rev =
4664)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 11:03:56 UTC (rev =
4665)
@@ -197,6 +197,7 @@
                     $t->ad_type=3D$f->ad_type;
                     $t->ad_size=3D$f->ad_size;
                     $t->ad_id=3D$f->ad_id;
+                    $t->ad_extra=3D$f->ad_extra;
                     $this->attribut[$Max]=3D$t;
                     $Max++;
                 } // if flag =3D=3D 0
@@ -344,8 +345,8 @@
             if ($this->id=3D=3D0) return NOTFOUND;
             // object is not in memory we need to look into the database
             $sql=3D"select ad_value from fiche_detail
-                 where f_id=3D".sql_string($this->id)." and ad_id=3D".$p=
_ad_id;
-            $Res=3D$this->cn->exec_sql($sql);
+                 where f_id=3D $1  and ad_id=3D $2 ";
+            $Res=3D$this->cn->exec_sql($sql,array($this->id,$p_ad_id));
             $row=3DDatabase::fetch_all($Res);
             // if not found return error
             if ( $row =3D=3D false )
@@ -505,6 +506,10 @@
 		  $w->table=3D1;
 		  $bulle=3DHtmlInput::infobulle(14);
 		  break;
+              case 'select':
+                  $w=3Dnew ISelect("av_text".$attr->ad_id);
+                  $w->value=3D$this->cn->make_array($attr->ad_extra);
+                  break;
 		case 'card':
 		  $w=3Dnew ICard("av_text".$attr->ad_id);
 		  // filter on frd_id
@@ -626,18 +631,22 @@
                     case 'text':
                         $w=3Dnew IText('av_text'.$r->ad_id);
                         $w->size=3D$r->ad_size;
+                        $w->value=3D$r->av_text;
                         break;
                     case 'numeric':
                         $w=3Dnew INum('av_text'.$r->ad_id);
                         $w->size=3D$r->ad_size;
+                        $w->value=3D$r->av_text;
                         break;
                     case 'date':
                         $w=3Dnew IDate('av_text'.$r->ad_id);
+                        $w->value=3D$r->av_text;
                         break;
                     case 'zone':
                         $w=3Dnew ITextArea('av_text'.$r->ad_id);
                         $w->width=3D$r->ad_size;
                         $w->heigh=3D2;
+                        $w->value=3D$r->av_text;
                         break;
 		    case 'poste':
 		      $w=3Dnew IPoste("av_text".$r->ad_id);
@@ -646,6 +655,7 @@
 			  $w->width=3D$r->ad_size;
 		      $w->table=3D0;
 		      $bulle=3DHtmlInput::infobulle(14);
+                      $w->value=3D$r->av_text;
 		      break;
 		    case 'card':
 		      $w=3Dnew ICard("av_text".$r->ad_id);
@@ -663,8 +673,13 @@
 		      $w->set_attribute('label',"av_text".$r->ad_id."_label");
 		      $msg=3D$w->search();
 		      $msg.=3D$label->input();
+                      $w->value=3D$r->av_text;
 		      break;
-
+                case 'select':
+                  $w=3Dnew ISelect();
+                  $w->value=3D$this->cn->make_array($attr->ad_extra);
+                  $w->selected=3D$r->av_text;
+                  break;
                     default:
 		      var_dump($r);
 		      throw new Exception("Type invalide");
@@ -672,7 +687,7 @@
                     $w->table=3D0;
                 }
             }
-            $w->value=3D$r->av_text;
+           =20
             $w->name=3D"av_text".$r->ad_id;
             $w->readonly=3D$p_readonly;
=20

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-06 00:01:11 UTC =
(rev 4664)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-06 11:03:56 UTC =
(rev 4665)
@@ -15,7 +15,7 @@
 {
     /* example private $variable=3Darray("easy_name"=3D>column_name,"ema=
il"=3D>"column_name_email","val3"=3D>0); */
=20
-    protected $variable=3Darray("id"=3D>"ad_id","desc"=3D>"ad_text","typ=
e"=3D>"ad_type","size"=3D>"ad_size");
+    protected $variable=3Darray("id"=3D>"ad_id","desc"=3D>"ad_text","typ=
e"=3D>"ad_type","size"=3D>"ad_size","extra"=3D>"ad_extra");
     function __construct ($p_cn,$p_id=3D0)
     {
         $this->cn=3D$p_cn;
@@ -64,8 +64,8 @@
         if ( strlen(trim($this->ad_type))=3D=3D0)
             throw new Exception('Le type ne peut pas =C3=AAtre vide',1);
         $this->ad_type=3Dstrtolower($this->ad_type);
-        if ( in_array($this->ad_type,array('date','text','numeric','zone=
','poste','card'))=3D=3Dfalse)
-            throw new Exception('Le type doit =C3=AAtre text, numeric,po=
ste, card ou date',1);
+        if ( in_array($this->ad_type,array('date','text','numeric','zone=
','poste','card','select'))=3D=3Dfalse)
+            throw new Exception('Le type doit =C3=AAtre text, numeric,po=
ste, card, select ou date',1);
         if ( trim($this->ad_size)=3D=3D'' || isNumber($this->ad_size)=3D=
=3D0||$this->ad_size>22)
         {
             switch ($this->ad_type)
@@ -130,14 +130,14 @@
         $this->verify();
         /*  please adapt */
         $sql=3D"insert into attr_def(ad_text
-             ,ad_type,ad_size
+             ,ad_type,ad_size,ad_extra
              ) values ($1
-             ,$2,$3
+             ,$2,$3,$4
              ) returning ad_id";
=20
         $this->ad_id=3D$this->cn->get_value(
                          $sql,
-                         array( $this->ad_text,$this->ad_type,$this->ad_=
size
+                         array( $this->ad_text,$this->ad_type,$this->ad_=
size,$this->ad_extra
                               )
                      );
=20
@@ -149,13 +149,13 @@
         if ( $this->ad_id < 9000) return;
         /*   please adapt */
         $sql=3D" update attr_def set ad_text =3D $1
-             ,ad_type =3D $2,ad_size=3D$4
+             ,ad_type =3D $2,ad_size=3D$4,ad_extra=3D$5
              where ad_id=3D $3";
         $res=3D$this->cn->exec_sql(
                  $sql,
                  array($this->ad_text
                        ,$this->ad_type
-                       ,$this->ad_id,$this->ad_size)
+                       ,$this->ad_id,$this->ad_size,$this->ad_extra)
              );
=20
     }
@@ -167,7 +167,7 @@
     {
=20
         $sql=3D"select ad_text
-             ,ad_type
+             ,ad_type,ad_size,ad_extra
              from attr_def where ad_id=3D$1";
         /* please adapt */
         $res=3D$this->cn->get_array(

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	2012-01-06 00:01:11 UTC (=
rev 4664)
+++ phpcompta/trunk/include/class_fiche_def.php	2012-01-06 11:03:56 UTC (=
rev 4665)
@@ -88,6 +88,7 @@
             $t->jnt_order=3D$row['jnt_order'];
             $t->ad_size=3D$row['ad_size'];
             $t->ad_type=3D$row['ad_type'];
+            $t->ad_extra=3D$row['ad_extra'];
             $this->attribut[$i]=3Dclone $t;
         }
         return $this->attribut;
@@ -296,7 +297,7 @@
         $sql=3D"select f_id,ad_value
              from
              fiche join fiche_detail using(f_id)
-             where ad_id=3D1 and fd_id=3D".$this->id." order by 2";
+             where ad_id=3D1 and fd_id=3D$1 order by 2";
=20
         // we use jrn_navigation_bar
         if ($step =3D=3D 1  && $_SESSION['g_pagesize'] !=3D -1   )
@@ -306,7 +307,7 @@
             $sql.=3D" offset $offset limit $step";
         }
=20
-        $Ret=3D$this->cn->get_array($sql);
+        $Ret=3D$this->cn->get_array($sql,array($this->id));
=20
         return $Ret;
     }
@@ -601,17 +602,17 @@
         foreach ($array as $ch)
         {
             $this->cn->start();
-            $sql=3D"delete from jnt_fic_attr where fd_id=3D".$this->id.
-                 "   and ad_id=3D".$ch;
-            $this->cn->exec_sql($sql);
+            $sql=3D"delete from jnt_fic_attr where fd_id=3D$1 ".
+                 "   and ad_id=3D$2";
+            $this->cn->exec_sql($sql,array($this->id,$ch));
=20
             $sql=3D"delete from fiche_detail  where jft_id in ( select "=
.
                  " jft_id from fiche_Detail ".
                  " join fiche using(f_id) ".
                  " where ".
-                 "fd_id =3D ".$this->id." and ".
-                 "ad_id=3D".$ch.")";
-            $this->cn->exec_sql($sql);
+                 "fd_id =3D $1 and ".
+                 "ad_id=3D$2)";
+            $this->cn->exec_sql($sql,array($this->id,$ch));
=20
             $this->cn->commit();
         }

Modified: phpcompta/trunk/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/trunk/sql/upgrade.sql	2012-01-06 00:01:11 UTC (rev 4664)
+++ phpcompta/trunk/sql/upgrade.sql	2012-01-06 11:03:56 UTC (rev 4665)
@@ -1,2 +1 @@
-update jrnx set j_text =3D null from jrn where jr_grpt_id=3Dj_grpt and j=
_text=3Djr_comment;
-insert into parameter (pr_id,pr_value) values ('MY_UPDLAB','N');
+alter table attr_def add ad_extra text ;
\ No newline at end of file



From MAILER-DAEMON Fri Jan 06 07:42:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rj97p-0004qh-MX
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 07:42:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 13:44:31 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73220.1325853744.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4666 - 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, 06 Jan 2012 12:42:23 -0000

Author: danydb
Date: 2012-01-06 13:44:31 +0100 (Fri, 06 Jan 2012)
New Revision: 4666

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
bug fiche  =3D display select

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	2012-01-06 11:03:56 UTC (rev =
4665)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 12:44:31 UTC (rev =
4666)
@@ -677,7 +677,7 @@
 		      break;
                 case 'select':
                   $w=3Dnew ISelect();
-                  $w->value=3D$this->cn->make_array($attr->ad_extra);
+                  $w->value=3D$this->cn->make_array($r->ad_extra);
                   $w->selected=3D$r->av_text;
                   break;
                     default:



From MAILER-DAEMON Fri Jan 06 07:42:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rj989-0004rW-P1
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 07:42:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 13:44:56 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73221.1325853765.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4667 - 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, 06 Jan 2012 12:42:44 -0000

Author: danydb
Date: 2012-01-06 13:44:56 +0100 (Fri, 06 Jan 2012)
New Revision: 4667

Modified:
   phpcompta/trunk/include/card_attr.inc.php
Log:
bug attribut fiche : extra is readonly

Modified: phpcompta/trunk/include/card_attr.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/card_attr.inc.php	2012-01-06 12:44:31 UTC (re=
v 4666)
+++ phpcompta/trunk/include/card_attr.inc.php	2012-01-06 12:44:56 UTC (re=
v 4667)
@@ -99,12 +99,14 @@
     $select_type->selected=3D$row->get_parameter('type');
     $desc->value=3D$row->get_parameter('desc');
     $size->value=3D$row->get_parameter('size');
+    $extra->value=3D$row->get_parameter('extra');
=20
     if ( $row->get_parameter('id')>=3D 9000)
     {
         $select_type->readOnly=3Dfalse;
         $desc->readOnly=3Dfalse;
         $size->readOnly=3Dfalse;
+        $extra->readOnly=3Dfalse;
=20
         $desc->style=3D' class=3D"input_text" ';
         $r.=3Dtd($desc->input());



From MAILER-DAEMON Fri Jan 06 08:06:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rj9V2-0007Nk-KU
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 08:06:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 14:08:33 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73245.1325855183.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4668 - 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, 06 Jan 2012 13:06:23 -0000

Author: danydb
Date: 2012-01-06 14:08:33 +0100 (Fri, 06 Jan 2012)
New Revision: 4668

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
bug attribut fiche :update fiche : extra

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	2012-01-06 12:44:56 UTC (rev =
4667)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 13:08:33 UTC (rev =
4668)
@@ -169,6 +169,7 @@
             $t->av_text=3D$row['ad_value'];
             $t->ad_type=3D$row['ad_type'];
             $t->ad_size=3D$row['ad_size'];
+            $t->ad_extra=3D$row['ad_extra'];
             $t->jnt_order=3D$row['jnt_order'];
             $this->attribut[$i]=3D$t;
         }



From MAILER-DAEMON Fri Jan 06 08:18:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rj9gM-0001iF-QA
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 08:18:06 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 14:20:12 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73254.1325855886.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4669 - 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, 06 Jan 2012 13:18:05 -0000

Author: danydb
Date: 2012-01-06 14:20:12 +0100 (Fri, 06 Jan 2012)
New Revision: 4669

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
bug attribut fiche : add blank : label

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	2012-01-06 13:08:33 UTC (rev =
4668)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 13:20:12 UTC (rev =
4669)
@@ -510,6 +510,7 @@
               case 'select':
                   $w=3Dnew ISelect("av_text".$attr->ad_id);
                   $w->value=3D$this->cn->make_array($attr->ad_extra);
+                  unset($w->label);
                   break;
 		case 'card':
 		  $w=3Dnew ICard("av_text".$attr->ad_id);



From MAILER-DAEMON Fri Jan 06 08:20:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rj9iq-0001u5-59
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 08:20:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 14:22:50 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73257.1325856039.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4670 - 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, 06 Jan 2012 13:20:38 -0000

Author: danydb
Date: 2012-01-06 14:22:50 +0100 (Fri, 06 Jan 2012)
New Revision: 4670

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
bug attribut fiche : add blank : label

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	2012-01-06 13:20:12 UTC (rev =
4669)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 13:22:50 UTC (rev =
4670)
@@ -510,7 +510,6 @@
               case 'select':
                   $w=3Dnew ISelect("av_text".$attr->ad_id);
                   $w->value=3D$this->cn->make_array($attr->ad_extra);
-                  unset($w->label);
                   break;
 		case 'card':
 		  $w=3Dnew ICard("av_text".$attr->ad_id);
@@ -534,7 +533,7 @@
=20
             }
             $w->table=3D$table;
-            $w->label=3D$attr->ad_text;
+            if ( $attr->ad_type !=3D 'select')            $w->label=3D$a=
ttr->ad_text;
             $w->name=3D"av_text".$attr->ad_id;
=20
             $r.=3D"<TR>".td($w->label,' class=3D"input_text" ').td($w->i=
nput())."$msg </TR>";



From MAILER-DAEMON Fri Jan 06 11:21:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCXk-0005uX-4V
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:21:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:23:31 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73516.1325866883.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4671 - 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, 06 Jan 2012 16:21:22 -0000

Author: danydb
Date: 2012-01-06 17:23:31 +0100 (Fri, 06 Jan 2012)
New Revision: 4671

Modified:
   phpcompta/trunk/include/class_iselect.php
Log:
iselect  : remove default label

Modified: phpcompta/trunk/include/class_iselect.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_iselect.php	2012-01-06 13:22:50 UTC (re=
v 4670)
+++ phpcompta/trunk/include/class_iselect.php	2012-01-06 16:23:31 UTC (re=
v 4671)
@@ -37,8 +37,8 @@
         $disabled=3D($this->disabled=3D=3Dtrue)?"disabled":"";
=20
         //echo "<b>Selected <b>".$this->selected;
-        $r=3D(isset($this->label))?$this->label:'';
-
+        //$r=3D(isset($this->label))?$this->label:'';
+        $r=3D"";
         //    if ( $this->table =3D=3D 1 ) $r=3Dtd($r);
=20
         $a=3D"<SELECT  id=3D\"$this->name\" NAME=3D\"$this->name\" $this=
->javascript $disabled>";



From MAILER-DAEMON Fri Jan 06 11:21:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCYE-0005yn-7I
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:21:54 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:24:03 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73519.1325866913.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4672 - 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, 06 Jan 2012 16:21:52 -0000

Author: danydb
Date: 2012-01-06 17:24:03 +0100 (Fri, 06 Jan 2012)
New Revision: 4672

Modified:
   phpcompta/trunk/include/template/result_cat_card_summary.php
Log:
cosmetic : PRINTCARD resume

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	2012-01-=
06 16:23:31 UTC (rev 4671)
+++ phpcompta/trunk/include/template/result_cat_card_summary.php	2012-01-=
06 16:24:03 UTC (rev 4672)
@@ -19,7 +19,7 @@
    $fiche=3Dnew Fiche($cn);
    $fiche->id=3D$row['f_id'];
  $fiche->getAttribut();
-$detail=3DHtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE)=
,$fiche->strAttribut(ATTR_DEF_QUICKCODE));
+$detail=3DHtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE)=
);
 echo td($detail);
  foreach($fiche->attribut as $attr) :
     echo td($attr->av_text,'style=3D"padding: 0 10 1 10;white-space:nowr=
ap;"');



From MAILER-DAEMON Fri Jan 06 11:22:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCYi-00062z-A6
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:22:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:24:34 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73520.1325866943.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4673 - in phpcompta/trunk: doc/developper 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 Jan 2012 16:22:23 -0000

Author: danydb
Date: 2012-01-06 17:24:34 +0100 (Fri, 06 Jan 2012)
New Revision: 4673

Modified:
   phpcompta/trunk/doc/developper/Doxyfile
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/constant.php
Log:
fiche_attr add a new attribut =3D select

Modified: phpcompta/trunk/doc/developper/Doxyfile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/doc/developper/Doxyfile	2012-01-06 16:24:03 UTC (rev =
4672)
+++ phpcompta/trunk/doc/developper/Doxyfile	2012-01-06 16:24:34 UTC (rev =
4673)
@@ -31,7 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
=20
-PROJECT_NUMBER         =3D Version5
+PROJECT_NUMBER         =3D Version-6
=20
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.

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	2012-01-06 16:24:03 UTC (rev =
4672)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 16:24:34 UTC (rev =
4673)
@@ -533,7 +533,7 @@
=20
             }
             $w->table=3D$table;
-            if ( $attr->ad_type !=3D 'select')            $w->label=3D$a=
ttr->ad_text;
+            $w->label=3D$attr->ad_text;
             $w->name=3D"av_text".$attr->ad_id;
=20
             $r.=3D"<TR>".td($w->label,' class=3D"input_text" ').td($w->i=
nput())."$msg </TR>";
@@ -557,8 +557,7 @@
         $attr=3D$this->attribut;
 	/* show card type here */
 	$type_card=3D$this->cn->get_value('select fd_label from fiche_def join =
fiche using (fd_id) where f_id=3D$1',array($this->id));
-	$ret=3Dh2("Type de fiche : ".h($type_card),"");
-
+	$ret=3Dh2("Type de fiche : ".h($type_card)." (id ".$this->id.")","");
         $ret.=3D"<table>";
         if ( empty ($attr) )
         {
@@ -688,9 +687,25 @@
                     $w->table=3D0;
                 }
             }
+            else
+            {
+                switch($r->ad_type)
+                {
+                    case 'select':
+                        $x=3Dnew ISelect();
+                        $x->value=3D$this->cn->make_array($r->ad_extra);
+                        $x->selected=3D$r->av_text;
+                        $value=3D$x->display();
+                        $w->value=3D$value;
+                        break;
+                    default:
+                        $w->value=3D$r->av_text;
+                       =20
+                }
+            }
            =20
             $w->name=3D"av_text".$r->ad_id;
-            $w->readonly=3D$p_readonly;
+            $w->readOnly=3D$p_readonly;
=20
=20
             $ret.=3D"<TR>".td($r->ad_text.$bulle).td($w->input()).td($ms=
g)." </TR>";

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	2012-01-06 16:24:03 UTC (rev 467=
2)
+++ phpcompta/trunk/include/constant.php	2012-01-06 16:24:34 UTC (rev 467=
3)
@@ -35,12 +35,12 @@
 $g_succeed=3D"<span style=3D\"font-size:18px;color:green\">&#x2713;</spa=
n>"; =20
 /*set to none for production */
 /* uncomment for production */
-// $version_phpcompta=3D4444;
-//define ("DEBUG",false);
+ $version_phpcompta=3D4620;
+define ("DEBUG",true);
=20
=20
-$version_phpcompta=3DSVNINFO;
-define ("DEBUG",false);
+//$version_phpcompta=3DSVNINFO;
+//define ("DEBUG",false);
=20
=20
=20



From MAILER-DAEMON Fri Jan 06 11:23:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCZN-000674-DF
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:23:05 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:25:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73521.1325866985.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4674 - 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, 06 Jan 2012 16:23:04 -0000

Author: danydb
Date: 2012-01-06 17:25:15 +0100 (Fri, 06 Jan 2012)
New Revision: 4674

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

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	2012-01-06 16:24:34 UTC (rev 467=
3)
+++ phpcompta/trunk/include/constant.php	2012-01-06 16:25:15 UTC (rev 467=
4)
@@ -35,12 +35,12 @@
 $g_succeed=3D"<span style=3D\"font-size:18px;color:green\">&#x2713;</spa=
n>"; =20
 /*set to none for production */
 /* uncomment for production */
- $version_phpcompta=3D4620;
-define ("DEBUG",true);
+// $version_phpcompta=3D4620;
+// define ("DEBUG",true);
=20
=20
-//$version_phpcompta=3DSVNINFO;
-//define ("DEBUG",false);
+$version_phpcompta=3DSVNINFO;
+define ("DEBUG",false);
=20
=20
=20



From MAILER-DAEMON Fri Jan 06 11:29:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCfr-0008JI-Dc
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:29:47 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:31:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73535.1325867386.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4675 - 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, 06 Jan 2012 16:29:45 -0000

Author: danydb
Date: 2012-01-06 17:31:55 +0100 (Fri, 06 Jan 2012)
New Revision: 4675

Modified:
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_iselect.php
Log:
cosmetic : length text + select in display card

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	2012-01-06 16:25:15 UTC (rev =
4674)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 16:31:55 UTC (rev =
4675)
@@ -558,7 +558,7 @@
 	/* show card type here */
 	$type_card=3D$this->cn->get_value('select fd_label from fiche_def join =
fiche using (fd_id) where f_id=3D$1',array($this->id));
 	$ret=3Dh2("Type de fiche : ".h($type_card)." (id ".$this->id.")","");
-        $ret.=3D"<table>";
+        $ret.=3D"<table style=3D\"width:98%;padding:1%\">";
         if ( empty ($attr) )
         {
 	  return 'FNT';
@@ -630,7 +630,7 @@
                     {
                     case 'text':
                         $w=3Dnew IText('av_text'.$r->ad_id);
-                        $w->size=3D$r->ad_size;
+                        $w->css_size=3D"100%";
                         $w->value=3D$r->av_text;
                         break;
                     case 'numeric':
@@ -679,6 +679,7 @@
                   $w=3Dnew ISelect();
                   $w->value=3D$this->cn->make_array($r->ad_extra);
                   $w->selected=3D$r->av_text;
+                  $w->style=3D' style=3D"width:100%" ';
                   break;
                     default:
 		      var_dump($r);

Modified: phpcompta/trunk/include/class_iselect.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_iselect.php	2012-01-06 16:25:15 UTC (re=
v 4674)
+++ phpcompta/trunk/include/class_iselect.php	2012-01-06 16:31:55 UTC (re=
v 4675)
@@ -32,16 +32,13 @@
         $this->name=3D($p_name=3D=3Dnull)?$this->name:$p_name;
         $this->value=3D($p_value=3D=3Dnull)?$this->value:$p_value;
         if ( $this->readOnly=3D=3Dtrue) return $this->display();
+        $style=3D(isset($this->style))?$this->style:"";
=20
-
         $disabled=3D($this->disabled=3D=3Dtrue)?"disabled":"";
=20
-        //echo "<b>Selected <b>".$this->selected;
-        //$r=3D(isset($this->label))?$this->label:'';
         $r=3D"";
-        //    if ( $this->table =3D=3D 1 ) $r=3Dtd($r);
=20
-        $a=3D"<SELECT  id=3D\"$this->name\" NAME=3D\"$this->name\" $this=
->javascript $disabled>";
+        $a=3D"<SELECT  id=3D\"$this->name\" NAME=3D\"$this->name\" $this=
->style $this->javascript $disabled>";
=20
         if (empty($this->value)) return '';
         for ( $i=3D0;$i<sizeof($this->value);$i++)



From MAILER-DAEMON Fri Jan 06 11:37:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCmr-0001oL-NT
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:37:01 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:39:11 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73544.1325867821.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4676 - 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, 06 Jan 2012 16:37:00 -0000

Author: danydb
Date: 2012-01-06 17:39:11 +0100 (Fri, 06 Jan 2012)
New Revision: 4676

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
add css_size to text in card

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	2012-01-06 16:31:55 UTC (rev =
4675)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-06 16:39:11 UTC (rev =
4676)
@@ -574,7 +574,7 @@
                 $w=3Dnew IText();
                 $w->table=3D1;
                 $w->readOnly=3Dtrue;
-
+                $w->css_size=3D"100%";
             }
             if ($p_readonly=3D=3Dfalse)
             {



From MAILER-DAEMON Fri Jan 06 11:39:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjCp5-0002SR-0x
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 11:39:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri,  6 Jan 2012 17:41:28 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.73545.1325867957.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4677 - 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, 06 Jan 2012 16:39:17 -0000

Author: danydb
Date: 2012-01-06 17:41:28 +0100 (Fri, 06 Jan 2012)
New Revision: 4677

Modified:
   phpcompta/trunk/include/class_iselect.php
Log:
iselect style undefined

Modified: phpcompta/trunk/include/class_iselect.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_iselect.php	2012-01-06 16:39:11 UTC (re=
v 4676)
+++ phpcompta/trunk/include/class_iselect.php	2012-01-06 16:41:28 UTC (re=
v 4677)
@@ -38,7 +38,7 @@
=20
         $r=3D"";
=20
-        $a=3D"<SELECT  id=3D\"$this->name\" NAME=3D\"$this->name\" $this=
->style $this->javascript $disabled>";
+        $a=3D"<SELECT  id=3D\"$this->name\" NAME=3D\"$this->name\" $styl=
e $this->javascript $disabled>";
=20
         if (empty($this->value)) return '';
         for ( $i=3D0;$i<sizeof($this->value);$i++)



From MAILER-DAEMON Fri Jan 06 20:23:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjL0T-0007j6-RH
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 20:23:37 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 02:25:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74473.1325899417.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4678 - 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: Sat, 07 Jan 2012 01:23:36 -0000

Author: danydb
Date: 2012-01-07 02:25:42 +0100 (Sat, 07 Jan 2012)
New Revision: 4678

Modified:
   phpcompta/trunk/html/js/card.js
   phpcompta/trunk/include/class_fiche.php
Log:

cosm?\195?\169tique fiche=20

Modified: phpcompta/trunk/html/js/card.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/card.js	2012-01-06 16:41:28 UTC (rev 4677)
+++ phpcompta/trunk/html/js/card.js	2012-01-07 01:25:42 UTC (rev 4678)
@@ -470,7 +470,7 @@
     var content=3D'div_new_card';
     var nTop=3DposY-40;
     var nLeft=3DposX-20;
-    var str_style=3D"top:"+nTop+";left:"+nLeft+";width:70em;height:auto"=
;
+    var str_style=3D"top:"+nTop+";left:"+nLeft+";width:60em;height:auto"=
;
=20
     var popup=3D{'id':  content,'cssclass':'inner_box','style':str_style=
,'html':loading(),'drag':true};
     if ( $(content)) {removeDiv(content);}

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	2012-01-06 16:41:28 UTC (rev =
4677)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-07 01:25:42 UTC (rev =
4678)
@@ -439,21 +439,23 @@
                 $label->name=3D"av_text".$attr->ad_id."_label";
=20
                 if ( $a['account_auto'] =3D=3D 't' )
-                    $msg.=3D"<TD>".$label->input()."<br> <font color=3D\=
"red\">"._("Rappel: Poste cr=C3=A9=C3=A9 automatiquement =C3=A0 partir de=
 ").$f->class_base." </font></TD> ";
+                    $msg.=3D$label->input()." <span style=3D\"color:red\=
">".
+						_("Rappel: Poste cr=C3=A9=C3=A9 automatiquement =C3=A0 partir de "=
)
+						.$f->class_base." </span> ";
                 else
                 {
                     // if there is a class base in fiche_def_ref, this a=
ccount will be the
                     // the default one
                     if ( strlen(trim($f->class_base)) !=3D 0 )
                     {
-                        $msg.=3D"<TD>".$label->input()."<br> <font color=
=3D\"red\">"._("Rappel: Poste par d=C3=A9faut sera ").
+                        $msg.=3D"<TD>".$label->input()." <span style=3D\=
"color:red\">"._("Rappel: Poste par d=C3=A9faut sera ").
                               $f->class_base.
-                              " !</font></TD> ";
+                              " !</span> ";
                         $w->value=3D$f->class_base;
                     }
=20
                 }
-                $r.=3D"<TR>".td("Poste Comptable",' class=3D"input_text"=
 ' ).td($w->input())."$msg </TR>";
+                $r.=3D"<TR>".td("Poste Comptable",' class=3D"input_text"=
 ' ).td($w->input().$msg)."</TR>";
                 continue;
             }
             elseif ( $attr->ad_id =3D=3D ATTR_DEF_TVA)
@@ -483,62 +485,61 @@
             else
             {
 	      switch ($attr->ad_type)
-                {
-                case 'text':
-		  $w=3Dnew IText();
-		  $w->size=3D$attr->ad_size;
-		  break;
-                case 'numeric':
-		  $w=3Dnew INum();
-		  $w->size=3D$attr->ad_size;
-		  break;
-                case 'date':
-		  $w=3Dnew IDate();
-		  break;
-                case 'zone':
-		  $w=3Dnew ITextArea();
-		  $w->width=3D$attr->ad_size;
-		  $w->heigh=3D2;
-		  break;
-		case 'poste':
-		  $w=3Dnew IPoste("av_text".$attr->ad_id);
-		  $w->set_attribute('ipopup','ipop_account');
-		  $w->set_attribute('account',"av_text".$attr->ad_id);
-		  $w->table=3D1;
-		  $bulle=3DHtmlInput::infobulle(14);
-		  break;
-              case 'select':
-                  $w=3Dnew ISelect("av_text".$attr->ad_id);
-                  $w->value=3D$this->cn->make_array($attr->ad_extra);
-                  break;
-		case 'card':
-		  $w=3Dnew ICard("av_text".$attr->ad_id);
-		  // filter on frd_id
-		  $sql=3D' select fd_id from fiche_def ';
-		  $filter=3D$this->cn->make_list($sql);
-		  $w->extra=3D$filter;
-		  $w->extra2=3D0;
-		  $label=3Dnew ISpan();
-		  $label->name=3D"av_text".$r->ad_id."_label";
-		  $w->set_attribute('ipopup','ipopcard');
-		  $w->set_attribute('typecard',$filter);
-		  $w->set_attribute('inp',"av_text".$r->ad_id);
-		  $w->set_attribute('label',"av_text".$r->ad_id."_label");
-		  $msg=3D$w->search();
-		  $msg.=3D$label->input();
-		  break;
+				{
+					case 'text':
+						$w =3D new IText();
+						$w->css_size =3D "100%";
+						break;
+					case 'numeric':
+						$w =3D new INum();
+						$w->size =3D $attr->ad_size;
+						break;
+					case 'date':
+						$w =3D new IDate();
+						break;
+					case 'zone':
+						$w =3D new ITextArea();
+						$w->width =3D $attr->ad_size;
+						$w->heigh =3D 2;
+						break;
+					case 'poste':
+						$w =3D new IPoste("av_text" . $attr->ad_id);
+						$w->set_attribute('ipopup', 'ipop_account');
+						$w->set_attribute('account', "av_text" . $attr->ad_id);
+						$w->table =3D 1;
+						$bulle =3D HtmlInput::infobulle(14);
+						break;
+					case 'select':
+						$w =3D new ISelect("av_text" . $attr->ad_id);
+						$w->value =3D $this->cn->make_array($attr->ad_extra);
+						$w->css_size =3D "100%";
+						break;
+					case 'card':
+						$w =3D new ICard("av_text" . $attr->ad_id);
+						// filter on frd_id
+						$sql =3D ' select fd_id from fiche_def ';
+						$filter =3D $this->cn->make_list($sql);
+						$w->extra =3D $filter;
+						$w->extra2 =3D 0;
+						$label =3D new ISpan();
+						$label->name =3D "av_text" . $r->ad_id . "_label";
+						$w->set_attribute('ipopup', 'ipopcard');
+						$w->set_attribute('typecard', $filter);
+						$w->set_attribute('inp', "av_text" . $r->ad_id);
+						$w->set_attribute('label', "av_text" . $r->ad_id . "_label");
+						$msg =3D $w->search();
+						$msg.=3D$label->input();
+						break;
+				}
+				$w->table =3D 0;
+			}
+			$w->table =3D $table;
+			$w->label =3D $attr->ad_text;
+			$w->name =3D "av_text" . $attr->ad_id;
=20
-                }
-                $w->table=3D0;
-
-            }
-            $w->table=3D$table;
-            $w->label=3D$attr->ad_text;
-            $w->name=3D"av_text".$attr->ad_id;
-
-            $r.=3D"<TR>".td($w->label,' class=3D"input_text" ').td($w->i=
nput())."$msg </TR>";
-        }
-        $r.=3D '</table>';
+			$r.=3D"<TR>" . td($w->label, ' class=3D"input_text" ') . td($w->input=
()) . "$msg </TR>";
+		}
+		$r.=3D '</table>';
         return $r;
     }
=20
@@ -557,8 +558,8 @@
         $attr=3D$this->attribut;
 	/* show card type here */
 	$type_card=3D$this->cn->get_value('select fd_label from fiche_def join =
fiche using (fd_id) where f_id=3D$1',array($this->id));
-	$ret=3Dh2("Type de fiche : ".h($type_card)." (id ".$this->id.")","");
-        $ret.=3D"<table style=3D\"width:98%;padding:1%\">";
+	$ret=3Dh2("Type de fiche : ".$type_card." (id ".$this->id.")","");
+        $ret.=3D"<table style=3D\"width:98%;margin:1%\">";
         if ( empty ($attr) )
         {
 	  return 'FNT';
@@ -701,10 +702,10 @@
                         break;
                     default:
                         $w->value=3D$r->av_text;
-                       =20
+
                 }
             }
-           =20
+
             $w->name=3D"av_text".$r->ad_id;
             $w->readOnly=3D$p_readonly;
=20



From MAILER-DAEMON Fri Jan 06 20:42:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjLJ2-00026e-MS
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 20:42:48 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 02:44:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74482.1325900568.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4679 - 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, 07 Jan 2012 01:42:47 -0000

Author: danydb
Date: 2012-01-07 02:44:55 +0100 (Sat, 07 Jan 2012)
New Revision: 4679

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:

cosm?\195?\169tique fiche=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	2012-01-07 01:25:42 UTC (rev =
4678)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-07 01:44:55 UTC (rev =
4679)
@@ -554,169 +554,165 @@
      */
     function Display($p_readonly)
     {
-        $this->GetAttribut();
-        $attr=3D$this->attribut;
-	/* show card type here */
-	$type_card=3D$this->cn->get_value('select fd_label from fiche_def join =
fiche using (fd_id) where f_id=3D$1',array($this->id));
-	$ret=3Dh2("Type de fiche : ".$type_card." (id ".$this->id.")","");
-        $ret.=3D"<table style=3D\"width:98%;margin:1%\">";
-        if ( empty ($attr) )
-        {
-	  return 'FNT';
-        }
+		$this->GetAttribut();
+		$attr =3D $this->attribut;
+		/* show card type here */
+		$type_card =3D $this->cn->get_value('select fd_label from fiche_def jo=
in fiche using (fd_id) where f_id=3D$1', array($this->id));
+		$ret =3D "";
+		$ret.=3D'<span style=3D"font-weight:bolder"> id :' . $this->id . "</sp=
an>";
+		$ret.=3Dh2("Type de fiche : " . $type_card, 'style=3D"display:inline"'=
);
+		$ret.=3D"<table style=3D\"width:98%;margin:1%\">";
+		if (empty($attr))
+		{
+			return 'FNT';
+		}
=20
-	/* for each attribute */
-        foreach ( $attr as $r)
-        {
-            $msg=3D"";
-            $bulle=3D"";
-            if ( $p_readonly)
-            {
-                $w=3Dnew IText();
-                $w->table=3D1;
-                $w->readOnly=3Dtrue;
-                $w->css_size=3D"100%";
-            }
-            if ($p_readonly=3D=3Dfalse)
-            {
+		/* for each attribute */
+		foreach ($attr as $r)
+		{
+			$msg =3D "";
+			$bulle =3D "";
+			if ($p_readonly)
+			{
+				$w =3D new IText();
+				$w->table =3D 1;
+				$w->readOnly =3D true;
+				$w->css_size =3D "100%";
+			}
+			if ($p_readonly =3D=3D false)
+			{
=20
-                if ( $r->ad_id =3D=3D ATTR_DEF_ACCOUNT)
-                {
-                    $w=3Dnew IPoste("av_text".$r->ad_id);
-                    $w->set_attribute('ipopup','ipop_account');
-                    $w->set_attribute('account',"av_text".$r->ad_id);
-                    //  account created automatically
-                    $w->table=3D0;
-                    //  account created automatically
-                    $sql=3D"select account_auto($this->fiche_def)";
-                    $ret_sql=3D$this->cn->exec_sql($sql);
-                    $a=3DDatabase::fetch_array($ret_sql,0);
-                    $bulle=3DHtmlInput::infobulle(10);
+				if ($r->ad_id =3D=3D ATTR_DEF_ACCOUNT)
+				{
+					$w =3D new IPoste("av_text" . $r->ad_id);
+					$w->set_attribute('ipopup', 'ipop_account');
+					$w->set_attribute('account', "av_text" . $r->ad_id);
+					//  account created automatically
+					$w->table =3D 0;
+					//  account created automatically
+					$sql =3D "select account_auto($this->fiche_def)";
+					$ret_sql =3D $this->cn->exec_sql($sql);
+					$a =3D Database::fetch_array($ret_sql, 0);
+					$bulle =3D HtmlInput::infobulle(10);
=20
-                    if ( $a['account_auto'] =3D=3D 't' )
-                        $bulle.=3DHtmlInput::warnbulle(11);
+					if ($a['account_auto'] =3D=3D 't')
+						$bulle.=3DHtmlInput::warnbulle(11);
+				}
+				elseif ($r->ad_id =3D=3D ATTR_DEF_TVA)
+				{
+					$w =3D new ITva_Popup('popup_tva');
+					$w->table =3D 1;
+				}
+				elseif ($r->ad_id =3D=3D ATTR_DEF_COMPANY)
+				{
+					$w =3D new ICard("av_text" . $r->ad_id);
+					// filter on frd_id
+					$sql =3D ' select fd_id from fiche_def where frd_id in (' . FICHE_T=
YPE_CLIENT . ',' . FICHE_TYPE_FOURNISSEUR . ',' . FICHE_TYPE_ADM_TAX . ')=
';
+					$filter =3D $this->cn->make_list($sql);
+					$w->extra =3D $filter;
+					$w->extra2 =3D 0;
+					$label =3D new ISpan();
+					$label->name =3D "av_text" . $r->ad_id . "_label";
+					$w->set_attribute('ipopup', 'ipopcard');
+					$w->set_attribute('typecard', $filter);
+					$w->set_attribute('inp', "av_text" . $r->ad_id);
+					$w->set_attribute('label', "av_text" . $r->ad_id . "_label");
=20
-                }
-                elseif ( $r->ad_id =3D=3D ATTR_DEF_TVA)
-                {
-                    $w=3Dnew ITva_Popup('popup_tva');
-                    $w->table=3D1;
=20
-                }
-                elseif ( $r->ad_id =3D=3D ATTR_DEF_COMPANY )
-                {
-                    $w=3Dnew ICard("av_text".$r->ad_id);
-                    // filter on frd_id
-                    $sql=3D' select fd_id from fiche_def where frd_id in=
 ('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.'=
)';
-                    $filter=3D$this->cn->make_list($sql);
-                    $w->extra=3D$filter;
-                    $w->extra2=3D0;
-                    $label=3Dnew ISpan();
-                    $label->name=3D"av_text".$r->ad_id."_label";
-                    $w->set_attribute('ipopup','ipopcard');
-                    $w->set_attribute('typecard',$filter);
-                    $w->set_attribute('inp',"av_text".$r->ad_id);
-                    $w->set_attribute('label',"av_text".$r->ad_id."_labe=
l");
+					$msg =3D $w->search();
+					$msg.=3D$label->input();
+				}
+				else
+				{
+					switch ($r->ad_type)
+					{
+						case 'text':
+							$w =3D new IText('av_text' . $r->ad_id);
+							$w->css_size =3D "100%";
+							$w->value =3D $r->av_text;
+							break;
+						case 'numeric':
+							$w =3D new INum('av_text' . $r->ad_id);
+							$w->size =3D $r->ad_size;
+							$w->value =3D $r->av_text;
+							break;
+						case 'date':
+							$w =3D new IDate('av_text' . $r->ad_id);
+							$w->value =3D $r->av_text;
+							break;
+						case 'zone':
+							$w =3D new ITextArea('av_text' . $r->ad_id);
+							$w->width =3D $r->ad_size;
+							$w->heigh =3D 2;
+							$w->value =3D $r->av_text;
+							break;
+						case 'poste':
+							$w =3D new IPoste("av_text" . $r->ad_id);
+							$w->set_attribute('ipopup', 'ipop_account');
+							$w->set_attribute('account', "av_text" . $r->ad_id);
+							$w->width =3D $r->ad_size;
+							$w->table =3D 0;
+							$bulle =3D HtmlInput::infobulle(14);
+							$w->value =3D $r->av_text;
+							break;
+						case 'card':
+							$w =3D new ICard("av_text" . $r->ad_id);
+							// filter on frd_id
+							$sql =3D ' select fd_id from fiche_def ';
+							$filter =3D $this->cn->make_list($sql);
+							$w->width =3D $r->ad_size;
+							$w->extra =3D $filter;
+							$w->extra2 =3D 0;
+							$label =3D new ISpan();
+							$label->name =3D "av_text" . $r->ad_id . "_label";
+							$w->set_attribute('ipopup', 'ipopcard');
+							$w->set_attribute('typecard', $filter);
+							$w->set_attribute('inp', "av_text" . $r->ad_id);
+							$w->set_attribute('label', "av_text" . $r->ad_id . "_label");
+							$msg =3D $w->search();
+							$msg.=3D$label->input();
+							$w->value =3D $r->av_text;
+							break;
+						case 'select':
+							$w =3D new ISelect();
+							$w->value =3D $this->cn->make_array($r->ad_extra);
+							$w->selected =3D $r->av_text;
+							$w->style =3D ' style=3D"width:100%" ';
+							break;
+						default:
+							var_dump($r);
+							throw new Exception("Type invalide");
+					}
+					$w->table =3D 0;
+				}
+			}
+			else
+			{
+				switch ($r->ad_type)
+				{
+					case 'select':
+						$x =3D new ISelect();
+						$x->value =3D $this->cn->make_array($r->ad_extra);
+						$x->selected =3D $r->av_text;
+						$value =3D $x->display();
+						$w->value =3D $value;
+						break;
+					default:
+						$w->value =3D $r->av_text;
+				}
+			}
=20
+			$w->name =3D "av_text" . $r->ad_id;
+			$w->readOnly =3D $p_readonly;
=20
-                    $msg=3D$w->search();
-                    $msg.=3D$label->input();
=20
+			$ret.=3D"<TR>" . td($r->ad_text . $bulle) . td($w->input()) . td($msg=
) . " </TR>";
+		}
=20
-                }
+		$ret.=3D"</table>";
=20
-                else
-                {
-                    switch ($r->ad_type)
-                    {
-                    case 'text':
-                        $w=3Dnew IText('av_text'.$r->ad_id);
-                        $w->css_size=3D"100%";
-                        $w->value=3D$r->av_text;
-                        break;
-                    case 'numeric':
-                        $w=3Dnew INum('av_text'.$r->ad_id);
-                        $w->size=3D$r->ad_size;
-                        $w->value=3D$r->av_text;
-                        break;
-                    case 'date':
-                        $w=3Dnew IDate('av_text'.$r->ad_id);
-                        $w->value=3D$r->av_text;
-                        break;
-                    case 'zone':
-                        $w=3Dnew ITextArea('av_text'.$r->ad_id);
-                        $w->width=3D$r->ad_size;
-                        $w->heigh=3D2;
-                        $w->value=3D$r->av_text;
-                        break;
-		    case 'poste':
-		      $w=3Dnew IPoste("av_text".$r->ad_id);
-		      $w->set_attribute('ipopup','ipop_account');
-		      $w->set_attribute('account',"av_text".$r->ad_id);
-			  $w->width=3D$r->ad_size;
-		      $w->table=3D0;
-		      $bulle=3DHtmlInput::infobulle(14);
-                      $w->value=3D$r->av_text;
-		      break;
-		    case 'card':
-		      $w=3Dnew ICard("av_text".$r->ad_id);
-		      // filter on frd_id
-		      $sql=3D' select fd_id from fiche_def ';
-		      $filter=3D$this->cn->make_list($sql);
-			  $w->width=3D$r->ad_size;
-		      $w->extra=3D$filter;
-		      $w->extra2=3D0;
-		      $label=3Dnew ISpan();
-		      $label->name=3D"av_text".$r->ad_id."_label";
-		      $w->set_attribute('ipopup','ipopcard');
-		      $w->set_attribute('typecard',$filter);
-		      $w->set_attribute('inp',"av_text".$r->ad_id);
-		      $w->set_attribute('label',"av_text".$r->ad_id."_label");
-		      $msg=3D$w->search();
-		      $msg.=3D$label->input();
-                      $w->value=3D$r->av_text;
-		      break;
-                case 'select':
-                  $w=3Dnew ISelect();
-                  $w->value=3D$this->cn->make_array($r->ad_extra);
-                  $w->selected=3D$r->av_text;
-                  $w->style=3D' style=3D"width:100%" ';
-                  break;
-                    default:
-		      var_dump($r);
-		      throw new Exception("Type invalide");
-                    }
-                    $w->table=3D0;
-                }
-            }
-            else
-            {
-                switch($r->ad_type)
-                {
-                    case 'select':
-                        $x=3Dnew ISelect();
-                        $x->value=3D$this->cn->make_array($r->ad_extra);
-                        $x->selected=3D$r->av_text;
-                        $value=3D$x->display();
-                        $w->value=3D$value;
-                        break;
-                    default:
-                        $w->value=3D$r->av_text;
-
-                }
-            }
-
-            $w->name=3D"av_text".$r->ad_id;
-            $w->readOnly=3D$p_readonly;
-
-
-            $ret.=3D"<TR>".td($r->ad_text.$bulle).td($w->input()).td($ms=
g)." </TR>";
-        }
-
-        $ret.=3D"</table>";
-
-        return $ret;
-    }
+		return $ret;
+	}
     /*!
      * \brief  Save a card, call insert or update
      *



From MAILER-DAEMON Fri Jan 06 21:15:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjLoY-0007L5-Uv
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 21:15:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 03:17:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74502.1325902522.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4680 - 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, 07 Jan 2012 02:15:20 -0000

Author: danydb
Date: 2012-01-07 03:17:29 +0100 (Sat, 07 Jan 2012)
New Revision: 4680

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:

cosm?\195?\169tique fiche=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	2012-01-07 01:44:55 UTC (rev =
4679)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-07 02:17:29 UTC (rev =
4680)
@@ -560,7 +560,7 @@
 		$type_card =3D $this->cn->get_value('select fd_label from fiche_def jo=
in fiche using (fd_id) where f_id=3D$1', array($this->id));
 		$ret =3D "";
 		$ret.=3D'<span style=3D"font-weight:bolder"> id :' . $this->id . "</sp=
an>";
-		$ret.=3Dh2("Type de fiche : " . $type_card, 'style=3D"display:inline"'=
);
+		$ret.=3Dh2( $type_card, 'style=3D"display:inline"');
 		$ret.=3D"<table style=3D\"width:98%;margin:1%\">";
 		if (empty($attr))
 		{



From MAILER-DAEMON Fri Jan 06 23:55:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjOJy-0004tX-F7
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 23:55:58 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 05:58:02 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74590.1325912157.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4681 - in phpcompta/trunk: html 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: Sat, 07 Jan 2012 04:55:56 -0000

Author: danydb
Date: 2012-01-07 05:58:01 +0100 (Sat, 07 Jan 2012)
New Revision: 4681

Modified:
   phpcompta/trunk/html/style-color.css
   phpcompta/trunk/html/style-epad.css
   phpcompta/trunk/html/style-light.css
   phpcompta/trunk/html/style.css
   phpcompta/trunk/include/class_itext.php
   phpcompta/trunk/include/template/result_cat_card_summary.php
   phpcompta/trunk/sql/upgrade.sql
Log:

cosmetic : input_text_ro
add date fin (ad_id=3D33)
cosmetic fiche : itext

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	2012-01-07 02:17:29 UTC (rev 468=
0)
+++ phpcompta/trunk/html/style-color.css	2012-01-07 04:58:01 UTC (rev 468=
1)
@@ -541,6 +541,11 @@
=20
=20
 }
+.input_text_ro {
+	   border:solid 1px blue;
+	   background:lightgrey;
+	margin:1px;
+}
 .input_text {
 	border:groove 1px blue;
 	margin:1px;
@@ -839,7 +844,7 @@
 td.tool {
 	border: solid 1px gray;
 	background-color:white;
-=09
+
 }
 div.topmenu {
 	width:100%;
@@ -1104,7 +1109,7 @@
 	float:left;
 	width:40em;
 	top:0px;
-=09
+
 }
=20
 div.foldercontent {

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	2012-01-07 02:17:29 UTC (rev 4680=
)
+++ phpcompta/trunk/html/style-epad.css	2012-01-07 04:58:01 UTC (rev 4681=
)
@@ -541,6 +541,11 @@
=20
=20
 }
+.input_text_ro {
+	   border:solid 1px blue;
+	   background:#EDEDED;
+	margin:1px;
+}
 .input_text {
 	border:groove 1px blue;
 	margin:1px;

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	2012-01-07 02:17:29 UTC (rev 468=
0)
+++ phpcompta/trunk/html/style-light.css	2012-01-07 04:58:01 UTC (rev 468=
1)
@@ -316,7 +316,7 @@
 	text-decoration:none;
 	display:inline;
 	color: blue;
-=09
+
 }
 a.mtitle:hover {
 	font-size:10px;
@@ -536,6 +536,11 @@
=20
=20
 }
+.input_text_ro {
+	   border:solid 1px blue;
+	   background:#EDEDED;
+	margin:1px;
+}
 .input_text {
 	border:groove 1px blue;
 	margin:1px;
@@ -804,7 +809,7 @@
 	color:lightblue;
 	font-weight: bold;
 	border:1px black outset  ;
-=09
+
 background-image: url("image/bg-submit5.png");
 background-repeat: repeat-x;
 	background-position: left;
@@ -820,7 +825,7 @@
 	margin-left:3px;
 	cursor:pointer;
 	font-size:1.1em;
-=09
+
 }
 a#anchorbutton:hover, .button:hover,a.button:hover,div.content a.button:=
hover  {
 	cursor:pointer;

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	2012-01-07 02:17:29 UTC (rev 4680)
+++ phpcompta/trunk/html/style.css	2012-01-07 04:58:01 UTC (rev 4681)
@@ -536,6 +536,11 @@
=20
=20
 }
+.input_text_ro {
+	   border:solid 1px blue;
+	   background:#EDEDED;
+	margin:1px;
+}
 .input_text {
 	   border:groove 1px blue;
 	margin:1px;
@@ -832,7 +837,7 @@
 	td.tool {
 	border: solid 1px gray;
 	background-color: white;
-=09
+
 	}
 div.topmenu {
 	margin-top:2px;

Modified: phpcompta/trunk/include/class_itext.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_itext.php	2012-01-07 02:17:29 UTC (rev =
4680)
+++ phpcompta/trunk/include/class_itext.php	2012-01-07 04:58:01 UTC (rev =
4681)
@@ -21,7 +21,7 @@
 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
=20
 /*!\file
- * \brief Html Input=20
+ * \brief Html Input
  */
 require_once('class_html_input.php');
 class IText extends HtmlInput
@@ -56,8 +56,8 @@
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
            ' style=3D"width:'.$this->css_size.';" '.$this->javascript." =
 $this->extra >";
=20
-        }           =20
-       =20
+        }
+
         if ( $this->table =3D=3D 1 )		  $r=3D'<td>'.$r.'</td>';
=20
         return $r;
@@ -71,16 +71,16 @@
         $extra=3D(isset($this->extra))?$this->extra:"";
=20
         $readonly=3D" readonly ";
-        $style=3D'style=3D"border:solid 1px blue;color:black;background:=
#EDEDED"';
         $this->value=3Dstr_replace('"','',$this->value);
+		 $this->style=3D' class=3D"input_text_ro" ';
          if ( ! isset ($this->css_size))
         {
-        $r=3D'<INPUT '.$style.' TYPE=3D"TEXT" id=3D"'.
+        $r=3D'<INPUT '.$this->style.' TYPE=3D"TEXT" id=3D"'.
            $this->name.'"'.$t.
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
            'SIZE=3D"'.$this->size.'" '.$this->javascript." $readonly $th=
is->extra >";
         } else {
-               $r=3D'<INPUT '.$style.' TYPE=3D"TEXT" id=3D"'.
+               $r=3D'<INPUT '.$this->style.' TYPE=3D"TEXT" id=3D"'.
            $this->name.'"'.$t.
            'NAME=3D"'.$this->name.'" VALUE=3D"'.$this->value.'"  '.
            ' style=3D"width:'.$this->css_size.'" '.$this->javascript." $=
readonly  $this->extra >";

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	2012-01-=
07 02:17:29 UTC (rev 4680)
+++ phpcompta/trunk/include/template/result_cat_card_summary.php	2012-01-=
07 04:58:01 UTC (rev 4681)
@@ -1,20 +1,20 @@
 <div class=3D"content">
 <table >
 <tr>
-<?=20
+<?
    echo th('D=C3=A9tail');
 for ($i=3D0;$i<count($aHeading);$i++) :
    echo th($aHeading[$i]->ad_text,'style=3D"color:blue;padding: 0 5 1 10=
"');
    endfor;
 ?>
 </tr>
-<?=20
+<?
 $e=3D0;
 foreach ($array as $row ) :
  $e++;
-   if ($e%2=3D=3D0)=20
+   if ($e%2=3D=3D0)
    echo '<tr class=3D"odd">';
-   else=20
+   else
    echo '<tr class=3D"even">';
    $fiche=3Dnew Fiche($cn);
    $fiche->id=3D$row['f_id'];
@@ -22,10 +22,21 @@
 $detail=3DHtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE)=
);
 echo td($detail);
  foreach($fiche->attribut as $attr) :
-    echo td($attr->av_text,'style=3D"padding: 0 10 1 10;white-space:nowr=
ap;"');
- endforeach;      =20
+	 if ( $attr->ad_type !=3D 'select'):
+			echo td($attr->av_text,'style=3D"padding: 0 10 1 10;white-space:nowra=
p;"');
+	 else:
+		$value=3D$cn->make_array($attr->ad_extra);
+		for ($e=3D0;$e<count($value);$e++):
+			if ( $value[$e]['value']=3D=3D$attr->av_text):
+				echo td($value[$e]['label'],'style=3D"padding: 0 10 1 10;white-space=
:nowrap;"');
+				break;
+			endif;
+		endfor;
+
+	 endif;
+ endforeach;
  echo '</tr>';
-endforeach;      =20
+endforeach;
=20
 ?>
 </table>

Modified: phpcompta/trunk/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/trunk/sql/upgrade.sql	2012-01-07 02:17:29 UTC (rev 4680)
+++ phpcompta/trunk/sql/upgrade.sql	2012-01-07 04:58:01 UTC (rev 4681)
@@ -1 +1,3 @@
-alter table attr_def add ad_extra text ;
\ No newline at end of file
+alter table attr_def add ad_extra text ;
+
+insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fi=
n','date',8);
\ No newline at end of file



From MAILER-DAEMON Fri Jan 06 23:56:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjOKY-0004yk-I9
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 23:56:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 05:58:40 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74593.1325912193.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r264 - in trunk/coprop: . 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 Jan 2012 04:56:33 -0000

Author: danydb
Date: 2012-01-07 05:58:39 +0100 (Sat, 07 Jan 2012)
New Revision: 264

Removed:
   trunk/coprop/include/coprop_parameter.php
Modified:
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/class_install_plugin.php
   trunk/coprop/include/copro-parameter.inc.php
   trunk/coprop/include/lot.inc.php
   trunk/coprop/index.php
Log:

add immeuble, lot, coprop

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-05 22:22:16 UTC (rev 263)
+++ trunk/coprop/coprop-javascript.js	2012-01-07 04:58:39 UTC (rev 264)
@@ -245,4 +245,37 @@
 	{
 		alert(e.message);
 	}
+}
+
+function budget_detail(plugin_code,ac,dossier,bud_id)
+{
+	waiting_box();
+	try
+	{
+		var queryString=3D"plugin_code=3D"+plugin_code+"&gDossier=3D"+dossier+=
"&bud_id=3D"+bud_id+'&ac=3D'+ac+"&act=3Dbuddisplay";
+		var action=3Dnew Ajax.Request ( 'ajax.php',
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:null,
+			onSuccess:function (response)
+			{
+				try
+				{
+                                    remove_waiting_box();
+                                    $('divbuddetail').innerHTML=3Drespon=
se.responseText;
+									response.responseText.evalScripts();
+				}
+				catch(e)
+				{
+					alert("R=C3=83=C2=A9ponse Ajax =3D"+e.message);
+				}
+			}
+		}
+		);
+	}
+	catch(e)
+	{
+		alert(e.message);
+	}
 }
\ No newline at end of file

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-05 22:22:16 UTC (rev 26=
3)
+++ trunk/coprop/include/class_budget.php	2012-01-07 04:58:39 UTC (rev 26=
4)
@@ -6,7 +6,7 @@
     function to_list()
     {
         global $cn;
-       =20
+
         $array=3D$cn->get_array("select b_id, b_name,
                     to_char(b_start,'DD.MM.YYYY') as str_start,
                     to_char(b_end,'DD.MM.YYYY') as str_end,
@@ -14,7 +14,7 @@
                     from coprop.budget
                     order by b_name
                     ");
-       =20
+
         require_once 'template/budget_list.php';
=20
     }
@@ -23,18 +23,18 @@
         global $cn;
         try
         {
-           =20
+
             if ( ! isset ($this->b_id)|| trim($this->b_id)=3D=3D'')
                     throw new Exception ("Aucun budget demand=C3=A9");
-            $array=3D$cn->get_array("select bt_id,bt_amount,f_id,vw_name=
,quick_code,cr_name,cr_id=20
+            $array=3D$cn->get_array("select bt_id,bt_amount,f_id,vw_name=
,quick_code,cr_name,cr_id
                 from coprop.budget_detail
                 join coprop.clef_repartition using (cr_id)
                 join vw_fiche_attr using (f_id)
                 where b_id=3D$1",array($this->b_id));
             $a_input=3Darray();
             $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D2");
-	    var_dump($fiche_dep);
-            $a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.=
clef_repartition order by cr_name");
+
+			$a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.clef_repa=
rtition order by cr_name");
             for ($i=3D0;$i<count($array);$i++)
             {
                 $card=3Dnew ICard('f_id'.$i);
@@ -43,7 +43,7 @@
=20
                  // name of the field to update with the name of the car=
d
                 $card->set_attribute('label','w_card_label'.$i);
-               =20
+
                 // Type of card : deb, cred,
                 $card->set_attribute('typecard',$fiche_dep);
=20
@@ -71,19 +71,18 @@
                 $amount=3Dnew INum("bt_amount[]");
                 $amount->value=3Dround($array[$i]['bt_amount'],2);
                 $hidden=3DHtmlInput::hidden("bt_id[]",$array[$i]["bt_id"=
]);
-               =20
+
                 $ikey=3Dnew ISelect("key[]");
                 $ikey->value=3D$a_key;
                 $ikey->selected=3D$array[$i]['cr_id'];
-               =20
+
                 $a_input[$i]["amount"]=3D$amount->input();
                 $a_input[$i]["hidden"]=3D$hidden;
                 $a_input[$i]["card"]=3D$card->input().$f_card_bt;
                 $a_input[$i]["card_label"]=3D$f_card_label;
-               =20
+
                 $a_input[$i]['key']=3D$ikey->input();
-		var_dump($card);
-               =20
+
             }
             require_once 'template/bud_detail.php';
         }

Modified: trunk/coprop/include/class_install_plugin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_install_plugin.php	2012-01-05 22:22:16 UTC=
 (rev 263)
+++ trunk/coprop/include/class_install_plugin.php	2012-01-07 04:58:39 UTC=
 (rev 264)
@@ -66,15 +66,19 @@
 		$this->cn->exec_sql($sql);
 // load default value
 		$array =3D array(
-			'categorie_lot' =3D> array(''),
-			'categorie_coprop' =3D> array(''),
-			'poste_appel' =3D> array(''),
-			'journal_appel' =3D> array('0'),
+			'categorie_lot' =3D> 0,
+			'categorie_coprop' =3D> 0,
+			'categorie_immeuble' =3D> 0,
+			'categorie_appel' =3D> 0,
+			'poste_appel' =3D> 0,
+			'journal_appel' =3D> 0,
+			'id_immeuble'=3D>9002,
+			'id_coprop'=3D>9003
 		);
=20
 		foreach ($array as $code =3D> $value)
 		{
-			$this->cn->exec_sql('insert into coprop.parameter(pr_id,pr_value) val=
ues ($1,$2)', array($code, $value[0]));
+			$this->cn->exec_sql('insert into coprop.parameter(pr_id,pr_value) val=
ues ($1,$2)', array($code, $value));
 		}
 	}
=20

Modified: trunk/coprop/include/copro-parameter.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/coprop/include/copro-parameter.inc.php	2012-01-05 22:22:16 UTC =
(rev 263)
+++ trunk/coprop/include/copro-parameter.inc.php	2012-01-07 04:58:39 UTC =
(rev 264)
@@ -37,6 +37,7 @@
 		$g_copro_parameter->save('categorie_coprop',$_POST['categorie_coprop']=
);
 		$g_copro_parameter->save('journal_appel',$_POST['journal_appel']);
 		$g_copro_parameter->save('categorie_appel',$_POST['categorie_appel']);
+		$g_copro_parameter->save('categorie_immeuble',$_POST['categorie_immeub=
le']);
 	}
 	catch(Exception $e)
 	{
@@ -65,15 +66,18 @@
 $categorie_appel->value=3D$cn->make_array("select  fd_id,fd_label from f=
iche_def order by fd_label ");
 $categorie_appel->selected=3D$g_copro_parameter->categorie_appel;
=20
+$categorie_immeuble=3Dnew ISelect('categorie_immeuble');
+$categorie_immeuble->value=3D$cn->make_array("select  fd_id,fd_label fro=
m fiche_def order by fd_label ");
+$categorie_immeuble->selected=3D$g_copro_parameter->categorie_immeuble;
 ?>
 <form method=3D"POST">
 <table>
 	<tr>
 		<td>
-			Cat=C3=A9gorie de fiches pour les lots
+			Cat=C3=A9gorie de fiches pour les immeubles
 		</td>
 		<td>
-			<?=3D$cat_lot->input()?>
+			<?=3D$categorie_immeuble->input()?>
 		</td>
 	</tr>
 		<tr>
@@ -84,6 +88,14 @@
 			<?=3D$cat_coprop->input();?>
 		</td>
 	</tr>
+	<tr>
+		<td>
+			Cat=C3=A9gorie de fiches pour les lots
+		</td>
+		<td>
+			<?=3D$cat_lot->input()?>
+		</td>
+	</tr>
 		<tr>
 		<td>
 			Cat=C3=A9gorie de fiches pour les appels de fond

Deleted: trunk/coprop/include/coprop_parameter.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/coprop_parameter.php	2012-01-05 22:22:16 UTC (re=
v 263)
+++ trunk/coprop/include/coprop_parameter.php	2012-01-07 04:58:39 UTC (re=
v 264)
@@ -1,29 +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
-
-/**
- * @file
- * @brief
- *
- */
-?>

Modified: trunk/coprop/include/lot.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/coprop/include/lot.inc.php	2012-01-05 22:22:16 UTC (rev 263)
+++ trunk/coprop/include/lot.inc.php	2012-01-07 04:58:39 UTC (rev 264)
@@ -75,41 +75,51 @@
 $f_add_button->label=3D_('Cr=C3=A9er une nouvelle fiche');
 $f_add_button->set_attribute('ipopup','ipop_newcard');
 $f_add_button->set_attribute('jrn',-1);
-$filter=3D$g_copro_parameter->categorie_lot.",".$g_copro_parameter->cate=
gorie_coprop;
+$filter=3D$g_copro_parameter->categorie_lot.",".$g_copro_parameter->cate=
gorie_coprop.",".$g_copro_parameter->categorie_immeuble;
 $f_add_button->javascript=3D" this.filter=3D'$filter';this.jrn=3D-1;sele=
ct_card_type(this);";
=20
=20
+
+// liste Immeuble
+
+$sql=3D" select a.f_id ,
+	(select ad_value from fiche_detail where f_id=3Da.f_id and ad_id=3D1) a=
s building_name,
+	(select ad_value from fiche_detail where f_id=3Da.f_id and ad_id=3D23) =
as building_qcode
+	from
+	fiche as a
+	where
+	a.fd_id=3D$1";
+
 /*
- * Liste
+ * Liste coprop par immeuble
  */
-$sql=3D" select distinct
-	c_fiche_id,
+$sql=3D" select f_id,
 	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
1) as copro_name,
 	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
23) as copro_qcode
-
+	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
10) as copro_start,
+	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
33) as copro_end
 	from
-	coprop.coproprietaire
+	fiche
+	where
+	fd_id=3D$1
+	and f_id in ( select f_id from fiche_detail where ad_id=3D$1 and ad_val=
ue=3D$2)
 	";
 /**
  * @todo ajouter tri
  */
-$a_copro=3D$cn->get_array($sql);
+$a_copro=3D$cn->get_array($sql,array($g_copro_parameter->categorie_copro=
p));
=20
-$sql_lot=3D$cn->prepare ("lot","select coprop_fk, (select ad_value from =
fiche_detail where f_id=3Dl_fiche_id and ad_id=3D1) as lot_name,
+$sql_lot=3D$cn->prepare ("lot","select f_id,
+	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
1) as lot_name,
 	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
23) as lot_qcode,
         (select ad_value from fiche_detail where f_id=3Dl_fiche_id and a=
d_id=3D9) as lot_desc
-	from coprop.lot where coprop_fk=3D$1");
+	from fiche where f_id in ( select f_id from fiche_detail where ad_id=3D=
$1 and ad_value=3D$2)
+	and fd_id=3D$3");
=20
 echo $f_add_button->input();
-echo '<div class=3D"content" id=3D"listcoprolot">';
-require_once 'template/coprop_lot_list.php';
-echo '</div>';
=20
-echo '<div class=3D"content" id=3D"ajoutcopro" style=3D"display:none">';
-require_once('template/coprop_lot_add.php');
=20
-echo '</div>';
-echo '<div id=3D"divcopropmod"></div>';
+
 echo $f_add_button->input();
=20
 ?>

Modified: trunk/coprop/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/coprop/index.php	2012-01-05 22:22:16 UTC (rev 263)
+++ trunk/coprop/index.php	2012-01-07 04:58:39 UTC (rev 264)
@@ -38,7 +38,7 @@
=20
 $url=3D'?'.dossier::get().'&plugin_code=3D'.$_REQUEST['plugin_code'].'&a=
c=3D'.$_REQUEST['ac'];
 $array=3Darray (
-         array($url.'&sa=3Dlot',_('Lot'),_('Listes des lots et liaison c=
opro'),1),
+         array($url.'&sa=3Dlot',_('Immeubles,lots et copropri=C3=A9taire=
s'),_('Listes des immeubles, copropri=C3=A9taire et lots '),1),
          array($url.'&sa=3Dcle',_('Clef de r=C3=A9partition'),_('Clef de=
 r=C3=A9partition'),2),
          array($url.'&sa=3Daf',_('Appel de fond'),_('Cr=C3=A9ation d=C3=A9=
compte pour appel de fond'),3),
          array($url.'&sa=3Dbu',_('Budget'),_('budgets'),5),
@@ -70,7 +70,9 @@
 if ( $cn->exist_schema('coprop') =3D=3D false)
   {
     require_once('include/class_install_plugin.php');
-
+/**
+ * cr=C3=A9er fiche immeuble, lot, copropri=C3=A9taire, ajouter des sele=
ct dans cat=C3=A9gorie lots pour montrer les copro + immeubles
+ */
     $iplugn=3Dnew Install_Plugin($cn);
     $iplugn->install();
     echo_warning(_("L'extension est install=C3=A9e, pourriez-vous en v=C3=
=A9rifier le param=C3=A8trage ?"));



From MAILER-DAEMON Fri Jan 06 23:56:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjOKq-00052i-Kc
	for mharc-phpcompta-dev@gnu.org; Fri, 06 Jan 2012 23:56:52 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 05:59:00 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74594.1325912211.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r265 - trunk/coprop/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, 07 Jan 2012 04:56:51 -0000

Author: danydb
Date: 2012-01-07 05:59:00 +0100 (Sat, 07 Jan 2012)
New Revision: 265

Added:
   trunk/coprop/sql/create_view_summary.sql.sql
Log:

create view

Added: trunk/coprop/sql/create_view_summary.sql.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/coprop/sql/create_view_summary.sql.sql	                        =
(rev 0)
+++ trunk/coprop/sql/create_view_summary.sql.sql	2012-01-07 04:59:00 UTC =
(rev 265)
@@ -0,0 +1,14 @@
+create view coprop.summary as select a.f_id,
+(select ad_value from fiche_detail as fd1 where fd1.f_id=3Da.f_id and fd=
1.ad_id=3D1) as lot_name,
+(select ad_value from fiche_detail as fd1 where fd1.f_id=3Da.f_id and fd=
1.ad_id=3D23) as lot_qcode,
+m.ad_value as building_id,
+(select ad_value from fiche_detail as fd1 where fd1.f_id=3Dm.ad_value::n=
umeric and fd1.ad_id=3D1) as immeuble,
+c.ad_value as coprop_id,
+(select ad_value from fiche_detail as fd1 where fd1.f_id=3Dc.ad_value::n=
umeric and fd1.ad_id=3D1) as coprop
+
+  from fiche_detail as a
+   join fiche as f1 on (f1.f_id=3Da.f_id)
+   join (select f_id,ad_value from fiche_detail as fd1 where ad_id=3D900=
3) as m on (m.f_id=3Da.f_id)
+join (select f_id,ad_value from fiche_detail as fd1 where ad_id=3D9002) =
as c on (c.f_id=3Da.f_id)
+
+  where fd_id=3D8 and ad_id=3D1;



From MAILER-DAEMON Sat Jan 07 00:09:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjOWe-0006fq-Na
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 00:09:04 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 06:11:12 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.74597.1325912943.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4682 - 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, 07 Jan 2012 05:09:03 -0000

Author: danydb
Date: 2012-01-07 06:11:12 +0100 (Sat, 07 Jan 2012)
New Revision: 4682

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
cosmetic new card : length select

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	2012-01-07 04:58:01 UTC (rev =
4681)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-07 05:11:12 UTC (rev =
4682)
@@ -421,7 +421,7 @@
         $f=3Dnew Fiche_Def($this->cn,$p_fiche_def);
         $f->Get();
         $array=3D$f->getAttribut();
-        $r=3D'<table>';
+        $r=3D'<table style=3D"width:98%;margin:1%">';
         foreach ($array as $attr)
         {
             $table=3D0;
@@ -512,7 +512,7 @@
 					case 'select':
 						$w =3D new ISelect("av_text" . $attr->ad_id);
 						$w->value =3D $this->cn->make_array($attr->ad_extra);
-						$w->css_size =3D "100%";
+						$w->style=3D 'style=3D"width:100%"';
 						break;
 					case 'card':
 						$w =3D new ICard("av_text" . $attr->ad_id);



From MAILER-DAEMON Sat Jan 07 17:40:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rjevo-0002My-Pc
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 17:40:08 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 23:42:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.75502.1325976006.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r266 - trunk/coprop/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, 07 Jan 2012 22:40:06 -0000

Author: danydb
Date: 2012-01-07 23:42:05 +0100 (Sat, 07 Jan 2012)
New Revision: 266

Modified:
   trunk/coprop/sql/create_view_summary.sql.sql
Log:

update view


Modified: trunk/coprop/sql/create_view_summary.sql.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/coprop/sql/create_view_summary.sql.sql	2012-01-07 04:59:00 UTC =
(rev 265)
+++ trunk/coprop/sql/create_view_summary.sql.sql	2012-01-07 22:42:05 UTC =
(rev 266)
@@ -1,14 +1,11 @@
-create view coprop.summary as select a.f_id,
-(select ad_value from fiche_detail as fd1 where fd1.f_id=3Da.f_id and fd=
1.ad_id=3D1) as lot_name,
-(select ad_value from fiche_detail as fd1 where fd1.f_id=3Da.f_id and fd=
1.ad_id=3D23) as lot_qcode,
-m.ad_value as building_id,
-(select ad_value from fiche_detail as fd1 where fd1.f_id=3Dm.ad_value::n=
umeric and fd1.ad_id=3D1) as immeuble,
-c.ad_value as coprop_id,
-(select ad_value from fiche_detail as fd1 where fd1.f_id=3Dc.ad_value::n=
umeric and fd1.ad_id=3D1) as coprop
-
-  from fiche_detail as a
-   join fiche as f1 on (f1.f_id=3Da.f_id)
-   join (select f_id,ad_value from fiche_detail as fd1 where ad_id=3D900=
3) as m on (m.f_id=3Da.f_id)
-join (select f_id,ad_value from fiche_detail as fd1 where ad_id=3D9002) =
as c on (c.f_id=3Da.f_id)
-
-  where fd_id=3D8 and ad_id=3D1;
+CREATE OR REPLACE VIEW coprop.summary AS
+ SELECT a.f_id AS lot_id, m.ad_value AS building_id, c.ad_value AS copro=
p_id
+   FROM fiche_detail a
+   JOIN fiche f1 ON f1.f_id =3D a.f_id
+   JOIN ( SELECT fd1.f_id, fd1.ad_value
+      FROM fiche_detail fd1
+     WHERE fd1.ad_id =3D 70) m ON m.f_id =3D a.f_id
+   JOIN ( SELECT fd1.f_id, fd1.ad_value
+   FROM fiche_detail fd1
+  WHERE fd1.ad_id =3D 71) c ON c.f_id =3D a.f_id
+  WHERE f1.fd_id =3D 8 AND a.ad_id =3D 1;
\ No newline at end of file



From MAILER-DAEMON Sat Jan 07 17:42:10 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rjexm-0002VA-7X
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 17:42:10 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat,  7 Jan 2012 23:44:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.75503.1325976129.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r267 - trunk/coprop/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, 07 Jan 2012 22:42:09 -0000

Author: danydb
Date: 2012-01-07 23:44:15 +0100 (Sat, 07 Jan 2012)
New Revision: 267

Added:
   trunk/coprop/sql/create_view_summary.sql
Removed:
   trunk/coprop/sql/create_view_summary.sql.sql
Log:
fix name

Copied: trunk/coprop/sql/create_view_summary.sql (from rev 266, trunk/cop=
rop/sql/create_view_summary.sql.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/coprop/sql/create_view_summary.sql	                        (rev=
 0)
+++ trunk/coprop/sql/create_view_summary.sql	2012-01-07 22:44:15 UTC (rev=
 267)
@@ -0,0 +1,11 @@
+CREATE OR REPLACE VIEW coprop.summary AS
+ SELECT a.f_id AS lot_id, m.ad_value AS building_id, c.ad_value AS copro=
p_id
+   FROM fiche_detail a
+   JOIN fiche f1 ON f1.f_id =3D a.f_id
+   JOIN ( SELECT fd1.f_id, fd1.ad_value
+      FROM fiche_detail fd1
+     WHERE fd1.ad_id =3D 70) m ON m.f_id =3D a.f_id
+   JOIN ( SELECT fd1.f_id, fd1.ad_value
+   FROM fiche_detail fd1
+  WHERE fd1.ad_id =3D 71) c ON c.f_id =3D a.f_id
+  WHERE f1.fd_id =3D 8 AND a.ad_id =3D 1;
\ No newline at end of file

Deleted: trunk/coprop/sql/create_view_summary.sql.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/coprop/sql/create_view_summary.sql.sql	2012-01-07 22:42:05 UTC =
(rev 266)
+++ trunk/coprop/sql/create_view_summary.sql.sql	2012-01-07 22:44:15 UTC =
(rev 267)
@@ -1,11 +0,0 @@
-CREATE OR REPLACE VIEW coprop.summary AS
- SELECT a.f_id AS lot_id, m.ad_value AS building_id, c.ad_value AS copro=
p_id
-   FROM fiche_detail a
-   JOIN fiche f1 ON f1.f_id =3D a.f_id
-   JOIN ( SELECT fd1.f_id, fd1.ad_value
-      FROM fiche_detail fd1
-     WHERE fd1.ad_id =3D 70) m ON m.f_id =3D a.f_id
-   JOIN ( SELECT fd1.f_id, fd1.ad_value
-   FROM fiche_detail fd1
-  WHERE fd1.ad_id =3D 71) c ON c.f_id =3D a.f_id
-  WHERE f1.fd_id =3D 8 AND a.ad_id =3D 1;
\ No newline at end of file



From MAILER-DAEMON Sat Jan 07 17:59:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjfER-0006US-U9
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 17:59:23 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Jan 2012 00:01:25 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.75514.1325977162.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r268 - in trunk/coprop: . 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, 07 Jan 2012 22:59:21 -0000

Author: danydb
Date: 2012-01-08 00:01:25 +0100 (Sun, 08 Jan 2012)
New Revision: 268

Added:
   trunk/coprop/include/template/budget.php
Modified:
   trunk/coprop/ajax.php
   trunk/coprop/coprop-constant.php
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/ajax_bud_display.php
   trunk/coprop/include/budget.inc.php
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/template/bud_detail.php
Log:
Budget : fix form + compute total


Modified: trunk/coprop/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/coprop/ajax.php	2012-01-07 22:44:15 UTC (rev 267)
+++ trunk/coprop/ajax.php	2012-01-07 23:01:25 UTC (rev 268)
@@ -7,14 +7,6 @@
 $html=3D'';$extra=3D'';$ctl=3D'';
 switch ($act)
 {
-	// ajout un lien copro + lot
-	case 'modcopro':
-		/* the hide button */
-		require_once('include/ajax_mod_copro_lot.php');
-		break;
-	case 'removelot':
-		$cn->exec_sql("delete from coprop.lot where l_id=3D$1",array($lot_id))=
;
-		break;
 	case 'addkey':
 		require_once 'include/ajax_add_key.php';
 		break;

Modified: trunk/coprop/coprop-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/coprop/coprop-constant.php	2012-01-07 22:44:15 UTC (rev 267)
+++ trunk/coprop/coprop-constant.php	2012-01-07 23:01:25 UTC (rev 268)
@@ -14,5 +14,5 @@
 $gDossier=3DDossier::id();
 $g_copro_parameter=3Dnew Copro_Parameter();
 define ("COPRO_MAX_LOT",19);
-
+define("MAXROWBUD",15);
 ?>
\ No newline at end of file

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-07 22:44:15 UTC (rev 267)
+++ trunk/coprop/coprop-javascript.js	2012-01-07 23:01:25 UTC (rev 268)
@@ -233,9 +233,9 @@
 		if ( ! isNaN($('cr_tantieme').value)) {
 			var difference=3DparseFloat($('cr_tantieme').value)-tot;
 			if ( difference !=3D 0 )	{
-					$('span_diff').style.color=3D"red";
+					$('span_diff').style.backgroundColor=3D"red";
 				} else {
-					$('span_diff').style.color=3D"green";
+					$('span_diff').style.backgroundColor=3D"green";
 				}
 			$('span_diff').innerHTML=3Ddifference;
 		}
@@ -268,7 +268,7 @@
 				}
 				catch(e)
 				{
-					alert("R=C3=83=C2=A9ponse Ajax =3D"+e.message);
+					alert("R=C3=A9ponse Ajax =3D"+e.message);
 				}
 			}
 		}
@@ -278,4 +278,37 @@
 	{
 		alert(e.message);
 	}
-}
\ No newline at end of file
+}
+function compute_budget()
+{
+	try
+	{
+		str=3D"";
+		var array=3D$("fbud_update").getInputs('text');
+		var tot=3D0;
+		for (i=3D0;i<array.length;i++)
+			{
+				if ( array[i].name.search(/bt_amount/) > -1)
+				{
+					if (! isNaN(array[i].value) && array[i].value!=3D "") {
+						tot+=3DparseFloat(array[i].value);
+					}
+				}
+			}
+		$("sbud_total").innerHTML=3DMath.round(tot);
+		if ( ! isNaN($('b_amount').value)) {
+			var difference=3DparseFloat($('b_amount').value)-tot;
+			if ( difference !=3D 0 )	{
+					$('span_diff').style.backgroundColor=3D"red";
+				} else {
+					$('span_diff').style.backgroundColor=3D"green";
+				}
+			$('span_diff').innerHTML=3Ddifference;
+		}
+
+	}
+	catch(e)
+	{
+		alert(e.message);
+	}
+}

Modified: trunk/coprop/include/ajax_bud_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/coprop/include/ajax_bud_display.php	2012-01-07 22:44:15 UTC (re=
v 267)
+++ trunk/coprop/include/ajax_bud_display.php	2012-01-07 23:01:25 UTC (re=
v 268)
@@ -6,6 +6,8 @@
=20
 $bud=3Dnew Budget();
 $bud->b_id=3D$bud_id;
-
+echo '<form id=3D"fbud_update" method=3D"post">';
 $bud->detail();
+echo HtmlInput::submit("bud_update","Valider");
+echo "</form>";
 ?>

Modified: trunk/coprop/include/budget.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/coprop/include/budget.inc.php	2012-01-07 22:44:15 UTC (rev 267)
+++ trunk/coprop/include/budget.inc.php	2012-01-07 23:01:25 UTC (rev 268)
@@ -5,10 +5,14 @@
  */
=20
 require_once 'class_budget.php';
+$bud=3Dnew Budget();
=20
+if ( isset ($_POST['budget_update']))
+{
+	$bud->save();
+}
=20
=20
=20
-$bud=3Dnew Budget();
=20
 $bud->to_list();
\ No newline at end of file

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-07 22:44:15 UTC (rev 26=
7)
+++ trunk/coprop/include/class_budget.php	2012-01-07 23:01:25 UTC (rev 26=
8)
@@ -18,6 +18,38 @@
         require_once 'template/budget_list.php';
=20
     }
+	function load()
+	{
+		global $cn;
+		try
+		{
+			if ($this->b_id =3D=3D '') throw new Exception("Aucun budget demand=C3=
=A9");
+			$array=3D$cn->get_array("select b_id,b_name,b_start,b_end,b_amount,
+				to_char(b_start,'DD.MM.YYYY') as str_b_start,
+				to_char(b_end,'DD.MM.YYYY') as str_b_end
+				from coprop.budget where b_id=3D$1",array($this->b_id));
+			if ($cn->count() =3D=3D 1)
+			{
+				$this->b_name=3D$array[0]['b_name'];
+				$this->b_start=3D$array[0]['b_start'];
+				$this->str_b_start=3D$array[0]['str_b_start'];
+				$this->b_end=3D$array[0]['b_end'];
+				$this->str_b_end=3D$array[0]['str_b_end'];
+				$this->b_amount=3D$array[0]['b_amount'];
+			}
+			else
+				throw new Exception ('Aucun budget trouv=C3=A9');
+		} catch (Exception $e)
+		{
+			echo $e->getTraceAsString();
+			throw $e;
+		}
+	}
+	/**
+	 *Detail d'un budget avec les d=C3=A9tails, pour mettre =C3=A0 jour
+	 * @global type $cn
+	 * @throws Exception
+	 */
     function detail()
     {
         global $cn;
@@ -26,6 +58,28 @@
=20
             if ( ! isset ($this->b_id)|| trim($this->b_id)=3D=3D'')
                     throw new Exception ("Aucun budget demand=C3=A9");
+			$this->load();
+			$name=3Dnew IText('b_name');
+			if ($this->b_id <> 0)
+			{
+				$name->value=3D$this->b_name;
+				$start=3Dnew IDate('b_start',$this->str_b_start);
+				$end=3Dnew IDate('b_end',$this->str_b_end);
+				$amount=3Dnew INum('b_amount',round($this->b_amount,2));
+
+			}	else {
+				$start=3Dnew IDate('b_start');
+				$end=3Dnew IDate('b_end');
+				$amount=3Dnew INum('b_amount',0);
+
+			}
+			$amount->javascript=3D'onchange=3D"format_number(this,2);compute_budg=
et();"';
+			$bud_amount=3D$amount->value;
+
+			echo HtmlInput::hidden("b_id",$this->b_id);
+			echo HtmlInput::request_to_hidden(array('gDossier','ac','plugin_code'=
,'sa'));
+			require_once 'template/budget.php';
+
             $array=3D$cn->get_array("select bt_id,bt_amount,f_id,vw_name=
,quick_code,cr_name,cr_id
                 from coprop.budget_detail
                 join coprop.clef_repartition using (cr_id)
@@ -35,10 +89,11 @@
             $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D2");
=20
 			$a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.clef_repa=
rtition order by cr_name");
-            for ($i=3D0;$i<count($array);$i++)
+			$max=3Dcount($array);
+            for ($i=3D0;$i<MAXROWBUD;$i++)
             {
                 $card=3Dnew ICard('f_id'.$i);
-                $card->value=3D$array[$i]['quick_code'];
+                $card->value=3D($i>=3D$max)?"":$array[$i]['quick_code'];
                 $card->table=3D0;
=20
                  // name of the field to update with the name of the car=
d
@@ -69,12 +124,13 @@
                 $f_card_bt=3D$card->search();
=20
                 $amount=3Dnew INum("bt_amount[]");
-                $amount->value=3Dround($array[$i]['bt_amount'],2);
-                $hidden=3DHtmlInput::hidden("bt_id[]",$array[$i]["bt_id"=
]);
+                $amount->value=3D($i>=3D$max)?"":round($array[$i]['bt_am=
ount'],2);
+				$amount->javascript=3D'onchange=3D"format_number(this,2);compute_bud=
get();"';
+                $hidden=3D($i>=3D$max)?0:HtmlInput::hidden("bt_id[]",$ar=
ray[$i]["bt_id"]);
=20
                 $ikey=3Dnew ISelect("key[]");
                 $ikey->value=3D$a_key;
-                $ikey->selected=3D$array[$i]['cr_id'];
+                $ikey->selected=3D($i>=3D$max)?0:$array[$i]['cr_id'];
=20
                 $a_input[$i]["amount"]=3D$amount->input();
                 $a_input[$i]["hidden"]=3D$hidden;

Modified: trunk/coprop/include/template/bud_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/coprop/include/template/bud_detail.php	2012-01-07 22:44:15 UTC =
(rev 267)
+++ trunk/coprop/include/template/bud_detail.php	2012-01-07 23:01:25 UTC =
(rev 268)
@@ -24,15 +24,21 @@
         </td>
         <td>
             <?=3D$a_input[$i]['key']?>
-           =20
+
         </td>
-       =20
+
         <td>
             <?=3D$a_input[$i]['amount']?>
-           =20
+
         </td>
-    </tr>=20
-   =20
+    </tr>
+
 <? endfor?>
-   =20
+
 </table>
+<p>
+	Total <span id=3D"sbud_total"><?=3Dnbm($bud_amount)?></span>
+</p>
+<p>
+Diff=C3=A9rence <span id=3D"span_diff"></span>
+</p>
\ No newline at end of file

Added: trunk/coprop/include/template/budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/budget.php	                        (rev=
 0)
+++ trunk/coprop/include/template/budget.php	2012-01-07 23:01:25 UTC (rev=
 268)
@@ -0,0 +1,65 @@
+<?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
+
+/**
+ * @file
+ * @brief show budget header
+ * @see Budget::detail
+ *
+ */
+?>
+<table>
+	<tr>
+		<td>
+			Nom
+		</td>
+		<td>
+			<?=3D$name->input()?>
+		</td
+	</tr>
+	<tr>
+		<td>
+			Date d=C3=A9but
+		</td>
+		<td>
+			<?=3D$start->input()?>
+		</td>
+	</tr>
+	<tr>
+		<td>
+			Date fin
+		</td>
+		<td>
+			<?=3D$end->input()?>
+		</td>
+	</tr>
+	<tr>
+		<td>
+		Montant
+		</td>
+		<td>
+			<?=3D$amount->input()?>
+		</td>
+
+	</tr>
+</table>
\ No newline at end of file



From MAILER-DAEMON Sat Jan 07 18:07:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RjfMR-00083F-Mt
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 18:07:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Jan 2012 00:09:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.75519.1325977659.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r269 - trunk/coprop/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 Jan 2012 23:07:38 -0000

Author: danydb
Date: 2012-01-08 00:09:44 +0100 (Sun, 08 Jan 2012)
New Revision: 269

Modified:
   trunk/coprop/include/class_copro_key.php
Log:
Key : bug sql


Modified: trunk/coprop/include/class_copro_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_key.php	2012-01-07 23:01:25 UTC (rev=
 268)
+++ trunk/coprop/include/class_copro_key.php	2012-01-07 23:09:44 UTC (rev=
 269)
@@ -32,15 +32,15 @@
     {
         global $cn;
         extract ($p_array);
-        if (strlen(trim ($cr_name))=3D=3D0)=20
+        if (strlen(trim ($cr_name))=3D=3D0)
             throw new Exception("Le nom est vide");
         if ($b_dupl )
         {
-            $dupl=3D$cn->count_sql("select * from copro.clef_repartition=
 where cr_name=3D$1",$cr_name);
+            $dupl=3D$cn->count_sql("select * from coprop.clef_repartitio=
n where cr_name=3D$1",array($cr_name));
             if ( $dupl >0 )
                 throw new Exception("Une clef avec ce nom existe d=C3=A9=
ja");
         }
-       =20
+
     }
=20
 	function insert($p_array)
@@ -52,7 +52,7 @@
                     $this->verify($p_array);
 			$cn->start();
 			$this->cr_id =3D $cn->get_value("insert into coprop.clef_repartition(=
cr_note,cr_name,cr_tantieme)
-				values($1,$2) returning cr_id", array( strip_tags($cr_note), strip_t=
ags($cr_name),$cr_tantieme));
+				values($1,$2,$3) returning cr_id", array( strip_tags($cr_note), stri=
p_tags($cr_name),$cr_tantieme));
 			for ($i =3D 0; $i < count($f_id); $i++)
 			{
 				if (${"part" . $f_id[$i]} =3D=3D '')
@@ -76,7 +76,7 @@
 		{
                     $this->verify($p_array,false);
 			$cn->start();
-			$cn->exec_sql("update coprop.clef_repartition set=20
+			$cn->exec_sql("update coprop.clef_repartition set
 				cr_note=3D$1,cr_name=3D$2,cr_tantieme=3D$3
 				where cr_id=3D$4",
 					array( strip_tags($cr_note), strip_tags($cr_name),$cr_tantieme,$thi=
s->cr_id));



From MAILER-DAEMON Sat Jan 07 18:33:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rjfl5-000472-5B
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 18:33:07 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Jan 2012 00:35:10 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.75537.1325979186.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r270 - in trunk/coprop: . 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 Jan 2012 23:33:05 -0000

Author: danydb
Date: 2012-01-08 00:35:10 +0100 (Sun, 08 Jan 2012)
New Revision: 270

Removed:
   trunk/coprop/include/ajax_mod_copro_lot.php
Modified:
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/class_budget.php
Log:
compute_budget : fix bug + when page is loaded compute difference

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-07 23:09:44 UTC (rev 269)
+++ trunk/coprop/coprop-javascript.js	2012-01-07 23:35:10 UTC (rev 270)
@@ -232,6 +232,7 @@
 		$("span_tantieme").innerHTML=3DMath.round(tot);
 		if ( ! isNaN($('cr_tantieme').value)) {
 			var difference=3DparseFloat($('cr_tantieme').value)-tot;
+			difference=3DMath.round(difference*100)/100;
 			if ( difference !=3D 0 )	{
 					$('span_diff').style.backgroundColor=3D"red";
 				} else {
@@ -295,9 +296,10 @@
 					}
 				}
 			}
-		$("sbud_total").innerHTML=3DMath.round(tot);
+		$("sbud_total").innerHTML=3DMath.round(tot*100)/100;
 		if ( ! isNaN($('b_amount').value)) {
 			var difference=3DparseFloat($('b_amount').value)-tot;
+			difference=3DMath.round(difference*100)/100;
 			if ( difference !=3D 0 )	{
 					$('span_diff').style.backgroundColor=3D"red";
 				} else {

Deleted: trunk/coprop/include/ajax_mod_copro_lot.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/ajax_mod_copro_lot.php	2012-01-07 23:09:44 UTC (=
rev 269)
+++ trunk/coprop/include/ajax_mod_copro_lot.php	2012-01-07 23:35:10 UTC (=
rev 270)
@@ -1,60 +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
-
-/**
- * @file
- * @brief modify copro. + lot
- * parameter are
- *@code
- * array
-  'plugin_code' =3D> string 'COPROP' (length=3D6)
-  'gDossier' =3D> string '26' (length=3D2)
-  'coprop_id' =3D> string '32' (length=3D2)
-  'ac' =3D> string 'EXT/COPROP' (length=3D10)
-  'act' =3D> string 'modcopro' (length=3D8)
-
- *@endcode
- */
-
-$copro=3Dnew Fiche($cn);
-$copro->id=3D$coprop_id;
-
-$acurrent=3D$cn->get_array("select lot.l_id   ,l_fiche_id,
-			(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
1) as fiche_name,
-			(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
23) as fiche_qcode,
-			(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
9) as fiche_desc
-			from coprop.lot where coprop_fk=3D$1",
-		array($coprop_id));
-
-$not_assigned=3D$cn->get_array("select a.f_id,
-			(select ad_value from fiche_detail as e where e.f_id=3Da.f_id and ad_=
id=3D1) as fiche_name,
-			(select ad_value from fiche_detail as f where f.f_id=3Da.f_id and ad_=
id=3D23) as fiche_qcode,
-                        (select ad_value from fiche_detail where f_id=3D=
l_fiche_id and ad_id=3D9) as fiche_desc
-			from coprop.lot
-			right join fiche as a on (l_fiche_id=3Da.f_id)
-			where
-			coalesce(coprop_fk,0) <>$1 and fd_id=3D$2",
-		array($coprop_id,$g_copro_parameter->categorie_lot));
-
-require_once("template/coprop_lot_mod.php")
-?>

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-07 23:09:44 UTC (rev 26=
9)
+++ trunk/coprop/include/class_budget.php	2012-01-07 23:35:10 UTC (rev 27=
0)
@@ -141,6 +141,7 @@
=20
             }
             require_once 'template/bud_detail.php';
+			echo create_script("compute_budget()");
         }
         catch (Exception $e)
         {



From MAILER-DAEMON Sat Jan 07 18:36:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rjfo9-0004Fn-E7
	for mharc-phpcompta-dev@gnu.org; Sat, 07 Jan 2012 18:36:17 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Jan 2012 00:38:22 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.75538.1325979376.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4683 - phpcompta/trunk/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, 07 Jan 2012 23:36:16 -0000

Author: danydb
Date: 2012-01-08 00:38:22 +0100 (Sun, 08 Jan 2012)
New Revision: 4683

Modified:
   phpcompta/trunk/sql/upgrade.sql
Log:
change fk to attr_def

Modified: phpcompta/trunk/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/trunk/sql/upgrade.sql	2012-01-07 05:11:12 UTC (rev 4682)
+++ phpcompta/trunk/sql/upgrade.sql	2012-01-07 23:38:22 UTC (rev 4683)
@@ -1,3 +1,17 @@
 alter table attr_def add ad_extra text ;
=20
-insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fi=
n','date',8);
\ No newline at end of file
+insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fi=
n','date',8);
+
+ALTER TABLE fiche_detail DROP CONSTRAINT "$2";
+
+ALTER TABLE fiche_detail
+  ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id)
+      REFERENCES attr_def (ad_id) MATCH SIMPLE
+      ON UPDATE cascade ON DELETE cascade;
+     =20
+ALTER TABLE jnt_fic_attr DROP CONSTRAINT "$2";
+
+ALTER TABLE jnt_fic_attr
+  ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id)
+      REFERENCES attr_def (ad_id) MATCH SIMPLE
+      ON UPDATE cascade ON DELETE cascade;



From MAILER-DAEMON Sun Jan 08 11:35:06 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rjvi6-0005Dh-Pf
	for mharc-phpcompta-dev@gnu.org; Sun, 08 Jan 2012 11:35:06 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun,  8 Jan 2012 17:37:04 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.76658.1326040505.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r271 - in trunk/coprop: . 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 Jan 2012 16:35:04 -0000

Author: danydb
Date: 2012-01-08 17:37:03 +0100 (Sun, 08 Jan 2012)
New Revision: 271

Modified:
   trunk/coprop/ajax.php
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/budget.inc.php
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/lot.inc.php
   trunk/coprop/include/template/budget_list.php
Log:
budget ; create, update and delete

Modified: trunk/coprop/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/coprop/ajax.php	2012-01-07 23:35:10 UTC (rev 270)
+++ trunk/coprop/ajax.php	2012-01-08 16:37:03 UTC (rev 271)
@@ -1,10 +1,13 @@
 <?php
+
 require_once('coprop-constant.php');
 require_once('class_database.php');
=20
 extract($_GET);
 global $cn;
-$html=3D'';$extra=3D'';$ctl=3D'';
+$html =3D '';
+$extra =3D '';
+$ctl =3D '';
 switch ($act)
 {
 	case 'addkey':
@@ -13,12 +16,19 @@
 	case 'modkey':
 		require_once 'include/ajax_mod_key.php';
 		break;
-        case 'removekey':
-            require_once 'include/ajax_remove_key.php';
-            break;
-        case 'buddisplay':
-            require_once 'include/ajax_bud_display.php';
-            break;
+	case 'removekey':
+		require_once 'include/ajax_remove_key.php';
+		break;
+	case 'buddisplay':
+		require_once 'include/ajax_bud_display.php';
+		break;
+	case 'budadd':
+		$bud_id=3D0;
+		require_once 'include/ajax_bud_display.php';
+		break;
+	case 'removebudget':
+		$cn->exec_sql("delete from coprop.budget where b_id=3D$1",array($bud_i=
d));
+		break;
 	default:
=20
 		var_dump($_GET);

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-07 23:35:10 UTC (rev 270)
+++ trunk/coprop/coprop-javascript.js	2012-01-08 16:37:03 UTC (rev 271)
@@ -195,8 +195,7 @@
 					remove_waiting_box();
 					$("row"+key_id).style.color=3D"red";
 					$("row"+key_id).style.textDecoration=3D"line-through";
-                                        $("col"+key_id).style.textDecora=
tion=3D"none";
-					$("col"+key_id).innerHTML=3D"Effac=C3=A9";
+					$("col"+key_id).innerHTML=3D"";
=20
 					//response.responseText.evalScripts();
 				}
@@ -314,3 +313,72 @@
 		alert(e.message);
 	}
 }
+function budget_add(dossier,plugin_code,ac)
+{
+	waiting_box();
+	try
+	{
+		var queryString=3D"plugin_code=3D"+plugin_code+"&gDossier=3D"+dossier+=
"&bud_id=3D0&ac=3D"+ac+"&act=3Dbudadd";
+		var action=3Dnew Ajax.Request ( 'ajax.php',
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:null,
+			onSuccess:function (response)
+			{
+				try
+				{
+                                    remove_waiting_box();
+                                    $('divbuddetail').innerHTML=3Drespon=
se.responseText;
+									response.responseText.evalScripts();
+				}
+				catch(e)
+				{
+					alert("R=C3=A9ponse Ajax =3D"+e.message);
+				}
+			}
+		}
+		);
+	}
+	catch(e)
+	{
+		alert(e.message);
+	}
+}
+function budget_remove(plugin_code,ac,dossier,bud_id)
+{
+	if (! confirm("Vous voulez effacer ce budget?")) { return;}
+	waiting_box();
+	try
+	{
+		var queryString=3D"plugin_code=3D"+plugin_code+"&gDossier=3D"+dossier+=
"&bud_id=3D"+bud_id+'&ac=3D'+ac+"&act=3Dremovebudget";
+		var action=3Dnew Ajax.Request ( 'ajax.php',
+		{
+			method:'get',
+			parameters:queryString,
+			onFailure:null,
+			onSuccess:function (response)
+			{
+				try
+				{
+					remove_waiting_box();
+					$("row"+bud_id).style.color=3D"red";
+					$("row"+bud_id).style.textDecoration=3D"line-through";
+					$("col2"+bud_id).innerHTML=3D"";
+					$("col1"+bud_id).innerHTML=3D"";
+
+					//response.responseText.evalScripts();
+				}
+				catch(e)
+				{
+					alert("R=C3=A9ponse Ajax =3D"+e.message);
+				}
+			}
+		}
+		);
+	}
+	catch(e)
+	{
+		alert(e.message);
+	}
+}
\ No newline at end of file

Modified: trunk/coprop/include/budget.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/coprop/include/budget.inc.php	2012-01-07 23:35:10 UTC (rev 270)
+++ trunk/coprop/include/budget.inc.php	2012-01-08 16:37:03 UTC (rev 271)
@@ -7,12 +7,18 @@
 require_once 'class_budget.php';
 $bud=3Dnew Budget();
=20
-if ( isset ($_POST['budget_update']))
+if ( isset ($_POST['bud_update']))
 {
-	$bud->save();
+	$bud->save($_POST);
 }
=20
=20
=20
+echo '<div id=3D"bud_list" class=3D"content">';
+$bud->to_list();
+echo HtmlInput::button("bud_add_bt","Ajout Budget","onclick=3D\"budget_a=
dd('".$_REQUEST['gDossier']."','".$_REQUEST['plugin_code']."','".$_REQUES=
T['ac']."')\"");
+echo '</div>';
+?>
+<div id=3D"divbuddetail">
=20
-$bud->to_list();
\ No newline at end of file
+</div>
\ No newline at end of file

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-07 23:35:10 UTC (rev 27=
0)
+++ trunk/coprop/include/class_budget.php	2012-01-08 16:37:03 UTC (rev 27=
1)
@@ -58,10 +58,10 @@
=20
             if ( ! isset ($this->b_id)|| trim($this->b_id)=3D=3D'')
                     throw new Exception ("Aucun budget demand=C3=A9");
-			$this->load();
 			$name=3Dnew IText('b_name');
 			if ($this->b_id <> 0)
 			{
+				$this->load();
 				$name->value=3D$this->b_name;
 				$start=3Dnew IDate('b_start',$this->str_b_start);
 				$end=3Dnew IDate('b_end',$this->str_b_end);
@@ -80,7 +80,8 @@
 			echo HtmlInput::request_to_hidden(array('gDossier','ac','plugin_code'=
,'sa'));
 			require_once 'template/budget.php';
=20
-            $array=3D$cn->get_array("select bt_id,bt_amount,f_id,vw_name=
,quick_code,cr_name,cr_id
+            $array=3D$cn->get_array("select bt_label,
+							bt_id,bt_amount,f_id,vw_name,quick_code,cr_name,cr_id
                 from coprop.budget_detail
                 join coprop.clef_repartition using (cr_id)
                 join vw_fiche_attr using (f_id)
@@ -92,6 +93,9 @@
 			$max=3Dcount($array);
             for ($i=3D0;$i<MAXROWBUD;$i++)
             {
+				$label=3Dnew IText('bt_label[]');
+				$label->value=3D($i>=3D$max)?"":$array[$i]['bt_label'];
+
                 $card=3Dnew ICard('f_id'.$i);
                 $card->value=3D($i>=3D$max)?"":$array[$i]['quick_code'];
                 $card->table=3D0;
@@ -126,7 +130,8 @@
                 $amount=3Dnew INum("bt_amount[]");
                 $amount->value=3D($i>=3D$max)?"":round($array[$i]['bt_am=
ount'],2);
 				$amount->javascript=3D'onchange=3D"format_number(this,2);compute_bud=
get();"';
-                $hidden=3D($i>=3D$max)?0:HtmlInput::hidden("bt_id[]",$ar=
ray[$i]["bt_id"]);
+                $hidden=3D($i>=3D$max)?HtmlInput::hidden("bt_id[]",0):Ht=
mlInput::hidden("bt_id[]",$array[$i]["bt_id"]);
+				echo $hidden;
=20
                 $ikey=3Dnew ISelect("key[]");
                 $ikey->value=3D$a_key;
@@ -135,7 +140,7 @@
                 $a_input[$i]["amount"]=3D$amount->input();
                 $a_input[$i]["hidden"]=3D$hidden;
                 $a_input[$i]["card"]=3D$card->input().$f_card_bt;
-                $a_input[$i]["card_label"]=3D$f_card_label;
+                $a_input[$i]["card_label"]=3D$label->input();
=20
                 $a_input[$i]['key']=3D$ikey->input();
=20
@@ -146,10 +151,165 @@
         catch (Exception $e)
         {
             $e->getTraceAsString();
+			throw $e;
         }
     }
-}
+	/**
+	 *@brief insert or update a new budget
+	 * @param $p_array
+	 *   - b_id
+	 *   - b_name
+	 *   - b_start
+	 *   - b_end
+	 *   - b_amount
+	 *   - f_idX  -> qcode
+	 *   - key[X]
+	 *   - bt_amount[X]
+	 *   - p_jrn
+	 *   - bt_id[X]
+	 */
+	function save($p_array)
+	{
+		try{
+			$this->b_id=3D$p_array['b_id'];
+			if ( $p_array['b_id'] =3D=3D 0 )
+			{
+				$this->insert($p_array);
+				$this->save_detail($p_array);
+			} else {
+				$this->update($p_array);
+				$this->save_detail($p_array);
+			}
+		}
+		catch( Exception $e){
+			throw $e;
+		}
+	}
+	/**
+	 *@brief update budget
+	 */
+	function update($p_array)
+	{
+		global $cn;
+		try {
+			extract ($p_array);
+			// update coprop.budget
+			$cn->exec_sql("update coprop.budget set b_name=3D$1,
+					b_start=3Dto_date($2,'DD.MM.YYYY'),
+					b_end=3Dto_date($3,'DD.MM.YYYY'),
+					b_amount=3D$4
+					where b_id=3D$5
+					",array(
+						strip_tags($b_name),
+						$b_start,
+						$b_end,
+						$b_amount,
+						$b_id
+					));
=20
=20
+		}
+		catch (Exception $exc) {
+			echo $exc->getTraceAsString();
+			throw $exc;
+		}
=20
+	}
+	/**
+	 *@brief insert budget
+	 */
+	function insert($p_array)
+	{
+		global $cn;
+		try {
+			extract ($p_array);
+			// update coprop.budget
+			$this->b_id=3D$cn->get_value("insert into coprop.budget (b_name,b_sta=
rt,b_end,b_amount)
+				values ($1,
+					to_date($2,'DD.MM.YYYY'),
+					to_date($3,'DD.MM.YYYY'),
+					$4) returning b_id
+					",array(
+						strip_tags($b_name),
+						$b_start,
+						$b_end,
+						$b_amount
+					));
+
+
+		}
+		catch (Exception $exc) {
+			echo $exc->getTraceAsString();
+			throw $exc;
+		}
+
+	}
+	function save_detail($p_array)
+	{
+		extract($p_array);
+		global $cn;
+		try
+		{
+			$max=3Dcount($bt_id);
+			for ($i=3D0;$i<MAXROWBUD;$i++)
+			{
+
+				if ( $bt_id[$i]=3D=3D 0)
+				{
+					if ( strlen(trim(${'f_id'.$i})) !=3D 0)
+					{
+						$f_id=3D$cn->get_value("select f_id from vw_fiche_attr where quick=
_code=3Dupper(trim($1))",
+								array(${'f_id'.$i}));
+
+						// insert into coprop.budget_detail
+							$cn->exec_sql("insert into coprop.budget_detail (bt_label,f_id,b_=
id,bt_amount,cr_id) ".
+								" values ($1,$2,$3,$4,$5)",
+								array(
+									strip_tags($bt_label[$i]),
+									$f_id,
+									$this->b_id,
+									$bt_amount[$i],
+									$key[$i]
+									)
+
+							);
+					}
+				}
+				else
+				{
+					// update into coprop.budget_detail
+					if ( strlen(trim(${'f_id'.$i})) !=3D 0)
+					{
+						$f_id=3D$cn->get_value("select f_id from vw_fiche_attr where quick=
_code=3Dupper(trim($1))",
+								array(${'f_id'.$i}));
+
+						$cn->exec_sql("update coprop.budget_detail set bt_label=3D$1,f_id=3D=
$2,bt_amount=3D$3,cr_id=3D$4 ".
+								" where bt_id=3D$5",
+								array(
+									strip_tags($bt_label[$i]),
+									$f_id,
+									$bt_amount[$i],
+									$key[$i],
+									$bt_id[$i]
+									)
+
+							);
+
+					} else {
+						$cn->exec_sql("delete from coprop.budget_detail where bt_id=3D$1",=
array($bt_id[$i]));
+					}
+
+				}
+			}
+
+
+		}
+		catch (Exception $exc)
+		{
+			echo $exc->getTraceAsString();
+			throw $exc;
+		}
+
+	}
+}
 ?>

Modified: trunk/coprop/include/lot.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/coprop/include/lot.inc.php	2012-01-07 23:35:10 UTC (rev 270)
+++ trunk/coprop/include/lot.inc.php	2012-01-08 16:37:03 UTC (rev 271)
@@ -107,7 +107,7 @@
 /**
  * @todo ajouter tri
  */
-$a_copro=3D$cn->get_array($sql,array($g_copro_parameter->categorie_copro=
p));
+/*$a_copro=3D$cn->get_array($sql,array($g_copro_parameter->categorie_cop=
rop));
=20
 $sql_lot=3D$cn->prepare ("lot","select f_id,
 	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
1) as lot_name,
@@ -115,7 +115,7 @@
         (select ad_value from fiche_detail where f_id=3Dl_fiche_id and a=
d_id=3D9) as lot_desc
 	from fiche where f_id in ( select f_id from fiche_detail where ad_id=3D=
$1 and ad_value=3D$2)
 	and fd_id=3D$3");
-
+*/
 echo $f_add_button->input();
=20
=20

Modified: trunk/coprop/include/template/budget_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/budget_list.php	2012-01-07 23:35:10 UTC=
 (rev 270)
+++ trunk/coprop/include/template/budget_list.php	2012-01-08 16:37:03 UTC=
 (rev 271)
@@ -10,16 +10,19 @@
         <th> Nom </th>
         <th> Date d=C3=A9but </th>
         <th> Date Fin </th>
-        <th> Montant </th>
+        <th style=3D"text-align: right"> Montant </th>
     </tr>
 <?
 for ($i=3D0;$i<count($array);$i++):
     $class=3D($i%2=3D=3D0)?' class=3D"evend" ':' class=3D"odd" ';
-    $str_js=3Dsprintf(" onclick=3D\"budget_detail('%s','%s','%s','%s')\"=
 ",
+    $str_js=3Dsprintf(" onclick=3D\"budget_detail('%s','%s','%s','%s'); =
 \"",
             $_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier=
'],$array[$i]['b_id']);
     $js=3DHtmlInput::anchor("D=C3=A9tail","",$str_js);
+	$str_js_del=3Dsprintf(" onclick=3D\"budget_remove('%s','%s','%s','%s');=
\" ",
+            $_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier=
'],$array[$i]['b_id']);
+    $js_del=3DHtmlInput::anchor("Effacer","",$str_js_del);
 ?>
-    <tr <?=3D$class?> >
+    <tr id=3D"row<?=3D$array[$i]['b_id']?>" <?=3D$class?> >
         <td>
             <?=3D$array[$i]['b_name']?>
         </td>
@@ -29,18 +32,18 @@
         <td>
             <?=3D$array[$i]['str_end']?>
         </td>
-        <td>
+        <td CLASS=3D"num">
             <?=3Dnbm($array[$i]['b_amount'])?>
         </td>
-        <td>
+        <td  id=3D"col1<?=3D$array[$i]['b_id']?>">
             <?=3D$js?>
         </td>
-    </tr> =20
+        <td  id=3D"col2<?=3D$array[$i]['b_id']?>">
+            <?=3D$js_del?>
+        </td>
+    </tr>
 <?
 endfor;
 ?>
-   =20
+
 </table>
-<div id=3D"divbuddetail">
-
-</div>
\ No newline at end of file



From MAILER-DAEMON Mon Jan 09 06:15:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkDCL-00059h-P6
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 06:15:29 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 12:17:21 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.77797.1326107728.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4684 - 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: Mon, 09 Jan 2012 11:15:28 -0000

Author: danydb
Date: 2012-01-09 12:17:20 +0100 (Mon, 09 Jan 2012)
New Revision: 4684

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

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	2012-01-07 23:38:22 UTC (rev =
4683)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-09 11:17:20 UTC (rev =
4684)
@@ -559,8 +559,8 @@
 		/* show card type here */
 		$type_card =3D $this->cn->get_value('select fd_label from fiche_def jo=
in fiche using (fd_id) where f_id=3D$1', array($this->id));
 		$ret =3D "";
+		$ret.=3Dh2( $type_card, 'style=3D"display:inline"');
 		$ret.=3D'<span style=3D"font-weight:bolder"> id :' . $this->id . "</sp=
an>";
-		$ret.=3Dh2( $type_card, 'style=3D"display:inline"');
 		$ret.=3D"<table style=3D\"width:98%;margin:1%\">";
 		if (empty($attr))
 		{



From MAILER-DAEMON Mon Jan 09 06:20:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkDHB-00075Q-6l
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 06:20:29 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 12:22:20 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.77811.1326108028.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4685 - 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: Mon, 09 Jan 2012 11:20:27 -0000

Author: danydb
Date: 2012-01-09 12:22:20 +0100 (Mon, 09 Jan 2012)
New Revision: 4685

Modified:
   phpcompta/trunk/include/class_fiche.php
Log:
bug fiche : champs non rempli

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	2012-01-09 11:17:20 UTC (rev =
4684)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-09 11:22:20 UTC (rev =
4685)
@@ -581,7 +581,7 @@
 			}
 			if ($p_readonly =3D=3D false)
 			{
-
+                               =20
 				if ($r->ad_id =3D=3D ATTR_DEF_ACCOUNT)
 				{
 					$w =3D new IPoste("av_text" . $r->ad_id);
@@ -589,6 +589,7 @@
 					$w->set_attribute('account', "av_text" . $r->ad_id);
 					//  account created automatically
 					$w->table =3D 0;
+                                        $w->value =3D $r->av_text;
 					//  account created automatically
 					$sql =3D "select account_auto($this->fiche_def)";
 					$ret_sql =3D $this->cn->exec_sql($sql);
@@ -602,6 +603,7 @@
 				{
 					$w =3D new ITva_Popup('popup_tva');
 					$w->table =3D 1;
+                                        $w->value =3D $r->av_text;
 				}
 				elseif ($r->ad_id =3D=3D ATTR_DEF_COMPANY)
 				{
@@ -617,8 +619,7 @@
 					$w->set_attribute('typecard', $filter);
 					$w->set_attribute('inp', "av_text" . $r->ad_id);
 					$w->set_attribute('label', "av_text" . $r->ad_id . "_label");
-
-
+                                        $w->value =3D $r->av_text;
 					$msg =3D $w->search();
 					$msg.=3D$label->input();
 				}



From MAILER-DAEMON Mon Jan 09 06:27:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkDNW-0004lr-Po
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 06:27:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 12:28:49 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.77829.1326108421.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4686 - 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: Mon, 09 Jan 2012 11:27:00 -0000

Author: danydb
Date: 2012-01-09 12:28:48 +0100 (Mon, 09 Jan 2012)
New Revision: 4686

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
V?\195?\169rifie que ad_extra contient un SQL valide

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 11:22:20 UTC =
(rev 4685)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 11:28:48 UTC =
(rev 4686)
@@ -82,6 +82,14 @@
             case 'zone':
                 $this->ad_size=3D22;
                 break;
+            case 'select':
+                $this->ad_size=3D22;
+                try{
+                    $a=3D$this->cn->exec_sql($this->ad_extra);
+                }catch (Exception $e)
+                {
+                    throw new Exception ("La requ=C3=AAte SQL est invali=
de ");
+                }
             default:
                 $this->ad_size=3D22;
             }
@@ -89,6 +97,7 @@
     }
     public function save()
     {
+      =20
         /* please adapt */
         if (  $this->ad_id =3D=3D 0 )
             $this->insert();



From MAILER-DAEMON Mon Jan 09 06:27:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkDNt-0004n2-04
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 06:27:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 12:29:19 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.77830.1326108443.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4687 - 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: Mon, 09 Jan 2012 11:27:23 -0000

Author: danydb
Date: 2012-01-09 12:29:19 +0100 (Mon, 09 Jan 2012)
New Revision: 4687

Modified:
   phpcompta/trunk/include/fiche.inc.php
Log:
code inutile :
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
echo IPoste::ipopup('ipop_account');
echo ICard::ipopup('ipop_card');



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	2012-01-09 11:28:48 UTC (rev 46=
86)
+++ phpcompta/trunk/include/fiche.inc.php	2012-01-09 11:29:19 UTC (rev 46=
87)
@@ -29,8 +29,9 @@
 include_once ("user_menu.php");
 require_once('class_dossier.php');
 require_once('class_ipopup.php');
-echo IPoste::ipopup('ipop_account');
-echo ICard::ipopup('ipop_card');
+// Necessaire ???
+/*echo IPoste::ipopup('ipop_account');
+echo ICard::ipopup('ipop_card');*/
=20
 $str_dossier=3Ddossier::get();
 global $g_user,$cn;



From MAILER-DAEMON Mon Jan 09 07:24:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkEH3-00061v-Sy
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 07:24:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 13:26:17 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78043.1326111865.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4688 - 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: Mon, 09 Jan 2012 12:24:24 -0000

Author: danydb
Date: 2012-01-09 13:26:17 +0100 (Mon, 09 Jan 2012)
New Revision: 4688

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
V?\195?\169rifie que ad_extra contient un SQL valide

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 11:29:19 UTC =
(rev 4687)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 12:26:17 UTC =
(rev 4688)
@@ -84,7 +84,9 @@
                 break;
             case 'select':
                 $this->ad_size=3D22;
+                if (trim($this->ad_extra)=3D"") throw new Exception ("La=
 requ=C3=AAte SQL est vide ");
                 try{
+                   =20
                     $a=3D$this->cn->exec_sql($this->ad_extra);
                 }catch (Exception $e)
                 {



From MAILER-DAEMON Mon Jan 09 07:33:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkEPg-0007Is-Nx
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 07:33:20 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 13:35:11 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78065.1326112399.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4689 - 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: Mon, 09 Jan 2012 12:33:19 -0000

Author: danydb
Date: 2012-01-09 13:35:11 +0100 (Mon, 09 Jan 2012)
New Revision: 4689

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
bug attribut fiche : add blank : label

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 12:26:17 UTC =
(rev 4688)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 12:35:11 UTC =
(rev 4689)
@@ -84,7 +84,7 @@
                 break;
             case 'select':
                 $this->ad_size=3D22;
-                if (trim($this->ad_extra)=3D"") throw new Exception ("La=
 requ=C3=AAte SQL est vide ");
+                if (trim($this->ad_extra)=3D=3D"") throw new Exception (=
"La requ=C3=AAte SQL est vide ");
                 try{
                    =20
                     $a=3D$this->cn->exec_sql($this->ad_extra);



From MAILER-DAEMON Mon Jan 09 07:40:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkEWZ-0000JN-8X
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 07:40:27 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 13:42:22 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78082.1326112826.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4690 - 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: Mon, 09 Jan 2012 12:40:26 -0000

Author: danydb
Date: 2012-01-09 13:42:22 +0100 (Mon, 09 Jan 2012)
New Revision: 4690

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
bug attribut fiche : add blank : label add exception

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 12:35:11 UTC =
(rev 4689)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 12:42:22 UTC =
(rev 4690)
@@ -138,6 +138,7 @@
     }
     public function insert()
     {
+        try{
         $this->verify();
         /*  please adapt */
         $sql=3D"insert into attr_def(ad_text
@@ -151,12 +152,18 @@
                          array( $this->ad_text,$this->ad_type,$this->ad_=
size,$this->ad_extra
                               )
                      );
+        } catch (Exception $e)
+        {
+            throw ($e);
+        }
=20
     }
=20
     public function update()
     {
-        if ( $this->verify() !=3D 0 ) return;
+        try=20
+        {
+         $this->verify();
         if ( $this->ad_id < 9000) return;
         /*   please adapt */
         $sql=3D" update attr_def set ad_text =3D $1
@@ -168,6 +175,11 @@
                        ,$this->ad_type
                        ,$this->ad_id,$this->ad_size,$this->ad_extra)
              );
+        }catch (Exception $e)
+        {
+            throw ($e);
+        }
+       =20
=20
     }
     /**



From MAILER-DAEMON Mon Jan 09 07:53:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkEj7-0002Mz-3C
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 07:53:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 13:55:18 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78122.1326113604.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4691 - 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 Jan 2012 12:53:23 -0000

Author: danydb
Date: 2012-01-09 13:55:17 +0100 (Mon, 09 Jan 2012)
New Revision: 4691

Modified:
   phpcompta/trunk/html/style.css
Log:
CSS menu selected

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	2012-01-09 12:42:22 UTC (rev 4690)
+++ phpcompta/trunk/html/style.css	2012-01-09 12:55:17 UTC (rev 4691)
@@ -326,7 +326,7 @@
 background-color:#5D90CD;
=20
 }
-td.selectedcell a.mtitle {
+td.selectedcell a.mtitle,div.content td.selectedcell a.mtitle {
  font-size:1em;
  text-decoration:none;
  display:block;



From MAILER-DAEMON Mon Jan 09 08:09:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkEyq-00052W-Fn
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 08:09:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 14:11:28 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78145.1326114579.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4692 - 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: Mon, 09 Jan 2012 13:09:39 -0000

Author: danydb
Date: 2012-01-09 14:11:28 +0100 (Mon, 09 Jan 2012)
New Revision: 4692

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
V?\195?\169rifie que ad_extra contient un SQL valide

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 12:55:17 UTC =
(rev 4691)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 13:11:28 UTC =
(rev 4692)
@@ -82,19 +82,21 @@
             case 'zone':
                 $this->ad_size=3D22;
                 break;
-            case 'select':
+           =20
+            default:
                 $this->ad_size=3D22;
+            }
+        }
+        if ( $this->ad_extra =3D=3D 'select')
+        {
                 if (trim($this->ad_extra)=3D=3D"") throw new Exception (=
"La requ=C3=AAte SQL est vide ");
                 try{
                    =20
-                    $a=3D$this->cn->exec_sql($this->ad_extra);
+                        $this->cn->exec_sql($this->ad_extra);
                 }catch (Exception $e)
                 {
                     throw new Exception ("La requ=C3=AAte SQL est invali=
de ");
                 }
-            default:
-                $this->ad_size=3D22;
-            }
         }
     }
     public function save()



From MAILER-DAEMON Mon Jan 09 08:10:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkEzx-00058y-KJ
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 08:10:49 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 14:12:40 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78152.1326114648.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4693 - 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: Mon, 09 Jan 2012 13:10:48 -0000

Author: danydb
Date: 2012-01-09 14:12:40 +0100 (Mon, 09 Jan 2012)
New Revision: 4693

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
protect string against js

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 13:11:28 UTC =
(rev 4692)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 13:12:40 UTC =
(rev 4693)
@@ -95,7 +95,7 @@
                         $this->cn->exec_sql($this->ad_extra);
                 }catch (Exception $e)
                 {
-                    throw new Exception ("La requ=C3=AAte SQL est invali=
de ");
+                    throw new Exception ("La requ=C3=AAte SQL ".h($this-=
>ad_extra)." est invalide ");
                 }
         }
     }



From MAILER-DAEMON Mon Jan 09 08:34:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkFN1-0005XX-H6
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 08:34:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 14:36:31 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78191.1326116078.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4694 - 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: Mon, 09 Jan 2012 13:34:38 -0000

Author: danydb
Date: 2012-01-09 14:36:31 +0100 (Mon, 09 Jan 2012)
New Revision: 4694

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
SQL Protect


Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 13:12:40 UTC =
(rev 4693)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 13:36:31 UTC =
(rev 4694)
@@ -87,9 +87,11 @@
                 $this->ad_size=3D22;
             }
         }
-        if ( $this->ad_extra =3D=3D 'select')
+	echo $this->ad_type;
+        if ( $this->ad_type =3D=3D 'select')
         {
                 if (trim($this->ad_extra)=3D=3D"") throw new Exception (=
"La requ=C3=AAte SQL est vide ");
+		if ( preg_match('/^\h*select/i',$this->ad_extra)  =3D=3D 0) throw new =
Exception ("La requ=C3=AAte SQL doit commencer par SELECT ");
                 try{
                    =20
                         $this->cn->exec_sql($this->ad_extra);
@@ -156,7 +158,7 @@
                      );
         } catch (Exception $e)
         {
-            throw ($e);
+            throw $e;
         }
=20
     }
@@ -179,7 +181,7 @@
              );
         }catch (Exception $e)
         {
-            throw ($e);
+            throw $e;
         }
        =20
=20



From MAILER-DAEMON Mon Jan 09 08:47:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkFZO-0007WG-G6
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 08:47:26 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 14:49:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78227.1326116846.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4695 - 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 Jan 2012 13:47:25 -0000

Author: danydb
Date: 2012-01-09 14:49:15 +0100 (Mon, 09 Jan 2012)
New Revision: 4695

Modified:
   phpcompta/trunk/html/user_login.php
   phpcompta/trunk/include/class_user.php
Log:
Filter on name or description

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	2012-01-09 13:36:31 UTC (rev 4694=
)
+++ phpcompta/trunk/html/user_login.php	2012-01-09 13:49:15 UTC (rev 4695=
)
@@ -137,7 +137,7 @@
 ?>
 <span class=3D"notice">
                         <?php
-                        echo _('Donnez une partie du nom du dossier =C3=A0=
 rechercher');
+                        echo _('Donnez une partie du nom du dossier ou d=
e la description =C3=A0 rechercher');
 ?>
 </span>
 </form>

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	2012-01-09 13:36:31 UTC (rev 4=
694)
+++ phpcompta/trunk/include/class_user.php	2012-01-09 13:49:15 UTC (rev 4=
695)
@@ -965,7 +965,7 @@
              join  priv_user on ( priv_jnt=3Djnt_id)
              where use_active=3D1
              and use_login=3D'".sql_string($this->login)."'
-             and priv_priv !=3D 'X' and dos_name ilike '%$p_filter%'
+             and priv_priv !=3D 'X' and ( dos_name ilike '%$p_filter%' o=
r dos_description ~* '$p_filter')
              order by dos_name";
 		}
 		else



From MAILER-DAEMON Mon Jan 09 09:38:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkGMb-0005Bc-0L
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 09:38:17 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 15:40:02 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78527.1326119896.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4696 - 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: Mon, 09 Jan 2012 14:38:15 -0000

Author: danydb
Date: 2012-01-09 15:40:02 +0100 (Mon, 09 Jan 2012)
New Revision: 4696

Modified:
   phpcompta/trunk/include/class_user.php
Log:
Filter on name or description

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	2012-01-09 13:49:15 UTC (rev 4=
695)
+++ phpcompta/trunk/include/class_user.php	2012-01-09 14:40:02 UTC (rev 4=
696)
@@ -971,7 +971,7 @@
 		else
 		{
 			$sql =3D "select distinct dos_id,dos_name,dos_description from ac_dos=
sier
-             where  dos_name ilike '%".sql_string($p_filter)."%' order b=
y dos_name";
+             where   dos_name ilike '%$p_filter%' or dos_description ~* =
'$p_filter' order by dos_name";
 		}
 		require_once('class_database.php');
 		$cn =3D new Database();



From MAILER-DAEMON Mon Jan 09 09:45:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkGTk-0006tc-BW
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 09:45:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 15:47:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78532.1326120339.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4697 - in phpcompta/trunk: html 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, 09 Jan 2012 14:45:38 -0000

Author: danydb
Date: 2012-01-09 15:47:29 +0100 (Mon, 09 Jan 2012)
New Revision: 4697

Modified:
   phpcompta/trunk/html/ajax_ledger.php
   phpcompta/trunk/include/template/ledger_detail_bottom.php
Log:
Modifie rapprochement fiche detail

Modified: phpcompta/trunk/html/ajax_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/html/ajax_ledger.php	2012-01-09 14:40:02 UTC (rev 469=
6)
+++ phpcompta/trunk/html/ajax_ledger.php	2012-01-09 14:47:29 UTC (rev 469=
7)
@@ -38,6 +38,7 @@
 require_once('class_anc_operation.php');
 require_once('class_idate.php');
 require_once 'class_own.php';
+require_once 'class_iconcerned.php';
 /**
  * Check if we receive the needed data (jr_id...)
  */

Modified: phpcompta/trunk/include/template/ledger_detail_bottom.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_detail_bottom.php	2012-01-09 =
14:40:02 UTC (rev 4696)
+++ phpcompta/trunk/include/template/ledger_detail_bottom.php	2012-01-09 =
14:47:29 UTC (rev 4697)
@@ -39,9 +39,10 @@
 </legend>
 <?
 if ( $access=3D=3D'W') {
-  $search=3D'<INPUT TYPE=3D"BUTTON" class=3D"button" VALUE=3D"Cherche" O=
nClick=3D"search_reconcile('.$gDossier.",'rapt".$div."','".$obj->det->jr_=
montant."')\">";
-  $rapt=3Dnew IText('rapt'.$div);
-  echo $rapt->input().$search;
+     $wConcerned=3Dnew IConcerned("rapt".$div);
+     $wConcerned->amount_id=3D$obj->det->jr_montant;
+    echo $wConcerned->input();   =20
+   =20
 }
=20
 ?>



From MAILER-DAEMON Mon Jan 09 10:11:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkGst-0005hu-G1
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 10:11:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 16:13:33 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78597.1326121899.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4698 - 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: Mon, 09 Jan 2012 15:11:39 -0000

Author: danydb
Date: 2012-01-09 16:13:32 +0100 (Mon, 09 Jan 2012)
New Revision: 4698

Modified:
   phpcompta/trunk/include/class_user.php
Log:
SQL protect

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	2012-01-09 14:47:29 UTC (rev 4=
697)
+++ phpcompta/trunk/include/class_user.php	2012-01-09 15:13:32 UTC (rev 4=
698)
@@ -953,28 +953,29 @@
=20
 	function get_available_folder( $p_filter=3D"")
 	{
-
+            $cn =3D new Database();
 		$filter =3D "";
 		if ($this->admin =3D=3D 0)
 		{
 			// show only available folders
 			// if user is not an admin
-			$sql =3D "select distinct dos_id,dos_name,dos_description from ac_use=
rs
+			$Res=3D$cn->exec_sql( "select distinct dos_id,dos_name,dos_descriptio=
n from ac_users
              natural join jnt_use_dos
              natural join  ac_dossier
              join  priv_user on ( priv_jnt=3Djnt_id)
              where use_active=3D1
-             and use_login=3D'".sql_string($this->login)."'
-             and priv_priv !=3D 'X' and ( dos_name ilike '%$p_filter%' o=
r dos_description ~* '$p_filter')
-             order by dos_name";
+             and use_login=3D $1=20
+             and priv_priv !=3D 'X' and ( dos_name ~* $2 or dos_descript=
ion ~* $2 )
+             order by dos_name", array($this->login,$p_filter));
 		}
 		else
 		{
-			$sql =3D "select distinct dos_id,dos_name,dos_description from ac_dos=
sier
-             where   dos_name ilike '%$p_filter%' or dos_description ~* =
'$p_filter' order by dos_name";
+			$Res =3D $cn->exec_sql("select distinct dos_id,dos_name,dos_descripti=
on from ac_dossier
+             where   dos_name ~* $1 or dos_description ~* $1 order by do=
s_name",
+                        array($p_filter));
 		}
 		require_once('class_database.php');
-		$cn =3D new Database();
+	=09
=20
 		$Res =3D $cn->exec_sql($sql);
 		$max =3D Database::num_row($Res);



From MAILER-DAEMON Mon Jan 09 10:11:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkGtD-0005lC-HT
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 10:11:59 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 16:13:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78598.1326121917.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4699 - 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: Mon, 09 Jan 2012 15:11:57 -0000

Author: danydb
Date: 2012-01-09 16:13:46 +0100 (Mon, 09 Jan 2012)
New Revision: 4699

Modified:
   phpcompta/trunk/include/class_user.php
Log:
SQL protect

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	2012-01-09 15:13:32 UTC (rev 4=
698)
+++ phpcompta/trunk/include/class_user.php	2012-01-09 15:13:46 UTC (rev 4=
699)
@@ -975,10 +975,8 @@
                         array($p_filter));
 		}
 		require_once('class_database.php');
-	=09
=20
-		$Res =3D $cn->exec_sql($sql);
-		$max =3D Database::num_row($Res);
+                $max =3D Database::num_row($Res);
 		if ($max =3D=3D 0)
 			return 0;
=20



From MAILER-DAEMON Mon Jan 09 10:52:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkHWc-0002RG-6W
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 10:52:42 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 16:54:32 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.78677.1326124361.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4700 - 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: Mon, 09 Jan 2012 15:52:41 -0000

Author: danydb
Date: 2012-01-09 16:54:32 +0100 (Mon, 09 Jan 2012)
New Revision: 4700

Modified:
   phpcompta/trunk/include/card_attr.inc.php
Log:
alert if crd attr incorrect

Modified: phpcompta/trunk/include/card_attr.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/card_attr.inc.php	2012-01-09 15:13:46 UTC (re=
v 4699)
+++ phpcompta/trunk/include/card_attr.inc.php	2012-01-09 15:54:32 UTC (re=
v 4700)
@@ -56,7 +56,7 @@
     }
     catch (Exception $e)
     {
-        $e->getMessage();
+      alert($e->getMessage());
         $cn->rollback();
     }
=20



From MAILER-DAEMON Mon Jan 09 15:41:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkM2V-0007uN-FU
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 15:41:55 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 21:43:48 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.79189.1326141714.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4701 - 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: Mon, 09 Jan 2012 20:41:54 -0000

Author: danydb
Date: 2012-01-09 21:43:48 +0100 (Mon, 09 Jan 2012)
New Revision: 4701

Modified:
   phpcompta/trunk/include/adm.inc.php
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_acc_ledger_fin.php
   phpcompta/trunk/include/class_acc_ledger_purchase.php
   phpcompta/trunk/include/class_acc_ledger_sold.php
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/detail_adm.inc.php
   phpcompta/trunk/include/detail_client.inc.php
   phpcompta/trunk/include/detail_supplier.inc.php
   phpcompta/trunk/include/supplier.inc.php
Log:

Security : avoid js inject + block access if an user cannot add card


Modified: phpcompta/trunk/include/adm.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/adm.inc.php	2012-01-09 15:54:32 UTC (rev 4700=
)
+++ phpcompta/trunk/include/adm.inc.php	2012-01-09 20:43:48 UTC (rev 4701=
)
@@ -109,22 +109,25 @@
     echo '<br>';
     echo '<br>';
     echo '<br>';
-    /* Add button */
-    $f_add_button=3Dnew 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');
+	if  ($g_user->check_action(FICADD)=3D=3D1)
+	{
+		/* Add button */
+		$f_add_button=3Dnew 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');
=20
-    $f_add_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX);
-    $f_add_button->javascript=3D" select_card_type(this);";
-    echo $f_add_button->input();
+		$f_add_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX);
+		$f_add_button->javascript=3D" select_card_type(this);";
+		echo $f_add_button->input();
=20
-    $f_cat_button=3Dnew IButton('add_cat');
-    $f_cat_button->set_attribute('ipopup','ipop_cat');
-    $f_cat_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX);
-    $f_cat_button->label=3D_('Ajout d\'une cat=C3=A9gorie');
-    $f_cat_button->javascript=3D'add_category(this)';
-    echo $f_cat_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_ADM_TAX);
+		$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>';
=20

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	2012-01-09 15:54:32 UTC =
(rev 4700)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-09 20:43:48 UTC =
(rev 4701)
@@ -1498,14 +1498,16 @@
         $add_js.=3D'get_last_date();';
=20
         $ret=3D"";
-        /* Add button */
-        $f_add_button=3Dnew 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('jrn',$this->id);
-        $f_add_button->javascript=3D" this.jrn=3D\$('p_jrn').value;selec=
t_card_type(this);";
-        $f_add_button->input();
-
+		if ( $user->check_action(FICADD) =3D=3D 1)
+		{
+			/* Add button */
+			$f_add_button=3Dnew 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('jrn',$this->id);
+			$f_add_button->javascript=3D" this.jrn=3D\$('p_jrn').value;select_car=
d_type(this);";
+			$f_add_button->input();
+		}
 		$wLedger=3D$this->select_ledger('ODS',2);
         if ($wLedger =3D=3D null) exit (_('Pas de journal disponible'));
         $wLedger->javascript=3D"onChange=3D'update_name();update_predef(=
\"ods\",\"t\");$add_js'";
@@ -1593,7 +1595,7 @@
         $ret.=3DHtmlInput::hidden('jrn_type',$this->get_type());
         $info=3D HtmlInput::infobulle(0);
         $info_poste=3DHtmlInput::infobulle(9);
-		$ret.=3D$f_add_button->input();
+		if  ($user->check_action(FICADD)=3D=3D1)	$ret.=3D$f_add_button->input(=
);
         $ret.=3D'<table id=3D"quick_item" style=3D"width:100%">';
         $ret.=3D'<tr>'.
               '<th style=3D"text-align:left">Quickcode'.$info.'</th>'.
@@ -2564,7 +2566,7 @@
         {
 			$desc=3Dsql_string($desc);
             $fil_desc=3D$and." ( upper(jr_comment) like upper('%".$desc.=
"%') or upper(jr_pj_number) like upper('%".$desc."%') ".
-                      " or upper(jr_internal)  like upper('%".$desc."%')=
=20
+                      " or upper(jr_internal)  like upper('%".$desc."%')
                           or jr_grpt_id in (select j_grpt from jrnx wher=
e j_text ~* '".$desc."'))";
             $and=3D" and ";
         }

Modified: phpcompta/trunk/include/class_acc_ledger_fin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_fin.php	2012-01-09 15:54:32 =
UTC (rev 4700)
+++ phpcompta/trunk/include/class_acc_ledger_fin.php	2012-01-09 20:43:48 =
UTC (rev 4701)
@@ -193,12 +193,13 @@
=20
         $pview_only=3Dfalse;
         $user =3D new User($this->db);
+
         $f_add_button=3Dnew 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('jrn',$this->id);
         $f_add_button->javascript=3D" this.jrn=3D\$('p_jrn').value;selec=
t_card_type(this);";
-        $str_add_button=3D$f_add_button->input();
+        $str_add_button=3D($user->check_action(FICADD)=3D=3D1)?$f_add_bu=
tton->input():"";
=20
         // The first day of the periode
         $pPeriode=3Dnew Periode($this->db);

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	2012-01-09 15:5=
4:32 UTC (rev 4700)
+++ phpcompta/trunk/include/class_acc_ledger_purchase.php	2012-01-09 20:4=
3:48 UTC (rev 4701)
@@ -895,10 +895,13 @@
         $f_add_button2->set_attribute('filter',$this->get_all_fiche_def =
());
         //    $f_add_button2->set_attribute('jrn',$this->id);
         $f_add_button2->javascript=3D"  this.jrn=3D\$('p_jrn').value;sel=
ect_card_type(this);";
-
-        $str_add_button=3D$f_add_button->input();
-        $str_add_button2=3D$f_add_button2->input();
-
+		$str_add_button=3D"";
+		$str_add_button2=3D"";
+		if ($user->check_action(FICADD)=3D=3D1)
+		{
+			$str_add_button=3D$f_add_button->input();
+			$str_add_button2=3D$f_add_button2->input();
+		}
         // The first day of the periode
         $oPeriode=3Dnew Periode($this->db);
         list ($l_date_start,$l_date_end)=3D$oPeriode->get_date_limit($us=
er->get_periode());

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	2012-01-09 15:54:32=
 UTC (rev 4700)
+++ phpcompta/trunk/include/class_acc_ledger_sold.php	2012-01-09 20:43:48=
 UTC (rev 4701)
@@ -1017,9 +1017,13 @@
         //    $f_add_button2->set_attribute('jrn',$this->id);
         $f_add_button2->javascript=3D" this.jrn=3D\$('p_jrn').value;sele=
ct_card_type(this);";
=20
-        $str_add_button=3D$f_add_button->input();
-        $str_add_button2=3D$f_add_button2->input();
-
+		$str_add_button=3D"";
+		$str_add_button2=3D"";
+		if ($user->check_action(FICADD)=3D=3D1)
+		{
+			$str_add_button=3D$f_add_button->input();
+			$str_add_button2=3D$f_add_button2->input();
+		}
         // The first day of the periode
         $oPeriode=3Dnew Periode($this->db);
         list ($l_date_start,$l_date_end)=3D$oPeriode->get_date_limit($us=
er->get_periode());
@@ -1257,7 +1261,7 @@
             if ( $g_parameter->MY_UPDLAB =3D=3D 'Y')
             {
                 $Span=3Dnew IText("e_march".$i."_label");
-               =20
+
                 $Span->css_size=3D"100%";
             } else
             {

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	2012-01-09 15:54:32 UTC (rev =
4700)
+++ phpcompta/trunk/include/class_fiche.php	2012-01-09 20:43:48 UTC (rev =
4701)
@@ -581,7 +581,7 @@
 			}
 			if ($p_readonly =3D=3D false)
 			{
-                               =20
+
 				if ($r->ad_id =3D=3D ATTR_DEF_ACCOUNT)
 				{
 					$w =3D new IPoste("av_text" . $r->ad_id);
@@ -835,7 +835,7 @@
                 $value2=3Dsql_string($value);
=20
                 $sql=3Dsprintf("select attribut_insert(%d,%d,'%s')",
-                             $fiche_id,$id,trim($value2));
+                             $fiche_id,$id,  strip_tags(trim($value2)));
                 $this->cn->exec_sql($sql);
             }
         }
@@ -1004,7 +1004,7 @@
=20
                 // Normal traitement
                 $sql=3D"update fiche_detail set ad_value=3D$1 where jft_=
id=3D$2";
-		$this->cn->exec_sql($sql,array($value,$jft_id));
+				$this->cn->exec_sql($sql,array(strip_tags($value),$jft_id));
             }
         }
         catch (Exception $e )

Modified: phpcompta/trunk/include/detail_adm.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/detail_adm.inc.php	2012-01-09 15:54:32 UTC (r=
ev 4700)
+++ phpcompta/trunk/include/detail_adm.inc.php	2012-01-09 20:43:48 UTC (r=
ev 4701)
@@ -25,9 +25,9 @@
  * contact,operation,invoice and financial)
  * include from adm.inc.php and concerned only the customer card and
  * the customer category
- * parameter=20
+ * parameter
  *  - p_action =3D adm
- *  - sb =3D detail=20
+ *  - sb =3D detail
  *  - sc =3D dc
  */
 //----------------------------------------------------------------------=
------
@@ -44,18 +44,18 @@
=20
 }
=20
-echo '<div class=3D"u_content">';
+echo '<div class=3D"u_content" style=3D"width:50%">';
 $f_id=3D$_REQUEST['f_id'];
 echo '<div class=3D"content">';
 if ( isset($_POST['mod'])) echo hb('Information sauv=C3=A9e');
=20
 $adm=3Dnew Fiche($cn,$f_id);
-
-echo '<form method=3D"post">';
+$p_readonly=3D($g_user->check_action(FICADD)=3D=3D0)?true:false;
+if ( ! $p_readonly) echo '<form method=3D"post">';
 echo dossier::hidden();
 echo HtmlInput::hidden('sb','detail');
 echo HtmlInput::hidden('dc','cc');
-echo $adm->Display(false);
+echo $adm->Display($p_readonly);
 $w=3Dnew IHidden();
 $w->name=3D"p_action";
 $w->value=3D"adm";
@@ -63,11 +63,13 @@
 $w->name=3D"f_id";
 $w->value=3D$f_id;
 echo $w->input();
-
-echo HtmlInput::submit('mod',_('Sauver les modifications'));
-echo HtmlInput::reset(_("Annuler"));
-echo HtmlInput::submit('delete_card','Effacer cette fiche','onclick=3D"r=
eturn confirm(\'Confirmer effacement ?\');"');
-echo '</form>';
+if ( ! $p_readonly)
+{
+	echo HtmlInput::submit('mod',_('Sauver les modifications'));
+	echo HtmlInput::reset(_("Annuler"));
+	echo HtmlInput::submit('delete_card','Effacer cette fiche','onclick=3D"=
return confirm(\'Confirmer effacement ?\');"');
+	echo '</form>';
+}
 echo $return->input();
 echo '</div>';
=20

Modified: phpcompta/trunk/include/detail_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/detail_client.inc.php	2012-01-09 15:54:32 UTC=
 (rev 4700)
+++ phpcompta/trunk/include/detail_client.inc.php	2012-01-09 20:43:48 UTC=
 (rev 4701)
@@ -25,9 +25,9 @@
  * contact,operation,invoice and financial)
  * include from client.inc.php and concerned only the customer card and
  * the customer category
- * parameter=20
+ * parameter
  *  - p_action =3D client
- *  - sb =3D detail=20
+ *  - sb =3D detail
  *  - sc =3D dc
  */
 //----------------------------------------------------------------------=
------
@@ -46,16 +46,16 @@
=20
 echo '<div class=3D"u_content">';
 $f_id=3D$_REQUEST['f_id'];
-echo '<div class=3D"content">';
+echo '<div class=3D"content" style=3D"width:50%">';
 if ( isset($_POST['mod'])) echo hb(_('Information sauv=C3=A9e'));
=20
 $client=3Dnew Customer($cn,$f_id);
-
-echo '<form method=3D"post">';
+$p_readonly=3D($g_user->check_action(FICADD)=3D=3D0)?true:false;
+if ( ! $p_readonly) echo '<form method=3D"post">';
 echo dossier::hidden();
 echo HtmlInput::hidden('sb','detail');
 echo HtmlInput::hidden('dc','cc');
-echo $client->Display(false);
+echo $client->Display($p_readonly);
 $w=3Dnew IHidden();
 $w->name=3D"p_action";
 $w->value=3D"client";
@@ -63,11 +63,13 @@
 $w->name=3D"f_id";
 $w->value=3D$f_id;
 echo $w->input();
-
-echo HtmlInput::submit('mod',_('Sauver les modifications'));
-echo HtmlInput::reset(_("Annuler"));
-echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick=3D=
"return confirm(\'Confirmer effacement ?\');"');
-echo '</form>';
+if ( ! $p_readonly)
+{
+	echo HtmlInput::submit('mod',_('Sauver les modifications'));
+	echo HtmlInput::reset(_("Annuler"));
+	echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick=3D=
"return confirm(\'Confirmer effacement ?\');"');
+	echo '</form>';
+}
 echo $return;
 echo '</div>';
=20

Modified: phpcompta/trunk/include/detail_supplier.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/detail_supplier.inc.php	2012-01-09 15:54:32 U=
TC (rev 4700)
+++ phpcompta/trunk/include/detail_supplier.inc.php	2012-01-09 20:43:48 U=
TC (rev 4701)
@@ -25,9 +25,9 @@
  * contact,operation,invoice and financial)
  * include from supplier.inc.php and concerned only the customer card an=
d
  * the customer category
- * parameter=20
+ * parameter
  *  - p_action =3D supplier
- *  - sb =3D detail=20
+ *  - sb =3D detail
  *  - sc =3D dc
  */
 //----------------------------------------------------------------------=
------
@@ -46,16 +46,16 @@
=20
 echo '<div class=3D"u_content">';
 $f_id=3D$_REQUEST['f_id'];
-echo '<div class=3D"content">';
+echo '<div class=3D"content" style=3D"width:50%">';
 if ( isset($_POST['mod'])) echo hb(_('Information sauv=C3=A9e'));
=20
 $supplier=3Dnew Supplier($cn,$f_id);
-
-echo '<form method=3D"post">';
+$p_readonly=3D($g_user->check_action(FICADD)=3D=3D0)?true:false;
+if ( ! $p_readonly) echo '<form method=3D"post">';
 echo dossier::hidden();
 echo HtmlInput::hidden('sb','detail');
 echo HtmlInput::hidden('dc','cc');
-echo $supplier->Display(false);
+echo $supplier->Display($p_readonly);
 $w=3Dnew IHidden();
 $w->name=3D"p_action";
 $w->value=3D"supplier";
@@ -63,11 +63,13 @@
 $w->name=3D"f_id";
 $w->value=3D$f_id;
 echo $w->input();
-
-echo HtmlInput::submit('mod',_('Sauver les modifications'));
-echo HtmlInput::reset(_("Annuler"));
-echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick=3D=
"return confirm(\'Confirmer effacement ?\');"');
-echo '</form>';
+if ( ! $p_readonly)
+{
+	echo HtmlInput::submit('mod',_('Sauver les modifications'));
+	echo HtmlInput::reset(_("Annuler"));
+	echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick=3D=
"return confirm(\'Confirmer effacement ?\');"');
+	echo '</form>';
+}
 echo $return->input();
 echo '</div>';
=20

Modified: phpcompta/trunk/include/supplier.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/supplier.inc.php	2012-01-09 15:54:32 UTC (rev=
 4700)
+++ phpcompta/trunk/include/supplier.inc.php	2012-01-09 20:43:48 UTC (rev=
 4701)
@@ -110,22 +110,26 @@
     echo '<br>';
     echo '<br>';
     echo '<br>';
-    /* Add button */
-    $f_add_button=3Dnew 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');
+	if  ($g_user->check_action(FICADD)=3D=3D1)
+	{
+		/* Add button */
+		$f_add_button=3Dnew 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');
=20
-    $f_add_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR);
-    $f_add_button->javascript=3D" select_card_type(this);";
-    echo $f_add_button->input();
+		$f_add_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR);
+		$f_add_button->javascript=3D" select_card_type(this);";
+		echo $f_add_button->input();
=20
-    $f_cat_button=3Dnew IButton('add_cat');
-    $f_cat_button->set_attribute('ipopup','ipop_cat');
-    $f_cat_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR);
-    $f_cat_button->label=3D_('Ajout d\'une cat=C3=A9gorie');
-    $f_cat_button->javascript=3D'add_category(this)';
-    echo $f_cat_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_FOURNISSEUR);
+		$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>';
=20



From MAILER-DAEMON Mon Jan 09 15:46:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkM7J-00013U-F5
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 15:46:53 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 21:48:49 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.79196.1326142012.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4702 - in phpcompta/trunk: 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: Mon, 09 Jan 2012 20:46:51 -0000

Author: danydb
Date: 2012-01-09 21:48:49 +0100 (Mon, 09 Jan 2012)
New Revision: 4702

Added:
   phpcompta/trunk/html/admin/sql/patch/upgrade100.sql
Modified:
   phpcompta/trunk/include/constant.php
Log:
SQL patch add ad_extra


Added: phpcompta/trunk/html/admin/sql/patch/upgrade100.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/upgrade100.sql	                 =
       (rev 0)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade100.sql	2012-01-09 20:48:=
49 UTC (rev 4702)
@@ -0,0 +1,22 @@
+begin;
+alter table attr_def add ad_extra text ;
+
+insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fi=
n','date',8);
+
+ALTER TABLE fiche_detail DROP CONSTRAINT "$2";
+
+ALTER TABLE fiche_detail
+  ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id)
+      REFERENCES attr_def (ad_id) MATCH SIMPLE
+      ON UPDATE cascade ON DELETE cascade;
+
+ALTER TABLE jnt_fic_attr DROP CONSTRAINT "$2";
+
+ALTER TABLE jnt_fic_attr
+  ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id)
+      REFERENCES attr_def (ad_id) MATCH SIMPLE
+      ON UPDATE cascade ON DELETE cascade;
+
+update version set val=3D100;
+
+commit;
\ No newline at end of file

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	2012-01-09 20:43:48 UTC (rev 470=
1)
+++ phpcompta/trunk/include/constant.php	2012-01-09 20:48:49 UTC (rev 470=
2)
@@ -31,8 +31,8 @@
=20
 global $g_captcha,$g_failed,$g_succeed;
 $g_captcha=3Dfalse;
-$g_failed=3D"<span style=3D\"font-size:18px;color:red\">&#x2716;</span>"=
;                                                                        =
                                                                         =
                        =20
-$g_succeed=3D"<span style=3D\"font-size:18px;color:green\">&#x2713;</spa=
n>"; =20
+$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>";
 /*set to none for production */
 /* uncomment for production */
 // $version_phpcompta=3D4620;
@@ -42,9 +42,11 @@
 $version_phpcompta=3DSVNINFO;
 define ("DEBUG",false);
=20
+/* $version_phpcompta=3D4601;
+define ("DEBUG",true); */
=20
+define ("DBVERSION",101);
=20
-define ("DBVERSION",100);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');
=20



From MAILER-DAEMON Mon Jan 09 15:50:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkMAz-0001lw-Gh
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 15:50:41 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 21:52:35 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.79207.1326142239.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4703 - 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: Mon, 09 Jan 2012 20:50:39 -0000

Author: danydb
Date: 2012-01-09 21:52:35 +0100 (Mon, 09 Jan 2012)
New Revision: 4703

Modified:
   phpcompta/trunk/html/admin/sql/patch/upgrade100.sql
Log:
update version

Modified: phpcompta/trunk/html/admin/sql/patch/upgrade100.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/upgrade100.sql	2012-01-09 20:48:=
49 UTC (rev 4702)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade100.sql	2012-01-09 20:52:=
35 UTC (rev 4703)
@@ -17,6 +17,6 @@
       REFERENCES attr_def (ad_id) MATCH SIMPLE
       ON UPDATE cascade ON DELETE cascade;
=20
-update version set val=3D100;
+update version set val=3D101;
=20
 commit;
\ No newline at end of file



From MAILER-DAEMON Mon Jan 09 16:01:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkMLP-0003MA-08
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 16:01:27 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 22:03:24 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.79221.1326142886.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4704 - 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: Mon, 09 Jan 2012 21:01:26 -0000

Author: danydb
Date: 2012-01-09 22:03:24 +0100 (Mon, 09 Jan 2012)
New Revision: 4704

Modified:
   phpcompta/trunk/include/class_fiche_attr.php
Log:
remove debug info

Modified: phpcompta/trunk/include/class_fiche_attr.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_attr.php	2012-01-09 20:52:35 UTC =
(rev 4703)
+++ phpcompta/trunk/include/class_fiche_attr.php	2012-01-09 21:03:24 UTC =
(rev 4704)
@@ -5,7 +5,7 @@
  *
 Example
 @code
-=20
+
 @endcode
  */
 require_once('class_database.php');
@@ -82,18 +82,18 @@
             case 'zone':
                 $this->ad_size=3D22;
                 break;
-           =20
+
             default:
                 $this->ad_size=3D22;
             }
         }
-	echo $this->ad_type;
-        if ( $this->ad_type =3D=3D 'select')
+
+		if ( $this->ad_type =3D=3D 'select')
         {
                 if (trim($this->ad_extra)=3D=3D"") throw new Exception (=
"La requ=C3=AAte SQL est vide ");
 		if ( preg_match('/^\h*select/i',$this->ad_extra)  =3D=3D 0) throw new =
Exception ("La requ=C3=AAte SQL doit commencer par SELECT ");
                 try{
-                   =20
+
                         $this->cn->exec_sql($this->ad_extra);
                 }catch (Exception $e)
                 {
@@ -103,7 +103,7 @@
     }
     public function save()
     {
-      =20
+
         /* please adapt */
         if (  $this->ad_id =3D=3D 0 )
             $this->insert();
@@ -165,7 +165,7 @@
=20
     public function update()
     {
-        try=20
+        try
         {
          $this->verify();
         if ( $this->ad_id < 9000) return;
@@ -183,8 +183,8 @@
         {
             throw $e;
         }
-       =20
=20
+
     }
     /**
      *@brief load a object
@@ -224,7 +224,7 @@
=20
 	$sql=3D"delete from jnt_fic_attr where ad_id=3D$1";
         $res=3D$this->cn->exec_sql($sql,array($this->ad_id));
-=09
+
         $sql=3D"delete from attr_def where ad_id=3D$1";
         $res=3D$this->cn->exec_sql($sql,array($this->ad_id));
=20



From MAILER-DAEMON Mon Jan 09 16:54:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkNAI-00045T-HV
	for mharc-phpcompta-dev@gnu.org; Mon, 09 Jan 2012 16:54:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon,  9 Jan 2012 22:55:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.79313.1326146041.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4705 - 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: Mon, 09 Jan 2012 21:54:00 -0000

Author: danydb
Date: 2012-01-09 22:55:55 +0100 (Mon, 09 Jan 2012)
New Revision: 4705

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


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)



From MAILER-DAEMON Tue Jan 10 04:11:55 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkXkJ-0005Oi-Qn
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 04:11:55 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 10:13:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.81091.1326186715.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4706 - 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, 10 Jan 2012 09:11:54 -0000

Author: danydb
Date: 2012-01-10 10:13:44 +0100 (Tue, 10 Jan 2012)
New Revision: 4706

Modified:
   phpcompta/trunk/html/ajax_history.php
   phpcompta/trunk/include/balance_card.inc.php
Log:
Typo Aucun_e_ Op?\195?\169ration

Modified: phpcompta/trunk/html/ajax_history.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_history.php	2012-01-09 21:55:55 UTC (rev 47=
05)
+++ phpcompta/trunk/html/ajax_history.php	2012-01-10 09:13:44 UTC (rev 47=
06)
@@ -109,7 +109,7 @@
 	echo '<p style=3D"text-align:center;font-size:125%">'.$detail_card.'</p=
>';
=20
 	if (   $fiche->HtmlTable($array,0,0)=3D=3D-1){
-	  echo h2("Aucun op=C3=A9ration pour l'exercice courant",'class=3D"erro=
r"');
+	  echo h2("Aucune op=C3=A9ration pour l'exercice courant",'class=3D"err=
or"');
 	}
=20
 	echo $old;
@@ -180,7 +180,7 @@
         if ( $poste->HtmlTable($array) =3D=3D -1)
 	  {
 	    echo h2info($poste->id." ".$poste->name);
-	    echo h2("Aucun op=C3=A9ration pour l'exercice courant",'class=3D"er=
ror"');
+	    echo h2("Aucune op=C3=A9ration pour l'exercice courant",'class=3D"e=
rror"');
 	  }
 	echo $old;
=20

Modified: phpcompta/trunk/include/balance_card.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_card.inc.php	2012-01-09 21:55:55 UTC =
(rev 4705)
+++ phpcompta/trunk/include/balance_card.inc.php	2012-01-10 09:13:44 UTC =
(rev 4706)
@@ -66,7 +66,7 @@
       }
=20
     if (   $fiche->HtmlTable($array,0,0)=3D=3D-1){
-      echo h2("Aucun op=C3=A9ration pour l'exercice courant",'class=3D"e=
rror"');
+      echo h2("Aucune op=C3=A9ration pour l'exercice courant",'class=3D"=
error"');
     }
     echo $old;
=20



From MAILER-DAEMON Tue Jan 10 05:27:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkYvh-0003Tn-1K
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 05:27:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 11:29:27 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.81214.1326191263.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4707 - 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, 10 Jan 2012 10:27:43 -0000

Author: danydb
Date: 2012-01-10 11:29:27 +0100 (Tue, 10 Jan 2012)
New Revision: 4707

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
Log:
montre le journal dans recherche


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	2012-01-10 09:13:44 UTC =
(rev 4706)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-10 10:29:27 UTC =
(rev 4707)
@@ -624,12 +624,14 @@
=20
=20
         $r.=3D"<tr >";
+	$r.=3D"<th>Selection</th>";
         $r.=3D"<th>Internal</th>";
-        if ( $this->type=3D=3D'')
+
+        if ( $this->type=3D=3D'ALL')
         {
             $r.=3Dth('Journal');
         }
-		$r.=3D"<th>Selection</th>";
+
         $r.=3D'<th>Date</th>';
         $r.=3D'<th>Pi=C3=A8ce</td>';
 		$r.=3Dth('tiers');
@@ -667,7 +669,7 @@
             $r.=3Dsprintf('<A class=3D"detail" style=3D"text-decoration:=
underline" HREF=3D"javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
                         $row['jr_id'], $gDossier, $row['jr_internal']);
             $r.=3D"</TD>";
-            if ( $this->type=3D=3D'') $r.=3Dtd($row['jrn_def_name']);
+            if ( $this->type=3D=3D'ALL') $r.=3Dtd($row['jrn_def_name']);
             // date
             $r.=3D"<TD>";
             $r.=3D$row['str_jr_date'];
@@ -817,7 +819,7 @@
=20
         $r.=3D"<tr >";
         $r.=3D"<th>Internal</th>";
-        if ( $this->type=3D=3D'')
+        if ( $this->type=3D=3D'ALL')
         {
             $r.=3Dth('Journal');
         }
@@ -860,7 +862,7 @@
             $r.=3Dsprintf('<A class=3D"detail" style=3D"text-decoration:=
underline" HREF=3D"javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
                         $row['jr_id'], $gDossier, $row['jr_internal']);
             $r.=3D"</TD>";
-            if ( $this->type=3D=3D'') $r.=3Dtd($row['jrn_def_name']);
+            if ( $this->type=3D=3D'ALL') $r.=3Dtd($row['jrn_def_name']);
             // date
             $r.=3D"<TD>";
             $r.=3Dsmaller_date($row['str_jr_date']);



From MAILER-DAEMON Tue Jan 10 09:00:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkcFu-0006l6-59
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 09:00:50 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 15:02:29 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.81659.1326204049.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4708 - 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, 10 Jan 2012 14:00:48 -0000

Author: danydb
Date: 2012-01-10 15:02:28 +0100 (Tue, 10 Jan 2012)
New Revision: 4708

Modified:
   phpcompta/trunk/include/class_fiche_def.php
Log:
cosmetic : ajout ordre dans cat. fiche


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	2012-01-10 10:29:27 UTC (=
rev 4707)
+++ phpcompta/trunk/include/class_fiche_def.php	2012-01-10 14:02:28 UTC (=
rev 4708)
@@ -457,6 +457,7 @@
         */
         $MaxLine=3Dsizeof($this->attribut);
         $r=3D"<TABLE>";
+	$r.=3D"<tr>".th('Nom attribut').th('').th('Ordre','style=3D"text-align:=
right"').'</tr>';
         // Display each attribute
         $add_action=3D"";
         for ($i=3D0;$i<$MaxLine;$i++)



From MAILER-DAEMON Tue Jan 10 13:00:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rkfzt-00018b-Ao
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 13:00:33 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 19:02:04 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.82493.1326218432.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4709 - in phpcompta/trunk: 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: Tue, 10 Jan 2012 18:00:32 -0000

Author: danydb
Date: 2012-01-10 19:02:03 +0100 (Tue, 10 Jan 2012)
New Revision: 4709

Removed:
   phpcompta/trunk/html/ajax_report.php
   phpcompta/trunk/html/js/acc_report.js
Modified:
   phpcompta/trunk/html/export.php
   phpcompta/trunk/html/js/scripts.js
   phpcompta/trunk/include/class_acc_report.php
   phpcompta/trunk/include/function_javascript.php
   phpcompta/trunk/include/report.inc.php
Log:




Deleted: phpcompta/trunk/html/ajax_report.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_report.php	2012-01-10 14:02:28 UTC (rev 470=
8)
+++ phpcompta/trunk/html/ajax_report.php	2012-01-10 18:02:03 UTC (rev 470=
9)
@@ -1,76 +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
-
-/*!\file
- * \brief export definition of a report
- */
-
-
-require_once  ("constant.php");
-require_once('class_database.php');
-require_once ("user_common.php");
-require_once('class_dossier.php');
-require_once('class_acc_report.php');
-require_once('class_user.php');
-if ( ! isset($_GET['gDossier']) ||
-        ! isset($_GET['f']) )
-{
-    $a=3D'{"answer":"nok"}';
-    header("Content-type: text/html; charset: utf8",true);
-    print $a;
-    exit();
-}
-$cn=3Dnew Database(dossier::id());
-
-$User=3Dnew User($cn);
-$User->Check();
-$User->check_dossier(dossier::id());
-
-
-
-$gDossier=3Ddossier::id();
-if ( ! is_dir('tmp') )
-{
-    mkdir ('tmp');
-}
-
-$cn=3Dnew Database($gDossier);
-if ( isset($_SESSION['isValid']) && $_SESSION['isValid'] =3D=3D 1)
-{
-    $rap=3Dnew Acc_Report($cn,$_GET['f']);
-
-    $name=3Dtempnam('tmp','report_').'.bin';
-
-    $file=3D fopen($name,"a+");
-    $rap->export($file);
-    fclose ($file);
-    $name=3D'tmp'.DIRECTORY_SEPARATOR.basename($name);
-    $name=3Ddirname($_SERVER['REQUEST_URI']).DIRECTORY_SEPARATOR.$name;
-
-    $a=3D'{"answer":"ok","link":"'.$name.'"}';
-
-}
-else
-    $a=3D'{"answer":"nok"}';
-header("Content-type: text/html; charset: utf8",true);
-print $a;
-?>

Modified: phpcompta/trunk/html/export.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/export.php	2012-01-10 14:02:28 UTC (rev 4708)
+++ phpcompta/trunk/html/export.php	2012-01-10 18:02:03 UTC (rev 4709)
@@ -158,6 +158,9 @@
   case 'CSV:AncGrandLivre':
       require_once 'export_anc_grandlivre_csv.php';
       break;
+  case 'CSV:reportinit':
+	  require_once('export_reportinit_csv.php');
+	  break;
    default:
     alert('Action inconnue '.$_GET['act']);
     exit();

Deleted: phpcompta/trunk/html/js/acc_report.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_report.js	2012-01-10 14:02:28 UTC (rev 47=
08)
+++ phpcompta/trunk/html/js/acc_report.js	2012-01-10 18:02:03 UTC (rev 47=
09)
@@ -1,84 +0,0 @@
-/*
- *   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
-
-/*!\file
- * \brief javascript script for the report (in accountancy)
- *
- */
-/**
- * @brief add a line in the form for the report=20
- * @param p_dossier dossier id to connect
- */
-function rapport_add_row(p_dossier)
-{
-    style=3D'style=3D"border: 1px solid blue;"';
-    var table=3D$("rap1");
-    var line=3Dtable.rows.length;
-
-    var row=3Dtable.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+'">';
-
-    // 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+'">';
-
-    // 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;
-    but_html.evalScripts();
-
-    g('form'+line).value=3D'';
-}
-
-/**
- * @brief create a file to export a report
- * @param p_dossier the dossier id
- */
-function report_export(p_dossier,p_fr_id)
-{
-    var queryString=3D"?&gDossier=3D"+p_dossier+"&f=3D"+p_fr_id;
-    var action=3Dnew Ajax.Request(
-                   "ajax_report.php",
-                   {
-                   method:'get',
-                   parameters:queryString,
-                   onSuccess:report_export_success
-                   }
-               );
-
-}
-/**
- * @brief callback function for exporting a report
- * @param request object request
- * @param json json answer
- */
-function report_export_success(request,json)
-{
-    var answer =3D request.responseText.evalJSON(true);
-    var ok=3Danswer.answer;
-    var link=3Danswer.link;
-    $('export').hide();
-    $('export_link').innerHTML=3D'<a class=3D"mtitle" href=3D"'+link+'">=
 Cliquez ici pour t=C3=A9l=C3=A9charger le rapport</a>';
-}
\ No newline at end of file

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	2012-01-10 14:02:28 UTC (rev 4708)
+++ phpcompta/trunk/html/js/scripts.js	2012-01-10 18:02:03 UTC (rev 4709)
@@ -1351,3 +1351,31 @@
     }
     alert(s_type+a_array.join(","));
 }
+/**
+ * @brief add a line in the form for the report
+ * @param p_dossier dossier id to connect
+ */
+function rapport_add_row(p_dossier)
+{
+    style=3D'style=3D"border: 1px solid blue;"';
+    var table=3D$("rap1");
+    var line=3Dtable.rows.length;
+
+    var row=3Dtable.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+'">';
+
+    // 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+'">';
+
+    // 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;
+    but_html.evalScripts();
+
+    g('form'+line).value=3D'';
+}

Modified: phpcompta/trunk/include/class_acc_report.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_report.php	2012-01-10 14:02:28 UTC =
(rev 4708)
+++ phpcompta/trunk/include/class_acc_report.php	2012-01-10 18:02:03 UTC =
(rev 4709)
@@ -100,7 +100,7 @@
     }
     /*!
      * \brief  Display a form for encoding a new report or update one
-     *=20
+     *
      * \param $p_line number of line
      *
      */
@@ -346,7 +346,7 @@
     }
     /*!\brief To make a SELECT button with the needed value, it is used
      *by the SELECT widget
-     *\return string with html code=20
+     *\return string with html code
      */
     function make_array()
     {
@@ -356,9 +356,9 @@
=20
=20
     /*!\brief write to a file the definition of a report
-     * \param p_file is the file name
+     * \param p_file is the file name (default php://output)
      */
-    function export($p_file)
+    function export_csv($p_file)
     {
         $this->load();
=20

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	2012-01-10 14:02:28 U=
TC (rev 4708)
+++ phpcompta/trunk/include/function_javascript.php	2012-01-10 18:02:03 U=
TC (rev 4709)
@@ -2743,7 +2743,6 @@
     echo js_include('slider.js');
     echo js_include('acc_ledger.js');
     echo js_include('accounting_item.js');
-    echo js_include('acc_report.js');
     echo js_include('ajax_fiche.js');
     echo js_include('anc_script.js');
     echo js_include('builder.js');

Modified: phpcompta/trunk/include/report.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/report.inc.php	2012-01-10 14:02:28 UTC (rev 4=
708)
+++ phpcompta/trunk/include/report.inc.php	2012-01-10 18:02:03 UTC (rev 4=
709)
@@ -128,20 +128,22 @@
     {
         echo '<DIV class=3D"redcontent">';
         $rap->id=3D$_REQUEST ['fr_id'];
-        echo '<form method=3D"post">';
+        echo '<form method=3D"post" style=3D"display:inline">';
         $rap->load();
         echo $rap->form();
         echo HtmlInput::hidden("fr_id",$rap->id);
         echo HtmlInput::hidden("action","record");
         echo HtmlInput::submit("update",_("Mise a jour"));
         echo HtmlInput::submit("del_form",_("Effacement"));
-        $w=3Dnew IButton();
-        $w->name=3D"export";
-        $w->javascript=3D"report_export('".$gDossier."','".$rap->id."')"=
;
-        $w->label=3D'Export';
-        echo $w->input();
-        echo '<span id=3D"export_link"></span>';
+
         echo '</form>';
+		echo '<form method=3D"get" action=3D"export.php" style=3D"display:inli=
ne">';
+		echo dossier::hidden();
+		echo HtmlInput::hidden("act","CSV:reportinit");
+		echo HtmlInput::hidden('f',$rap->id);
+		echo HtmlInput::submit('bt_csv',"Export CSV");
+		echo HtmlInput::request_to_hidden(array('ac','action','p_action','fr_i=
d'));
+		echo '</form>';
         echo '<span class=3D"notice">'._("Les lignes vides seront effac=C3=
=A9es").'</span>';
         echo "</DIV>";
     }



From MAILER-DAEMON Tue Jan 10 13:04:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rkg3a-0002jn-6T
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 13:04:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 19:06:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.82558.1326218661.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4710 - 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: Tue, 10 Jan 2012 18:04:21 -0000

Author: danydb
Date: 2012-01-10 19:06:06 +0100 (Tue, 10 Jan 2012)
New Revision: 4710

Modified:
   phpcompta/trunk/html/admin/sql/patch/upgrade100.sql
Log:

update script for report definition CSV:reportinit


Modified: phpcompta/trunk/html/admin/sql/patch/upgrade100.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/upgrade100.sql	2012-01-10 18:02:=
03 UTC (rev 4709)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade100.sql	2012-01-10 18:06:=
06 UTC (rev 4710)
@@ -17,6 +17,11 @@
       REFERENCES attr_def (ad_id) MATCH SIMPLE
       ON UPDATE cascade ON DELETE cascade;
=20
+insert into menu_ref(me_code,me_menu,me_type) values ('CVS:reportinit','=
Export d=C3=A9finition d''un raport','PR');
+
+insert  into profile_menu (me_code,p_id,p_type_display) values ('CVS:rep=
ortinit',1,'P');
+insert  into profile_menu (me_code,p_id,p_type_display) values ('CVS:rep=
ortinit',2,'P');
+
 update version set val=3D101;
=20
 commit;
\ No newline at end of file



From MAILER-DAEMON Tue Jan 10 13:18:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkgH5-00073R-84
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 13:18:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 19:20:02 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.82774.1326219498.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4711 - 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, 10 Jan 2012 18:18:17 -0000

Author: danydb
Date: 2012-01-10 19:20:01 +0100 (Tue, 10 Jan 2012)
New Revision: 4711

Added:
   phpcompta/trunk/include/export_reportinit_csv.php
Log:
add missing

Copied: phpcompta/trunk/include/export_reportinit_csv.php (from rev 4708,=
 phpcompta/trunk/html/ajax_report.php)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_reportinit_csv.php	                   =
     (rev 0)
+++ phpcompta/trunk/include/export_reportinit_csv.php	2012-01-10 18:20:01=
 UTC (rev 4711)
@@ -0,0 +1,57 @@
+<?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
+
+/*!\file
+ * \brief export definition of a report
+ */
+
+
+require_once  ("constant.php");
+require_once('class_database.php');
+require_once ("user_common.php");
+require_once('class_dossier.php');
+require_once('class_acc_report.php');
+require_once('class_user.php');
+if ( ! isset($_GET['gDossier']) ||
+        ! isset($_GET['f']) )
+{
+    $a=3D'Param=C3=A8tre manquant';
+    header("Content-type: text/html; charset: utf8",true);
+    print $a;
+    exit();
+}
+
+$gDossier=3Ddossier::id();
+if ( ! is_dir('tmp') )
+{
+    mkdir ('tmp');
+}
+
+$cn=3Dnew Database($gDossier);
+$rap=3Dnew Acc_Report($cn,$_GET['f']);
+
+$file=3D fopen('php://output',"a+");
+header('Pragma: public');
+header('Content-type: application/bin');
+header('Content-Disposition: attachment;filename=3D"export.bin"',FALSE);
+$rap->export_csv($file);
+?>



From MAILER-DAEMON Tue Jan 10 15:01:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rkht0-0004rs-Ig
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 15:01:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 21:03:17 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.83026.1326225693.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r272 - trunk/coprop/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 Jan 2012 20:01:32 -0000

Author: danydb
Date: 2012-01-10 21:03:16 +0100 (Tue, 10 Jan 2012)
New Revision: 272

Modified:
   trunk/coprop/include/class_install_plugin.php
Log:
installation

Modified: trunk/coprop/include/class_install_plugin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_install_plugin.php	2012-01-08 16:37:03 UTC=
 (rev 271)
+++ trunk/coprop/include/class_install_plugin.php	2012-01-10 20:03:16 UTC=
 (rev 272)
@@ -44,7 +44,10 @@
 		// create the schema
 		$this->create_schema();
 		// create table + put default values
+		$this->create_card();
+
 		$this->create_table_parameter();
+
 		$this->cn->commit();
 	}
=20
@@ -52,7 +55,16 @@
 	{
 		$this->cn->exec_sql('create schema coprop');
 	}
+	function create_card()
+	{
+	$sql=3D"		insert into attr_def (ad_id,ad_text,ad_type,ad_size,ad_extra)
+		values  ('71','Copropri=C3=A9taire','select','22','select f_id,vw_name=
 from vw_fiche_attr where fd_id =3D 7 '),
+		('70','Immeuble','select','22','select f_id,vw_name from vw_fiche_attr=
 where fd_id =3D 21');";
+	// Create categorie pour lot immeuble et coprop
=20
+	// creation vue (create_view_summary)
+
+	}
 	function create_table_parameter()
 	{
 		$sql =3D <<<EOF
@@ -71,9 +83,7 @@
 			'categorie_immeuble' =3D> 0,
 			'categorie_appel' =3D> 0,
 			'poste_appel' =3D> 0,
-			'journal_appel' =3D> 0,
-			'id_immeuble'=3D>9002,
-			'id_coprop'=3D>9003
+			'journal_appel' =3D> 0
 		);
=20
 		foreach ($array as $code =3D> $value)



From MAILER-DAEMON Tue Jan 10 15:43:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkiXh-0002fb-55
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 15:43:37 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 21:45:28 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.83115.1326228216.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4712 - 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, 10 Jan 2012 20:43:35 -0000

Author: danydb
Date: 2012-01-10 21:45:28 +0100 (Tue, 10 Jan 2012)
New Revision: 4712

Modified:
   phpcompta/trunk/include/class_fiche_def.php
Log:
fix order

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	2012-01-10 18:20:01 UTC (=
rev 4711)
+++ phpcompta/trunk/include/class_fiche_def.php	2012-01-10 20:45:28 UTC (=
rev 4712)
@@ -585,7 +585,7 @@
         if ( $this->id =3D=3D 0 ) return;
         /* ORDER */
         $this->GetAttribut();
-        $max=3Dsizeof($this->attribut);
+        $max=3Dsizeof($this->attribut)*15;
         // Insert a new attribute for the model
         // it means insert a row in jnt_fic_attr
         $sql=3Dsprintf("insert into jnt_fic_attr (fd_id,ad_id,jnt_order)=
 values (%d,%d,%d)",



From MAILER-DAEMON Tue Jan 10 15:52:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rkig2-0004c7-5Y
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 15:52:14 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 21:54:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.83122.1326228733.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r273 - trunk/coprop/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 Jan 2012 20:52:13 -0000

Author: danydb
Date: 2012-01-10 21:54:05 +0100 (Tue, 10 Jan 2012)
New Revision: 273

Modified:
   trunk/coprop/include/class_install_plugin.php
Log:
Installation plugin

Modified: trunk/coprop/include/class_install_plugin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_install_plugin.php	2012-01-10 20:03:16 UTC=
 (rev 272)
+++ trunk/coprop/include/class_install_plugin.php	2012-01-10 20:54:05 UTC=
 (rev 273)
@@ -55,16 +55,72 @@
 	{
 		$this->cn->exec_sql('create schema coprop');
 	}
+
 	function create_card()
 	{
-	$sql=3D"		insert into attr_def (ad_id,ad_text,ad_type,ad_size,ad_extra)
-		values  ('71','Copropri=C3=A9taire','select','22','select f_id,vw_name=
 from vw_fiche_attr where fd_id =3D 7 '),
-		('70','Immeuble','select','22','select f_id,vw_name from vw_fiche_attr=
 where fd_id =3D 21');";
-	// Create categorie pour lot immeuble et coprop
+		// create categorie immeuble, lot et coprop.
+		$fiche_def =3D new Fiche_Def($this->cn);
=20
-	// creation vue (create_view_summary)
+		// Create categorie pour lot immeuble et coprop + attribut
+		$fiche_def->add(array(
+			'FICHE_REF' =3D> 9,
+			'nom_mod' =3D> 'Copropri=C3=A9taires - plugin',
+			'class_base' =3D> null)
+		);
+		$copro =3D $fiche_def->id;
+		$lot_def =3D new Fiche_Def($this->cn);
=20
+		$lot_def->add(array(
+			'FICHE_REF' =3D> 15,
+			'nom_mod' =3D> 'Lots - plugin',
+			'class_base' =3D> '')
+		);
+		$lot =3D $lot_def->id;
+
+		$imm_def =3D new Fiche_Def($this->cn);
+		$fiche_def->add(array(
+			'FICHE_REF' =3D> 15,
+			'nom_mod' =3D> 'immeuble - plugin',
+			'class_base' =3D> '')
+		);
+		$immeuble =3D $imm_def->id;
+
+		// creation attribut
+		$this->cn->exec_sql("		insert into attr_def (ad_id,ad_text,ad_type,ad_=
size,ad_extra)
+		values  ('71','Copropri=C3=A9taire','select','22','select f_id,vw_name=
 from vw_fiche_attr where fd_id =3D $1 '),
+		('70','Immeuble','select','22','select f_id,vw_name from vw_fiche_attr=
 where fd_id =3D $2');", array($copro, $immeuble));
+
+		$lot_def->InsertAttribut(71); // lien vers coprop
+		$lot_def->InsertAttribut(72);// lien vers immeuble
+
+		$imm_def->InsertAttribut(14); // adresse
+		$imm_def->InsertAttribut(15); // code postale
+		$imm_def->InsertAttribut(24); //ville
+		$imm_def->InsertAttribut(16); // pays
+
+		$fiche_def->InsertAttribut(27); // gsm
+		$fiche_def->InsertAttribut(32); // pr=C3=A9nom
+		$fiche_def->InsertAttribut(10); // date d=C3=A9but
+		$fiche_def->InsertAttribut(33); // date fin
+		//
+		// creation vue (create_view_summary)
+		$this->cn->exec_sql("CREATE OR REPLACE VIEW coprop.summary AS
+				SELECT a.f_id AS lot_id, m.ad_value AS building_id, c.ad_value AS co=
prop_id
+				FROM fiche_detail a
+				JOIN fiche f1 ON f1.f_id =3D a.f_id
+				JOIN ( SELECT fd1.f_id, fd1.ad_value
+					FROM fiche_detail fd1
+					WHERE fd1.ad_id =3D 70) m ON m.f_id =3D a.f_id
+				JOIN ( SELECT fd1.f_id, fd1.ad_value
+				FROM fiche_detail fd1
+				WHERE fd1.ad_id =3D 71) c ON c.f_id =3D a.f_id
+				WHERE f1.fd_id =3D $1 AND a.ad_id =3D 1", array($lot));
+		$this->lot_id=3D$lot;
+		$this->immeuble_id=3D$immeuble;
+		$this->coprop_id=3D$coprop;
+
 	}
+
 	function create_table_parameter()
 	{
 		$sql =3D <<<EOF
@@ -78,9 +134,9 @@
 		$this->cn->exec_sql($sql);
 // load default value
 		$array =3D array(
-			'categorie_lot' =3D> 0,
-			'categorie_coprop' =3D> 0,
-			'categorie_immeuble' =3D> 0,
+			'categorie_lot' =3D> $this->lot_id,
+			'categorie_coprop' =3D> $this->coprop_id,
+			'categorie_immeuble' =3D> $this->immeuble_id,
 			'categorie_appel' =3D> 0,
 			'poste_appel' =3D> 0,
 			'journal_appel' =3D> 0



From MAILER-DAEMON Tue Jan 10 15:54:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rkii8-0004pm-Eh
	for mharc-phpcompta-dev@gnu.org; Tue, 10 Jan 2012 15:54:24 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 10 Jan 2012 21:56:17 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.83131.1326228863.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r274 - trunk/coprop/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 Jan 2012 20:54:23 -0000

Author: danydb
Date: 2012-01-10 21:56:16 +0100 (Tue, 10 Jan 2012)
New Revision: 274

Modified:
   trunk/coprop/include/copro-parameter.inc.php
Log:
Installation plugin : utilise les valeurs par d?\195?\169faut

Modified: trunk/coprop/include/copro-parameter.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/coprop/include/copro-parameter.inc.php	2012-01-10 20:54:05 UTC =
(rev 273)
+++ trunk/coprop/include/copro-parameter.inc.php	2012-01-10 20:56:16 UTC =
(rev 274)
@@ -33,11 +33,11 @@
 {
 	$cn->start();
 	try {
-		$g_copro_parameter->save('categorie_lot',$_POST['categorie_lot']);
-		$g_copro_parameter->save('categorie_coprop',$_POST['categorie_coprop']=
);
+		/*$g_copro_parameter->save('categorie_lot',$_POST['categorie_lot']);
+		$g_copro_parameter->save('categorie_coprop',$_POST['categorie_coprop']=
);*/
 		$g_copro_parameter->save('journal_appel',$_POST['journal_appel']);
 		$g_copro_parameter->save('categorie_appel',$_POST['categorie_appel']);
-		$g_copro_parameter->save('categorie_immeuble',$_POST['categorie_immeub=
le']);
+		//$g_copro_parameter->save('categorie_immeuble',$_POST['categorie_imme=
uble']);
 	}
 	catch(Exception $e)
 	{
@@ -53,10 +53,12 @@
 $cat_lot=3Dnew ISelect('categorie_lot');
 $cat_lot->value=3D$cn->make_array("select fd_id,fd_label from fiche_def =
order by fd_label");
 $cat_lot->selected=3D$g_copro_parameter->categorie_lot;
+$cat_lot->readOnly=3Dtrue;
=20
 $cat_coprop=3Dnew ISelect('categorie_coprop');
 $cat_coprop->value=3D$cn->make_array("select fd_id,fd_label from fiche_d=
ef order by fd_label ");
 $cat_coprop->selected=3D$g_copro_parameter->categorie_coprop;
+$cat_coprop->readOnly=3Dtrue;
=20
 $journal_appel=3Dnew ISelect('journal_appel');
 $journal_appel->value=3D$cn->make_array("select jrn_def_id,jrn_def_name =
from jrn_def where jrn_def_type=3D'ODS' order by 2");
@@ -69,6 +71,7 @@
 $categorie_immeuble=3Dnew ISelect('categorie_immeuble');
 $categorie_immeuble->value=3D$cn->make_array("select  fd_id,fd_label fro=
m fiche_def order by fd_label ");
 $categorie_immeuble->selected=3D$g_copro_parameter->categorie_immeuble;
+$categorie_immeuble->readOnly=3Dtrue;
 ?>
 <form method=3D"POST">
 <table>



From MAILER-DAEMON Wed Jan 11 06:18:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RkwCa-0001V0-3S
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Jan 2012 06:18:44 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Jan 2012 12:20:27 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.86164.1326280722.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r275 - in trunk/coprop/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 Jan 2012 11:18:42 -0000

Author: danydb
Date: 2012-01-11 12:20:26 +0100 (Wed, 11 Jan 2012)
New Revision: 275

Modified:
   trunk/coprop/include/class_copro_lot.php
   trunk/coprop/include/lot.inc.php
   trunk/coprop/include/template/coprop_lot_list.php
Log:
Ajout vue immeuble, lot, coprop

Modified: trunk/coprop/include/class_copro_lot.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_lot.php	2012-01-10 20:56:16 UTC (rev=
 274)
+++ trunk/coprop/include/class_copro_lot.php	2012-01-11 11:20:26 UTC (rev=
 275)
@@ -29,86 +29,7 @@
  */
 class Copro_Lot
 {
-	function insert($p_array)
-	{
-		global $cn;
-		extract($p_array);
-		try
-		{
-			// find the coprop
-			$coprop=3Dnew Fiche($cn);
-			$coprop->get_by_qcode($w_copro);
-			if ($coprop->id =3D=3D 0) throw new Exception("Ce copropri=C3=A9taire=
 $w_copro n'existe pas",1);
-			$count=3D$cn->get_value("select count(*) from coprop.coproprietaire w=
here c_fiche_id=3D$1",
-					array($coprop->id));
-			if ( $count > 0 )				throw new Exception ("Copropri=C3=A9taire d=C3=A9=
j=C3=A0 encod=C3=A9",2);
-			$cn->exec_sql("insert into coprop.coproprietaire(c_fiche_id)values($1=
)",
-					array($coprop->id));
-			// Find the lot.
-			$str_warning=3D"";$n_warning=3D0;
-			for ($i=3D0;$i<count($lot);$i++)
-			{
-				$flot=3Dnew Fiche($cn);
-				$flot->id=3D$lot[$i];
=20
-				// si w_lot pas inser=C3=A9 alors inserer
-				$cn->exec_sql("insert into coprop.lot(l_fiche_id,coprop_fk)".
-						" values ($1,$2)",
-						array($flot->id,$coprop->id));
=20
-			}
-		}
-		catch (Exception $e)
-		{
-			echo $e->getMessage();
-			echo $e->getTraceAsString();
-
-		}
-
-
-	}
-	function add_lot($p_array)
-	{
-		global $cn;
-		extract($p_array);
-		try
-		{
-			// find the coprop
-			$coprop=3Dnew Fiche($cn);
-			$coprop->id=3D$copro_id;
-			if ($coprop->id =3D=3D 0) throw new Exception("Ce copropri=C3=A9taire=
 $w_copro n'existe pas",1);
-			$count=3D$cn->get_value("select count(*) from coprop.coproprietaire w=
here c_fiche_id=3D$1",
-					array($coprop->id));
-			// Find the lot.
-			$str_warning=3D"";$n_warning=3D0;
-			for ($i=3D0;$i<count($lot);$i++)
-			{
-				$flot=3Dnew Fiche($cn);
-				$flot->id=3D$lot[$i];
-
-				// si w_lot pas inser=C3=A9 alors inserer
-				$cn->exec_sql("insert into coprop.lot(l_fiche_id,coprop_fk)".
-						" values ($1,$2)",
-						array($flot->id,$coprop->id));
-
-			}
-		}
-		catch (Exception $e)
-		{
-			echo $e->getMessage();
-			echo $e->getTraceAsString();
-
-		}
-
-
-	}
-	function update_lot($p_array)
-	{
-	=09
-            return;
-
-	}
-
-
 }
 ?>

Modified: trunk/coprop/include/lot.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/coprop/include/lot.inc.php	2012-01-10 20:56:16 UTC (rev 274)
+++ trunk/coprop/include/lot.inc.php	2012-01-11 11:20:26 UTC (rev 275)
@@ -26,49 +26,8 @@
  * @brief liaison entre lot et copropri=C3=A9taires
  *
  */
-require_once 'class_copro_lot.php';
 global $cn,$g_copro_parameter;
-if ( isset($_POST['copro_new']))
-{
-	var_dump($_POST);
-	$cp=3Dnew Copro_Lot();
-	try
-	{
-		$cp->insert($_POST);
-	}
-	catch(Exception $e)
-	{
-		echo $e->getTraceAsString();
-	}
 }
-// Ajout de lots
-if (isset($_POST['addlot']))
-{
-	var_dump($_POST);
-	$cp=3Dnew Copro_Lot();
-	try
-	{
-		$cp->add_lot($_POST);
-	}
-	catch(Exception $e)
-	{
-		echo $e->getTraceAsString();
-	}
-}
-// Mise =C3=A0 jour lots existants
-if ( isset($_POST['updexist']))
-{
-		var_dump($_POST);
-	$cp=3Dnew Copro_Lot();
-	try
-	{
-		$cp->update_lot($_POST);
-	}
-	catch(Exception $e)
-	{
-		echo $e->getTraceAsString();
-	}
-}
 //require_once 'include/class_coprop-lot_coprop.php';
 /* Add button */
 $f_add_button=3Dnew IButton('add_card');
@@ -80,42 +39,55 @@
=20
=20
=20
+/**
+ * @todo ajouter tri
+ */
+
 // liste Immeuble
=20
-$sql=3D" select a.f_id ,
-	(select ad_value from fiche_detail where f_id=3Da.f_id and ad_id=3D1) a=
s building_name,
-	(select ad_value from fiche_detail where f_id=3Da.f_id and ad_id=3D23) =
as building_qcode
+$a_immeuble=3D$cn->get_array(" select f_id,vw_name,quick_code
+    from vw_fiche_attr
+    where
+    fd_id=3D$1
+    ",array($g_copro_parameter->categorie_immeuble));
+
+/*
+ * Liste coprop par immeuble
+ */
+$coprop=3D$cn->prepare("coprop"," select coprop_id,
+	vw_name as copro_name,
+        vw_first_name as copro_first_name,
+	quick_code as copro_qcode
 	from
-	fiche as a
+	coprop.summary as s join vw_fiche_attr using (f_id)
 	where
-	a.fd_id=3D$1";
-
+	s.building_id=3D$1
+	");
 /*
  * Liste coprop par immeuble
  */
-$sql=3D" select f_id,
-	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
1) as copro_name,
-	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
23) as copro_qcode
-	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
10) as copro_start,
-	(select ad_value from fiche_detail where f_id=3Dc_fiche_id and ad_id=3D=
33) as copro_end
+$lot=3D$cn->prepare("lot"," select lot_id,
+	vw_name as lot_name,
+	quick_code as lot_qcode,
+        vw_description as lot_desc
 	from
-	fiche
+	coprop.summary as s join vw_fiche_attr using (f_id)
 	where
-	fd_id=3D$1
-	and f_id in ( select f_id from fiche_detail where ad_id=3D$1 and ad_val=
ue=3D$2)
-	";
-/**
- * @todo ajouter tri
+	s.building_id=3D$1 and s.coprop_id=3D$2
+	");
+/*
+ * Lot sans immeuble or coprop
  */
-/*$a_copro=3D$cn->get_array($sql,array($g_copro_parameter->categorie_cop=
rop));
+$a_undef_lot=3D$cn->get_array(" select lot_id,
+	vw_name as lot_name,
+	quick_code as lot_qcode,
+        vw_description as lot_desc
+	from
+	coprop.summary as s join vw_fiche_attr using (f_id)
+	where
+	coalesce(s.building_id,'')=3D'' or coalesce(s.coprop_id,'')=3D''
+	");
=20
-$sql_lot=3D$cn->prepare ("lot","select f_id,
-	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
1) as lot_name,
-	(select ad_value from fiche_detail where f_id=3Dl_fiche_id and ad_id=3D=
23) as lot_qcode,
-        (select ad_value from fiche_detail where f_id=3Dl_fiche_id and a=
d_id=3D9) as lot_desc
-	from fiche where f_id in ( select f_id from fiche_detail where ad_id=3D=
$1 and ad_value=3D$2)
-	and fd_id=3D$3");
-*/
 echo $f_add_button->input();
=20
=20

Modified: trunk/coprop/include/template/coprop_lot_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_list.php	2012-01-10 20:56:16=
 UTC (rev 274)
+++ trunk/coprop/include/template/coprop_lot_list.php	2012-01-11 11:20:26=
 UTC (rev 275)
@@ -23,45 +23,53 @@
=20
 /**
  * @file
- * @brief show list between lot et copropri=C3=A9taire
+ * @brief show list building, lot and copropri=C3=A9taire
  *
  */
 $gDossier=3DDossier::id();
 ?>
-<table class=3D"result">
-	<tr>
-		<th> Nom copropri=C3=A9taire </th>
-		<th>
-			Lot(s)
-		</th>
-	</tr>
-<?
-for ($i=3D0;$i<count($a_copro);$i++):
-	$col_copro=3DHtmlInput::anchor($a_copro[$i]['copro_name'],"","onclick=3D=
\"mod_coprop($gDossier,'".$a_copro[$i]['c_fiche_id']."','".$_REQUEST['plu=
gin_code']."','".$_REQUEST['ac']."')\"");
-?>
-	<tr>
-		<td><?=3D$col_copro?></td>
-	<td>
-		<?
-			$rlot=3D$cn->execute('lot',array($a_copro[$i]['c_fiche_id']));
-			$max=3DDatabase::num_row($rlot);
-			$sp=3D"";
-			for ($e=3D0;$e<$max;$e++):
-				$row=3DDatabase::fetch_array($rlot,$e);
-				$js_lot=3DHtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],=
' class=3D"line"');
-                                $js_lot.=3D$row['lot_desc'];
-				echo $sp.$js_lot;
-				$sp=3D" , ";
-			endfor;
-		?>
+<h1>Lots affect=C3=A9s</h1>
+<? for ( $i=3D0;$i<count($a_immeuble);$i++):?>
+<h2><?=3DHtmlInput::card_detail($a_immeuble[$i]['quick_code'],$a_immeubl=
e[$i]['vw_name'])?></h2>
=20
-	</td>
-</tr>
-<?
-endfor;
+<?=20
+$ret_coprop=3D$cn->execute("coprop",array($a_immeuble[$i]['f_id']));
+$max_coprop=3DDatabase::nuw_row($ret_coprop);
+if ($max_coprop=3D=3D0)
+{
+    echo "Pas de copropri=C3=A9taires pour cet immeuble";
+    continue;
+}
 ?>
+<ul>
+<?for ($e=3D0;$e<$max_coprop;$e++):=20
+    $r=3DDatabase::fetch_array($ret_coprop,$e);
+    ?>
+    <li><?=3DHtmlInput::card_detail($r['copro_qcode'],h($r['copro_name']=
." ".$r['copro_name']))?></li>
+    <?
+    $ret_lot=3D$cn->execute("lot",array($a_immeuble[$i]['f_id'],$r['copr=
o_id']));
+   $max_lot=3DDatabase::nuw_row($ret_lot);
+    if ($max_lot=3D=3D0)
+    {
+        echo "Pas de lot pour ce copropri=C3=A9taires ";
+        continue;
+    }
+    ?>
+    <ul>
+    <?for ($l=3D0;$e<$max_lot;$l++):=20
+    $s=3DDatabase::fetch_array($ret_lot,$e);
+    ?>
+    <li><?=3DHtmlInput::card_detail($s['lot_qcode'],h($r['lot_name']." "=
.$s['lot_desc']))?></li>
+    <? endfor;?>
+    </ul>
+    <? endfor;?>
+</ul>
=20
-</table>
-<?
-echo HtmlInput::button("add_link","Ajout Copropri=C3=A9taire / lot ","on=
click=3D\"add_coprop()\"");
-?>
\ No newline at end of file
+<? endfor; ?>
+
+<h1>Lot sans immeuble ou sans copropri=C3=A9taires</h1>
+<ul>
+<? for($e=3D0;$e<count($a_undef_lot);$e++):?>
+    <li><?=3DHtmlInput::card_detail($a_undef_lot[$e]['lot_qcode'],h($a_u=
ndef_lot[$e]['lot_name']." ".$a_undef_lot[$e]['lot_desc']))?></li>
+<? endfor; ?>
+</ul>



From MAILER-DAEMON Wed Jan 11 08:23:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rky9k-0003CA-J8
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Jan 2012 08:23:56 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Jan 2012 14:25:42 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.86547.1326288235.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r276 - trunk/coprop/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 Jan 2012 13:23:55 -0000

Author: danydb
Date: 2012-01-11 14:25:42 +0100 (Wed, 11 Jan 2012)
New Revision: 276

Modified:
   trunk/coprop/include/lot.inc.php
Log:
typo

Modified: trunk/coprop/include/lot.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/coprop/include/lot.inc.php	2012-01-11 11:20:26 UTC (rev 275)
+++ trunk/coprop/include/lot.inc.php	2012-01-11 13:25:42 UTC (rev 276)
@@ -27,7 +27,7 @@
  *
  */
 global $cn,$g_copro_parameter;
-}
+
 //require_once 'include/class_coprop-lot_coprop.php';
 /* Add button */
 $f_add_button=3Dnew IButton('add_card');



From MAILER-DAEMON Wed Jan 11 15:14:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rl4Yc-0001bo-H5
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Jan 2012 15:14:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Jan 2012 21:15:46 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.87798.1326312841.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r278 - trunk/coprop/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 Jan 2012 20:14:01 -0000

Author: danydb
Date: 2012-01-11 21:15:45 +0100 (Wed, 11 Jan 2012)
New Revision: 278

Removed:
   trunk/coprop/include/template/coprop_lot_add.php
   trunk/coprop/include/template/coprop_lot_mod.php
Log:

remove old files


Deleted: trunk/coprop/include/template/coprop_lot_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/coprop/include/template/coprop_lot_add.php	2012-01-11 13:56:31 =
UTC (rev 277)
+++ trunk/coprop/include/template/coprop_lot_add.php	2012-01-11 20:15:45 =
UTC (rev 278)
@@ -1,109 +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
-
-/**
- * @file
- * @brief ajout lien entre copro et lot
- *
- */
-  $copro=3Dnew ICard();
-  $copro->label=3D"Copropri=C3=A9taire : ".HtmlInput::infobulle(0) ;
-  $copro->name=3D"w_copro";
-  $copro->tabindex=3D1;
-  $copro->value=3D"";
-  $copro->table=3D0;
-
- // name of the field to update with the name of the card
-  $copro->set_attribute('label','w_copro_label');
-  // Type of card : deb, cred,
-  $copro->set_attribute('typecard',$g_copro_parameter->categorie_coprop)=
;
-
-  $copro->extra=3D$g_copro_parameter->categorie_coprop;
-
-// Add the callback function to filter the card on the jrn
-  $copro->set_callback('filter_card');
-  $copro->set_attribute('ipopup','ipopcard');
-// when value selected in the autcomplete
-  $copro->set_function('fill_data');
-
-// when the data change
-  $copro->javascript=3Dsprintf(' onchange=3D"fill_data_onchange(\'%s\');=
" ',
-            $copro->name);
-  $copro->set_dblclick("fill_ipopcard(this);");
-
-  $copro_label=3Dnew ISpan();
-  $copro_label->table=3D0;
-  $f_copro=3D$copro_label->input("w_copro_label","");
-
-// Search button for card
-  $f_copro_bt=3D$copro->search();
-
-
-echo '<form method=3D"post" onsubmit=3D"return confirm(\'Vous validez ?\=
')">';
-echo h2("Affectation de lot =C3=A0 un copropri=C3=A9taire",'class=3D"inf=
o"');
-echo "Copropri=C3=A9taire ".$copro->input();
-echo $f_copro_bt;
-echo $f_copro;
-echo HtmlInput::hidden('p_jrn',$g_copro_parameter->journal_appel);
-echo HtmlInput::hidden('ledger_type','ODS');
-$alot=3D$cn->get_array("select f_id,
-		(select ad_value from fiche_Detail as e where ad_id=3D1 and e.f_id=3Da=
.f_id) as fname,
-		(select ad_value from fiche_Detail as f where ad_id=3D23 and f.f_id=3D=
a.f_id) as fqcode,
-		(select ad_value from fiche_Detail as f where ad_id=3D9 and f.f_id=3Da=
.f_id) as fdesc
-		from fiche as a
-		where
-		fd_id=3D$1
-		", array($g_copro_parameter->categorie_lot));
-if ( count($alot)=3D=3D0) {
-	echo h2info('Aucune fiche de lot');
-	exit();
-}
-?>
-<table>
-	<tr>
-		<th>Lot</th>
-		<th>Description</th>
-	</tr>
-<?
-for ($i=3D0;$i<count($alot);$i++):
-
-// Search button for card
-  $ck=3Dnew ICheckBox("lot[]");
-  $ck->value=3D$alot[$i]['f_id'];
-?>
-<tr>
-	<td>
-	<?=3D$ck->input()?>
-	</td>
-	<td>
-		<?=3DHtmlInput::card_detail($alot[$i]['fqcode'],$alot[$i]['fname'],' c=
lass=3D"line" ')?>
-	</td>
-	<td>
-		<?=3D$alot[$i]['fdesc']?>
-	</td>
-</tr>
-<? endfor;?>
-</table>
-<? echo HtmlInput::submit('copro_new','Sauver');?>
-<? echo HtmlInput::button("add_link","Retour =C3=A0 la liste sans sauver=
 ","onclick=3D\"copro_show_list()\"");?>
-</form>

Deleted: trunk/coprop/include/template/coprop_lot_mod.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_mod.php	2012-01-11 13:56:31 =
UTC (rev 277)
+++ trunk/coprop/include/template/coprop_lot_mod.php	2012-01-11 20:15:45 =
UTC (rev 278)
@@ -1,97 +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
-
-/**
- * @file
- * @brief included from ajax_mod_copro_lot.php
- *
- */
-
-?>
-<h1>
-	Modification<?=3DHtmlInput::card_detail($copro->strAttribut(ATTR_DEF_QU=
ICKCODE),$copro->strAttribut(ATTR_DEF_NAME),' class=3D"line"')?>
-</h1>
-<h2>Lot affect=C3=A9 =C3=A0 ce copropri=C3=A9taire</h2>
-<form method=3D"post" onsubmit=3D"return confirm('Vous confirmez ?')">
-		<?=3DHtmlInput::hidden("copro_id",$copro->id)?>
-<table class=3D"result">
-	<tr>
-		<th>
-			Lot
-		</th>
-		<th>
-			Description
-		</th>
-	</tr>
-<? for ($i=3D0;$i<count($acurrent);$i++): ?>
-	<tr id=3D"row<?=3D$acurrent[$i]['l_id']?>">
-		<td>
-			<?=3DHtmlInput::card_detail($acurrent[$i]['fiche_qcode'],$acurrent[$i=
]['fiche_name'],' class=3D"line"')?>
-		</td>
-		<td>
-                    <?=3D$acurrent[$i]['fiche_desc']?>
-		</td>
-		<td id=3D"col<?=3D$acurrent[$i]['l_id']?>">
-			<?
-			$js=3D"onclick=3Dremove_lot('".$_REQUEST['plugin_code']."','".$_REQUE=
ST['ac']."','".$_REQUEST['gDossier']."','".$acurrent[$i]['l_id']."')";
-			echo HtmlInput::anchor("enlever","",$js);
-			?>
-		</td>
-	</tr>
-<? endfor; ?>
-</table>
-<?=3DHtmlInput::submit('updexist',"Mise =C3=A0 jour")?>
-</form>
-<hr>
-<h2>Autre lots</h2>
-<form method=3D"post" onsubmit=3D"return confirm('Vous confirmez ?')">
-	<?=3DHtmlInput::hidden("copro_id",$copro->id)?>
-<table class=3D"result">
-	<tr>
-		<th>
-			Lot
-		</th>
-		<th>
-			Description
-		</th>
-	</tr>
-<? for ($i=3D0;$i<count($not_assigned);$i++): ?>
-	<tr >
-		<td>
-                    		<?=3DHtmlInput::card_detail($not_assigned[$i]['fic=
he_qcode'],$not_assigned[$i]['fiche_name'],' class=3D"line"')?>
-		</td>
-		<td>
-                    <?=3D$not_assigned[$i]['fiche_desc']?>
-		</td>
-		<td>
-			<?
-				$ck=3Dnew ICheckBox("lot[]");
-				$ck->value=3D$not_assigned[$i]['f_id'];
-				echo $ck->input();
-			?>
-		</td>
-	</tr>
-<? endfor; ?>
-</table>
-<?=3DHtmlInput::submit('addlot',"Ajout des lots s=C3=A9lectionn=C3=A9s")=
?>
-</form>



From MAILER-DAEMON Wed Jan 11 15:23:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rl4iA-0005qW-AI
	for mharc-phpcompta-dev@gnu.org; Wed, 11 Jan 2012 15:23:54 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 11 Jan 2012 21:25:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.87913.1326313433.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r279 - trunk/coprop/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 Jan 2012 20:23:52 -0000

Author: danydb
Date: 2012-01-11 21:25:38 +0100 (Wed, 11 Jan 2012)
New Revision: 279

Modified:
   trunk/coprop/include/template/coprop_lot_list.php
Log:

cosmetic : immeuble / coprop / lot


Modified: trunk/coprop/include/template/coprop_lot_list.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/coprop_lot_list.php	2012-01-11 20:15:45=
 UTC (rev 278)
+++ trunk/coprop/include/template/coprop_lot_list.php	2012-01-11 20:25:38=
 UTC (rev 279)
@@ -32,7 +32,7 @@
 <? for ( $i=3D0;$i<count($a_immeuble);$i++):?>
 <h2><?=3DHtmlInput::card_detail($a_immeuble[$i]['quick_code'],$a_immeubl=
e[$i]['vw_name'],' style=3D"display:inline;text-decoration:underline"')?>=
</h2>
=20
-<?=20
+<?
 $ret_coprop=3D$cn->execute("coprop",array($a_immeuble[$i]['f_id']));
 $max_coprop=3DDatabase::num_row($ret_coprop);
 if ($max_coprop=3D=3D0)
@@ -41,11 +41,13 @@
     continue;
 }
 ?>
-<ul>
-<?for ($e=3D0;$e<$max_coprop;$e++):=20
+<ul style=3D"list-style-type: none;margin-top:10px;margin-bottom:10px;">
+<?for ($e=3D0;$e<$max_coprop;$e++):
     $r=3DDatabase::fetch_array($ret_coprop,$e);
     ?>
-<li><?=3DHtmlInput::card_detail($r['copro_qcode'],'',' style=3D"display:=
inline;text-decoration:underline"').' '.h($r['copro_name']." ".$r['copro_=
first_name'])?></li>
+<li style=3D"margin-top:4px;margin-bottom:4px;">
+<?=3DHtmlInput::card_detail($r['copro_qcode'],'',' style=3D"display:inli=
ne;text-decoration:underline"').' '.h($r['copro_name']." ".$r['copro_firs=
t_name'])?>
+</li>
     <?
     $ret_lot=3D$cn->execute("lot",array($a_immeuble[$i]['f_id'],$r['copr=
op_id']));
    $max_lot=3DDatabase::num_row($ret_lot);
@@ -56,10 +58,10 @@
     }
     ?>
     <ul>
-    <?for ($l=3D0;$l<$max_lot;$l++):=20
+    <?for ($l=3D0;$l<$max_lot;$l++):
     $s=3DDatabase::fetch_array($ret_lot,$l);
     ?>
-       <li><?=3DHtmlInput::card_detail($s['lot_qcode'],'',' style=3D"dis=
play:inline;text-decoration:underline"')." ".h($s['lot_name']." ".$s['lot=
_desc'])?></li>
+       <li style=3D"list-style-type: square;margin-top:2px;margin-bottom=
:2px;"><?=3DHtmlInput::card_detail($s['lot_qcode'],'',' style=3D"display:=
inline;text-decoration:underline"')." ".h($s['lot_name']." ".$s['lot_desc=
'])?></li>
     <? endfor;?>
     </ul>
     <? endfor;?>



From MAILER-DAEMON Thu Jan 12 05:41:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlI6J-0000oU-G6
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 05:41:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 11:43:13 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.89312.1326364902.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r280 - trunk/coprop/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, 12 Jan 2012 10:41:41 -0000

Author: danydb
Date: 2012-01-12 11:43:13 +0100 (Thu, 12 Jan 2012)
New Revision: 280

Modified:
   trunk/coprop/include/appel_fond.inc.php
Log:
format code

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-11 20:25:38 UTC (rev =
279)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-12 10:43:13 UTC (rev =
280)
@@ -26,64 +26,64 @@
  * @brief g=C3=A9n=C3=A9re =C3=A9criture comptable pour appel de fond
  *
  */
-global $cn,$g_copro_parameter;
+global $cn, $g_copro_parameter;
=20
 extract($_GET);
-if ( isset($genere ))
+if (isset($genere))
 {
-	// G=C3=A9n=C3=A9re =C3=A9criture comptable dans journal choisi
-} else
+    // G=C3=A9n=C3=A9re =C3=A9criture comptable dans journal choisi
+}
+else
 {
-	$date=3Dnew IDate('p_date');
-	$amount=3Dnew INum('amount');
+    $date =3D new IDate('p_date');
+    $amount =3D new INum('amount');
=20
-	$ledger=3Dnew Acc_Ledger($cn,0);
-	$led_appel_fond=3D$ledger->select_ledger('ODS',3);
-	$led_appel_fond->selected=3D$g_copro_parameter->journal_appel;
-	  $copro=3Dnew ICard();
-  $categorie_appel=3Dnew ICard();
-  $categorie_appel->label=3D" Appel de fond : ".HtmlInput::infobulle(0) =
;
-  $categorie_appel->name=3D"w_categorie_appel";
-  $categorie_appel->tabindex=3D1;
-  $categorie_appel->value=3D"";
-  $categorie_appel->table=3D0;
+    $ledger =3D new Acc_Ledger($cn, 0);
+    $led_appel_fond =3D $ledger->select_ledger('ODS', 3);
+    $led_appel_fond->selected =3D $g_copro_parameter->journal_appel;
+    $copro =3D new ICard();
+    $categorie_appel =3D new ICard();
+    $categorie_appel->label =3D " Appel de fond : " . HtmlInput::infobul=
le(0);
+    $categorie_appel->name =3D "w_categorie_appel";
+    $categorie_appel->tabindex =3D 1;
+    $categorie_appel->value =3D "";
+    $categorie_appel->table =3D 0;
=20
- // name of the field to update with the name of the card
-  $categorie_appel->set_attribute('label','w_categorie_appel_label');
-  // Type of card : deb, cred,
-  $categorie_appel->set_attribute('typecard',$g_copro_parameter->categor=
ie_appel);
+    // name of the field to update with the name of the card
+    $categorie_appel->set_attribute('label', 'w_categorie_appel_label');
+    // Type of card : deb, cred,
+    $categorie_appel->set_attribute('typecard', $g_copro_parameter->cate=
gorie_appel);
=20
-  $categorie_appel->extra=3D$g_copro_parameter->categorie_appel;
+    $categorie_appel->extra =3D $g_copro_parameter->categorie_appel;
=20
 // Add the callback function to filter the card on the jrn
-  $categorie_appel->set_callback('filter_card');
-  $categorie_appel->set_attribute('ipopup','ipopcard');
+    $categorie_appel->set_callback('filter_card');
+    $categorie_appel->set_attribute('ipopup', 'ipopcard');
 // when value selected in the autcomplete
-  $categorie_appel->set_function('fill_data');
+    $categorie_appel->set_function('fill_data');
=20
 // when the data change
-  $categorie_appel->javascript=3Dsprintf(' onchange=3D"fill_data_onchang=
e(\'%s\');" ',
-            $categorie_appel->name);
-  $categorie_appel->set_dblclick("fill_ipopcard(this);");
+    $categorie_appel->javascript =3D sprintf(' onchange=3D"fill_data_onc=
hange(\'%s\');" ', $categorie_appel->name);
+    $categorie_appel->set_dblclick("fill_ipopcard(this);");
=20
-  $categorie_appel_label=3Dnew ISpan();
-  $categorie_appel_label->table=3D0;
-  $f_categorie_appel_label=3D$categorie_appel_label->input("w_categorie_=
appel_label","");
+    $categorie_appel_label =3D new ISpan();
+    $categorie_appel_label->table =3D 0;
+    $f_categorie_appel_label =3D $categorie_appel_label->input("w_catego=
rie_appel_label", "");
=20
 // Search button for card
-  $f_categorie_appel_bt=3D$categorie_appel->search();
+    $f_categorie_appel_bt =3D $categorie_appel->search();
=20
-	$key=3Dnew ISelect("key");
-	$key->value=3D$cn->make_array("select cr_id,cr_name from coprop.clef_re=
partition");
+    $key =3D new ISelect("key");
+    $key->value =3D $cn->make_array("select cr_id,cr_name from coprop.cl=
ef_repartition");
=20
-	$f_add_button=3Dnew IButton('add_card');
-	$f_add_button->label=3D_('Nouvelle fiche ');
-	$f_add_button->set_attribute('ipopup','ipop_newcard');
-	$f_add_button->set_attribute('jrn',-1);
-	$filter=3D$g_copro_parameter->categorie_appel;
-	$f_add_button->javascript=3D" this.filter=3D'$filter';this.jrn=3D-1;sel=
ect_card_type(this);";
-	$str_add_appel=3D $f_add_button->input();
+    $f_add_button =3D new IButton('add_card');
+    $f_add_button->label =3D _('Nouvelle fiche ');
+    $f_add_button->set_attribute('ipopup', 'ipop_newcard');
+    $f_add_button->set_attribute('jrn', -1);
+    $filter =3D $g_copro_parameter->categorie_appel;
+    $f_add_button->javascript =3D " this.filter=3D'$filter';this.jrn=3D-=
1;select_card_type(this);";
+    $str_add_appel =3D $f_add_button->input();
=20
-	require_once 'template/appel_fond.php';
+    require_once 'template/appel_fond.php';
 }
 ?>



From MAILER-DAEMON Thu Jan 12 05:55:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlIJW-0004YA-8o
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 05:55:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 11:56:54 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.89323.1326365721.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r281 - in trunk/coprop: . 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, 12 Jan 2012 10:55:20 -0000

Author: danydb
Date: 2012-01-12 11:56:54 +0100 (Thu, 12 Jan 2012)
New Revision: 281

Modified:
   trunk/coprop/coprop-javascript.js
   trunk/coprop/include/appel_fond.inc.php
   trunk/coprop/include/template/appel_fond.php
Log:
Appel de fond  : ?\195?\169cran

Modified: trunk/coprop/coprop-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/coprop/coprop-javascript.js	2012-01-12 10:43:13 UTC (rev 280)
+++ trunk/coprop/coprop-javascript.js	2012-01-12 10:56:54 UTC (rev 281)
@@ -381,4 +381,35 @@
 	{
 		alert(e.message);
 	}
+}
+
+function appel_fond_show()
+{
+    try=20
+    {
+        var aft=3D$('aft');
+        var choice=3Daft.options[aft.selectedIndex].value;
+        if ( choice =3D=3D -1 )
+        {
+            $('appel_fond_budget').hide();
+            $('appel_fond_amount').hide();
+            return;
+        }
+        if ( choice =3D=3D 1 )
+        {
+            $('appel_fond_budget').show();
+            $('appel_fond_amount').hide();
+            return;
+        }
+        if ( choice =3D=3D 2 )
+        {
+            $('appel_fond_budget').hide();
+            $('appel_fond_amount').show();
+            return;
+        }
+    } catch(e)
+    {
+        alert(e.message);
+    }
+   =20
 }
\ No newline at end of file

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-12 10:43:13 UTC (rev =
280)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-12 10:56:54 UTC (rev =
281)
@@ -83,7 +83,25 @@
     $filter =3D $g_copro_parameter->categorie_appel;
     $f_add_button->javascript =3D " this.filter=3D'$filter';this.jrn=3D-=
1;select_card_type(this);";
     $str_add_appel =3D $f_add_button->input();
-
+   =20
+ // Budget
+    $budget_sel=3Dnew ISelect("b_id");
+    $budget_sel->value=3D$cn->make_arrak("select b_id,b_name from coprop=
.budget order by b_name");
+   =20
+    // pourcentage
+    $budget_pct=3Dnew INum("bud_pct",0);
+   =20
+    // select between budget or amount
+    $appel_fond_type=3Dnew ISelect("aft");
+    $appel_fond_type->value=3Darray(
+        array("value"=3D>-1,'Faites votre choix'),
+        array("value"=3D>1,'appel de fond d\'budget'),
+        array("value"=3D>2,'Appel de fond par montant')
+    );
+    $onchange=3D" onchange=3D\"appel_fond_show() \"";
+    $appel_fond_type->javascript=3D$onchange;
+   =20
+   =20
     require_once 'template/appel_fond.php';
 }
 ?>

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-12 10:43:13 UTC =
(rev 280)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-12 10:56:54 UTC =
(rev 281)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  *   This file is part of PhpCompta.
  *
@@ -50,6 +49,27 @@
 			<?=3D$date->input()?>
 		</td>
 	</tr>
+</table>
+appel de fond par <?=3D$appel_fond_type->input()?>
+<table id=3D"appel_fond_budget">
+        	<tr >
+                   =20
+		<td>
+			Budget =C3=A0 utiliser
+		</td>
+		<td>
+			<?=3D$budget_sel->input()?>
+		</td>
+
+		<td>
+			Pourcentage du budget
+		</td>
+		<td>
+			<?=3D$budget_pct->input()?>
+		</td>
+	</tr>
+</table>
+<table id=3D"appel_fond_amount">
 	<tr>
=20
 		<td>
@@ -58,8 +78,6 @@
 		<td>
 			<?=3D$amount->input()?>
 		</td>
-	</tr>
-	<tr>
=20
 		<td>
 			Clef de r=C3=A9partiton =C3=A0 utiliser



From MAILER-DAEMON Thu Jan 12 07:09:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlJTV-0000Ba-Qg
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 07:09:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 13:11:23 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.89541.1326370184.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r282 - trunk/coprop/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, 12 Jan 2012 12:09:44 -0000

Author: danydb
Date: 2012-01-12 13:11:23 +0100 (Thu, 12 Jan 2012)
New Revision: 282

Modified:
   trunk/coprop/include/appel_fond.inc.php
Log:
typo

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-12 10:56:54 UTC (rev =
281)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-12 12:11:23 UTC (rev =
282)
@@ -86,7 +86,7 @@
    =20
  // Budget
     $budget_sel=3Dnew ISelect("b_id");
-    $budget_sel->value=3D$cn->make_arrak("select b_id,b_name from coprop=
.budget order by b_name");
+    $budget_sel->value=3D$cn->make_array("select b_id,b_name from coprop=
.budget order by b_name");
    =20
     // pourcentage
     $budget_pct=3Dnew INum("bud_pct",0);



From MAILER-DAEMON Thu Jan 12 07:26:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlJjn-0002zT-Nq
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 07:26:35 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 13:28:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.89598.1326371194.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r283 - trunk/coprop/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, 12 Jan 2012 12:26:34 -0000

Author: danydb
Date: 2012-01-12 13:28:15 +0100 (Thu, 12 Jan 2012)
New Revision: 283

Modified:
   trunk/coprop/include/appel_fond.inc.php
Log:
label

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-12 12:11:23 UTC (rev =
282)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-12 12:28:15 UTC (rev =
283)
@@ -94,9 +94,9 @@
     // select between budget or amount
     $appel_fond_type=3Dnew ISelect("aft");
     $appel_fond_type->value=3Darray(
-        array("value"=3D>-1,'Faites votre choix'),
-        array("value"=3D>1,'appel de fond d\'budget'),
-        array("value"=3D>2,'Appel de fond par montant')
+        array("value"=3D>-1,'label'=3D>'Faites votre choix'),
+        array("value"=3D>1,'label'=3D>'Appel de fond d\'budget'),
+        array("value"=3D>2,'label'=3D>'Appel de fond par montant')
     );
     $onchange=3D" onchange=3D\"appel_fond_show() \"";
     $appel_fond_type->javascript=3D$onchange;



From MAILER-DAEMON Thu Jan 12 08:32:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlKli-0002kH-Vw
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 08:32:38 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 14:34:14 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.89776.1326375158.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r284 - trunk/coprop/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 Jan 2012 13:32:38 -0000

Author: danydb
Date: 2012-01-12 14:34:14 +0100 (Thu, 12 Jan 2012)
New Revision: 284

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
By default hide tables

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-12 12:28:15 UTC =
(rev 283)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-12 13:34:14 UTC =
(rev 284)
@@ -28,7 +28,13 @@
 ?>
 <table>
 	<tr>
-
+		<td>
+			Date de l'op=C3=A9ration
+		</td>
+		<td>
+			<?=3D$date->input()?>
+		</td>
+	</tr>
 		<td>Journal pour l'appel de fond</td>
 		<td>
 			<?=3D$led_appel_fond->input()?>
@@ -41,14 +47,7 @@
 		<td><?=3D$f_categorie_appel_label?></td>
 		<td><?=3D$str_add_appel?></td>
 	</tr>
-	<tr>
-		<td>
-			Date de l'op=C3=A9ration
-		</td>
-		<td>
-			<?=3D$date->input()?>
-		</td>
-	</tr>
+
 </table>
 appel de fond par <?=3D$appel_fond_type->input()?>
 <table id=3D"appel_fond_budget">
@@ -87,4 +86,5 @@
 		</td>
 	</tr>
=20
-</table>
\ No newline at end of file
+</table>
+<script> appel_fond_show()</script>
\ No newline at end of file



From MAILER-DAEMON Thu Jan 12 08:42:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlKvS-0006NL-Ec
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 08:42:42 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 14:44:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.89829.1326375760.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r285 - trunk/coprop/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 Jan 2012 13:42:39 -0000

Author: danydb
Date: 2012-01-12 14:44:16 +0100 (Thu, 12 Jan 2012)
New Revision: 285

Modified:
   trunk/coprop/include/template/appel_fond.php
Log:
ecran appel de fond cosmetic

Modified: trunk/coprop/include/template/appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/template/appel_fond.php	2012-01-12 13:34:14 UTC =
(rev 284)
+++ trunk/coprop/include/template/appel_fond.php	2012-01-12 13:44:16 UTC =
(rev 285)
@@ -50,6 +50,7 @@
=20
 </table>
 appel de fond par <?=3D$appel_fond_type->input()?>
+<div style=3D"margin-left:150px">
 <table id=3D"appel_fond_budget">
         	<tr >
                    =20
@@ -59,7 +60,8 @@
 		<td>
 			<?=3D$budget_sel->input()?>
 		</td>
-
+        </tr>
+        <tr>
 		<td>
 			Pourcentage du budget
 		</td>
@@ -77,7 +79,8 @@
 		<td>
 			<?=3D$amount->input()?>
 		</td>
-
+        </tr>
+        <tr>
 		<td>
 			Clef de r=C3=A9partiton =C3=A0 utiliser
 		</td>
@@ -87,4 +90,5 @@
 	</tr>
=20
 </table>
-<script> appel_fond_show()</script>
\ No newline at end of file
+</div>
+<script> appel_fond_show()</script>



From MAILER-DAEMON Thu Jan 12 11:10:45 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlNEj-0004t4-N4
	for mharc-phpcompta-dev@gnu.org; Thu, 12 Jan 2012 11:10:45 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 12 Jan 2012 17:12:18 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.90149.1326384644.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r286 - trunk/coprop/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, 12 Jan 2012 16:10:43 -0000

Author: danydb
Date: 2012-01-12 17:12:17 +0100 (Thu, 12 Jan 2012)
New Revision: 286

Added:
   trunk/coprop/include/class_coprop_appel_fond.php
Modified:
   trunk/coprop/include/appel_fond.inc.php
   trunk/coprop/include/class_install_plugin.php
Log:
appel de fond  : create key=20

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-12 13:44:16 UTC (rev =
285)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-12 16:12:17 UTC (rev =
286)
@@ -27,81 +27,108 @@
  *
  */
 global $cn, $g_copro_parameter;
+require_once 'class_coprop_appel_fond.php';
+extract($_GET);
+$error =3D 0;
=20
-extract($_GET);
-if (isset($genere))
+// Demande g=C3=A9n=C3=A9ration
+if (isset($calc))
 {
-    // G=C3=A9n=C3=A9re =C3=A9criture comptable dans journal choisi
+// G=C3=A9n=C3=A9re =C3=A9criture comptable dans journal choisi
+    switch ($aft)
+    {
+        case -1:
+        $error =3D 1;
+        alert("Choississez le type de calcul");
+        break;
+        case 1:
+            $appel_fond=3Dnew Coprop_Appel_Fond();
+            $error=3D$appel_fond->compute_budget($_GET);
+            break;
+        case 2:
+            $appel_fond=3Dnew Coprop_Appel_Fond();
+            $error=3D$appel_fond->compute_amount($_GET);
+            break;
+    }
+    if ($error =3D=3D 0)        exit();
 }
-else
-{
-    $date =3D new IDate('p_date');
-    $amount =3D new INum('amount');
+// Montre =C3=A9cran confirmation
=20
-    $ledger =3D new Acc_Ledger($cn, 0);
-    $led_appel_fond =3D $ledger->select_ledger('ODS', 3);
-    $led_appel_fond->selected =3D $g_copro_parameter->journal_appel;
-    $copro =3D new ICard();
-    $categorie_appel =3D new ICard();
-    $categorie_appel->label =3D " Appel de fond : " . HtmlInput::infobul=
le(0);
-    $categorie_appel->name =3D "w_categorie_appel";
-    $categorie_appel->tabindex =3D 1;
-    $categorie_appel->value =3D "";
-    $categorie_appel->table =3D 0;
=20
-    // name of the field to update with the name of the card
-    $categorie_appel->set_attribute('label', 'w_categorie_appel_label');
-    // Type of card : deb, cred,
-    $categorie_appel->set_attribute('typecard', $g_copro_parameter->cate=
gorie_appel);
+// confirmation
=20
-    $categorie_appel->extra =3D $g_copro_parameter->categorie_appel;
=20
+// Detail : propose de faire un appel de fond
+$date =3D new IDate('p_date');
+$amount =3D new INum('amount');
+
+$ledger =3D new Acc_Ledger($cn, 0);
+$led_appel_fond =3D $ledger->select_ledger('ODS', 3);
+$led_appel_fond->selected =3D $g_copro_parameter->journal_appel;
+$copro =3D new ICard();
+$categorie_appel =3D new ICard();
+$categorie_appel->label =3D " Appel de fond : " . HtmlInput::infobulle(0=
);
+$categorie_appel->name =3D "w_categorie_appel";
+$categorie_appel->tabindex =3D 1;
+$categorie_appel->value =3D "";
+$categorie_appel->table =3D 0;
+
+// name of the field to update with the name of the card
+$categorie_appel->set_attribute('label', 'w_categorie_appel_label');
+// Type of card : deb, cred,
+$categorie_appel->set_attribute('typecard', $g_copro_parameter->categori=
e_appel);
+
+$categorie_appel->extra =3D $g_copro_parameter->categorie_appel;
+
 // Add the callback function to filter the card on the jrn
-    $categorie_appel->set_callback('filter_card');
-    $categorie_appel->set_attribute('ipopup', 'ipopcard');
+$categorie_appel->set_callback('filter_card');
+$categorie_appel->set_attribute('ipopup', 'ipopcard');
 // when value selected in the autcomplete
-    $categorie_appel->set_function('fill_data');
+$categorie_appel->set_function('fill_data');
=20
 // when the data change
-    $categorie_appel->javascript =3D sprintf(' onchange=3D"fill_data_onc=
hange(\'%s\');" ', $categorie_appel->name);
-    $categorie_appel->set_dblclick("fill_ipopcard(this);");
+$categorie_appel->javascript =3D sprintf(' onchange=3D"fill_data_onchang=
e(\'%s\');" ', $categorie_appel->name);
+$categorie_appel->set_dblclick("fill_ipopcard(this);");
=20
-    $categorie_appel_label =3D new ISpan();
-    $categorie_appel_label->table =3D 0;
-    $f_categorie_appel_label =3D $categorie_appel_label->input("w_catego=
rie_appel_label", "");
+$categorie_appel_label =3D new ISpan();
+$categorie_appel_label->table =3D 0;
+$f_categorie_appel_label =3D $categorie_appel_label->input("w_categorie_=
appel_label", "");
=20
 // Search button for card
-    $f_categorie_appel_bt =3D $categorie_appel->search();
+$f_categorie_appel_bt =3D $categorie_appel->search();
=20
-    $key =3D new ISelect("key");
-    $key->value =3D $cn->make_array("select cr_id,cr_name from coprop.cl=
ef_repartition");
+$key =3D new ISelect("key");
+$key->value =3D $cn->make_array("select cr_id,cr_name from coprop.clef_r=
epartition");
=20
-    $f_add_button =3D new IButton('add_card');
-    $f_add_button->label =3D _('Nouvelle fiche ');
-    $f_add_button->set_attribute('ipopup', 'ipop_newcard');
-    $f_add_button->set_attribute('jrn', -1);
-    $filter =3D $g_copro_parameter->categorie_appel;
-    $f_add_button->javascript =3D " this.filter=3D'$filter';this.jrn=3D-=
1;select_card_type(this);";
-    $str_add_appel =3D $f_add_button->input();
-   =20
- // Budget
-    $budget_sel=3Dnew ISelect("b_id");
-    $budget_sel->value=3D$cn->make_array("select b_id,b_name from coprop=
.budget order by b_name");
-   =20
-    // pourcentage
-    $budget_pct=3Dnew INum("bud_pct",0);
-   =20
-    // select between budget or amount
-    $appel_fond_type=3Dnew ISelect("aft");
-    $appel_fond_type->value=3Darray(
-        array("value"=3D>-1,'label'=3D>'Faites votre choix'),
-        array("value"=3D>1,'label'=3D>'Appel de fond d\'budget'),
-        array("value"=3D>2,'label'=3D>'Appel de fond par montant')
-    );
-    $onchange=3D" onchange=3D\"appel_fond_show() \"";
-    $appel_fond_type->javascript=3D$onchange;
-   =20
-   =20
-    require_once 'template/appel_fond.php';
-}
+$f_add_button =3D new IButton('add_card');
+$f_add_button->label =3D _('Nouvelle fiche ');
+$f_add_button->set_attribute('ipopup', 'ipop_newcard');
+$f_add_button->set_attribute('jrn', -1);
+$filter =3D $g_copro_parameter->categorie_appel;
+$f_add_button->javascript =3D " this.filter=3D'$filter';this.jrn=3D-1;se=
lect_card_type(this);";
+$str_add_appel =3D $f_add_button->input();
+
+// Budget
+$budget_sel =3D new ISelect("b_id");
+$budget_sel->value =3D $cn->make_array("select b_id,b_name from coprop.b=
udget order by b_name");
+
+// pourcentage
+$budget_pct =3D new INum("bud_pct", 0);
+
+// select between budget or amount
+$appel_fond_type =3D new ISelect("aft");
+$appel_fond_type->value =3D array(
+    array("value" =3D> -1, 'label' =3D> 'Faites votre choix'),
+    array("value" =3D> 1, 'label' =3D> 'Appel de fond d\'budget'),
+    array("value" =3D> 2, 'label' =3D> 'Appel de fond par montant')
+);
+$onchange =3D " onchange=3D\"appel_fond_show() \"";
+$appel_fond_type->javascript =3D $onchange;
+
+
+echo '<form method=3D"get">';
+echo HtmlInput::request_to_hidden('ac', 'plugin_code', 'sa');
+require_once 'template/appel_fond.php';
+echo HtmlInput::submit('calc', "Calculer");
+echo '</form>';
 ?>

Added: trunk/coprop/include/class_coprop_appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_coprop_appel_fond.php	                    =
    (rev 0)
+++ trunk/coprop/include/class_coprop_appel_fond.php	2012-01-12 16:12:17 =
UTC (rev 286)
@@ -0,0 +1,65 @@
+<?php
+/**
+ *@brief calcul appel de fond=20
+ */
+
+class Coprop_Appel_Fond
+{
+    /**
+     *@brief create a key to save the data in DB=20
+     */
+    function create_key()
+    {
+        global $cn;
+        $this->id=3D$cn->get_next_seq('appel_fond_id');
+        // clean old
+        $this->exec_sql("delete from coprop.appel_fond where af_confirme=
d=3D'N' and tech_per < tech_per - interval '5 hours' )");
+       =20
+        // insert new unconfirmed
+        $cn->exec_sql("insert into coprop.appel_fond(af_id,af_date,af_co=
nfirmed,af_percent,af_amount,af_card,af_ledger,tech_per)
+                values ($1,to_date($2,'DD.MM.YYYY','N',$3,$4,$5,$6,$7,no=
w())",array($this->id,$this->af_date,$this->percent,$this->amount,$this->=
bud_id,$this->af_card,$this->af_ledger));
+       =20
+    }
+    function compute_amount($p_array)
+    {
+        $this->type=3D"amount";
+        $this->amount=3D0;
+        $this->percent=3D1;
+        $this->bud_id=3Dnull;
+       =20
+        $this->create_key();
+    }
+    function compute_budget($p_array)
+    {
+        global $cn;
+        bcscale(2);
+        try=20
+        {
+            // req bud_pct <=3D 1 && bud_pct > 0
+            if ($p_array['bud_pct'] > 1 || $p_array['bud_pct']<0 ) throw=
 new Exception ('Pourcentage incorrect');
+            // req date valide
+            if ( isDate($p_array['p_date'])=3D=3Dnull) throw new Excepti=
on('La date est invalide');
+           =20
+            $this->type=3D"budget";
+            $this->bud_id=3D$p_array['b_id'];
+            $this->percent=3D$p_array['bud_pct'];
+            $this->af_ledger=3D$p_array['p_jrn'];
+            $this->af_date=3D$p_array['p_date'];
+            $fiche=3Dnew Fiche($cn);
+            $fiche->get_by_qcode($p_array['w_categorie_appel']);
+            //  req  $fiche->id > 0
+            if ( $fiche->id < 1 ) throw new Exception("La fiche pour l'a=
ppel de fond n'existe pas");
+            $this->af_card=3D$fiche->id;
+
+            $tot_bud=3D$cn->get_value('select b_amount from coprop.budge=
t where b_id=3D$1',array($this->bud_id));
+            if ($tot_bud <=3D0  ) throw new Exception ("Ce budget a un m=
ontant de 0 ");
+
+            $this->amount=3D  bcmul($tot_bud,$this->percent);
+            $this->create_key();
+        } catch (Exception $e)
+        {
+            throw ($e);
+        }
+    }
+}
+?>

Modified: trunk/coprop/include/class_install_plugin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_install_plugin.php	2012-01-12 13:44:16 UTC=
 (rev 285)
+++ trunk/coprop/include/class_install_plugin.php	2012-01-12 16:12:17 UTC=
 (rev 286)
@@ -54,6 +54,7 @@
 	function create_schema()
 	{
 		$this->cn->exec_sql('create schema coprop');
+                $this->cn->exec_sql("create sequence coprop.appel_fond_i=
d");
 	}
=20
 	function create_card()



From MAILER-DAEMON Fri Jan 13 06:00:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rlero-0004mc-Fq
	for mharc-phpcompta-dev@gnu.org; Fri, 13 Jan 2012 06:00:16 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 13 Jan 2012 12:01:39 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.92180.1326452415.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r287 - trunk/coprop/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, 13 Jan 2012 11:00:14 -0000

Author: danydb
Date: 2012-01-13 12:01:38 +0100 (Fri, 13 Jan 2012)
New Revision: 287

Modified:
   trunk/coprop/include/lot.inc.php
Log:
?\195?\169cran lot : montre aussi lot avec immeuble ou coprop inexistant

Modified: trunk/coprop/include/lot.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/coprop/include/lot.inc.php	2012-01-12 16:12:17 UTC (rev 286)
+++ trunk/coprop/include/lot.inc.php	2012-01-13 11:01:38 UTC (rev 287)
@@ -86,6 +86,8 @@
 	coprop.summary as s join vw_fiche_attr on (lot_id::numeric=3Df_id)
 	where
 	coalesce(s.building_id,'')=3D'' or coalesce(s.coprop_id,'')=3D''
+        or coalesce(s.building_id,'') not in (select building_id from co=
prop.summary)=20
+        or coalesce(s.coprop_id,'') not in (select coprop_id from coprop=
.summary)=20
 	");
=20
 echo $f_add_button->input();



From MAILER-DAEMON Fri Jan 13 09:27:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rli6V-0003eZ-PE
	for mharc-phpcompta-dev@gnu.org; Fri, 13 Jan 2012 09:27:39 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 13 Jan 2012 15:29:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.92527.1326464859.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r288 - trunk/coprop/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, 13 Jan 2012 14:27:38 -0000

Author: danydb
Date: 2012-01-13 15:29:05 +0100 (Fri, 13 Jan 2012)
New Revision: 288

Added:
   trunk/coprop/include/class_copro_appel_fond_detail.php
Modified:
   trunk/coprop/include/appel_fond.inc.php
   trunk/coprop/include/class_budget.php
   trunk/coprop/include/class_copro_key.php
   trunk/coprop/include/class_coprop_appel_fond.php
Log:
Appel de fond : calcul et sauve dans table

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-13 11:01:38 UTC (rev =
287)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-13 14:29:05 UTC (rev =
288)
@@ -34,23 +34,34 @@
 // Demande g=C3=A9n=C3=A9ration
 if (isset($calc))
 {
+    try
+    {
+
 // G=C3=A9n=C3=A9re =C3=A9criture comptable dans journal choisi
-    switch ($aft)
+        switch ($aft)
+        {
+            case -1:
+                throw  new Exception("Choississez le type de calcul");
+                break;
+            case 1:
+                $appel_fond =3D new Coprop_Appel_Fond();
+                $error =3D $appel_fond->compute_budget($_GET);
+                break;
+            case 2:
+                $appel_fond =3D new Coprop_Appel_Fond();
+                $error =3D $appel_fond->compute_amount($_GET);
+                break;
+        }
+       =20
+        $appel_fond->display_ledger();
+       =20
+       =20
+        exit();
+    }
+    catch (Exception $e)
     {
-        case -1:
-        $error =3D 1;
-        alert("Choississez le type de calcul");
-        break;
-        case 1:
-            $appel_fond=3Dnew Coprop_Appel_Fond();
-            $error=3D$appel_fond->compute_budget($_GET);
-            break;
-        case 2:
-            $appel_fond=3Dnew Coprop_Appel_Fond();
-            $error=3D$appel_fond->compute_amount($_GET);
-            break;
+        alert($e->getMessage());
     }
-    if ($error =3D=3D 0)        exit();
 }
 // Montre =C3=A9cran confirmation
=20
@@ -127,7 +138,7 @@
=20
=20
 echo '<form method=3D"get">';
-echo HtmlInput::request_to_hidden('ac', 'plugin_code', 'sa');
+echo HtmlInput::request_to_hidden(array('ac', 'plugin_code', 'sa'));
 require_once 'template/appel_fond.php';
 echo HtmlInput::submit('calc', "Calculer");
 echo '</form>';

Modified: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-13 11:01:38 UTC (rev 28=
7)
+++ trunk/coprop/include/class_budget.php	2012-01-13 14:29:05 UTC (rev 28=
8)
@@ -311,5 +311,12 @@
 		}
=20
 	}
+       function get_detail()
+       {
+           global $cn;
+           $array=3D$cn->get_array("select * from coprop.budget_detail w=
here b_id=3D$1",
+                   array($this->b_id));
+           return $array;
+       }
 }
 ?>

Added: trunk/coprop/include/class_copro_appel_fond_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/coprop/include/class_copro_appel_fond_detail.php	              =
          (rev 0)
+++ trunk/coprop/include/class_copro_appel_fond_detail.php	2012-01-13 14:=
29:05 UTC (rev 288)
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @brief manage the table coprop.appel_fond_detail
+ */
+class Copro_Appel_Fond_Detail
+{
+    function insert()
+    {
+        global $cn;
+        $this->afd_id=3D$cn->get_value("insert into coprop.appel_fond_de=
tail
+            (af_id,lot_id,key_id,afd_amount,key_tantieme,lot_tantieme)
+            values ($1,$2,$3,$4,$5,$6) returning afd_id",
+                array(
+                    $this->af_id, //1
+                    $this->lot_id, //2
+                    $this->key_id, //3=20
+                    $this->afd_amount, //4=20
+                    $this->key_tantieme, //5=20
+                    $this->lot_tantieme)); //6
+    }
+}
+?>

Modified: trunk/coprop/include/class_copro_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_key.php	2012-01-13 11:01:38 UTC (rev=
 287)
+++ trunk/coprop/include/class_copro_key.php	2012-01-13 14:29:05 UTC (rev=
 288)
@@ -95,6 +95,25 @@
 			echo $exc->getTraceAsString();
 		}
 	}
+        function load()
+        {
+            global $cn;
+            $array=3D$cn->get_array("select * from coprop.clef_repartiti=
on where
+                cr_id=3D$1",$this->cr_id);
+            if ( $cn->count() =3D=3D 1 )
+            {
+                foreach ( array("cr_id","cr_name","cr_note","cr_tantieme=
") as $k=3D>$e) {
+                    $this->$e=3D$array[0][$e];
+                }
+            }
+        }
+        function get_detail()
+        {
+            global $cn;
+            $array=3D$cn->get_array("select * from coprop.clef_repartiti=
on_detail
+                where cr_id=3D$1",array($this->cr_id));
+            return $array;
+        }
=20
 }
=20

Modified: trunk/coprop/include/class_coprop_appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_coprop_appel_fond.php	2012-01-13 11:01:38 =
UTC (rev 287)
+++ trunk/coprop/include/class_coprop_appel_fond.php	2012-01-13 14:29:05 =
UTC (rev 288)
@@ -2,7 +2,8 @@
 /**
  *@brief calcul appel de fond=20
  */
-
+require_once 'class_copro_key.php';
+require_once 'class_copro_budget.php';
 class Coprop_Appel_Fond
 {
     /**
@@ -16,18 +17,77 @@
         $this->exec_sql("delete from coprop.appel_fond where af_confirme=
d=3D'N' and tech_per < tech_per - interval '5 hours' )");
        =20
         // insert new unconfirmed
-        $cn->exec_sql("insert into coprop.appel_fond(af_id,af_date,af_co=
nfirmed,af_percent,af_amount,af_card,af_ledger,tech_per)
-                values ($1,to_date($2,'DD.MM.YYYY','N',$3,$4,$5,$6,$7,no=
w())",array($this->id,$this->af_date,$this->percent,$this->amount,$this->=
bud_id,$this->af_card,$this->af_ledger));
+        $cn->exec_sql("insert into coprop.appel_fond(af_id,af_date,af_co=
nfirmed,af_percent,af_amount,af_card,af_ledger,tech_per,b_id,cr_id)
+                values ($1,to_date($2,'DD.MM.YYYY','N',$3,$4,$5,$6,$7,no=
w()),$8",
+                array($this->id,$this->af_date,$this->percent,$this->amo=
unt,$this->af_card,$this->af_ledger,$this->b_id,$this->cr_id));
        =20
     }
+    function compute_key($p_key_id,$p_amount)
+    {
+        global $cn;
+        try
+        {
+            $cn->start();
+            // prend tantieme global
+            $key=3Dnew Copro_Key();
+            $key->cr_id=3D$p_key_id;
+            $key->load();
+           =20
+            bcscale(4);
+            $a_lot=3D$key->get_detail();
+            for ($i=3D0;$i<count($a_lot);$i++)
+            {
+                $afd=3Dnew Copro_Appel_Fond_Detail();
+                $afd->af_id=3D$this->id;
+                $afd->lot_id=3D$a_lot[$i]['lot_fk'];
+                $afd->key_id=3D$p_key_id;
+                $afd->key_tantieme=3D$key->cr_tantieme;
+                $afd->lot_tantieme=3D$a_lot[$i]['crd_amount'];
+               =20
+                $fract=3Dbcsub($key->cr_tantieme,$a_lot[$i]['crd_amount'=
]);
+                $afd->afd_amount=3D$fract;
+               =20
+                $afd->insert();
+               =20
+            }
+           =20
+        }
+        catch (Exception $exc)
+        {
+            echo $exc->getTraceAsString();
+            $cn->rollback();
+            throw $exc;
+        }
+    }
     function compute_amount($p_array)
     {
-        $this->type=3D"amount";
-        $this->amount=3D0;
-        $this->percent=3D1;
-        $this->bud_id=3Dnull;
-       =20
-        $this->create_key();
+        global $cn;
+        bcscale(2);
+        try
+        {
+            $this->type =3D "amount";
+            $this->af_amount =3D $p_array['amount'];
+            $this->cr_id =3D $p_array['cr_id'];
+            $this->percent =3D 1;
+            $this->b_id =3D null;
+            // req date valide
+            if (isDate($p_array['p_date']) =3D=3D null)
+                throw new Exception('La date est invalide');
+            $this->af_ledger =3D $p_array['p_jrn'];
+            $this->af_date =3D $p_array['p_date'];
+            $fiche =3D new Fiche($cn);
+            $fiche->get_by_qcode($p_array['w_categorie_appel']);
+            //  req  $fiche->id > 0
+            if ($fiche->id < 1)
+                throw new Exception("La fiche pour l'appel de fond n'exi=
ste pas");
+            $this->af_card =3D $fiche->id;
+            $this->create_key();
+            $this->compute_key($this->cr_id,$this->af_amount);
+        }
+        catch (Exception $e)
+        {
+            throw ($e);
+        }
     }
     function compute_budget($p_array)
     {
@@ -41,7 +101,7 @@
             if ( isDate($p_array['p_date'])=3D=3Dnull) throw new Excepti=
on('La date est invalide');
            =20
             $this->type=3D"budget";
-            $this->bud_id=3D$p_array['b_id'];
+            $this->b_id=3D$p_array['b_id'];
             $this->percent=3D$p_array['bud_pct'];
             $this->af_ledger=3D$p_array['p_jrn'];
             $this->af_date=3D$p_array['p_date'];
@@ -51,15 +111,38 @@
             if ( $fiche->id < 1 ) throw new Exception("La fiche pour l'a=
ppel de fond n'existe pas");
             $this->af_card=3D$fiche->id;
=20
-            $tot_bud=3D$cn->get_value('select b_amount from coprop.budge=
t where b_id=3D$1',array($this->bud_id));
+            $tot_bud=3D$cn->get_value('select b_amount from coprop.budge=
t where b_id=3D$1',array($this->b_id));
             if ($tot_bud <=3D0  ) throw new Exception ("Ce budget a un m=
ontant de 0 ");
=20
-            $this->amount=3D  bcmul($tot_bud,$this->percent);
+            $this->af_amount=3D  bcmul($tot_bud,$this->percent);
             $this->create_key();
+           =20
+            // get all the key of this budget
+            $budget=3Dnew Budget();
+            $budget->b_id=3D$this->b_id;
+           =20
+            $a_detail=3D$budget->get_detail();
+            bcscale(4);
+           =20
+            // foreach key,=20
+            for ($i=3D0;$i<count($a_detail);$i++)
+            {
+                //  compute the amount to take=20
+                $amount=3D$a_detail[$i]['bt_amount'];
+                $key=3D$a_detail[$i]['cr_id'];
+
+                // call compute_key
+                $this->compute_key($key, $amount);
+               =20
+            }
         } catch (Exception $e)
         {
             throw ($e);
         }
     }
+    function display_ledger()
+    {
+       =20
+    }
 }
 ?>



From MAILER-DAEMON Fri Jan 13 17:18:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RlpRw-0008RK-AO
	for mharc-phpcompta-dev@gnu.org; Fri, 13 Jan 2012 17:18:16 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 13 Jan 2012 23:19:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.93083.1326493095.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r289 - in trunk/coprop: . 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, 13 Jan 2012 22:18:14 -0000

Author: danydb
Date: 2012-01-13 23:19:46 +0100 (Fri, 13 Jan 2012)
New Revision: 289

Removed:
   trunk/coprop/include/class_budget.php
Modified:
   trunk/coprop/coprop-constant.php
   trunk/coprop/include/ajax_bud_display.php
   trunk/coprop/include/appel_fond.inc.php
   trunk/coprop/include/budget.inc.php
   trunk/coprop/include/class_copro_key.php
   trunk/coprop/include/class_coprop_appel_fond.php
Log:

appel de fond : calcul et sauvegarde


Modified: trunk/coprop/coprop-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/coprop/coprop-constant.php	2012-01-13 14:29:05 UTC (rev 288)
+++ trunk/coprop/coprop-constant.php	2012-01-13 22:19:46 UTC (rev 289)
@@ -9,6 +9,8 @@
=20
 require_once ('class_database.php');
 require_once 'include/class_copro_parameter.php';
+require_once 'class_acc_ledger.php';
+
 global $cn,$g_copro_parameter,$gDossier;
 $cn=3DDossier::connect();
 $gDossier=3DDossier::id();

Modified: trunk/coprop/include/ajax_bud_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/coprop/include/ajax_bud_display.php	2012-01-13 14:29:05 UTC (re=
v 288)
+++ trunk/coprop/include/ajax_bud_display.php	2012-01-13 22:19:46 UTC (re=
v 289)
@@ -2,9 +2,9 @@
 /**
  * @file montre d=C3=A9tail budget pour mise =C3=A0 jour
  */
-require_once 'class_budget.php';
+require_once 'class_copro_budget.php';
=20
-$bud=3Dnew Budget();
+$bud=3Dnew Copro_Budget();
 $bud->b_id=3D$bud_id;
 echo '<form id=3D"fbud_update" method=3D"post">';
 $bud->detail();

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-13 14:29:05 UTC (rev =
288)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-13 22:19:46 UTC (rev =
289)
@@ -45,17 +45,17 @@
                 break;
             case 1:
                 $appel_fond =3D new Coprop_Appel_Fond();
-                $error =3D $appel_fond->compute_budget($_GET);
+                $appel_fond->compute_budget($_GET);
                 break;
             case 2:
                 $appel_fond =3D new Coprop_Appel_Fond();
-                $error =3D $appel_fond->compute_amount($_GET);
+                 $appel_fond->compute_amount($_GET);
                 break;
         }
-       =20
+
         $appel_fond->display_ledger();
-       =20
-       =20
+
+
         exit();
     }
     catch (Exception $e)
@@ -63,26 +63,56 @@
         alert($e->getMessage());
     }
 }
+// save
+if ( isset($_POST['confirm']))
+{
+	$ledger=3Dnew Acc_Ledger($cn,$_POST['p_jrn']);
+	$ledger->with_concerned=3Dfalse;
+	$ledger->save($_POST);
+	echo "<h2>Op=C3=A9ration sauv=C3=A9e</h2>";
+	echo HtmlInput::detail_op($ledger->jr_id,$ledger->internal);
+	echo $ledger->input($_GET,1);
+	$appel_fond =3D new Coprop_Appel_Fond();
+	$appel_fond->id=3D$_POST['af_id'];
+	$appel_fond->confirm();
+	exit();
+}
 // Montre =C3=A9cran confirmation
+if ( isset ($_GET['save']))
+{
+	/**
+	 *@todo manque correction
+	 */
+	echo '<form method=3D"POST">';
+	$ledger=3Dnew Acc_Ledger($cn,$_GET['p_jrn']);
+	$ledger->with_concerned=3Dfalse;
+	echo $ledger->input($_GET,1);
+	echo HtmlInput::submit('confirm','Confirmer');
+	echo '</form>';
+	exit();
+}
=20
=20
-// confirmation
=20
-
 // Detail : propose de faire un appel de fond
 $date =3D new IDate('p_date');
+$date->value=3DHtmlInput::default_value('p_date',"",$_GET);
+
 $amount =3D new INum('amount');
+$amount->value=3DHtmlInput::default_value('amount',0,$_GET);
=20
 $ledger =3D new Acc_Ledger($cn, 0);
 $led_appel_fond =3D $ledger->select_ledger('ODS', 3);
-$led_appel_fond->selected =3D $g_copro_parameter->journal_appel;
+$led_appel_fond->selected =3D (isset($_GET['p_jrn']))?$_GET['p_jrn']:$g_=
copro_parameter->journal_appel;
+
 $copro =3D new ICard();
 $categorie_appel =3D new ICard();
 $categorie_appel->label =3D " Appel de fond : " . HtmlInput::infobulle(0=
);
 $categorie_appel->name =3D "w_categorie_appel";
 $categorie_appel->tabindex =3D 1;
-$categorie_appel->value =3D "";
+$categorie_appel->value =3D isset($_GET['w_categorie_appel'])?$_GET['w_c=
ategorie_appel']:"";
 $categorie_appel->table =3D 0;
+$categorie_appel->selected=3D(isset($_GET['key']))?$_GET['key']:-1;
=20
 // name of the field to update with the name of the card
 $categorie_appel->set_attribute('label', 'w_categorie_appel_label');
@@ -110,6 +140,7 @@
=20
 $key =3D new ISelect("key");
 $key->value =3D $cn->make_array("select cr_id,cr_name from coprop.clef_r=
epartition");
+$key->selected=3DHtmlInput::default_value('key',-1,$_GET);
=20
 $f_add_button =3D new IButton('add_card');
 $f_add_button->label =3D _('Nouvelle fiche ');
@@ -122,23 +153,25 @@
 // Budget
 $budget_sel =3D new ISelect("b_id");
 $budget_sel->value =3D $cn->make_array("select b_id,b_name from coprop.b=
udget order by b_name");
+$budget_sel->selected=3DHtmlInput::default_value('b_id',-1,$_GET);
=20
 // pourcentage
 $budget_pct =3D new INum("bud_pct", 0);
+$budget_pct->value=3DHtmlInput::default_value('bud_pct',0,$_GET);
=20
 // select between budget or amount
 $appel_fond_type =3D new ISelect("aft");
 $appel_fond_type->value =3D array(
     array("value" =3D> -1, 'label' =3D> 'Faites votre choix'),
-    array("value" =3D> 1, 'label' =3D> 'Appel de fond d\'budget'),
+    array("value" =3D> 1, 'label' =3D> 'Appel de fond par budget'),
     array("value" =3D> 2, 'label' =3D> 'Appel de fond par montant')
 );
 $onchange =3D " onchange=3D\"appel_fond_show() \"";
 $appel_fond_type->javascript =3D $onchange;
+$appel_fond_type->selected=3DHtmlInput::default_value('aft',-1,$_GET);
=20
-
 echo '<form method=3D"get">';
-echo HtmlInput::request_to_hidden(array('ac', 'plugin_code', 'sa'));
+echo HtmlInput::request_to_hidden(array('ac', 'plugin_code', 'sa','gDoss=
ier'));
 require_once 'template/appel_fond.php';
 echo HtmlInput::submit('calc', "Calculer");
 echo '</form>';

Modified: trunk/coprop/include/budget.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/coprop/include/budget.inc.php	2012-01-13 14:29:05 UTC (rev 288)
+++ trunk/coprop/include/budget.inc.php	2012-01-13 22:19:46 UTC (rev 289)
@@ -4,8 +4,8 @@
  * @file gestion des budgets
  */
=20
-require_once 'class_budget.php';
-$bud=3Dnew Budget();
+require_once 'class_copro_budget.php';
+$bud=3Dnew Copro_Budget();
=20
 if ( isset ($_POST['bud_update']))
 {

Deleted: trunk/coprop/include/class_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_budget.php	2012-01-13 14:29:05 UTC (rev 28=
8)
+++ trunk/coprop/include/class_budget.php	2012-01-13 22:19:46 UTC (rev 28=
9)
@@ -1,322 +0,0 @@
-<?php
-
-
-class Budget
-{
-    function to_list()
-    {
-        global $cn;
-
-        $array=3D$cn->get_array("select b_id, b_name,
-                    to_char(b_start,'DD.MM.YYYY') as str_start,
-                    to_char(b_end,'DD.MM.YYYY') as str_end,
-                    b_amount
-                    from coprop.budget
-                    order by b_name
-                    ");
-
-        require_once 'template/budget_list.php';
-
-    }
-	function load()
-	{
-		global $cn;
-		try
-		{
-			if ($this->b_id =3D=3D '') throw new Exception("Aucun budget demand=C3=
=A9");
-			$array=3D$cn->get_array("select b_id,b_name,b_start,b_end,b_amount,
-				to_char(b_start,'DD.MM.YYYY') as str_b_start,
-				to_char(b_end,'DD.MM.YYYY') as str_b_end
-				from coprop.budget where b_id=3D$1",array($this->b_id));
-			if ($cn->count() =3D=3D 1)
-			{
-				$this->b_name=3D$array[0]['b_name'];
-				$this->b_start=3D$array[0]['b_start'];
-				$this->str_b_start=3D$array[0]['str_b_start'];
-				$this->b_end=3D$array[0]['b_end'];
-				$this->str_b_end=3D$array[0]['str_b_end'];
-				$this->b_amount=3D$array[0]['b_amount'];
-			}
-			else
-				throw new Exception ('Aucun budget trouv=C3=A9');
-		} catch (Exception $e)
-		{
-			echo $e->getTraceAsString();
-			throw $e;
-		}
-	}
-	/**
-	 *Detail d'un budget avec les d=C3=A9tails, pour mettre =C3=A0 jour
-	 * @global type $cn
-	 * @throws Exception
-	 */
-    function detail()
-    {
-        global $cn;
-        try
-        {
-
-            if ( ! isset ($this->b_id)|| trim($this->b_id)=3D=3D'')
-                    throw new Exception ("Aucun budget demand=C3=A9");
-			$name=3Dnew IText('b_name');
-			if ($this->b_id <> 0)
-			{
-				$this->load();
-				$name->value=3D$this->b_name;
-				$start=3Dnew IDate('b_start',$this->str_b_start);
-				$end=3Dnew IDate('b_end',$this->str_b_end);
-				$amount=3Dnew INum('b_amount',round($this->b_amount,2));
-
-			}	else {
-				$start=3Dnew IDate('b_start');
-				$end=3Dnew IDate('b_end');
-				$amount=3Dnew INum('b_amount',0);
-
-			}
-			$amount->javascript=3D'onchange=3D"format_number(this,2);compute_budg=
et();"';
-			$bud_amount=3D$amount->value;
-
-			echo HtmlInput::hidden("b_id",$this->b_id);
-			echo HtmlInput::request_to_hidden(array('gDossier','ac','plugin_code'=
,'sa'));
-			require_once 'template/budget.php';
-
-            $array=3D$cn->get_array("select bt_label,
-							bt_id,bt_amount,f_id,vw_name,quick_code,cr_name,cr_id
-                from coprop.budget_detail
-                join coprop.clef_repartition using (cr_id)
-                join vw_fiche_attr using (f_id)
-                where b_id=3D$1",array($this->b_id));
-            $a_input=3Darray();
-            $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D2");
-
-			$a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.clef_repa=
rtition order by cr_name");
-			$max=3Dcount($array);
-            for ($i=3D0;$i<MAXROWBUD;$i++)
-            {
-				$label=3Dnew IText('bt_label[]');
-				$label->value=3D($i>=3D$max)?"":$array[$i]['bt_label'];
-
-                $card=3Dnew ICard('f_id'.$i);
-                $card->value=3D($i>=3D$max)?"":$array[$i]['quick_code'];
-                $card->table=3D0;
-
-                 // name of the field to update with the name of the car=
d
-                $card->set_attribute('label','w_card_label'.$i);
-
-                // Type of card : deb, cred,
-                $card->set_attribute('typecard',$fiche_dep);
-
-                $card->extra=3D$fiche_dep;
-
-                // Add the callback function to filter the card on the j=
rn
-                $card->set_callback('filter_card');
-                $card->set_attribute('ipopup','ipopcard');
-                // when value selected in the autcomplete
-                  $card->set_function('fill_data');
-
-                // when the data change
-
-                  $card->javascript=3Dsprintf(' onchange=3D"fill_data_on=
change(\'%s\');" ',
-                            $card->name);
-                  $card->set_dblclick("fill_ipopcard(this);");
-
-                  $card_label=3Dnew ISpan();
-                  $card_label->table=3D0;
-                  $f_card_label=3D$card_label->input("w_card_label".$i,"=
");
-
-                // Search button for card
-                $f_card_bt=3D$card->search();
-
-                $amount=3Dnew INum("bt_amount[]");
-                $amount->value=3D($i>=3D$max)?"":round($array[$i]['bt_am=
ount'],2);
-				$amount->javascript=3D'onchange=3D"format_number(this,2);compute_bud=
get();"';
-                $hidden=3D($i>=3D$max)?HtmlInput::hidden("bt_id[]",0):Ht=
mlInput::hidden("bt_id[]",$array[$i]["bt_id"]);
-				echo $hidden;
-
-                $ikey=3Dnew ISelect("key[]");
-                $ikey->value=3D$a_key;
-                $ikey->selected=3D($i>=3D$max)?0:$array[$i]['cr_id'];
-
-                $a_input[$i]["amount"]=3D$amount->input();
-                $a_input[$i]["hidden"]=3D$hidden;
-                $a_input[$i]["card"]=3D$card->input().$f_card_bt;
-                $a_input[$i]["card_label"]=3D$label->input();
-
-                $a_input[$i]['key']=3D$ikey->input();
-
-            }
-            require_once 'template/bud_detail.php';
-			echo create_script("compute_budget()");
-        }
-        catch (Exception $e)
-        {
-            $e->getTraceAsString();
-			throw $e;
-        }
-    }
-	/**
-	 *@brief insert or update a new budget
-	 * @param $p_array
-	 *   - b_id
-	 *   - b_name
-	 *   - b_start
-	 *   - b_end
-	 *   - b_amount
-	 *   - f_idX  -> qcode
-	 *   - key[X]
-	 *   - bt_amount[X]
-	 *   - p_jrn
-	 *   - bt_id[X]
-	 */
-	function save($p_array)
-	{
-		try{
-			$this->b_id=3D$p_array['b_id'];
-			if ( $p_array['b_id'] =3D=3D 0 )
-			{
-				$this->insert($p_array);
-				$this->save_detail($p_array);
-			} else {
-				$this->update($p_array);
-				$this->save_detail($p_array);
-			}
-		}
-		catch( Exception $e){
-			throw $e;
-		}
-	}
-	/**
-	 *@brief update budget
-	 */
-	function update($p_array)
-	{
-		global $cn;
-		try {
-			extract ($p_array);
-			// update coprop.budget
-			$cn->exec_sql("update coprop.budget set b_name=3D$1,
-					b_start=3Dto_date($2,'DD.MM.YYYY'),
-					b_end=3Dto_date($3,'DD.MM.YYYY'),
-					b_amount=3D$4
-					where b_id=3D$5
-					",array(
-						strip_tags($b_name),
-						$b_start,
-						$b_end,
-						$b_amount,
-						$b_id
-					));
-
-
-		}
-		catch (Exception $exc) {
-			echo $exc->getTraceAsString();
-			throw $exc;
-		}
-
-	}
-	/**
-	 *@brief insert budget
-	 */
-	function insert($p_array)
-	{
-		global $cn;
-		try {
-			extract ($p_array);
-			// update coprop.budget
-			$this->b_id=3D$cn->get_value("insert into coprop.budget (b_name,b_sta=
rt,b_end,b_amount)
-				values ($1,
-					to_date($2,'DD.MM.YYYY'),
-					to_date($3,'DD.MM.YYYY'),
-					$4) returning b_id
-					",array(
-						strip_tags($b_name),
-						$b_start,
-						$b_end,
-						$b_amount
-					));
-
-
-		}
-		catch (Exception $exc) {
-			echo $exc->getTraceAsString();
-			throw $exc;
-		}
-
-	}
-	function save_detail($p_array)
-	{
-		extract($p_array);
-		global $cn;
-		try
-		{
-			$max=3Dcount($bt_id);
-			for ($i=3D0;$i<MAXROWBUD;$i++)
-			{
-
-				if ( $bt_id[$i]=3D=3D 0)
-				{
-					if ( strlen(trim(${'f_id'.$i})) !=3D 0)
-					{
-						$f_id=3D$cn->get_value("select f_id from vw_fiche_attr where quick=
_code=3Dupper(trim($1))",
-								array(${'f_id'.$i}));
-
-						// insert into coprop.budget_detail
-							$cn->exec_sql("insert into coprop.budget_detail (bt_label,f_id,b_=
id,bt_amount,cr_id) ".
-								" values ($1,$2,$3,$4,$5)",
-								array(
-									strip_tags($bt_label[$i]),
-									$f_id,
-									$this->b_id,
-									$bt_amount[$i],
-									$key[$i]
-									)
-
-							);
-					}
-				}
-				else
-				{
-					// update into coprop.budget_detail
-					if ( strlen(trim(${'f_id'.$i})) !=3D 0)
-					{
-						$f_id=3D$cn->get_value("select f_id from vw_fiche_attr where quick=
_code=3Dupper(trim($1))",
-								array(${'f_id'.$i}));
-
-						$cn->exec_sql("update coprop.budget_detail set bt_label=3D$1,f_id=3D=
$2,bt_amount=3D$3,cr_id=3D$4 ".
-								" where bt_id=3D$5",
-								array(
-									strip_tags($bt_label[$i]),
-									$f_id,
-									$bt_amount[$i],
-									$key[$i],
-									$bt_id[$i]
-									)
-
-							);
-
-					} else {
-						$cn->exec_sql("delete from coprop.budget_detail where bt_id=3D$1",=
array($bt_id[$i]));
-					}
-
-				}
-			}
-
-
-		}
-		catch (Exception $exc)
-		{
-			echo $exc->getTraceAsString();
-			throw $exc;
-		}
-
-	}
-       function get_detail()
-       {
-           global $cn;
-           $array=3D$cn->get_array("select * from coprop.budget_detail w=
here b_id=3D$1",
-                   array($this->b_id));
-           return $array;
-       }
-}
-?>

Modified: trunk/coprop/include/class_copro_key.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_key.php	2012-01-13 14:29:05 UTC (rev=
 288)
+++ trunk/coprop/include/class_copro_key.php	2012-01-13 22:19:46 UTC (rev=
 289)
@@ -20,7 +20,7 @@
 /* $Revision$ */
=20
 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
-
+require_once 'class_copro_appel_fond_detail.php';
 /**
  * @file
  * @brief G=C3=A8re les clefs
@@ -99,7 +99,7 @@
         {
             global $cn;
             $array=3D$cn->get_array("select * from coprop.clef_repartiti=
on where
-                cr_id=3D$1",$this->cr_id);
+                cr_id=3D$1",array($this->cr_id));
             if ( $cn->count() =3D=3D 1 )
             {
                 foreach ( array("cr_id","cr_name","cr_note","cr_tantieme=
") as $k=3D>$e) {

Modified: trunk/coprop/include/class_coprop_appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_coprop_appel_fond.php	2012-01-13 14:29:05 =
UTC (rev 288)
+++ trunk/coprop/include/class_coprop_appel_fond.php	2012-01-13 22:19:46 =
UTC (rev 289)
@@ -1,26 +1,43 @@
 <?php
 /**
- *@brief calcul appel de fond=20
+ *@brief calcul appel de fond
  */
 require_once 'class_copro_key.php';
 require_once 'class_copro_budget.php';
 class Coprop_Appel_Fond
 {
+	function load()
+	{
+		global $cn;
+		$array=3D$cn->get_array("SELECT af_id, to_char(af_date,'DD.MM.YYYY') a=
s af_date,
+					af_confirmed, af_percent, af_amount, af_card,
+					af_ledger, tech_per, jr_internal, b_id, cr_id
+						FROM coprop.appel_fond where af_id=3D$1",
+				array($this->id));
+
+		$var=3Darray('af_id','af_date','af_confirmed','af_percent','af_amount'=
,'af_card','af_ledger','tech_per','jr_internal','b_id','cr_id');
+		for ($i=3D0;$i<count($array);$i++)
+		{
+			$idx=3D$var[$i];
+			$this->$idx=3D$array[0][$idx];
+		}
+
+	}
     /**
-     *@brief create a key to save the data in DB=20
+     *@brief create a key to save the data in DB
      */
     function create_key()
     {
         global $cn;
-        $this->id=3D$cn->get_next_seq('appel_fond_id');
+        $this->id=3D$cn->get_next_seq('coprop.appel_fond_id');
         // clean old
-        $this->exec_sql("delete from coprop.appel_fond where af_confirme=
d=3D'N' and tech_per < tech_per - interval '5 hours' )");
-       =20
+        $cn->exec_sql("delete from coprop.appel_fond where af_confirmed=3D=
'N' and tech_per < tech_per - interval '5 hours' ");
+
         // insert new unconfirmed
         $cn->exec_sql("insert into coprop.appel_fond(af_id,af_date,af_co=
nfirmed,af_percent,af_amount,af_card,af_ledger,tech_per,b_id,cr_id)
-                values ($1,to_date($2,'DD.MM.YYYY','N',$3,$4,$5,$6,$7,no=
w()),$8",
-                array($this->id,$this->af_date,$this->percent,$this->amo=
unt,$this->af_card,$this->af_ledger,$this->b_id,$this->cr_id));
-       =20
+                values ($1,to_date($2,'DD.MM.YYYY'),'N',$3,$4,$5,$6,now(=
),$7,$8)",
+                array($this->id,$this->af_date,$this->af_percent,$this->=
af_amount,$this->af_card,$this->af_ledger,$this->b_id,$this->cr_id));
+
     }
     function compute_key($p_key_id,$p_amount)
     {
@@ -32,7 +49,7 @@
             $key=3Dnew Copro_Key();
             $key->cr_id=3D$p_key_id;
             $key->load();
-           =20
+
             bcscale(4);
             $a_lot=3D$key->get_detail();
             for ($i=3D0;$i<count($a_lot);$i++)
@@ -43,14 +60,15 @@
                 $afd->key_id=3D$p_key_id;
                 $afd->key_tantieme=3D$key->cr_tantieme;
                 $afd->lot_tantieme=3D$a_lot[$i]['crd_amount'];
-               =20
-                $fract=3Dbcsub($key->cr_tantieme,$a_lot[$i]['crd_amount'=
]);
-                $afd->afd_amount=3D$fract;
-               =20
+
+                $fract=3D  bcdiv($a_lot[$i]['crd_amount'],$key->cr_tanti=
eme);
+
+                $afd->afd_amount=3D  bcmul($fract,$p_amount);
+
                 $afd->insert();
-               =20
+
             }
-           =20
+			$cn->commit();
         }
         catch (Exception $exc)
         {
@@ -62,13 +80,13 @@
     function compute_amount($p_array)
     {
         global $cn;
-        bcscale(2);
+        bcscale(4);
         try
         {
             $this->type =3D "amount";
             $this->af_amount =3D $p_array['amount'];
-            $this->cr_id =3D $p_array['cr_id'];
-            $this->percent =3D 1;
+            $this->cr_id =3D $p_array['key'];
+            $this->af_percent =3D 1;
             $this->b_id =3D null;
             // req date valide
             if (isDate($p_array['p_date']) =3D=3D null)
@@ -92,17 +110,17 @@
     function compute_budget($p_array)
     {
         global $cn;
-        bcscale(2);
-        try=20
+        bcscale(4);
+        try
         {
             // req bud_pct <=3D 1 && bud_pct > 0
             if ($p_array['bud_pct'] > 1 || $p_array['bud_pct']<0 ) throw=
 new Exception ('Pourcentage incorrect');
             // req date valide
             if ( isDate($p_array['p_date'])=3D=3Dnull) throw new Excepti=
on('La date est invalide');
-           =20
+
             $this->type=3D"budget";
             $this->b_id=3D$p_array['b_id'];
-            $this->percent=3D$p_array['bud_pct'];
+            $this->af_percent=3D$p_array['bud_pct'];
             $this->af_ledger=3D$p_array['p_jrn'];
             $this->af_date=3D$p_array['p_date'];
             $fiche=3Dnew Fiche($cn);
@@ -110,30 +128,31 @@
             //  req  $fiche->id > 0
             if ( $fiche->id < 1 ) throw new Exception("La fiche pour l'a=
ppel de fond n'existe pas");
             $this->af_card=3D$fiche->id;
+			$this->cr_id=3Dnull;
=20
             $tot_bud=3D$cn->get_value('select b_amount from coprop.budge=
t where b_id=3D$1',array($this->b_id));
             if ($tot_bud <=3D0  ) throw new Exception ("Ce budget a un m=
ontant de 0 ");
=20
-            $this->af_amount=3D  bcmul($tot_bud,$this->percent);
+            $this->af_amount=3D  bcmul($tot_bud,$this->af_percent);
             $this->create_key();
-           =20
+
             // get all the key of this budget
-            $budget=3Dnew Budget();
+            $budget=3Dnew Copro_Budget();
             $budget->b_id=3D$this->b_id;
-           =20
+
             $a_detail=3D$budget->get_detail();
             bcscale(4);
-           =20
-            // foreach key,=20
+
+            // foreach key,
             for ($i=3D0;$i<count($a_detail);$i++)
             {
-                //  compute the amount to take=20
-                $amount=3D$a_detail[$i]['bt_amount'];
+                //  compute the amount to take
+                $amount=3D  bcmul($a_detail[$i]['bt_amount'],$this->af_p=
ercent);
                 $key=3D$a_detail[$i]['cr_id'];
=20
                 // call compute_key
                 $this->compute_key($key, $amount);
-               =20
+
             }
         } catch (Exception $e)
         {
@@ -141,8 +160,53 @@
         }
     }
     function display_ledger()
-    {
-       =20
-    }
+	{
+		global $cn;
+		$ledger =3D new Acc_Ledger($cn,0);
+		$this->load();
+		$adetail =3D $cn->get_array("
+			select sum(afd_amount) as amount,S.coprop_id
+				from coprop.appel_fond_detail as A
+				join coprop.summary as S on (S.lot_id::numeric=3DA.lot_id)
+			where af_id=3D$1 group by S.coprop_id", array($this->id));
+		$array[] =3D array();
+
+		$array['e_date'] =3D $this->af_date;
+		$array['p_jrn'] =3D $this->af_ledger;
+		$array['desc']=3D"Appel de fond";
+		$fiche=3Dnew Fiche($cn,$this->af_card);
+		$array['qc_0']=3D$fiche->get_quick_code();
+		$array['amount0']=3D$this->af_amount;
+		$array['nb']=3Dcount($adetail);
+
+		for ($i=3D0;$i<count($adetail);$i++){
+			$idx=3D$i+1;
+			$fiche=3Dnew Fiche($cn,$adetail[$i]['coprop_id']);
+			$array['qc_'.$idx]=3D$fiche->get_quick_code();
+			$array['amount'.$idx]=3Dround($adetail[$i]['amount'],2);
+			$array['ck'.$idx]=3D1;
+		}
+
+		echo '<FORM METHOD=3D"GET" class=3D"print">';
+		echo $ledger->input($array,0);
+		echo HtmlInput::request_to_hidden(array('ac', 'plugin_code','sa'));
+		echo HtmlInput::extension() . dossier::hidden();
+		echo HtmlInput::hidden('action', 'confirm');
+		echo HtmlInput::hidden('af_id', $this->id);
+		echo HtmlInput::submit('save', 'Sauve');
+		echo HtmlInput::button('add', _('Ajout d\'une ligne'), 'onClick=3D"qui=
ck_writing_add_row()"');
+		echo '</form>';
+		echo '<div class=3D"info">' .
+		_('D=C3=A9bit') . ' =3D <span id=3D"totalDeb"></span>  ' .
+		_('Cr=C3=A9dit') . ' =3D <span id=3D"totalCred"></span>  ' .
+		_('Difference') . ' =3D <span id=3D"totalDiff"></span></div> ';
+		echo "<script>checkTotalDirect();</script>";
+		echo '</div>';
+	}
+	function confirm()
+	{
+		global $cn;
+		$cn->exec_sql("update coprop.appel_fond set af_confirmed=3D'Y' where a=
f_id=3D$1",array($this->id));
+	}
 }
 ?>



From MAILER-DAEMON Sat Jan 14 07:27:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rm2hW-0005Yy-Ou
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Jan 2012 07:27:14 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Jan 2012 13:28:46 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.93844.1326544033.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4713 - 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 Jan 2012 12:27:13 -0000

Author: danydb
Date: 2012-01-14 13:28:45 +0100 (Sat, 14 Jan 2012)
New Revision: 4713

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
Log:
get bigger label ODS

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	2012-01-10 20:45:28 UTC =
(rev 4712)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-14 12:28:45 UTC =
(rev 4713)
@@ -1560,7 +1560,7 @@
         }
         $wPJ=3Dnew IText('e_pj');
         $wPJ->readonly=3Dfalse;
-        $wPJ->size=3D10;
+        $wPJ->size=3D40;
=20
         /* suggest PJ ? */
         $default_pj=3D'';



From MAILER-DAEMON Sat Jan 14 07:30:33 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rm2kj-0005in-5T
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Jan 2012 07:30:33 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Jan 2012 13:32:10 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.93845.1326544232.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4714 - 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 Jan 2012 12:30:31 -0000

Author: danydb
Date: 2012-01-14 13:32:09 +0100 (Sat, 14 Jan 2012)
New Revision: 4714

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
Log:
get bigger label ODS

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	2012-01-14 12:28:45 UTC =
(rev 4713)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-14 12:32:09 UTC =
(rev 4714)
@@ -1560,7 +1560,7 @@
         }
         $wPJ=3Dnew IText('e_pj');
         $wPJ->readonly=3Dfalse;
-        $wPJ->size=3D40;
+        $wPJ->size=3D10;
=20
         /* suggest PJ ? */
         $default_pj=3D'';
@@ -1576,12 +1576,14 @@
         $ret.=3D '</tr>';
         $ret.=3D '</td>';
=20
-        $ret.=3D '<tr><td >'._('Libell=C3=A9');
+        $ret.=3D '<tr>'
+        $ret.=3D'<td colspan=3D"2" style=3D"width:auto">';
+	$ret.=3D_('Libell=C3=A9');
         $wDescription=3Dnew IText('desc');
         $wDescription->readonly=3D$p_readonly;
-        $wDescription->css_size=3D"100%";
+        $wDescription->size=3D"50";
         $wDescription->value=3D(isset($desc))?$desc:'';
-        $ret.=3D'<td colspan=3D"2" style=3D"width:auto">';
+
         $ret.=3D$wDescription->input();
         $ret.=3D '</td>';
         $ret.=3D'</tr>';



From MAILER-DAEMON Sat Jan 14 07:32:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rm2mu-0005pV-CN
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Jan 2012 07:32:48 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Jan 2012 13:34:26 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.93848.1326544367.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4715 - 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 Jan 2012 12:32:47 -0000

Author: danydb
Date: 2012-01-14 13:34:26 +0100 (Sat, 14 Jan 2012)
New Revision: 4715

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
Log:
cosmetic ODS label bigger


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	2012-01-14 12:32:09 UTC =
(rev 4714)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-14 12:34:26 UTC =
(rev 4715)
@@ -1576,7 +1576,7 @@
         $ret.=3D '</tr>';
         $ret.=3D '</td>';
=20
-        $ret.=3D '<tr>'
+        $ret.=3D '<tr>';
         $ret.=3D'<td colspan=3D"2" style=3D"width:auto">';
 	$ret.=3D_('Libell=C3=A9');
         $wDescription=3Dnew IText('desc');



From MAILER-DAEMON Sat Jan 14 09:37:40 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rm4jk-0005Vh-CM
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Jan 2012 09:37:40 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Jan 2012 15:39:16 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.93978.1326551858.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4716 - 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 Jan 2012 14:37:38 -0000

Author: danydb
Date: 2012-01-14 15:39:16 +0100 (Sat, 14 Jan 2012)
New Revision: 4716

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
Log:
code clean

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	2012-01-14 12:34:26 UTC =
(rev 4715)
+++ phpcompta/trunk/include/class_acc_ledger.php	2012-01-14 14:39:16 UTC =
(rev 4716)
@@ -1631,8 +1631,7 @@
                                             $quick_code->name);
=20
             $quick_code->jrn=3D$this->id;
-            $quick_code->value=3D(isset(${'qc_'.$i}))?${'qc_'.$i}:""
-                               ;
+            $quick_code->value=3D(isset(${'qc_'.$i}))?${'qc_'.$i}:"";
             $quick_code->readonly=3D$p_readonly;
=20
             $label=3D'';



From MAILER-DAEMON Sat Jan 14 09:38:08 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rm4kC-0006Et-M5
	for mharc-phpcompta-dev@gnu.org; Sat, 14 Jan 2012 09:38:08 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sat, 14 Jan 2012 15:39:38 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.93979.1326551887.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4717 - 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, 14 Jan 2012 14:38:07 -0000

Author: danydb
Date: 2012-01-14 15:39:38 +0100 (Sat, 14 Jan 2012)
New Revision: 4717

Modified:
   phpcompta/trunk/include/class_acc_ledger_fin.php
   phpcompta/trunk/include/template/form_ledger_fin.php
Log:
Cosmetic=20

Modified: phpcompta/trunk/include/class_acc_ledger_fin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_fin.php	2012-01-14 14:39:16 =
UTC (rev 4716)
+++ phpcompta/trunk/include/class_acc_ledger_fin.php	2012-01-14 14:39:38 =
UTC (rev 4717)
@@ -311,23 +311,12 @@
         {
             $tiers=3D(isset(${"e_other".$i}))?${"e_other".$i}:""
                    ;
-            $tiers_label=3D"";
             $tiers_amount=3D(isset(${"e_other$i"."_amount"}))?round(${"e=
_other$i"."_amount"},2):0;
=20
             $tiers_comment=3D(isset (${"e_other$i"."_comment"}))?${"e_ot=
her$i"."_comment"}:""
                            ;
-            // If $tiers has a value
-            if ( $tiers !=3D ""  )
-            {
-                $fTiers=3Dnew Fiche($this->db);
-                $fTiers->get_by_qcode($tiers);
+            ${"e_other$i"."_amount"}=3D(isset (${"e_other$i"."_amount"})=
)?${"e_other$i"."_amount"}:0;
=20
-                $tiers_label=3D$fTiers->strAttribut(ATTR_DEF_NAME);
-
-            }
-            ${"e_other$i"."_amount"}=3D(isset (${"e_other$i"."_amount"})=
)?${"e_other$i"."_amount"}:
-                                     0;
-
             $W1=3Dnew ICard();
             $W1->label=3D"";
             $W1->name=3D"e_other".$i;
@@ -338,7 +327,7 @@
             $W1->set_attribute('ipopup','ipopcard');
=20
             // name of the field to update with the name of the card
-            $W1->set_attribute('label','e_other'.$i.'_label');
+            $W1->set_attribute('label','e_other'.$i.'_comment');
             // name of the field to update with the name of the card
             $W1->set_attribute('typecard','filter');
             // Add the callback function to filter the card on the jrn
@@ -350,9 +339,6 @@
             $array[$i]['qcode']=3D$W1->input();
             $array[$i]['search']=3D$W1->search();
=20
-            // label
-            $other=3Dnew ISpan("e_other$i"."_label", $tiers_label);
-            $array[$i]['span']=3D$other->input();
             // Comment
             $wComment=3Dnew IText("e_other$i"."_comment",$tiers_comment)=
;
=20
@@ -477,7 +463,7 @@
         //-------------------------------------------------
         $r.=3D'<TABLE style=3D"width:100%" id=3D"fin_item">';
         $r.=3D"<TR>";
-        $r.=3D"<th colspan=3D\"2\">code</TH>";
+        $r.=3D"<th colspan=3D\"2\">Nom</TH>";
         $r.=3D"<th>Commentaire</TH>";
         $r.=3D"<th style=3D\"text-align:right\">Montant</TH>";
         $r.=3D'<th colspan=3D"2"> Op. Concern&eacute;e(s)</th>';
@@ -519,7 +505,6 @@
=20
             $r.=3D"<TR><td>".${'e_other'.$i}."</TD>";
             // label
-            $other=3Dnew ISpan();
             $r.=3D'<TD style=3D"width:25%;border-bottom:1px dotted grey;=
">';
             $r.=3D$fTiers->strAttribut(ATTR_DEF_NAME);
             $r.=3D'</td>';

Modified: phpcompta/trunk/include/template/form_ledger_fin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/form_ledger_fin.php	2012-01-14 14:39=
:16 UTC (rev 4716)
+++ phpcompta/trunk/include/template/form_ledger_fin.php	2012-01-14 14:39=
:38 UTC (rev 4717)
@@ -30,7 +30,6 @@
 <? foreach ($array as $item) {
 echo '<tr>';
 echo td($item['qcode'].$item['search']);
-echo td($item['span']);
 echo td($item['comment']);
 echo td($item['amount']);
 echo td($item['concerned']);



From MAILER-DAEMON Mon Jan 16 04:48:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RmjBT-0004DN-7M
	for mharc-phpcompta-dev@gnu.org; Mon, 16 Jan 2012 04:48:59 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 16 Jan 2012 10:50:08 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.97066.1326707337.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r290 - trunk/coprop/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: Mon, 16 Jan 2012 09:48:55 -0000

Author: danydb
Date: 2012-01-16 10:50:08 +0100 (Mon, 16 Jan 2012)
New Revision: 290

Modified:
   trunk/coprop/sql/trunk_dev.sql
Log:
update database

Modified: trunk/coprop/sql/trunk_dev.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/coprop/sql/trunk_dev.sql	2012-01-13 22:19:46 UTC (rev 289)
+++ trunk/coprop/sql/trunk_dev.sql	2012-01-16 09:50:08 UTC (rev 290)
@@ -2,9 +2,7 @@
 -- PostgreSQL database dump
 --
=20
--- Dumped from database version 9.0.4
--- Dumped by pg_dump version 9.0.4
--- Started on 2011-12-27 13:17:14 CET
+-- Started on 2012-01-16 10:49:01 CET
=20
 SET statement_timeout =3D 0;
 SET client_encoding =3D 'UTF8';
@@ -14,7 +12,7 @@
 SET escape_string_warning =3D off;
=20
 --
--- TOC entry 8 (class 2615 OID 7283076)
+-- TOC entry 8 (class 2615 OID 194375)
 -- Name: coprop; Type: SCHEMA; Schema: -; Owner: -
 --
=20
@@ -23,40 +21,439 @@
=20
 SET search_path =3D coprop, pg_catalog;
=20
+--
+-- TOC entry 93 (class 1255 OID 195141)
+-- Dependencies: 8 712
+-- Name: budget_check_date(); Type: FUNCTION; Schema: coprop; Owner: -
+--
+
+CREATE FUNCTION budget_check_date() RETURNS trigger
+    LANGUAGE plpgsql
+    AS $$declare
+	n_check int;
+
+begin
+	n_check :=3D comptaproc.find_periode(to_char (NEW.b_start,'DD.MM.YYYY')=
);
+	if  n_check =3D -1 then
+		raise exception '% n''est pas une date comprise dans les p=C3=A9riodes=
 d=C3=A9finies',NEW.b_start;
+		return null;
+	end if;
+	n_check :=3D comptaproc.find_periode(to_char (NEW.b_end,'DD.MM.YYYY'));
+	if  n_check =3D -1 then
+		raise exception '% n''est pas une date comprise dans les p=C3=A9riodes=
 d=C3=A9finies',NEW.b_end;
+		return null;
+	end if;
+	return NEW;
+
+end;
+$$;
+
+
+SET default_tablespace =3D '';
+
 SET default_with_oids =3D false;
=20
 --
--- TOC entry 2090 (class 1259 OID 7283087)
+-- TOC entry 2081 (class 1259 OID 195968)
+-- Dependencies: 2384 2385 2386 2387 8
+-- Name: appel_fond; Type: TABLE; Schema: coprop; Owner: -; Tablespace:=20
+--
+
+CREATE TABLE appel_fond (
+    af_id bigint NOT NULL,
+    af_date date NOT NULL,
+    af_confirmed character(1) DEFAULT 'N'::bpchar NOT NULL,
+    af_percent numeric(4,2) DEFAULT 0 NOT NULL,
+    af_amount numeric(20,4) DEFAULT 0 NOT NULL,
+    af_card bigint,
+    af_ledger bigint,
+    tech_per timestamp with time zone DEFAULT now() NOT NULL,
+    jr_internal text,
+    b_id bigint,
+    cr_id bigint
+);
+
+
+--
+-- TOC entry 2433 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: TABLE appel_fond; Type: COMMENT; Schema: coprop; Owner: -
+--
+
+COMMENT ON TABLE appel_fond IS 'appel de fond';
+
+
+--
+-- TOC entry 2434 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.af_date; Type: COMMENT; Schema: coprop; Owner=
: -
+--
+
+COMMENT ON COLUMN appel_fond.af_date IS 'date de l''appel de fond';
+
+
+--
+-- TOC entry 2435 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.af_confirmed; Type: COMMENT; Schema: coprop; =
Owner: -
+--
+
+COMMENT ON COLUMN appel_fond.af_confirmed IS 'confirm=C3=A9 ou temp (Y/N=
)';
+
+
+--
+-- TOC entry 2436 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.af_percent; Type: COMMENT; Schema: coprop; Ow=
ner: -
+--
+
+COMMENT ON COLUMN appel_fond.af_percent IS '% sur le budget';
+
+
+--
+-- TOC entry 2437 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.af_amount; Type: COMMENT; Schema: coprop; Own=
er: -
+--
+
+COMMENT ON COLUMN appel_fond.af_amount IS 'montant donn=C3=A9 ou calcul=C3=
=A9';
+
+
+--
+-- TOC entry 2438 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.af_card; Type: COMMENT; Schema: coprop; Owner=
: -
+--
+
+COMMENT ON COLUMN appel_fond.af_card IS 'fiche appel fond';
+
+
+--
+-- TOC entry 2439 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.af_ledger; Type: COMMENT; Schema: coprop; Own=
er: -
+--
+
+COMMENT ON COLUMN appel_fond.af_ledger IS 'journal pour enregistrer af';
+
+
+--
+-- TOC entry 2440 (class 0 OID 0)
+-- Dependencies: 2081
+-- Name: COLUMN appel_fond.jr_internal; Type: COMMENT; Schema: coprop; O=
wner: -
+--
+
+COMMENT ON COLUMN appel_fond.jr_internal IS 'op=C3=A9ration correspondan=
te';
+
+
+--
+-- TOC entry 2083 (class 1259 OID 196004)
 -- Dependencies: 8
--- Name: clef_repartition; Type: TABLE; Schema: coprop; Owner: -
+-- Name: appel_fond_detail; Type: TABLE; Schema: coprop; Owner: -; Table=
space:=20
 --
=20
+CREATE TABLE appel_fond_detail (
+    afd_id integer NOT NULL,
+    af_id bigint NOT NULL,
+    lot_id bigint NOT NULL,
+    key_id bigint NOT NULL,
+    afd_amount numeric(20,4),
+    key_tantieme numeric(20,4),
+    lot_tantieme numeric(20,4)
+);
+
+
+--
+-- TOC entry 2441 (class 0 OID 0)
+-- Dependencies: 2083
+-- Name: TABLE appel_fond_detail; Type: COMMENT; Schema: coprop; Owner: =
-
+--
+
+COMMENT ON TABLE appel_fond_detail IS 'detail af';
+
+
+--
+-- TOC entry 2442 (class 0 OID 0)
+-- Dependencies: 2083
+-- Name: COLUMN appel_fond_detail.af_id; Type: COMMENT; Schema: coprop; =
Owner: -
+--
+
+COMMENT ON COLUMN appel_fond_detail.af_id IS 'appel de fond';
+
+
+--
+-- TOC entry 2443 (class 0 OID 0)
+-- Dependencies: 2083
+-- Name: COLUMN appel_fond_detail.key_tantieme; Type: COMMENT; Schema: c=
oprop; Owner: -
+--
+
+COMMENT ON COLUMN appel_fond_detail.key_tantieme IS 'tanti=C3=A8me de la=
 clef';
+
+
+--
+-- TOC entry 2444 (class 0 OID 0)
+-- Dependencies: 2083
+-- Name: COLUMN appel_fond_detail.lot_tantieme; Type: COMMENT; Schema: c=
oprop; Owner: -
+--
+
+COMMENT ON COLUMN appel_fond_detail.lot_tantieme IS 'tantieme du lot';
+
+
+--
+-- TOC entry 2082 (class 1259 OID 196002)
+-- Dependencies: 2083 8
+-- Name: appel_fond_detail_afd_id_seq; Type: SEQUENCE; Schema: coprop; O=
wner: -
+--
+
+CREATE SEQUENCE appel_fond_detail_afd_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MAXVALUE
+    NO MINVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2445 (class 0 OID 0)
+-- Dependencies: 2082
+-- Name: appel_fond_detail_afd_id_seq; Type: SEQUENCE OWNED BY; Schema: =
coprop; Owner: -
+--
+
+ALTER SEQUENCE appel_fond_detail_afd_id_seq OWNED BY appel_fond_detail.a=
fd_id;
+
+
+--
+-- TOC entry 2446 (class 0 OID 0)
+-- Dependencies: 2082
+-- Name: appel_fond_detail_afd_id_seq; Type: SEQUENCE SET; Schema: copro=
p; Owner: -
+--
+
+SELECT pg_catalog.setval('appel_fond_detail_afd_id_seq', 15, true);
+
+
+--
+-- TOC entry 2084 (class 1259 OID 196046)
+-- Dependencies: 8
+-- Name: appel_fond_id; Type: SEQUENCE; Schema: coprop; Owner: -
+--
+
+CREATE SEQUENCE appel_fond_id
+    START WITH 1
+    INCREMENT BY 1
+    NO MAXVALUE
+    NO MINVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2447 (class 0 OID 0)
+-- Dependencies: 2084
+-- Name: appel_fond_id; Type: SEQUENCE SET; Schema: coprop; Owner: -
+--
+
+SELECT pg_catalog.setval('appel_fond_id', 1, true);
+
+
+--
+-- TOC entry 2077 (class 1259 OID 195110)
+-- Dependencies: 2380 2381 8
+-- Name: budget; Type: TABLE; Schema: coprop; Owner: -; Tablespace:=20
+--
+
+CREATE TABLE budget (
+    b_id integer NOT NULL,
+    b_name text,
+    b_start date NOT NULL,
+    b_end date NOT NULL,
+    b_amount numeric(20,4) DEFAULT 0 NOT NULL,
+    CONSTRAINT ck_date CHECK ((b_end > b_start))
+);
+
+
+--
+-- TOC entry 2448 (class 0 OID 0)
+-- Dependencies: 2077
+-- Name: TABLE budget; Type: COMMENT; Schema: coprop; Owner: -
+--
+
+COMMENT ON TABLE budget IS 'Budget parent';
+
+
+--
+-- TOC entry 2449 (class 0 OID 0)
+-- Dependencies: 2077
+-- Name: COLUMN budget.b_name; Type: COMMENT; Schema: coprop; Owner: -
+--
+
+COMMENT ON COLUMN budget.b_name IS 'nom budget';
+
+
+--
+-- TOC entry 2450 (class 0 OID 0)
+-- Dependencies: 2077
+-- Name: COLUMN budget.b_amount; Type: COMMENT; Schema: coprop; Owner: -
+--
+
+COMMENT ON COLUMN budget.b_amount IS 'Budget total';
+
+
+--
+-- TOC entry 2076 (class 1259 OID 195108)
+-- Dependencies: 8 2077
+-- Name: budget_b_id_seq; Type: SEQUENCE; Schema: coprop; Owner: -
+--
+
+CREATE SEQUENCE budget_b_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MAXVALUE
+    NO MINVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2451 (class 0 OID 0)
+-- Dependencies: 2076
+-- Name: budget_b_id_seq; Type: SEQUENCE OWNED BY; Schema: coprop; Owner=
: -
+--
+
+ALTER SEQUENCE budget_b_id_seq OWNED BY budget.b_id;
+
+
+--
+-- TOC entry 2452 (class 0 OID 0)
+-- Dependencies: 2076
+-- Name: budget_b_id_seq; Type: SEQUENCE SET; Schema: coprop; Owner: -
+--
+
+SELECT pg_catalog.setval('budget_b_id_seq', 8, true);
+
+
+--
+-- TOC entry 2079 (class 1259 OID 195121)
+-- Dependencies: 2383 8
+-- Name: budget_detail; Type: TABLE; Schema: coprop; Owner: -; Tablespac=
e:=20
+--
+
+CREATE TABLE budget_detail (
+    bt_id integer NOT NULL,
+    bt_label character varying(60) NOT NULL,
+    f_id bigint NOT NULL,
+    b_id bigint,
+    bt_amount numeric(20,4),
+    cr_id bigint,
+    CONSTRAINT bt_amount_ck CHECK ((bt_amount > (0)::numeric))
+);
+
+
+--
+-- TOC entry 2453 (class 0 OID 0)
+-- Dependencies: 2079
+-- Name: TABLE budget_detail; Type: COMMENT; Schema: coprop; Owner: -
+--
+
+COMMENT ON TABLE budget_detail IS 'Detail budget';
+
+
+--
+-- TOC entry 2454 (class 0 OID 0)
+-- Dependencies: 2079
+-- Name: COLUMN budget_detail.f_id; Type: COMMENT; Schema: coprop; Owner=
: -
+--
+
+COMMENT ON COLUMN budget_detail.f_id IS 'fk fiche.f_id';
+
+
+--
+-- TOC entry 2455 (class 0 OID 0)
+-- Dependencies: 2079
+-- Name: COLUMN budget_detail.b_id; Type: COMMENT; Schema: coprop; Owner=
: -
+--
+
+COMMENT ON COLUMN budget_detail.b_id IS 'fk budget.b_id';
+
+
+--
+-- TOC entry 2456 (class 0 OID 0)
+-- Dependencies: 2079
+-- Name: COLUMN budget_detail.cr_id; Type: COMMENT; Schema: coprop; Owne=
r: -
+--
+
+COMMENT ON COLUMN budget_detail.cr_id IS 'Fk vers clef_repartition';
+
+
+--
+-- TOC entry 2078 (class 1259 OID 195119)
+-- Dependencies: 8 2079
+-- Name: budget_detail_bt_id_seq; Type: SEQUENCE; Schema: coprop; Owner:=
 -
+--
+
+CREATE SEQUENCE budget_detail_bt_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MAXVALUE
+    NO MINVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2457 (class 0 OID 0)
+-- Dependencies: 2078
+-- Name: budget_detail_bt_id_seq; Type: SEQUENCE OWNED BY; Schema: copro=
p; Owner: -
+--
+
+ALTER SEQUENCE budget_detail_bt_id_seq OWNED BY budget_detail.bt_id;
+
+
+--
+-- TOC entry 2458 (class 0 OID 0)
+-- Dependencies: 2078
+-- Name: budget_detail_bt_id_seq; Type: SEQUENCE SET; Schema: coprop; Ow=
ner: -
+--
+
+SELECT pg_catalog.setval('budget_detail_bt_id_seq', 2, true);
+
+
+--
+-- TOC entry 2065 (class 1259 OID 194376)
+-- Dependencies: 2373 8
+-- Name: clef_repartition; Type: TABLE; Schema: coprop; Owner: -; Tables=
pace:=20
+--
+
 CREATE TABLE clef_repartition (
     cr_id integer NOT NULL,
     cr_name text NOT NULL,
     cr_note text,
-    cr_start date,
-    cr_end date
+    cr_tantieme bigint DEFAULT 0 NOT NULL
 );
=20
=20
 --
--- TOC entry 2089 (class 1259 OID 7283085)
--- Dependencies: 8 2090
+-- TOC entry 2459 (class 0 OID 0)
+-- Dependencies: 2065
+-- Name: COLUMN clef_repartition.cr_tantieme; Type: COMMENT; Schema: cop=
rop; Owner: -
+--
+
+COMMENT ON COLUMN clef_repartition.cr_tantieme IS 'tantieme totaux';
+
+
+--
+-- TOC entry 2066 (class 1259 OID 194382)
+-- Dependencies: 2065 8
 -- Name: clef_repartition_cr_id_seq; Type: SEQUENCE; Schema: coprop; Own=
er: -
 --
=20
 CREATE SEQUENCE clef_repartition_cr_id_seq
     START WITH 1
     INCREMENT BY 1
+    NO MAXVALUE
     NO MINVALUE
-    NO MAXVALUE
     CACHE 1;
=20
=20
 --
--- TOC entry 2406 (class 0 OID 0)
--- Dependencies: 2089
+-- TOC entry 2460 (class 0 OID 0)
+-- Dependencies: 2066
 -- Name: clef_repartition_cr_id_seq; Type: SEQUENCE OWNED BY; Schema: co=
prop; Owner: -
 --
=20
@@ -64,11 +461,20 @@
=20
=20
 --
--- TOC entry 2092 (class 1259 OID 7283136)
--- Dependencies: 2384 8
--- Name: clef_repartition_detail; Type: TABLE; Schema: coprop; Owner: -
+-- TOC entry 2461 (class 0 OID 0)
+-- Dependencies: 2066
+-- Name: clef_repartition_cr_id_seq; Type: SEQUENCE SET; Schema: coprop;=
 Owner: -
 --
=20
+SELECT pg_catalog.setval('clef_repartition_cr_id_seq', 5, true);
+
+
+--
+-- TOC entry 2067 (class 1259 OID 194384)
+-- Dependencies: 2375 8
+-- Name: clef_repartition_detail; Type: TABLE; Schema: coprop; Owner: -;=
 Tablespace:=20
+--
+
 CREATE TABLE clef_repartition_detail (
     crd_id integer NOT NULL,
     lot_fk bigint,
@@ -78,22 +484,22 @@
=20
=20
 --
--- TOC entry 2091 (class 1259 OID 7283134)
--- Dependencies: 8 2092
+-- TOC entry 2068 (class 1259 OID 194388)
+-- Dependencies: 8 2067
 -- Name: clef_repartition_detail_crd_id_seq; Type: SEQUENCE; Schema: cop=
rop; Owner: -
 --
=20
 CREATE SEQUENCE clef_repartition_detail_crd_id_seq
     START WITH 1
     INCREMENT BY 1
+    NO MAXVALUE
     NO MINVALUE
-    NO MAXVALUE
     CACHE 1;
=20
=20
 --
--- TOC entry 2407 (class 0 OID 0)
--- Dependencies: 2091
+-- TOC entry 2462 (class 0 OID 0)
+-- Dependencies: 2068
 -- Name: clef_repartition_detail_crd_id_seq; Type: SEQUENCE OWNED BY; Sc=
hema: coprop; Owner: -
 --
=20
@@ -101,9 +507,18 @@
=20
=20
 --
--- TOC entry 2096 (class 1259 OID 7302202)
+-- TOC entry 2463 (class 0 OID 0)
+-- Dependencies: 2068
+-- Name: clef_repartition_detail_crd_id_seq; Type: SEQUENCE SET; Schema:=
 coprop; Owner: -
+--
+
+SELECT pg_catalog.setval('clef_repartition_detail_crd_id_seq', 125, true=
);
+
+
+--
+-- TOC entry 2069 (class 1259 OID 194390)
 -- Dependencies: 8
--- Name: coproprietaire; Type: TABLE; Schema: coprop; Owner: -
+-- Name: coproprietaire; Type: TABLE; Schema: coprop; Owner: -; Tablespa=
ce:=20
 --
=20
 CREATE TABLE coproprietaire (
@@ -113,8 +528,8 @@
=20
=20
 --
--- TOC entry 2408 (class 0 OID 0)
--- Dependencies: 2096
+-- TOC entry 2464 (class 0 OID 0)
+-- Dependencies: 2069
 -- Name: TABLE coproprietaire; Type: COMMENT; Schema: coprop; Owner: -
 --
=20
@@ -122,22 +537,22 @@
=20
=20
 --
--- TOC entry 2095 (class 1259 OID 7302200)
--- Dependencies: 8 2096
+-- TOC entry 2070 (class 1259 OID 194393)
+-- Dependencies: 2069 8
 -- Name: coproprietaire_c_id_seq; Type: SEQUENCE; Schema: coprop; Owner:=
 -
 --
=20
 CREATE SEQUENCE coproprietaire_c_id_seq
     START WITH 1
     INCREMENT BY 1
+    NO MAXVALUE
     NO MINVALUE
-    NO MAXVALUE
     CACHE 1;
=20
=20
 --
--- TOC entry 2409 (class 0 OID 0)
--- Dependencies: 2095
+-- TOC entry 2465 (class 0 OID 0)
+-- Dependencies: 2070
 -- Name: coproprietaire_c_id_seq; Type: SEQUENCE OWNED BY; Schema: copro=
p; Owner: -
 --
=20
@@ -145,11 +560,20 @@
=20
=20
 --
--- TOC entry 2094 (class 1259 OID 7302189)
--- Dependencies: 2386 8
--- Name: lot; Type: TABLE; Schema: coprop; Owner: -
+-- TOC entry 2466 (class 0 OID 0)
+-- Dependencies: 2070
+-- Name: coproprietaire_c_id_seq; Type: SEQUENCE SET; Schema: coprop; Ow=
ner: -
 --
=20
+SELECT pg_catalog.setval('coproprietaire_c_id_seq', 6, true);
+
+
+--
+-- TOC entry 2071 (class 1259 OID 194395)
+-- Dependencies: 2378 8
+-- Name: lot; Type: TABLE; Schema: coprop; Owner: -; Tablespace:=20
+--
+
 CREATE TABLE lot (
     l_id integer NOT NULL,
     l_fiche_id bigint,
@@ -159,8 +583,8 @@
=20
=20
 --
--- TOC entry 2410 (class 0 OID 0)
--- Dependencies: 2094
+-- TOC entry 2467 (class 0 OID 0)
+-- Dependencies: 2071
 -- Name: TABLE lot; Type: COMMENT; Schema: coprop; Owner: -
 --
=20
@@ -168,22 +592,22 @@
=20
=20
 --
--- TOC entry 2093 (class 1259 OID 7302187)
--- Dependencies: 2094 8
+-- TOC entry 2072 (class 1259 OID 194399)
+-- Dependencies: 8 2071
 -- Name: lot_l_id_seq; Type: SEQUENCE; Schema: coprop; Owner: -
 --
=20
 CREATE SEQUENCE lot_l_id_seq
     START WITH 1
     INCREMENT BY 1
+    NO MAXVALUE
     NO MINVALUE
-    NO MAXVALUE
     CACHE 1;
=20
=20
 --
--- TOC entry 2411 (class 0 OID 0)
--- Dependencies: 2093
+-- TOC entry 2468 (class 0 OID 0)
+-- Dependencies: 2072
 -- Name: lot_l_id_seq; Type: SEQUENCE OWNED BY; Schema: coprop; Owner: -
 --
=20
@@ -191,9 +615,18 @@
=20
=20
 --
--- TOC entry 2088 (class 1259 OID 7283077)
+-- TOC entry 2469 (class 0 OID 0)
+-- Dependencies: 2072
+-- Name: lot_l_id_seq; Type: SEQUENCE SET; Schema: coprop; Owner: -
+--
+
+SELECT pg_catalog.setval('lot_l_id_seq', 18, true);
+
+
+--
+-- TOC entry 2073 (class 1259 OID 194401)
 -- Dependencies: 8
--- Name: parameter; Type: TABLE; Schema: coprop; Owner: -
+-- Name: parameter; Type: TABLE; Schema: coprop; Owner: -; Tablespace:=20
 --
=20
 CREATE TABLE parameter (
@@ -203,8 +636,45 @@
=20
=20
 --
--- TOC entry 2382 (class 2604 OID 7283090)
--- Dependencies: 2089 2090 2090
+-- TOC entry 2080 (class 1259 OID 195904)
+-- Dependencies: 2180 8
+-- Name: summary; Type: VIEW; Schema: coprop; Owner: -
+--
+
+CREATE VIEW summary AS
+    SELECT a.f_id AS lot_id, m.ad_value AS building_id, c.ad_value AS co=
prop_id FROM (((public.fiche_detail a JOIN public.fiche f1 ON ((f1.f_id =3D=
 a.f_id))) JOIN (SELECT fd1.f_id, fd1.ad_value FROM public.fiche_detail f=
d1 WHERE (fd1.ad_id =3D 70)) m ON ((m.f_id =3D a.f_id))) JOIN (SELECT fd1=
.f_id, fd1.ad_value FROM public.fiche_detail fd1 WHERE (fd1.ad_id =3D 71)=
) c ON ((c.f_id =3D a.f_id))) WHERE ((f1.fd_id =3D 8) AND (a.ad_id =3D 1)=
);
+
+
+--
+-- TOC entry 2388 (class 2604 OID 196007)
+-- Dependencies: 2082 2083 2083
+-- Name: afd_id; Type: DEFAULT; Schema: coprop; Owner: -
+--
+
+ALTER TABLE appel_fond_detail ALTER COLUMN afd_id SET DEFAULT nextval('a=
ppel_fond_detail_afd_id_seq'::regclass);
+
+
+--
+-- TOC entry 2379 (class 2604 OID 195113)
+-- Dependencies: 2077 2076 2077
+-- Name: b_id; Type: DEFAULT; Schema: coprop; Owner: -
+--
+
+ALTER TABLE budget ALTER COLUMN b_id SET DEFAULT nextval('budget_b_id_se=
q'::regclass);
+
+
+--
+-- TOC entry 2382 (class 2604 OID 195124)
+-- Dependencies: 2078 2079 2079
+-- Name: bt_id; Type: DEFAULT; Schema: coprop; Owner: -
+--
+
+ALTER TABLE budget_detail ALTER COLUMN bt_id SET DEFAULT nextval('budget=
_detail_bt_id_seq'::regclass);
+
+
+--
+-- TOC entry 2372 (class 2604 OID 194407)
+-- Dependencies: 2066 2065
 -- Name: cr_id; Type: DEFAULT; Schema: coprop; Owner: -
 --
=20
@@ -212,8 +682,8 @@
=20
=20
 --
--- TOC entry 2383 (class 2604 OID 7283139)
--- Dependencies: 2091 2092 2092
+-- TOC entry 2374 (class 2604 OID 194408)
+-- Dependencies: 2068 2067
 -- Name: crd_id; Type: DEFAULT; Schema: coprop; Owner: -
 --
=20
@@ -221,8 +691,8 @@
=20
=20
 --
--- TOC entry 2387 (class 2604 OID 7302205)
--- Dependencies: 2095 2096 2096
+-- TOC entry 2376 (class 2604 OID 194409)
+-- Dependencies: 2070 2069
 -- Name: c_id; Type: DEFAULT; Schema: coprop; Owner: -
 --
=20
@@ -230,8 +700,8 @@
=20
=20
 --
--- TOC entry 2385 (class 2604 OID 7302192)
--- Dependencies: 2094 2093 2094
+-- TOC entry 2377 (class 2604 OID 194410)
+-- Dependencies: 2072 2071
 -- Name: l_id; Type: DEFAULT; Schema: coprop; Owner: -
 --
=20
@@ -239,19 +709,197 @@
=20
=20
 --
--- TOC entry 2393 (class 2606 OID 7283142)
--- Dependencies: 2092 2092
--- Name: clef_repartition_detail_pkey; Type: CONSTRAINT; Schema: coprop;=
 Owner: -
+-- TOC entry 2429 (class 0 OID 195968)
+-- Dependencies: 2081
+-- Data for Name: appel_fond; Type: TABLE DATA; Schema: coprop; Owner: -
 --
=20
+INSERT INTO appel_fond VALUES (1, '2012-01-16', 'N', 1.00, 400.0000, 124=
, 5, '2012-01-16 10:45:11.897337+01', NULL, NULL, 1);
+
+
+--
+-- TOC entry 2430 (class 0 OID 196004)
+-- Dependencies: 2083
+-- Data for Name: appel_fond_detail; Type: TABLE DATA; Schema: coprop; O=
wner: -
+--
+
+INSERT INTO appel_fond_detail VALUES (1, 1, 86, 1, 8.0000, 2339.0000, 47=
.0000);
+INSERT INTO appel_fond_detail VALUES (2, 1, 84, 1, 1.6800, 2339.0000, 10=
.0000);
+INSERT INTO appel_fond_detail VALUES (3, 1, 91, 1, 259.9200, 2339.0000, =
1520.0000);
+INSERT INTO appel_fond_detail VALUES (4, 1, 89, 1, 7.6800, 2339.0000, 45=
.0000);
+INSERT INTO appel_fond_detail VALUES (5, 1, 100, 1, 1.1600, 2339.0000, 7=
.0000);
+INSERT INTO appel_fond_detail VALUES (6, 1, 88, 1, 0.3200, 2339.0000, 2.=
0000);
+INSERT INTO appel_fond_detail VALUES (7, 1, 94, 1, 1.1600, 2339.0000, 7.=
0000);
+INSERT INTO appel_fond_detail VALUES (8, 1, 90, 1, 99.8400, 2339.0000, 5=
84.0000);
+INSERT INTO appel_fond_detail VALUES (9, 1, 93, 1, 0.6800, 2339.0000, 4.=
0000);
+INSERT INTO appel_fond_detail VALUES (10, 1, 85, 1, 5.9600, 2339.0000, 3=
5.0000);
+INSERT INTO appel_fond_detail VALUES (11, 1, 127, 1, 0.0000, 2339.0000, =
0.0000);
+INSERT INTO appel_fond_detail VALUES (12, 1, 126, 1, 0.0000, 2339.0000, =
0.0000);
+INSERT INTO appel_fond_detail VALUES (13, 1, 87, 1, 11.6000, 2339.0000, =
68.0000);
+INSERT INTO appel_fond_detail VALUES (14, 1, 92, 1, 0.3200, 2339.0000, 2=
.0000);
+INSERT INTO appel_fond_detail VALUES (15, 1, 101, 1, 1.3600, 2339.0000, =
8.0000);
+
+
+--
+-- TOC entry 2427 (class 0 OID 195110)
+-- Dependencies: 2077
+-- Data for Name: budget; Type: TABLE DATA; Schema: coprop; Owner: -
+--
+
+INSERT INTO budget VALUES (8, 'test', '2011-04-01', '2011-05-01', 1200.0=
000);
+
+
+--
+-- TOC entry 2428 (class 0 OID 195121)
+-- Dependencies: 2079
+-- Data for Name: budget_detail; Type: TABLE DATA; Schema: coprop; Owner=
: -
+--
+
+INSERT INTO budget_detail VALUES (2, 'Eau', 103, 8, 200.0000, 1);
+INSERT INTO budget_detail VALUES (1, 'Electricit=C3=A9', 104, 8, 1000.00=
00, 1);
+
+
+--
+-- TOC entry 2422 (class 0 OID 194376)
+-- Dependencies: 2065
+-- Data for Name: clef_repartition; Type: TABLE DATA; Schema: coprop; Ow=
ner: -
+--
+
+INSERT INTO clef_repartition VALUES (1, 'Charges g=C3=A9n=C3=A9rales tou=
s b=C3=A2timents', '', 2339);
+INSERT INTO clef_repartition VALUES (5, 'Charge Eau', 'Clef de r=C3=A9pa=
rtition pour r=C3=A9partir les charges.=20
+
+Pour la Maison Horta', 6000);
+
+
+--
+-- TOC entry 2423 (class 0 OID 194384)
+-- Dependencies: 2067
+-- Data for Name: clef_repartition_detail; Type: TABLE DATA; Schema: cop=
rop; Owner: -
+--
+
+INSERT INTO clef_repartition_detail VALUES (96, 86, 47.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (97, 84, 10.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (98, 91, 1520.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (99, 89, 45.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (100, 100, 7.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (101, 88, 2.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (102, 94, 7.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (103, 90, 584.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (104, 93, 4.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (105, 85, 35.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (106, 127, 0.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (107, 126, 0.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (108, 87, 68.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (109, 92, 2.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (110, 101, 8.0000, 1);
+INSERT INTO clef_repartition_detail VALUES (111, 84, 1000.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (112, 85, 20.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (113, 86, 100.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (114, 87, 20.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (115, 88, 1000.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (116, 89, 20.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (117, 90, 100.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (118, 91, 0.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (119, 92, 1200.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (120, 93, 20.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (121, 94, 1151.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (122, 100, 0.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (123, 101, 1251.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (124, 126, 18.0000, 5);
+INSERT INTO clef_repartition_detail VALUES (125, 127, 100.0000, 5);
+
+
+--
+-- TOC entry 2424 (class 0 OID 194390)
+-- Dependencies: 2069
+-- Data for Name: coproprietaire; Type: TABLE DATA; Schema: coprop; Owne=
r: -
+--
+
+INSERT INTO coproprietaire VALUES (5, 115);
+INSERT INTO coproprietaire VALUES (6, 96);
+
+
+--
+-- TOC entry 2425 (class 0 OID 194395)
+-- Dependencies: 2071
+-- Data for Name: lot; Type: TABLE DATA; Schema: coprop; Owner: -
+--
+
+INSERT INTO lot VALUES (12, 84, NULL, 115);
+INSERT INTO lot VALUES (13, 85, NULL, 115);
+INSERT INTO lot VALUES (14, 86, NULL, 115);
+INSERT INTO lot VALUES (17, 87, 0.0000, 96);
+INSERT INTO lot VALUES (18, 88, 0.0000, 96);
+
+
+--
+-- TOC entry 2426 (class 0 OID 194401)
+-- Dependencies: 2073
+-- Data for Name: parameter; Type: TABLE DATA; Schema: coprop; Owner: -
+--
+
+INSERT INTO parameter VALUES ('poste_appel', '701');
+INSERT INTO parameter VALUES ('categorie_lot', '8');
+INSERT INTO parameter VALUES ('categorie_coprop', '7');
+INSERT INTO parameter VALUES ('journal_appel', '5');
+INSERT INTO parameter VALUES ('categorie_appel', '16');
+INSERT INTO parameter VALUES ('categorie_immeuble', '21');
+
+
+--
+-- TOC entry 2408 (class 2606 OID 196009)
+-- Dependencies: 2083 2083
+-- Name: appel_fond_detail_pkey; Type: CONSTRAINT; Schema: coprop; Owner=
: -; Tablespace:=20
+--
+
+ALTER TABLE ONLY appel_fond_detail
+    ADD CONSTRAINT appel_fond_detail_pkey PRIMARY KEY (afd_id);
+
+
+--
+-- TOC entry 2406 (class 2606 OID 195976)
+-- Dependencies: 2081 2081
+-- Name: appel_fond_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -; Ta=
blespace:=20
+--
+
+ALTER TABLE ONLY appel_fond
+    ADD CONSTRAINT appel_fond_pkey PRIMARY KEY (af_id);
+
+
+--
+-- TOC entry 2404 (class 2606 OID 195126)
+-- Dependencies: 2079 2079
+-- Name: budget_detail_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -;=
 Tablespace:=20
+--
+
+ALTER TABLE ONLY budget_detail
+    ADD CONSTRAINT budget_detail_pkey PRIMARY KEY (bt_id);
+
+
+--
+-- TOC entry 2402 (class 2606 OID 195118)
+-- Dependencies: 2077 2077
+-- Name: budget_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -; Tables=
pace:=20
+--
+
+ALTER TABLE ONLY budget
+    ADD CONSTRAINT budget_pkey PRIMARY KEY (b_id);
+
+
+--
+-- TOC entry 2392 (class 2606 OID 194412)
+-- Dependencies: 2067 2067
+-- Name: clef_repartition_detail_pkey; Type: CONSTRAINT; Schema: coprop;=
 Owner: -; Tablespace:=20
+--
+
 ALTER TABLE ONLY clef_repartition_detail
     ADD CONSTRAINT clef_repartition_detail_pkey PRIMARY KEY (crd_id);
=20
=20
 --
--- TOC entry 2391 (class 2606 OID 7283095)
--- Dependencies: 2090 2090
--- Name: clef_repartition_pkey; Type: CONSTRAINT; Schema: coprop; Owner:=
 -
+-- TOC entry 2390 (class 2606 OID 194414)
+-- Dependencies: 2065 2065
+-- Name: clef_repartition_pkey; Type: CONSTRAINT; Schema: coprop; Owner:=
 -; Tablespace:=20
 --
=20
 ALTER TABLE ONLY clef_repartition
@@ -259,9 +907,9 @@
=20
=20
 --
--- TOC entry 2389 (class 2606 OID 7283084)
--- Dependencies: 2088 2088
--- Name: copro_parameter_pkey; Type: CONSTRAINT; Schema: coprop; Owner: =
-
+-- TOC entry 2400 (class 2606 OID 194416)
+-- Dependencies: 2073 2073
+-- Name: copro_parameter_pkey; Type: CONSTRAINT; Schema: coprop; Owner: =
-; Tablespace:=20
 --
=20
 ALTER TABLE ONLY parameter
@@ -269,9 +917,9 @@
=20
=20
 --
--- TOC entry 2397 (class 2606 OID 7302219)
--- Dependencies: 2096 2096
--- Name: coproprietaire_c_fiche_id_key; Type: CONSTRAINT; Schema: coprop=
; Owner: -
+-- TOC entry 2394 (class 2606 OID 194418)
+-- Dependencies: 2069 2069
+-- Name: coproprietaire_c_fiche_id_key; Type: CONSTRAINT; Schema: coprop=
; Owner: -; Tablespace:=20
 --
=20
 ALTER TABLE ONLY coproprietaire
@@ -279,9 +927,9 @@
=20
=20
 --
--- TOC entry 2399 (class 2606 OID 7302207)
--- Dependencies: 2096 2096
--- Name: coproprietaire_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -
+-- TOC entry 2396 (class 2606 OID 194420)
+-- Dependencies: 2069 2069
+-- Name: coproprietaire_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -=
; Tablespace:=20
 --
=20
 ALTER TABLE ONLY coproprietaire
@@ -289,9 +937,9 @@
=20
=20
 --
--- TOC entry 2395 (class 2606 OID 7302194)
--- Dependencies: 2094 2094
--- Name: lot_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -
+-- TOC entry 2398 (class 2606 OID 194422)
+-- Dependencies: 2071 2071
+-- Name: lot_pkey; Type: CONSTRAINT; Schema: coprop; Owner: -; Tablespac=
e:=20
 --
=20
 ALTER TABLE ONLY lot
@@ -299,8 +947,100 @@
=20
=20
 --
--- TOC entry 2400 (class 2606 OID 7283148)
--- Dependencies: 2090 2390 2092
+-- TOC entry 2421 (class 2620 OID 195143)
+-- Dependencies: 2077 93
+-- Name: ck_date_trigger; Type: TRIGGER; Schema: coprop; Owner: -
+--
+
+CREATE TRIGGER ck_date_trigger
+    BEFORE INSERT OR UPDATE ON budget
+    FOR EACH ROW
+    EXECUTE PROCEDURE budget_check_date();
+
+
+--
+-- TOC entry 2416 (class 2606 OID 195987)
+-- Dependencies: 2081 1927
+-- Name: appel_fond_af_card_fkey; Type: FK CONSTRAINT; Schema: coprop; O=
wner: -
+--
+
+ALTER TABLE ONLY appel_fond
+    ADD CONSTRAINT appel_fond_af_card_fkey FOREIGN KEY (af_card) REFEREN=
CES public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 2417 (class 2606 OID 195992)
+-- Dependencies: 1948 2081
+-- Name: appel_fond_af_ledger_fkey; Type: FK CONSTRAINT; Schema: coprop;=
 Owner: -
+--
+
+ALTER TABLE ONLY appel_fond
+    ADD CONSTRAINT appel_fond_af_ledger_fkey FOREIGN KEY (af_ledger) REF=
ERENCES public.jrn_def(jrn_def_id) ON UPDATE RESTRICT ON DELETE RESTRICT;
+
+
+--
+-- TOC entry 2419 (class 2606 OID 196010)
+-- Dependencies: 2081 2401 2077
+-- Name: appel_fond_b_id_fkey; Type: FK CONSTRAINT; Schema: coprop; Owne=
r: -
+--
+
+ALTER TABLE ONLY appel_fond
+    ADD CONSTRAINT appel_fond_b_id_fkey FOREIGN KEY (b_id) REFERENCES bu=
dget(b_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 2420 (class 2606 OID 196015)
+-- Dependencies: 2389 2081 2065
+-- Name: appel_fond_cr_id_fkey; Type: FK CONSTRAINT; Schema: coprop; Own=
er: -
+--
+
+ALTER TABLE ONLY appel_fond
+    ADD CONSTRAINT appel_fond_cr_id_fkey FOREIGN KEY (cr_id) REFERENCES =
clef_repartition(cr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 2418 (class 2606 OID 195997)
+-- Dependencies: 2081 1946
+-- Name: appel_fond_jr_internal_fkey; Type: FK CONSTRAINT; Schema: copro=
p; Owner: -
+--
+
+ALTER TABLE ONLY appel_fond
+    ADD CONSTRAINT appel_fond_jr_internal_fkey FOREIGN KEY (jr_internal)=
 REFERENCES public.jrn(jr_internal);
+
+
+--
+-- TOC entry 2414 (class 2606 OID 195132)
+-- Dependencies: 2401 2079 2077
+-- Name: budget_detail_budget_fk; Type: FK CONSTRAINT; Schema: coprop; O=
wner: -
+--
+
+ALTER TABLE ONLY budget_detail
+    ADD CONSTRAINT budget_detail_budget_fk FOREIGN KEY (b_id) REFERENCES=
 budget(b_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 2415 (class 2606 OID 195172)
+-- Dependencies: 2079 2389 2065
+-- Name: budget_detail_clef; Type: FK CONSTRAINT; Schema: coprop; Owner:=
 -
+--
+
+ALTER TABLE ONLY budget_detail
+    ADD CONSTRAINT budget_detail_clef FOREIGN KEY (cr_id) REFERENCES cle=
f_repartition(cr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 2413 (class 2606 OID 195127)
+-- Dependencies: 1927 2079
+-- Name: budget_detail_fiche_fk; Type: FK CONSTRAINT; Schema: coprop; Ow=
ner: -
+--
+
+ALTER TABLE ONLY budget_detail
+    ADD CONSTRAINT budget_detail_fiche_fk FOREIGN KEY (f_id) REFERENCES =
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 2409 (class 2606 OID 194423)
+-- Dependencies: 2389 2067 2065
 -- Name: clef_repartition_detail_cr_id_fkey; Type: FK CONSTRAINT; Schema=
: coprop; Owner: -
 --
=20
@@ -309,8 +1049,8 @@
=20
=20
 --
--- TOC entry 2403 (class 2606 OID 7302208)
--- Dependencies: 2096 1950
+-- TOC entry 2410 (class 2606 OID 194428)
+-- Dependencies: 1927 2069
 -- Name: coproprietaire_c_fiche_id_fkey; Type: FK CONSTRAINT; Schema: co=
prop; Owner: -
 --
=20
@@ -319,8 +1059,8 @@
=20
=20
 --
--- TOC entry 2402 (class 2606 OID 7302230)
--- Dependencies: 2396 2094 2096
+-- TOC entry 2411 (class 2606 OID 194433)
+-- Dependencies: 2393 2069 2071
 -- Name: lot_coprop_fk_fkey; Type: FK CONSTRAINT; Schema: coprop; Owner:=
 -
 --
=20
@@ -329,8 +1069,8 @@
=20
=20
 --
--- TOC entry 2401 (class 2606 OID 7302195)
--- Dependencies: 1950 2094
+-- TOC entry 2412 (class 2606 OID 194438)
+-- Dependencies: 1927 2071
 -- Name: lot_fiche_fk; Type: FK CONSTRAINT; Schema: coprop; Owner: -
 --
=20
@@ -338,12 +1078,9 @@
     ADD CONSTRAINT lot_fiche_fk FOREIGN KEY (l_fiche_id) REFERENCES publ=
ic.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY D=
EFERRED;
=20
=20
--- Completed on 2011-12-27 13:17:14 CET
+-- Completed on 2012-01-16 10:49:01 CET
=20
 --
 -- PostgreSQL database dump complete
 --
-INSERT INTO parameter (pr_id, pr_value) VALUES ('categorie_lot', '');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('categorie_coprop', '');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('journal_appel', '');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('categorie_appel', '');
+



From MAILER-DAEMON Mon Jan 16 04:59:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RmjLT-0006og-NG
	for mharc-phpcompta-dev@gnu.org; Mon, 16 Jan 2012 04:59:19 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 16 Jan 2012 11:00:39 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.97077.1326707958.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r291 - trunk/coprop/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, 16 Jan 2012 09:59:18 -0000

Author: danydb
Date: 2012-01-16 11:00:39 +0100 (Mon, 16 Jan 2012)
New Revision: 291

Added:
   trunk/coprop/include/class_copro_budget.php
Log:
add class_copro_budget.php

Added: trunk/coprop/include/class_copro_budget.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_copro_budget.php	                        (=
rev 0)
+++ trunk/coprop/include/class_copro_budget.php	2012-01-16 10:00:39 UTC (=
rev 291)
@@ -0,0 +1,322 @@
+<?php
+
+
+class Copro_Budget
+{
+    function to_list()
+    {
+        global $cn;
+
+        $array=3D$cn->get_array("select b_id, b_name,
+                    to_char(b_start,'DD.MM.YYYY') as str_start,
+                    to_char(b_end,'DD.MM.YYYY') as str_end,
+                    b_amount
+                    from coprop.budget
+                    order by b_name
+                    ");
+
+        require_once 'template/budget_list.php';
+
+    }
+	function load()
+	{
+		global $cn;
+		try
+		{
+			if ($this->b_id =3D=3D '') throw new Exception("Aucun budget demand=C3=
=A9");
+			$array=3D$cn->get_array("select b_id,b_name,b_start,b_end,b_amount,
+				to_char(b_start,'DD.MM.YYYY') as str_b_start,
+				to_char(b_end,'DD.MM.YYYY') as str_b_end
+				from coprop.budget where b_id=3D$1",array($this->b_id));
+			if ($cn->count() =3D=3D 1)
+			{
+				$this->b_name=3D$array[0]['b_name'];
+				$this->b_start=3D$array[0]['b_start'];
+				$this->str_b_start=3D$array[0]['str_b_start'];
+				$this->b_end=3D$array[0]['b_end'];
+				$this->str_b_end=3D$array[0]['str_b_end'];
+				$this->b_amount=3D$array[0]['b_amount'];
+			}
+			else
+				throw new Exception ('Aucun budget trouv=C3=A9');
+		} catch (Exception $e)
+		{
+			echo $e->getTraceAsString();
+			throw $e;
+		}
+	}
+	/**
+	 *Detail d'un budget avec les d=C3=A9tails, pour mettre =C3=A0 jour
+	 * @global type $cn
+	 * @throws Exception
+	 */
+    function detail()
+    {
+        global $cn;
+        try
+        {
+
+            if ( ! isset ($this->b_id)|| trim($this->b_id)=3D=3D'')
+                    throw new Exception ("Aucun budget demand=C3=A9");
+			$name=3Dnew IText('b_name');
+			if ($this->b_id <> 0)
+			{
+				$this->load();
+				$name->value=3D$this->b_name;
+				$start=3Dnew IDate('b_start',$this->str_b_start);
+				$end=3Dnew IDate('b_end',$this->str_b_end);
+				$amount=3Dnew INum('b_amount',round($this->b_amount,2));
+
+			}	else {
+				$start=3Dnew IDate('b_start');
+				$end=3Dnew IDate('b_end');
+				$amount=3Dnew INum('b_amount',0);
+
+			}
+			$amount->javascript=3D'onchange=3D"format_number(this,2);compute_budg=
et();"';
+			$bud_amount=3D$amount->value;
+
+			echo HtmlInput::hidden("b_id",$this->b_id);
+			echo HtmlInput::request_to_hidden(array('gDossier','ac','plugin_code'=
,'sa'));
+			require_once 'template/budget.php';
+
+            $array=3D$cn->get_array("select bt_label,
+							bt_id,bt_amount,f_id,vw_name,quick_code,cr_name,cr_id
+                from coprop.budget_detail
+                join coprop.clef_repartition using (cr_id)
+                join vw_fiche_attr using (f_id)
+                where b_id=3D$1",array($this->b_id));
+            $a_input=3Darray();
+            $fiche_dep=3D$cn->make_list("select fd_id from fiche_def whe=
re frd_id=3D2");
+
+			$a_key=3D$cn->make_array(" select cr_id,cr_name from coprop.clef_repa=
rtition order by cr_name");
+			$max=3Dcount($array);
+            for ($i=3D0;$i<MAXROWBUD;$i++)
+            {
+				$label=3Dnew IText('bt_label[]');
+				$label->value=3D($i>=3D$max)?"":$array[$i]['bt_label'];
+
+                $card=3Dnew ICard('f_id'.$i);
+                $card->value=3D($i>=3D$max)?"":$array[$i]['quick_code'];
+                $card->table=3D0;
+
+                 // name of the field to update with the name of the car=
d
+                $card->set_attribute('label','w_card_label'.$i);
+
+                // Type of card : deb, cred,
+                $card->set_attribute('typecard',$fiche_dep);
+
+                $card->extra=3D$fiche_dep;
+
+                // Add the callback function to filter the card on the j=
rn
+                $card->set_callback('filter_card');
+                $card->set_attribute('ipopup','ipopcard');
+                // when value selected in the autcomplete
+                  $card->set_function('fill_data');
+
+                // when the data change
+
+                  $card->javascript=3Dsprintf(' onchange=3D"fill_data_on=
change(\'%s\');" ',
+                            $card->name);
+                  $card->set_dblclick("fill_ipopcard(this);");
+
+                  $card_label=3Dnew ISpan();
+                  $card_label->table=3D0;
+                  $f_card_label=3D$card_label->input("w_card_label".$i,"=
");
+
+                // Search button for card
+                $f_card_bt=3D$card->search();
+
+                $amount=3Dnew INum("bt_amount[]");
+                $amount->value=3D($i>=3D$max)?"":round($array[$i]['bt_am=
ount'],2);
+				$amount->javascript=3D'onchange=3D"format_number(this,2);compute_bud=
get();"';
+                $hidden=3D($i>=3D$max)?HtmlInput::hidden("bt_id[]",0):Ht=
mlInput::hidden("bt_id[]",$array[$i]["bt_id"]);
+				echo $hidden;
+
+                $ikey=3Dnew ISelect("key[]");
+                $ikey->value=3D$a_key;
+                $ikey->selected=3D($i>=3D$max)?0:$array[$i]['cr_id'];
+
+                $a_input[$i]["amount"]=3D$amount->input();
+                $a_input[$i]["hidden"]=3D$hidden;
+                $a_input[$i]["card"]=3D$card->input().$f_card_bt;
+                $a_input[$i]["card_label"]=3D$label->input();
+
+                $a_input[$i]['key']=3D$ikey->input();
+
+            }
+            require_once 'template/bud_detail.php';
+			echo create_script("compute_budget()");
+        }
+        catch (Exception $e)
+        {
+            $e->getTraceAsString();
+			throw $e;
+        }
+    }
+	/**
+	 *@brief insert or update a new budget
+	 * @param $p_array
+	 *   - b_id
+	 *   - b_name
+	 *   - b_start
+	 *   - b_end
+	 *   - b_amount
+	 *   - f_idX  -> qcode
+	 *   - key[X]
+	 *   - bt_amount[X]
+	 *   - p_jrn
+	 *   - bt_id[X]
+	 */
+	function save($p_array)
+	{
+		try{
+			$this->b_id=3D$p_array['b_id'];
+			if ( $p_array['b_id'] =3D=3D 0 )
+			{
+				$this->insert($p_array);
+				$this->save_detail($p_array);
+			} else {
+				$this->update($p_array);
+				$this->save_detail($p_array);
+			}
+		}
+		catch( Exception $e){
+			throw $e;
+		}
+	}
+	/**
+	 *@brief update budget
+	 */
+	function update($p_array)
+	{
+		global $cn;
+		try {
+			extract ($p_array);
+			// update coprop.budget
+			$cn->exec_sql("update coprop.budget set b_name=3D$1,
+					b_start=3Dto_date($2,'DD.MM.YYYY'),
+					b_end=3Dto_date($3,'DD.MM.YYYY'),
+					b_amount=3D$4
+					where b_id=3D$5
+					",array(
+						strip_tags($b_name),
+						$b_start,
+						$b_end,
+						$b_amount,
+						$b_id
+					));
+
+
+		}
+		catch (Exception $exc) {
+			echo $exc->getTraceAsString();
+			throw $exc;
+		}
+
+	}
+	/**
+	 *@brief insert budget
+	 */
+	function insert($p_array)
+	{
+		global $cn;
+		try {
+			extract ($p_array);
+			// update coprop.budget
+			$this->b_id=3D$cn->get_value("insert into coprop.budget (b_name,b_sta=
rt,b_end,b_amount)
+				values ($1,
+					to_date($2,'DD.MM.YYYY'),
+					to_date($3,'DD.MM.YYYY'),
+					$4) returning b_id
+					",array(
+						strip_tags($b_name),
+						$b_start,
+						$b_end,
+						$b_amount
+					));
+
+
+		}
+		catch (Exception $exc) {
+			echo $exc->getTraceAsString();
+			throw $exc;
+		}
+
+	}
+	function save_detail($p_array)
+	{
+		extract($p_array);
+		global $cn;
+		try
+		{
+			$max=3Dcount($bt_id);
+			for ($i=3D0;$i<MAXROWBUD;$i++)
+			{
+
+				if ( $bt_id[$i]=3D=3D 0)
+				{
+					if ( strlen(trim(${'f_id'.$i})) !=3D 0)
+					{
+						$f_id=3D$cn->get_value("select f_id from vw_fiche_attr where quick=
_code=3Dupper(trim($1))",
+								array(${'f_id'.$i}));
+
+						// insert into coprop.budget_detail
+							$cn->exec_sql("insert into coprop.budget_detail (bt_label,f_id,b_=
id,bt_amount,cr_id) ".
+								" values ($1,$2,$3,$4,$5)",
+								array(
+									strip_tags($bt_label[$i]),
+									$f_id,
+									$this->b_id,
+									$bt_amount[$i],
+									$key[$i]
+									)
+
+							);
+					}
+				}
+				else
+				{
+					// update into coprop.budget_detail
+					if ( strlen(trim(${'f_id'.$i})) !=3D 0)
+					{
+						$f_id=3D$cn->get_value("select f_id from vw_fiche_attr where quick=
_code=3Dupper(trim($1))",
+								array(${'f_id'.$i}));
+
+						$cn->exec_sql("update coprop.budget_detail set bt_label=3D$1,f_id=3D=
$2,bt_amount=3D$3,cr_id=3D$4 ".
+								" where bt_id=3D$5",
+								array(
+									strip_tags($bt_label[$i]),
+									$f_id,
+									$bt_amount[$i],
+									$key[$i],
+									$bt_id[$i]
+									)
+
+							);
+
+					} else {
+						$cn->exec_sql("delete from coprop.budget_detail where bt_id=3D$1",=
array($bt_id[$i]));
+					}
+
+				}
+			}
+
+
+		}
+		catch (Exception $exc)
+		{
+			echo $exc->getTraceAsString();
+			throw $exc;
+		}
+
+	}
+       function get_detail()
+       {
+           global $cn;
+           $array=3D$cn->get_array("select * from coprop.budget_detail w=
here b_id=3D$1",
+                   array($this->b_id));
+           return $array;
+       }
+}
+?>



From MAILER-DAEMON Mon Jan 16 06:26:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rmkhq-0006zD-9r
	for mharc-phpcompta-dev@gnu.org; Mon, 16 Jan 2012 06:26:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 16 Jan 2012 12:27:55 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.97463.1326713189.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4718 - 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: Mon, 16 Jan 2012 11:26:28 -0000

Author: danydb
Date: 2012-01-16 12:27:54 +0100 (Mon, 16 Jan 2012)
New Revision: 4718

Modified:
   phpcompta/trunk/include/modele.inc.php
Log:
bug : remove import_tmp

Modified: phpcompta/trunk/include/modele.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/modele.inc.php	2012-01-14 14:39:38 UTC (rev 4=
717)
+++ phpcompta/trunk/include/modele.inc.php	2012-01-16 11:27:54 UTC (rev 4=
718)
@@ -117,7 +117,6 @@
=20
 	$Res =3D $cn_mod->exec_sql('delete from operation_analytique');
=20
-	$Res =3D $cn_mod->exec_sql("truncate table import_tmp");
 	//	Reset the closed periode
 	$Res =3D $cn_mod->exec_sql("update parm_periode set p_closed=3D'f'");
 	$Res =3D $cn_mod->exec_sql('delete from jrn_periode');



From MAILER-DAEMON Mon Jan 16 09:26:29 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RmnW1-0005Ls-IG
	for mharc-phpcompta-dev@gnu.org; Mon, 16 Jan 2012 09:26:29 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 16 Jan 2012 15:27:52 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.97836.1326723988.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4719 - 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, 16 Jan 2012 14:26:28 -0000

Author: danydb
Date: 2012-01-16 15:27:52 +0100 (Mon, 16 Jan 2012)
New Revision: 4719

Modified:
   phpcompta/trunk/include/class_periode.php
   phpcompta/trunk/include/periode.inc.php
   phpcompta/trunk/include/template/periode_add_exercice.php
Log:
Add 12 or 13 periodes

Modified: phpcompta/trunk/include/class_periode.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_periode.php	2012-01-16 11:27:54 UTC (re=
v 4718)
+++ phpcompta/trunk/include/class_periode.php	2012-01-16 14:27:52 UTC (re=
v 4719)
@@ -345,6 +345,9 @@
     }
     function insert($p_date_start,$p_date_end,$p_exercice)
     {
+        try
+        {
+
         if (isDate($p_date_start) =3D=3D null ||
                 isDate($p_date_end) =3D=3D null ||
                 strlen (trim($p_exercice)) =3D=3D 0 ||
@@ -352,7 +355,7 @@
 	  ||$p_exercice < 2000 || $p_exercice > 2099 )
=20
         {
-            return 1;
+	  throw new Exception ("Param=C3=A8tre invalide");
         }
         $p_id=3D$this->cn->get_next_seq('s_periode');
         $sql=3Dsprintf(" insert into parm_periode(p_id,p_start,p_end,p_c=
losed,p_exercice)".
@@ -362,8 +365,6 @@
                      $p_date_start,
                      $p_date_end,
                      $p_exercice);
-        try
-        {
             $this->cn->start();
             $Res=3D$this->cn->exec_sql($sql);
             $Res=3D$this->cn->exec_sql("insert into jrn_periode (jrn_def=
_id,p_id,status) ".
@@ -484,19 +485,32 @@
     /**
      *add a exerice of 13 periode
      */
-    function insert_exercice($p_exercice)
+    function insert_exercice($p_exercice,$nb_periode)
     {
       try
 	{
+	  if ( $nb_periode !=3D 12 && $nb_periode !=3D 13) throw new Exception =
('Nombre de p=C3=A9riode incorrectes');
 	  $this->cn->start();
 	  for ($i=3D1;$i < 12;$i++)
 	    {
 	      $date_start=3Dsprintf('01.%02d.%d',$i,$p_exercice);
 	      $date_end=3D$this->cn->get_value("select to_char(to_date('$date_s=
tart','DD.MM.YYYY')+interval '1 month'-interval '1 day','DD.MM.YYYY')");
-	      $this->insert($date_start,$date_end,$p_exercice);
+	      if ( $this->insert($date_start,$date_end,$p_exercice) !=3D 0)
+		{
+		  throw new Exception('Erreur insertion p=C3=A9riode');
+		}
 	    }
-	  $this->insert('01.12.'.$p_exercice,'31.12.'.$p_exercice,$p_exercice);
+	  if ( $nb_periode=3D=3D12 && $this->insert('01.12.'.$p_exercice,'31.12=
.'.$p_exercice,$p_exercice) !=3D 0 )=20
+	    {=20
+	      throw new Exception('Erreur insertion p=C3=A9riode');
+	    }
+	  if ( $nb_periode=3D=3D13)=20
+	    {=20
+	      if ($this->insert('01.12.'.$p_exercice,'30.12.'.$p_exercice,$p_ex=
ercice) !=3D 0 ) 	      throw new Exception('Erreur insertion p=C3=A9riod=
e');
+	      if ($this->insert('31.12.'.$p_exercice,'31.12.'.$p_exercice,$p_ex=
ercice) !=3D 0 ) 	      throw new Exception('Erreur insertion p=C3=A9riod=
e');
+	    }
=20
+
 	  $this->cn->commit();
 	}
       catch (Exception $e)

Modified: phpcompta/trunk/include/periode.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/periode.inc.php	2012-01-16 11:27:54 UTC (rev =
4718)
+++ phpcompta/trunk/include/periode.inc.php	2012-01-16 14:27:52 UTC (rev =
4719)
@@ -51,7 +51,7 @@
   {
     $obj=3Dnew Periode($cn);
     $exercice=3D$cn->get_value('select max(p_exercice::float)+1 from par=
m_periode');
-    if ( $obj->insert_exercice($exercice) =3D=3D 1 )
+    if ( $obj->insert_exercice($exercice,$_POST['nb_exercice']) =3D=3D 1=
 )
     {
         alert(_('Valeurs invalides'));
     }
@@ -102,6 +102,12 @@
     $per->set_jrn($jrn);
=20
     $per->display_form_periode();
+    $nb_exercice=3Dnew ISelect("nb_exercice");
+    $nb_exercice->value=3Darray(
+			      array('value'=3D>12,'label'=3D>"12 p=C3=A9riodes"),
+			      array('value'=3D>13,'label'=3D>"13 p=C3=A9riodes")
+			      );
+
     require_once('template/periode_add_exercice.php');
 }
 else

Modified: phpcompta/trunk/include/template/periode_add_exercice.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/periode_add_exercice.php	2012-01-16 =
11:27:54 UTC (rev 4718)
+++ phpcompta/trunk/include/template/periode_add_exercice.php	2012-01-16 =
14:27:52 UTC (rev 4719)
@@ -1,12 +1,16 @@
 <fieldset><legend>Ajout d'un exercice</legend>
-Ajout d'un exercice comptable de 12 p=C3=A9riodes, commen=C3=A7ant le 1 =
janvier et terminant le 31 d=C3=A9cembre. Si vous souhaitez une 13i=C3=A8=
me p=C3=A9riode (le 31/12)
-pour faire tous les =C3=A9critures de fin d'exercice: amortissements, r=C3=
=A9gulations de compte... Il vous suffit de raccourcir d'allonger la p=C3=
=A9riode de d=C3=A9cembre jusqu'au 30/12
-et d'ajouter une p=C3=A9riode d'un jour allant du 31/12 au 31/12
+<ul>
+<li>
+Exercice en 12 p=C3=A9riodes : Ajout d'un exercice comptable de 12 p=C3=A9=
riodes, commen=C3=A7ant le 1 janvier et terminant le 31 d=C3=A9cembre. </=
li>
+<li>   Exercice en 13 p=C3=A9riodes: Ajout d'une p=C3=A9riode d'un jour =
le 31/12. Cette p=C3=A9riode est utilis=C3=A9e=20
+pour faire tous les =C3=A9critures de fin d'exercice: amortissements, r=C3=
=A9gulations de compte... Avec une 13i=C3=A8me p=C3=A9riode, cela simplif=
ie les pr=C3=A9visions, les rapports...</li>
+</ul>
+
 <form method=3D"post" onsubmit=3D"return confirm('Confirmez vous l\'ajou=
t d\'un exercice comptable ?')">
 <?
 echo HtmlInput::hidden("ac",$_REQUEST['ac']);
+echo $nb_exercice->input();
 echo HtmlInput::hidden("jrn_def_id","0");
-echo HtmlInput::hidden("jrn_def_id","0");
 echo Dossier::hidden();
 echo HtmlInput::submit("add_exercice","Ajout d'un exercice comptable");
 ?>



From MAILER-DAEMON Mon Jan 16 09:27:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RmnWa-0005MY-LQ
	for mharc-phpcompta-dev@gnu.org; Mon, 16 Jan 2012 09:27:04 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 16 Jan 2012 15:28:34 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.97837.1326724024.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4720 - 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, 16 Jan 2012 14:27:03 -0000

Author: danydb
Date: 2012-01-16 15:28:34 +0100 (Mon, 16 Jan 2012)
New Revision: 4720

Modified:
   phpcompta/trunk/include/template/periode_add_exercice.php
Log:
Add 12 or 13 periodes

Modified: phpcompta/trunk/include/template/periode_add_exercice.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/periode_add_exercice.php	2012-01-16 =
14:27:52 UTC (rev 4719)
+++ phpcompta/trunk/include/template/periode_add_exercice.php	2012-01-16 =
14:28:34 UTC (rev 4720)
@@ -3,7 +3,7 @@
 <li>
 Exercice en 12 p=C3=A9riodes : Ajout d'un exercice comptable de 12 p=C3=A9=
riodes, commen=C3=A7ant le 1 janvier et terminant le 31 d=C3=A9cembre. </=
li>
 <li>   Exercice en 13 p=C3=A9riodes: Ajout d'une p=C3=A9riode d'un jour =
le 31/12. Cette p=C3=A9riode est utilis=C3=A9e=20
-pour faire tous les =C3=A9critures de fin d'exercice: amortissements, r=C3=
=A9gulations de compte... Avec une 13i=C3=A8me p=C3=A9riode, cela simplif=
ie les pr=C3=A9visions, les rapports...</li>
+pour faire toutes les =C3=A9critures de fin d'exercice: amortissements, =
r=C3=A9gulations de compte... Avec une 13i=C3=A8me p=C3=A9riode, cela sim=
plifie les pr=C3=A9visions, les rapports...</li>
 </ul>
=20
 <form method=3D"post" onsubmit=3D"return confirm('Confirmez vous l\'ajou=
t d\'un exercice comptable ?')">
@@ -16,4 +16,4 @@
 ?>
=20
 </form>
-</fieldset>
\ No newline at end of file
+</fieldset>



From MAILER-DAEMON Tue Jan 17 04:35:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rn5Rz-00022L-NS
	for mharc-phpcompta-dev@gnu.org; Tue, 17 Jan 2012 04:35:31 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 17 Jan 2012 10:36:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.100976.1326792931.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r292 - trunk/coprop/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 Jan 2012 09:35:30 -0000

Author: danydb
Date: 2012-01-17 10:36:47 +0100 (Tue, 17 Jan 2012)
New Revision: 292

Modified:
   trunk/coprop/include/appel_fond.inc.php
Log:
missing af_id

Modified: trunk/coprop/include/appel_fond.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/coprop/include/appel_fond.inc.php	2012-01-16 10:00:39 UTC (rev =
291)
+++ trunk/coprop/include/appel_fond.inc.php	2012-01-17 09:36:47 UTC (rev =
292)
@@ -85,6 +85,7 @@
 	 */
 	echo '<form method=3D"POST">';
 	$ledger=3Dnew Acc_Ledger($cn,$_GET['p_jrn']);
+	echo HtmlInput::hidden('af_id',$_GET['af_id']);
 	$ledger->with_concerned=3Dfalse;
 	echo $ledger->input($_GET,1);
 	echo HtmlInput::submit('confirm','Confirmer');



From MAILER-DAEMON Wed Jan 18 10:30:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnXT4-0008Tj-J9
	for mharc-phpcompta-dev@gnu.org; Wed, 18 Jan 2012 10:30:30 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 18 Jan 2012 16:31:32 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.104406.1326900629.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4721 - 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 Jan 2012 15:30:28 -0000

Author: danydb
Date: 2012-01-18 16:31:31 +0100 (Wed, 18 Jan 2012)
New Revision: 4721

Modified:
   phpcompta/trunk/include/class_iposte.php
Log:
add css_size property to iposte=20

Modified: phpcompta/trunk/include/class_iposte.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_iposte.php	2012-01-16 14:28:34 UTC (rev=
 4720)
+++ phpcompta/trunk/include/class_iposte.php	2012-01-18 15:31:31 UTC (rev=
 4721)
@@ -150,7 +150,12 @@
=20
         /* create the text  */
         $itext=3Dnew IText($this->name,$this->value);
-		$itext->size=3D$this->size;
+
+	if ( isset ($this->css_size))
+	     $itext->css_size=3D$this->css_size;
+	else
+	     $itext->size=3D$this->size;
+
         /* create the button */
         $ibutton=3D$this->dsp_button();
         if ( $this->table=3D=3D3)



From MAILER-DAEMON Wed Jan 18 10:30:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnXTF-0008VP-LK
	for mharc-phpcompta-dev@gnu.org; Wed, 18 Jan 2012 10:30:41 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 18 Jan 2012 16:31:47 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.104409.1326900640.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4722 - 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: Wed, 18 Jan 2012 15:30:40 -0000

Author: danydb
Date: 2012-01-18 16:31:47 +0100 (Wed, 18 Jan 2012)
New Revision: 4722

Modified:
   phpcompta/trunk/include/class_anticipation.php
   phpcompta/trunk/include/template/forecast-detail.php
   phpcompta/trunk/include/template/forecast_result.php
Log:
#511 : utilisation de formule dans les pr?\195?\169visions

Modified: phpcompta/trunk/include/class_anticipation.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_anticipation.php	2012-01-18 15:31:31 UT=
C (rev 4721)
+++ phpcompta/trunk/include/class_anticipation.php	2012-01-18 15:31:47 UT=
C (rev 4722)
@@ -36,6 +36,8 @@
 require_once 'class_fiche.php';
 require_once 'class_acc_account_ledger.php';
 require_once 'class_periode.php';
+require_once 'class_impress.php';
+
 class Anticipation
 {
     /* example private $variable=3Darray("val1"=3D>1,"val2"=3D>"Seconde =
valeur","val3"=3D>0); */
@@ -137,10 +139,12 @@
 	                                 where p_start >=3D (select p_start fro=
m parm_periode where p_id=3D$start)
                                          and p_end <=3D (select p_end fr=
om parm_periode where p_id=3D$end)
 					 order by p_start;");
+	$error=3Darray();
         for($j=3D0;$j<count($aCat);$j++)
         {
             $aItem[$j]=3D$this->cn->get_array('select fi_card,fi_account=
,fi_text,fi_amount,fi_debit from forecast_item where fc_id=3D$1  and fi_p=
id=3D0 order by fi_order ',array($aCat[$j]['fc_id']));
             $aPerMonth[$j]=3D$this->cn->get_array('select fi_pid,fi_card=
,fi_account,fi_text,fi_amount,fi_debit from forecast_item where fc_id=3D$=
1 and fi_pid !=3D0 order by fi_order ',array($aCat[$j]['fc_id']));
+
             /* compute the real amount for periode */
             for($k=3D0;$k<count($aItem[$j]);$k++)
             {
@@ -151,15 +155,19 @@
                     {
                         $fiche->id=3D$aItem[$j][$k]['fi_card'];
                         $amount=3D$fiche->get_solde_detail("j_tech_per =3D=
 ".$aPeriode[$l]['p_id']);
+			if ($aItem[$j][$k]['fi_debit']=3D=3D'C' && $amount['debit']>$amount['=
credit'])  $amount['solde']=3D$amount["solde"]*(-1);
+			if ($aItem[$j][$k]['fi_debit']=3D=3D'D' && $amount['debit']<$amount['=
credit'])  $amount['solde']=3D$amount["solde"]*(-1);
=20
                     }
                     else
                     {
                         $poste->id=3D$aItem[$j][$k]['fi_account'];
-                        $amount=3D$poste->get_solde_detail("j_tech_per=3D=
 ".$aPeriode[$l]['p_id']);
+			$aresult=3DImpress::parse_formula($this->cn,"OK",$poste->id,$aPeriode=
[$l]['p_id'],$aPeriode[$l]['p_id']);
+                        $tmp_label=3D$aresult['desc'];
+			$amount['solde']=3D$aresult['montant'];
+
+			if ( $tmp_label !=3D 'OK') $error[]=3D"<li> ".$aItem[$j][$k]['fi_text=
'].$poste->id.'</li>';
                     }
-                    if ($aItem[$j][$k]['fi_debit']=3D=3D'C' && $amount['=
debit']>$amount['credit'])  $amount['solde']=3D$amount["solde"]*(-1);
-                    if ($aItem[$j][$k]['fi_debit']=3D=3D'D' && $amount['=
debit']<$amount['credit'])  $amount['solde']=3D$amount["solde"]*(-1);
                     $aReal[$j][$k][$l]=3D$amount['solde'];
                 }
             }
@@ -367,8 +375,12 @@
             /* Accounting*/
             $account=3Dnew IPoste('an_cat_acc'.$i);
             $account->set_attribute('ipopup','ipop_account');
-            $account->set_attribute('label','an_label'.$i);
+	    //            $account->set_attribute('label','an_label'.$i);
             $account->set_attribute('account','an_cat_acc'.$i);
+	    $account->set_attribute('bracket',1);
+	    $account->set_attribute('no_overwrite',1);
+	    $account->set_attribute('noquery',1);
+	    $account->css_size=3D"85%";
             $account->value=3D(isset($value[$i]["fi_account"]))?$value[$=
i]["fi_account"]:"";
             $aCat[$i]['account']=3D$account->input();
             /*Quick Code */

Modified: phpcompta/trunk/include/template/forecast-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
--- phpcompta/trunk/include/template/forecast-detail.php	2012-01-18 15:31=
:31 UTC (rev 4721)
+++ phpcompta/trunk/include/template/forecast-detail.php	2012-01-18 15:31=
:47 UTC (rev 4722)
@@ -5,8 +5,8 @@
 <table id=3D"fortable">
 <tr>
 <th><?php echo _('Cat=C3=A9gorie');?></th>
-<th><?php echo _('Poste Comptable');?></th>
-<th><?php echo _('QuickCode');?></th>
+<th style=3D"width:40%"><?php echo _('Formules');?></th>
+<th><?php echo _('ou QuickCode');?></th>
 <th><?php echo _('Libell=C3=A9');?></th>
 <th><?php echo _('Montant');?></th>
 <th><?php echo _('D=C3=A9bit ou Cr=C3=A9dit');?></th>

Modified: phpcompta/trunk/include/template/forecast_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/forecast_result.php	2012-01-18 15:31=
:31 UTC (rev 4721)
+++ phpcompta/trunk/include/template/forecast_result.php	2012-01-18 15:31=
:47 UTC (rev 4722)
@@ -166,3 +166,18 @@
=20
=20
 <?php endfor;?>
+<? if ( ! empty ($error) ) : ?>
+<div class=3D"error">
+D=C3=A9sol=C3=A9 il y a des formules incorrectes=20
+<ul style=3D"list-style-type:none">
+
+   <? $last=3D"";?>
+   <? for ($i=3D0;$i<count($error);$i++) : ?>
+<?
+   if ( $last !=3D $error[$i] ) {  echo h($error[$i]); }
+$last=3D$error[$i];
+endfor;
+?>
+</ul>
+</div>
+<? endif; ?>
\ No newline at end of file



From MAILER-DAEMON Thu Jan 19 05:25:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RnpBK-0008VJ-Rk
	for mharc-phpcompta-dev@gnu.org; Thu, 19 Jan 2012 05:25:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Thu, 19 Jan 2012 11:26:25 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.106494.1326968722.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r293 - trunk/coprop/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, 19 Jan 2012 10:25:22 -0000

Author: danydb
Date: 2012-01-19 11:26:25 +0100 (Thu, 19 Jan 2012)
New Revision: 293

Modified:
   trunk/coprop/include/class_coprop_appel_fond.php
Log:
delete properly old unconfirmed data and do not record amount =3D=3D 0

Modified: trunk/coprop/include/class_coprop_appel_fond.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/coprop/include/class_coprop_appel_fond.php	2012-01-17 09:36:47 =
UTC (rev 292)
+++ trunk/coprop/include/class_coprop_appel_fond.php	2012-01-19 10:26:25 =
UTC (rev 293)
@@ -31,7 +31,7 @@
         global $cn;
         $this->id=3D$cn->get_next_seq('coprop.appel_fond_id');
         // clean old
-        $cn->exec_sql("delete from coprop.appel_fond where af_confirmed=3D=
'N' and tech_per < tech_per - interval '5 hours' ");
+        $cn->exec_sql("delete from coprop.appel_fond where af_confirmed=3D=
'N' and tech_per < now() - interval '5 hours' ");
=20
         // insert new unconfirmed
         $cn->exec_sql("insert into coprop.appel_fond(af_id,af_date,af_co=
nfirmed,af_percent,af_amount,af_card,af_ledger,tech_per,b_id,cr_id)
@@ -65,7 +65,7 @@
=20
                 $afd->afd_amount=3D  bcmul($fract,$p_amount);
=20
-                $afd->insert();
+                if ( $afd->afd_amount !=3D 0 )$afd->insert();
=20
             }
 			$cn->commit();
@@ -189,7 +189,7 @@
=20
 		echo '<FORM METHOD=3D"GET" class=3D"print">';
 		echo $ledger->input($array,0);
-		echo HtmlInput::request_to_hidden(array('ac', 'plugin_code','sa'));
+		echo HtmlInput::request_to_hidden(array('amount','key','w_categorie_ap=
pel','b_id','aft','bud_pct','p_date','ac', 'plugin_code','sa'));
 		echo HtmlInput::extension() . dossier::hidden();
 		echo HtmlInput::hidden('action', 'confirm');
 		echo HtmlInput::hidden('af_id', $this->id);



From MAILER-DAEMON Fri Jan 20 10:48:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RoGhV-0006gQ-Aa
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Jan 2012 10:48:25 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Jan 2012 16:49:19 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.112661.1327074503.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4723 - 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: Fri, 20 Jan 2012 15:48:22 -0000

Author: danydb
Date: 2012-01-20 16:49:18 +0100 (Fri, 20 Jan 2012)
New Revision: 4723

Modified:
   phpcompta/trunk/html/ajax_card.php
Log:
cosmetic : center the text in dialog box for selecting a type


Modified: phpcompta/trunk/html/ajax_card.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_card.php	2012-01-18 15:31:47 UTC (rev 4722)
+++ phpcompta/trunk/html/ajax_card.php	2012-01-20 15:49:18 UTC (rev 4723)
@@ -257,9 +257,10 @@
     else
     {
         $r=3D'';
-	$html.=3D'<p class=3D"notice"> Choississez la cat=C3=A9gorie de fiche =C3=
=A0 laquelle vous aimeriez ajouter une fiche</p>';
+	$r.=3D'<p class=3D"notice" style=3D"padding-left:2em"> Choississez la c=
at=C3=A9gorie de fiche =C3=A0 laquelle vous aimeriez ajouter une fiche</p=
>';
         $isel=3Dnew ISelect('fd_id');
         $isel->value=3D$array;
+	$r.=3D'<div style=3D"text-align:center">';
         $r.=3D'<form id=3D"sel_type" method=3D"GET" onsubmit=3D"this.ipo=
pup=3D'.$ctl.';dis_blank_card(this);return false;" >';
         $r.=3Ddossier::hidden();
         $r.=3D(isset($ref))?HtmlInput::hidden('ref',1):'';
@@ -270,6 +271,7 @@
 	$r.=3DHtmlInput::button('Annuler','Annuler'," onclick=3D\"removeDiv('$c=
tl')\" ");
 	$r.=3D'</p>';
         $r.=3D'</form>';
+	$r.=3D'</div>';
         $html.=3D$r;
=20
     }



From MAILER-DAEMON Fri Jan 20 13:22:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RoJ6P-0004vR-FJ
	for mharc-phpcompta-dev@gnu.org; Fri, 20 Jan 2012 13:22:17 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Fri, 20 Jan 2012 19:23:21 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.113194.1327083735.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4724 - 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 Jan 2012 18:22:15 -0000

Author: danydb
Date: 2012-01-20 19:23:20 +0100 (Fri, 20 Jan 2012)
New Revision: 4724

Modified:
   phpcompta/trunk/include/class_anc_grandlivre.php
   phpcompta/trunk/include/class_anc_operation.php
Log:

Bug anc : order date + filter date


Modified: phpcompta/trunk/include/class_anc_grandlivre.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_anc_grandlivre.php	2012-01-20 15:49:18 =
UTC (rev 4723)
+++ phpcompta/trunk/include/class_anc_grandlivre.php	2012-01-20 18:23:20 =
UTC (rev 4724)
@@ -28,6 +28,22 @@
=20
 class Anc_GrandLivre extends Anc_Print
 {
+	    function set_sql_filter()
+    {
+        $sql=3D"";
+        $and=3D" and ";
+        if ( $this->from !=3D "" )
+        {
+            $sql.=3D"$and oa_date >=3D to_date('".$this->from."','DD.MM.=
YYYY')";
+        }
+        if ( $this->to !=3D "" )
+        {
+            $sql.=3D" $and oa_date <=3D to_date('".$this->to."','DD.MM.Y=
YYY')";
+        }
+
+        return $sql;
+
+    }
       /*!
      * \brief load the data from the database
      *
@@ -62,10 +78,9 @@
 	from operation_analytique as B join poste_analytique using(po_id)
 	left join jrnx using (j_id)
 	left join jrn on  (j_grpt=3Djr_grpt_id)
-             where $pa_id_cond oa_amount <> 0.0  $cond_poste
-	order by po_name,oa_date ,qcode,j_poste");
+             where $pa_id_cond oa_amount <> 0.0  $cond_poste  $filter_da=
te
+	order by po_name,to_date(oa_date,'DD.MM.YYYY') ,qcode,j_poste");
=20
-
         return $array;
     }
=20
@@ -92,8 +107,8 @@
 	from operation_analytique as B join poste_analytique using(po_id)
 	left join jrnx using (j_id)
 	left join jrn on  (j_grpt=3Djr_grpt_id)
-             where $pa_id_cond oa_amount <> 0.0  $cond_poste
-	order by po_name,oa_date ,qcode,j_poste");
+             where $pa_id_cond oa_amount <> 0.0  $cond_poste $filter_dat=
e
+	order by po_name,to_date(oa_date,'DD.MM.YYYY') ,qcode,j_poste");
=20
=20
         return $array;

Modified: phpcompta/trunk/include/class_anc_operation.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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_anc_operation.php	2012-01-20 15:49:18 U=
TC (rev 4723)
+++ phpcompta/trunk/include/class_anc_operation.php	2012-01-20 18:23:20 U=
TC (rev 4724)
@@ -154,7 +154,7 @@
 	left join jrnx using (j_id)
 	left join jrn on  (j_grpt=3Djr_grpt_id)
              where $pa_id_cond oa_amount <> 0.0 $cond $cond_poste
-	order by oa_date ,oa_group,oa_debit desc,oa_id";
+	order by jr_date,oa_group,oa_debit desc,oa_id";
=20
         $RetSql=3D$this->db->exec_sql($sql);
=20



From MAILER-DAEMON Sun Jan 22 17:26:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rp5sC-0001ZA-Nj
	for mharc-phpcompta-dev@gnu.org; Sun, 22 Jan 2012 17:26:52 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Sun, 22 Jan 2012 23:27:50 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.116607.1327271211.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4725 - 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: Sun, 22 Jan 2012 22:26:51 -0000

Author: danydb
Date: 2012-01-22 23:27:48 +0100 (Sun, 22 Jan 2012)
New Revision: 4725

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

Manuel corrig?\195?\169


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)



From MAILER-DAEMON Mon Jan 23 04:41:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpGOo-0001Jp-LG
	for mharc-phpcompta-dev@gnu.org; Mon, 23 Jan 2012 04:41:14 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 23 Jan 2012 10:42:07 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.117242.1327311674.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4726 - 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, 23 Jan 2012 09:41:13 -0000

Author: danydb
Date: 2012-01-23 10:42:06 +0100 (Mon, 23 Jan 2012)
New Revision: 4726

Added:
   phpcompta/tags/rel600/
Log:
official release


Copied: phpcompta/tags/rel600 (from rev 4725, phpcompta/trunk)



From MAILER-DAEMON Mon Jan 23 04:42:22 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpGPu-0001sK-9p
	for mharc-phpcompta-dev@gnu.org; Mon, 23 Jan 2012 04:42:22 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 23 Jan 2012 10:43:21 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.117247.1327311741.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r294 - tag
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, 23 Jan 2012 09:42:20 -0000

Author: danydb
Date: 2012-01-23 10:43:20 +0100 (Mon, 23 Jan 2012)
New Revision: 294

Added:
   tag/rel600/
Log:
official release


Copied: tag/rel600 (from rev 293, trunk)



From MAILER-DAEMON Mon Jan 23 04:48:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpGVg-0005jA-Ei
	for mharc-phpcompta-dev@gnu.org; Mon, 23 Jan 2012 04:48:20 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 23 Jan 2012 10:49:14 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.117261.1327312099.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4727 - in phpcompta: branches 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, 23 Jan 2012 09:48:18 -0000

Author: danydb
Date: 2012-01-23 10:49:14 +0100 (Mon, 23 Jan 2012)
New Revision: 4727

Added:
   phpcompta/branches/rel600/
Removed:
   phpcompta/tags/rel600/
Log:
Use branch instead of tags


Copied: phpcompta/branches/rel600 (from rev 4726, phpcompta/tags/rel600)



From MAILER-DAEMON Mon Jan 23 04:49:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpGWM-0005oH-Mx
	for mharc-phpcompta-dev@gnu.org; Mon, 23 Jan 2012 04:49:02 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Mon, 23 Jan 2012 10:50:02 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.117264.1327312142.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4728 - in phpcompta: branches 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, 23 Jan 2012 09:49:01 -0000

Author: danydb
Date: 2012-01-23 10:50:01 +0100 (Mon, 23 Jan 2012)
New Revision: 4728

Added:
   phpcompta/tags/rel600/
Removed:
   phpcompta/branches/rel600/
Log:
Renamed


Copied: phpcompta/tags/rel600 (from rev 4727, phpcompta/branches/rel600)



From MAILER-DAEMON Tue Jan 24 07:41:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rpfh1-0002Yk-17
	for mharc-phpcompta-dev@gnu.org; Tue, 24 Jan 2012 07:41:43 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 24 Jan 2012 13:42:21 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.119875.1327408902.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4729 - phpcompta/tags/rel600/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, 24 Jan 2012 12:41:41 -0000

Author: danydb
Date: 2012-01-24 13:42:20 +0100 (Tue, 24 Jan 2012)
New Revision: 4729

Modified:
   phpcompta/tags/rel600/include/user_detail.inc.php
Log:
Bug 517 : impossible d'effacer un utilisateur


Modified: phpcompta/tags/rel600/include/user_detail.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/rel600/include/user_detail.inc.php	2012-01-23 09:50:01=
 UTC (rev 4728)
+++ phpcompta/tags/rel600/include/user_detail.inc.php	2012-01-24 12:42:20=
 UTC (rev 4729)
@@ -86,12 +86,11 @@
     if (isset($_POST["DELETE"]))
     {
         $cn =3D new Database();
-        $Res =3D $cn->exec_sql("delete from priv_user where priv_jnt in =
( select jnt_id from jnt_use_dos where use_id=3D$1", array($uid));
+        $Res =3D $cn->exec_sql("delete from priv_user where priv_jnt in =
( select jnt_id from jnt_use_dos where use_id=3D$1)", array($uid));
         $Res =3D $cn->exec_sql("delete from jnt_use_dos where use_id=3D$=
1", array($uid));
         $Res =3D $cn->exec_sql("delete from ac_users where use_id=3D$1",=
 array($uid));
=20
-        echo "<center><H2 class=3D\"info\"> User " . h($_POST['fname']) =
. " " . h($_POST['lname']) . " (" .
-        h($_POST['login']) . ") est effac=C3=A9</H2></CENTER>";
+        echo "<center><H2 class=3D\"info\"> User " . h($_POST['fname']) =
. " " . h($_POST['lname']) . " est effac=C3=A9</H2></CENTER>";
         require_once("class_iselect.php");
         require_once("user.inc.php");
         return;



From MAILER-DAEMON Tue Jan 24 07:48:41 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rpfnl-0004jH-Pn
	for mharc-phpcompta-dev@gnu.org; Tue, 24 Jan 2012 07:48:41 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Tue, 24 Jan 2012 13:49:31 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.119878.1327409321.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4730 - phpcompta/tags/rel600/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, 24 Jan 2012 12:48:40 -0000

Author: danydb
Date: 2012-01-24 13:49:31 +0100 (Tue, 24 Jan 2012)
New Revision: 4730

Modified:
   phpcompta/tags/rel600/include/class_acc_ledger_fin.php
Log:
typo


Modified: phpcompta/tags/rel600/include/class_acc_ledger_fin.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/rel600/include/class_acc_ledger_fin.php	2012-01-24 12:=
42:20 UTC (rev 4729)
+++ phpcompta/tags/rel600/include/class_acc_ledger_fin.php	2012-01-24 12:=
49:31 UTC (rev 4730)
@@ -269,7 +269,7 @@
 		if ( $this->bank_id =3D=3D "" )
 		{
 			echo h2("Journal de banque non configur=C3=A9 ".$this->get_name(),' c=
lass=3D"error"');
-			echo '<span class=3D"error"> vous devez donner =C3=A0 ce journal un c=
ompte en banque (fiche), modifiez dans CFGLEDGER</span>';
+			echo '<span class=3D"error"> vous devez donner =C3=A0 ce journal un c=
ompte en banque (fiche), modifiez dans CFGLED</span>';
 			alert ("Journal de banque non configur=C3=A9 ".$this->get_name());
 		}
=20



From MAILER-DAEMON Tue Jan 24 18:41:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rppza-0008P3-Ce
	for mharc-phpcompta-dev@gnu.org; Tue, 24 Jan 2012 18:41:34 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 25 Jan 2012 00:42:15 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.121825.1327448492.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4731 - phpcompta/tags/rel600/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, 24 Jan 2012 23:41:32 -0000

Author: danydb
Date: 2012-01-25 00:42:14 +0100 (Wed, 25 Jan 2012)
New Revision: 4731

Modified:
   phpcompta/tags/rel600/include/class_fiche.php
Log:
probleme mise ?\195?\160 jour fiche avec double poste comptable

Modified: phpcompta/tags/rel600/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/rel600/include/class_fiche.php	2012-01-24 12:49:31 UTC=
 (rev 4730)
+++ phpcompta/tags/rel600/include/class_fiche.php	2012-01-24 23:42:14 UTC=
 (rev 4731)
@@ -934,47 +934,51 @@
                 }
=20
                 // account
-                if ( $id =3D=3D ATTR_DEF_ACCOUNT )
-                {
-                    $v=3Dsql_string($value);
-                    if ( trim($v) !=3D ''  )
-                    {
-			if ( strpos($v,',') !=3D 0)
-			{
-				$v=3D$this->cn->get_value('select format_account($1)',
-				    array($v));
-			}
-                        $sql=3Dsprintf("select account_update(%d,'%s')",
-                                     $this->id,$v);
-                        try
-                        {
-                            $this->cn->exec_sql($sql);
-                        }
-                        catch (Exception $e)
-                        {
-                            throw new Exception(__LINE__."Erreur : ce co=
mpte [$v] n'a pas de compte parent.".
-                                                "L'op&eacute;ration est =
annul&eacute;e");
-                        }
-                        continue;
-                    }
-                    if ( strlen (trim($v)) =3D=3D 0 )
-                    {
+                if ($id =3D=3D ATTR_DEF_ACCOUNT)
+				{
+					$v =3D sql_string($value);
+					if (trim($v) !=3D '')
+					{
+						if (strpos($v, ',') !=3D 0)
+						{
+							$ac_array =3D explode(",", $v);
+							if (count($ac_array) <> 2)
+								throw new Exception('D=C3=A9sol=C3=A9, il y a trop de virgule da=
ns le poste comptable ' . h($v));
+							$part1 =3D $ac_array[0];
+							$part2 =3D $ac_array[1];
+							$part1 =3D $this->cn->get_value('select format_account($1)', arra=
y($part1));
+							$part2 =3D $this->cn->get_value('select format_account($1)', arra=
y($part2));
+							$v =3D $part1 . ',' . $part2;
+						}
+						$sql =3D sprintf("select account_update(%d,'%s')", $this->id, $v);
+						try
+						{
+							$this->cn->exec_sql($sql);
+						}
+						catch (Exception $e)
+						{
+							throw new Exception(__LINE__ . "Erreur : ce compte [$v] n'a pas d=
e compte parent." .
+									"L'op&eacute;ration est annul&eacute;e");
+						}
+						continue;
+					}
+					if (strlen(trim($v)) =3D=3D 0)
+					{
=20
-                        $sql=3Dsprintf("select account_update(%d,null)",
-                                     $this->id);
-                        try
-                        {
-                            $Ret=3D$this->cn->exec_sql($sql);
-                        }
-                        catch (Exception $e)
-                        {
-                            throw new Exception(__LINE__."Erreur : ce co=
mpte [$v] n'a pas de compte parent.".
-                                                "L'op=C3=A9ration est an=
nul=C3=A9e");
-                        }
+						$sql =3D sprintf("select account_update(%d,null)", $this->id);
+						try
+						{
+							$Ret =3D $this->cn->exec_sql($sql);
+						}
+						catch (Exception $e)
+						{
+							throw new Exception(__LINE__ . "Erreur : ce compte [$v] n'a pas d=
e compte parent." .
+									"L'op=C3=A9ration est annul=C3=A9e");
+						}
=20
-                        continue;
-                    }
-                }
+						continue;
+					}
+				}
                 // TVA
                 if ( $id =3D=3D ATTR_DEF_TVA )
                 {



From MAILER-DAEMON Tue Jan 24 18:43:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rpq1F-0008W0-IE
	for mharc-phpcompta-dev@gnu.org; Tue, 24 Jan 2012 18:43:17 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 25 Jan 2012 00:44:06 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.121826.1327448597.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4732 - phpcompta/tags/rel600/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, 24 Jan 2012 23:43:16 -0000

Author: danydb
Date: 2012-01-25 00:44:06 +0100 (Wed, 25 Jan 2012)
New Revision: 4732

Modified:
   phpcompta/tags/rel600/include/class_acc_ledger_purchase.php
   phpcompta/tags/rel600/include/class_acc_ledger_sold.php
Log:
Esthetique : document g?\195?\169n?\195?\169r?\195?\169

Modified: phpcompta/tags/rel600/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/rel600/include/class_acc_ledger_purchase.php	2012-01-2=
4 23:42:14 UTC (rev 4731)
+++ phpcompta/tags/rel600/include/class_acc_ledger_purchase.php	2012-01-2=
4 23:44:06 UTC (rev 4732)
@@ -723,7 +723,7 @@
             if ( isset($_POST['gen_invoice']) )
             {
                 $ref_doc=3D $this->create_document($internal,$p_array);
-                $this->doc=3D _('Document g=C3=A9n=C3=A9r=C3=A9')."  : "=
;
+                $this->doc=3D _('Document g=C3=A9n=C3=A9r=C3=A9')."  : "=
."<br>";
                 $this->doc.=3D'<A style=3D"line" HREF=3D"show_pj.php?'.d=
ossier::get().'&jr_grpt_id=3D'.$seq.'&jrn=3D'.$this->id.'">'.$ref_doc.'</=
A>';
             }
=20

Modified: phpcompta/tags/rel600/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/rel600/include/class_acc_ledger_sold.php	2012-01-24 23=
:42:14 UTC (rev 4731)
+++ phpcompta/tags/rel600/include/class_acc_ledger_sold.php	2012-01-24 23=
:44:06 UTC (rev 4732)
@@ -498,7 +498,7 @@
                     if ( isset($_POST['gen_invoice']))
                     {
                         $file=3D$this->create_document($internal,$p_arra=
y);
-                        $this->doc=3D _('Document g=C3=A9n=C3=A9r=C3=A9'=
)."  : ";
+                        $this->doc=3D _('Document g=C3=A9n=C3=A9r=C3=A9'=
)."  : "."<br>";
                         $this->doc.=3D'<A class=3D"line" HREF=3D"show_pj=
.php?'.dossier::get().'&jr_grpt_id=3D'.$seq.'&jrn=3D'.$this->id.'">'.$fil=
e.'</A>';
                     }
             }



From MAILER-DAEMON Tue Jan 24 18:55:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RpqCp-0001KM-9c
	for mharc-phpcompta-dev@gnu.org; Tue, 24 Jan 2012 18:55:15 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 25 Jan 2012 00:56:11 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.121833.1327449314.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4733 - phpcompta/tags/rel600/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: Tue, 24 Jan 2012 23:55:14 -0000

Author: danydb
Date: 2012-01-25 00:56:11 +0100 (Wed, 25 Jan 2012)
New Revision: 4733

Modified:
   phpcompta/tags/rel600/html/js/acc_ledger.js
Log:
Probl?\195?\168me ajout ligne dans VEN / ACH si non assujetti TVA

Modified: phpcompta/tags/rel600/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/rel600/html/js/acc_ledger.js	2012-01-24 23:44:06 UTC (=
rev 4732)
+++ phpcompta/tags/rel600/html/js/acc_ledger.js	2012-01-24 23:56:11 UTC (=
rev 4733)
@@ -163,7 +163,7 @@
     }
     catch (e)
     {
-        alert("success_update_bank".e.message);
+        alert("success_update_bank"+e.message);
     }
 }
 /**
@@ -265,11 +265,12 @@
  */
 function ledger_add_row()
 {
+	try{
     style=3D'class=3D"input_text"';
     var mytable=3Dg("sold_item").tBodies[0];
     var ofirstRow=3Dmytable.rows[1];
     var line=3Dmytable.rows.length;
-    var nCell=3D9;
+    var nCell=3Dmytable.rows[1].cells.length;
     var row=3Dmytable.insertRow(line);
     var nb=3Dg("nb_item");
     for (var e=3D0;e<nCell;e++)
@@ -290,11 +291,12 @@
     g("e_march"+nb.value+"_price").value=3D'0';
     g("e_march"+nb.value).value=3D"";
     g("e_quant"+nb.value).value=3D"1";
-    g("e_march"+nb.value+"_tva_amount").value=3D0;
+	 if ($("e_march"+nb.value+"_tva_amount")) g("e_march"+nb.value+"_tva_am=
ount").value=3D0;
=20
     nb.value++;
=20
     new_tt.evalScripts();
+	} catch(e) { alert(e.message);}
=20
 }
 /**



From MAILER-DAEMON Tue Jan 24 19:45:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Rpqzm-0006AE-DU
	for mharc-phpcompta-dev@gnu.org; Tue, 24 Jan 2012 19:45:50 -0500
To: phpcompta-dev@nongnu.org
Content-Type: text/plain; charset=UTF-8
Date: Wed, 25 Jan 2012 01:46:44 +0100 (CET)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 91.121.80.190
Message-ID: <mailman.121869.1327452349.15006.phpcompta-dev@nongnu.org>
From: phpcompta-dev@nongnu.org
Subject: [Phpcompta-dev] r4734 - phpcompta/tags/rel600/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, 25 Jan 2012 00:45:48 -0000

Author: danydb
Date: 2012-01-25 01:46:43 +0100 (Wed, 25 Jan 2012)
New Revision: 4734

Modified:
   phpcompta/tags/rel600/include/user.inc.php
Log:
order in user

Modified: phpcompta/tags/rel600/include/user.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/rel600/include/user.inc.php	2012-01-24 23:56:11 UTC (r=
ev 4733)
+++ phpcompta/tags/rel600/include/user.inc.php	2012-01-25 00:46:43 UTC (r=
ev 4734)
@@ -101,7 +101,7 @@
 $header=3Dnew Sort_Table();
 $url=3Dbasename($_SERVER['PHP_SELF'])."?action=3D".$_REQUEST['action'];
 $header->add("Login", $url," order by use_login asc", "order by use_logi=
n desc","la", "ld");
-$header->add("Nom", $url," order by use_login asc", "order by use_login =
desc","na", "nd");
+$header->add("Nom", $url," order by use_name asc,use_first_name asc", "o=
rder by use_name desc,use_first_name desc","na", "nd");
 $header->add('Dossier',$url,' order by ag_dossier asc','order by ag_doss=
ier desc',
         'da','dd');
 $header->add("Actif", $url," order by use_active asc", "order by  use_ac=
tive desc","aa", "ad");



