phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r214 - in trunk/coprop: . include include/template


From: phpcompta-dev
Subject: [Phpcompta-dev] r214 - in trunk/coprop: . include include/template
Date: Sun, 25 Dec 2011 18:27:36 +0100 (CET)

Author: danydb
Date: 2011-12-25 18:27:34 +0100 (Sun, 25 Dec 2011)
New Revision: 214

Added:
   trunk/coprop/include/ajax_mod_copro_lot.php
   trunk/coprop/include/template/coprop_lot_mod.php
Modified:
   trunk/coprop/ajax.php
   trunk/coprop/coprop-constant.php
   trunk/coprop/coprop-javascript.js
   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
Log:

Copropri?\195?\169taire / lot : ajout, modification et enlever


Modified: trunk/coprop/ajax.php
===================================================================
--- trunk/coprop/ajax.php       2011-12-20 22:13:09 UTC (rev 213)
+++ trunk/coprop/ajax.php       2011-12-25 17:27:34 UTC (rev 214)
@@ -5,15 +5,18 @@
 extract($_GET);
 global $cn;
 $html='';$extra='';$ctl='';
-ob_start();
-switch($act) {
+switch ($act)
+{
        // ajout un lien copro + lot
-case 'addcopro':
-  /* the hide button */
-  require_once('include/ajax_add_copro_lot.php');
-  break;
-default:
+       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=$1",array($lot_id));
+               break;
+       default:
 
-       var_dump($_GET);
+               var_dump($_GET);
 }
 ?>

Modified: trunk/coprop/coprop-constant.php
===================================================================
--- trunk/coprop/coprop-constant.php    2011-12-20 22:13:09 UTC (rev 213)
+++ trunk/coprop/coprop-constant.php    2011-12-25 17:27:34 UTC (rev 214)
@@ -10,8 +10,9 @@
 require_once ('class_database.php');
 require_once 'include/class_copro_parameter.php';
 global $cn,$g_copro_parameter,$gDossier;
-
+$cn=Dossier::connect();
 $gDossier=Dossier::id();
 $g_copro_parameter=new Copro_Parameter();
+define ("COPRO_MAX_LOT",19);
 
 ?>
\ No newline at end of file

Modified: trunk/coprop/coprop-javascript.js
===================================================================
--- trunk/coprop/coprop-javascript.js   2011-12-20 22:13:09 UTC (rev 213)
+++ trunk/coprop/coprop-javascript.js   2011-12-25 17:27:34 UTC (rev 214)
@@ -5,17 +5,77 @@
 /**
  * Modifier un copropriétaire et les lots qu'il a
  */
-function mod_coprop(dossier,copro_qcode,plugin_code)
+function mod_coprop(dossier,coprop_id,plugin_code,ac)
 {
+       waiting_box();
        try
        {
-               alert('Modifier un copropriétaire et ses lots');
+               var 
queryString="plugin_code="+plugin_code+"&gDossier="+dossier+"&coprop_id="+coprop_id+'&ac='+ac+"&act=modcopro";
+               var action=new Ajax.Request ( 'ajax.php',
+               {
+                       method:'get',
+                       parameters:queryString,
+                       onFailure:null,
+                       onSuccess:function (response)
+                       {
+                               try
+                               {
+                                       remove_waiting_box();
+                                       $('listcoprolot').hide();
+                                       $('ajoutcopro').hide();
+                                       
$('divcopropmod').innerHTML=response.responseText;
+                                       //response.responseText.evalScripts();
+                               }
+                               catch(e)
+                               {
+                                       alert("Réponse Ajax ="+e.message);
+                               }
+                       }
+               }
+               );
        }
        catch(e)
        {
                alert(e.message);
        }
 }
+function remove_lot(plugin_code,ac,dossier,lot_id)
+{
+       if (! confirm("Vous voulez enlever ce lot ?")) { return;}
+       waiting_box();
+       try
+       {
+               var 
queryString="plugin_code="+plugin_code+"&gDossier="+dossier+"&lot_id="+lot_id+'&ac='+ac+"&act=removelot";
+               var action=new Ajax.Request ( 'ajax.php',
+               {
+                       method:'get',
+                       parameters:queryString,
+                       onFailure:null,
+                       onSuccess:function (response)
+                       {
+                               try
+                               {
+                                       remove_waiting_box();
+                                       alert("lot_id="+lot_id);
+                                       $("row"+lot_id).style.color="red";
+                                       
$("row"+lot_id).style.textDecoration="line-through";
+                                       $("col"+lot_id).innerHTML="Enlevé";
+
+                                       //response.responseText.evalScripts();
+                               }
+                               catch(e)
+                               {
+                                       alert("Réponse Ajax ="+e.message);
+                               }
+                       }
+               }
+               );
+       }
+       catch(e)
+       {
+               alert(e.message);
+       }
+}
 /**
  * Ajout un lien entre copropriétaire et lot
  */

Added: trunk/coprop/include/ajax_mod_copro_lot.php
===================================================================
--- trunk/coprop/include/ajax_mod_copro_lot.php                         (rev 0)
+++ trunk/coprop/include/ajax_mod_copro_lot.php 2011-12-25 17:27:34 UTC (rev 
214)
@@ -0,0 +1,60 @@
+<?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 by
+ *   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-1307  USA
+ */
+/* $Revision$ */
+
+// Copyright Author Dany De Bontridder address@hidden
+
+/**
+ * @file
+ * @brief modify copro. + lot
+ * parameter are
+ address@hidden
+ * array
+  'plugin_code' => string 'COPROP' (length=6)
+  'gDossier' => string '26' (length=2)
+  'coprop_id' => string '32' (length=2)
+  'ac' => string 'EXT/COPROP' (length=10)
+  'act' => string 'modcopro' (length=8)
+
+ address@hidden
+ */
+
+$copro=new Fiche($cn);
+$copro->id=$coprop_id;
+
+$acurrent=$cn->get_array("select lot.l_id   ,l_fiche_id,
+                       (select ad_value from fiche_detail where 
f_id=l_fiche_id and ad_id=1) as fiche_name,
+                       (select ad_value from fiche_detail where 
f_id=l_fiche_id and ad_id=23) as fiche_qcode,
+                       l_part
+                       from coprop.lot where coprop_fk=$1",
+               array($coprop_id));
+
+$not_assigned=$cn->get_array("select a.f_id,
+                       (select ad_value from fiche_detail as e where 
e.f_id=a.f_id and ad_id=1) as fiche_name,
+                       (select ad_value from fiche_detail as f where 
f.f_id=a.f_id and ad_id=23) as fiche_qcode,
+                       coalesce(l_part,0) as str_part
+                       from coprop.lot
+                       right join fiche as a on (l_fiche_id=a.f_id)
+                       where
+                       coalesce(coprop_fk,0) <>$1 and fd_id=$2",
+               array($coprop_id,$g_copro_parameter->categorie_lot));
+
+require_once("template/coprop_lot_mod.php")
+?>

Modified: trunk/coprop/include/class_copro_lot.php
===================================================================
--- trunk/coprop/include/class_copro_lot.php    2011-12-20 22:13:09 UTC (rev 
213)
+++ trunk/coprop/include/class_copro_lot.php    2011-12-25 17:27:34 UTC (rev 
214)
@@ -24,13 +24,172 @@
 /**
  * @file
  * @brief gère la liaison entre lots et copropriétaire
+ * table jnt_coprop_lot
  *
  */
-class Copro_List
+class Copro_Lot
 {
        function insert($p_array)
        {
-               
+               global $cn;
+               extract($p_array);
+               try
+               {
+                       // find the coprop
+                       $coprop=new Fiche($cn);
+                       $coprop->get_by_qcode($w_copro);
+                       if ($coprop->id == 0) throw new Exception("Ce 
copropriétaire $w_copro n'existe pas",1);
+                       $count=$cn->get_value("select count(*) from 
coprop.coproprietaire where c_fiche_id=$1",
+                                       array($coprop->id));
+                       if ( $count > 0 )                               throw 
new Exception ("Copropriétaire déjà encodé",2);
+                       $cn->exec_sql("insert into 
coprop.coproprietaire(c_fiche_id)values($1)",
+                                       array($coprop->id));
+                       // Find the lot.
+                       $str_warning="";$n_warning=0;
+                       for ($i=0;$i<count($lot);$i++)
+                       {
+                               $flot=new Fiche($cn);
+                               $flot->id=$lot[$i];
+
+                               $part=${'lot_per'.$lot[$i]};
+
+                               if ( trim($part)<>'' && isNumber($part)==0)
+                               {
+                                       // avertissement et mettre à 100%
+                                       $part=100;
+                               }
+                               // si w_lot pas inseré 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));
+
+                               // si w_lot insérer avec nouveau coprop. 
calculer somme jcl_part si total de jcl_part > 100 alors
+                               // avertissement
+                               $tot=$cn->get_value("select sum(l_part) from 
coprop.lot where l_fiche_id=$1",
+                                                       array($flot->id));
+                               if ($tot > 100 )
+                               {
+                                       // avertisement affecté à +100%
+                               } elseif ($tot < 100 )
+                               {
+                                       // avertisement affecté à - 100%
+
+                               }
+                       }
+               }
+               catch (Exception $e)
+               {
+                       echo $e->getMessage();
+                       echo $e->getTraceAsString();
+
+               }
+
+
        }
+       function add_lot($p_array)
+       {
+               global $cn;
+               extract($p_array);
+               try
+               {
+                       // find the coprop
+                       $coprop=new Fiche($cn);
+                       $coprop->id=$copro_id;
+                       if ($coprop->id == 0) throw new Exception("Ce 
copropriétaire $w_copro n'existe pas",1);
+                       $count=$cn->get_value("select count(*) from 
coprop.coproprietaire where c_fiche_id=$1",
+                                       array($coprop->id));
+                       // Find the lot.
+                       $str_warning="";$n_warning=0;
+                       for ($i=0;$i<count($lot);$i++)
+                       {
+                               $flot=new Fiche($cn);
+                               $flot->id=$lot[$i];
+
+                               $part=${'Part'.$lot[$i]};
+
+                               if ( trim($part)<>'' && isNumber($part)==0)
+                               {
+                                       // avertissement et mettre à 100%
+                                       $part=100;
+                               }
+                               // si w_lot pas inseré 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));
+
+                               // si w_lot insérer avec nouveau coprop. 
calculer somme jcl_part si total de jcl_part > 100 alors
+                               // avertissement
+                               $tot=$cn->get_value("select sum(l_part) from 
coprop.lot where l_fiche_id=$1",
+                                                       array($flot->id));
+                               if ($tot > 100 )
+                               {
+                                       // avertisement affecté à +100%
+                               } elseif ($tot < 100 )
+                               {
+                                       // avertisement affecté à - 100%
+
+                               }
+                       }
+               }
+               catch (Exception $e)
+               {
+                       echo $e->getMessage();
+                       echo $e->getTraceAsString();
+
+               }
+
+
+       }
+       function update_lot($p_array)
+       {
+               global $cn;
+               extract($p_array);
+               try
+               {
+                       $lot=$cn->get_array("select l_id,l_fiche_id,l_part from 
coprop.lot where coprop_fk=$1 ",
+                                       array($copro_id));
+                       // Find the lot.
+                       $str_warning="";$n_warning=0;
+                       for ($i=0;$i<count($lot);$i++)
+                       {
+                               $flot=new Fiche($cn);
+                               $flot->id=$lot[$i]['l_fiche_id'];
+
+                               $part=${'num'.$lot[$i]['l_id']};
+
+                               if ( trim($part)<>'' && isNumber($part)==0)
+                               {
+                                       // avertissement et mettre à 100%
+                                       $part=100;
+                               }
+                               // si w_lot pas inseré alors inserer
+                               $cn->exec_sql("update coprop.lot set l_part=$1 
where l_id=$2",
+                                               array($part,$lot[$i]['l_id']));
+
+                               // si w_lot insérer avec nouveau coprop. 
calculer somme jcl_part si total de jcl_part > 100 alors
+                               // avertissement
+                               $tot=$cn->get_value("select sum(l_part) from 
coprop.lot where l_fiche_id=$1",
+                                                       array($flot->id));
+                               if ($tot > 100 )
+                               {
+                                       // avertisement affecté à +100%
+                               } elseif ($tot < 100 )
+                               {
+                                       // avertisement affecté à - 100%
+
+                               }
+                       }
+               }
+               catch (Exception $e)
+               {
+                       echo $e->getMessage();
+                       echo $e->getTraceAsString();
+
+               }
+
+
+       }
+
+
 }
 ?>

Modified: trunk/coprop/include/lot.inc.php
===================================================================
--- trunk/coprop/include/lot.inc.php    2011-12-20 22:13:09 UTC (rev 213)
+++ trunk/coprop/include/lot.inc.php    2011-12-25 17:27:34 UTC (rev 214)
@@ -26,11 +26,12 @@
  * @brief liaison entre lot et copropriétaires
  *
  */
+require_once 'class_copro_lot.php';
 global $cn,$g_copro_parameter;
 if ( isset($_POST['copro_new']))
 {
        var_dump($_POST);
-       $cp=new Copro_List();
+       $cp=new Copro_Lot();
        try
        {
                $cp->insert($_POST);
@@ -40,6 +41,34 @@
                echo $e->getTraceAsString();
        }
 }
+// Ajout de lots
+if (isset($_POST['addlot']))
+{
+       var_dump($_POST);
+       $cp=new Copro_Lot();
+       try
+       {
+               $cp->add_lot($_POST);
+       }
+       catch(Exception $e)
+       {
+               echo $e->getTraceAsString();
+       }
+}
+// Mise à jour lots existants
+if ( isset($_POST['updexist']))
+{
+               var_dump($_POST);
+       $cp=new 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=new IButton('add_card');
@@ -53,20 +82,22 @@
 /*
  * Liste
  */
-$sql=" select jcl_id,
-       jcl_copro,
-       (select ad_value from fiche_detail where f_id=jcl_copro and ad_id=1) as 
coprop_name,
-       (select ad_value from fiche_detail where f_id=jcl_copro and ad_id=23) 
as coprop_qcode
+$sql=" select distinct
+       c_fiche_id,
+       (select ad_value from fiche_detail where f_id=c_fiche_id and ad_id=1) 
as copro_name,
+       (select ad_value from fiche_detail where f_id=c_fiche_id and ad_id=23) 
as copro_qcode
+
        from
-       coprop.jnt_coprop_lot
+       coprop.coproprietaire
        ";
 /**
  * @todo ajouter tri
  */
 $a_copro=$cn->get_array($sql);
 
-$sql_lot=$cn->prepare ("lot","select jcl_lot, (select ad_value from 
fiche_detail where f_id=jcl_lot and ad_id=1) as lot_name,
-       (select ad_value from fiche_detail where f_id=jcl_lot and ad_id=23) as 
lot_qcode from coprop.jnt_coprop_lot where jcl_id=$1");
+$sql_lot=$cn->prepare ("lot","select coprop_fk, (select ad_value from 
fiche_detail where f_id=l_fiche_id and ad_id=1) as lot_name,
+       (select ad_value from fiche_detail where f_id=l_fiche_id and ad_id=23) 
as lot_qcode,l_part
+       from coprop.lot where coprop_fk=$1");
 
 echo $f_add_button->input();
 echo '<div class="content" id="listcoprolot">';
@@ -77,6 +108,7 @@
 require_once('template/coprop_lot_add.php');
 
 echo '</div>';
+echo '<div id="divcopropmod"></div>';
 echo $f_add_button->input();
 
 ?>

Modified: trunk/coprop/include/template/coprop_lot_add.php
===================================================================
--- trunk/coprop/include/template/coprop_lot_add.php    2011-12-20 22:13:09 UTC 
(rev 213)
+++ trunk/coprop/include/template/coprop_lot_add.php    2011-12-25 17:27:34 UTC 
(rev 214)
@@ -66,6 +66,17 @@
 echo $f_copro;
 echo HtmlInput::hidden('p_jrn',$g_copro_parameter->journal_appel);
 echo HtmlInput::hidden('ledger_type','ODS');
+$alot=$cn->get_array("select f_id,
+               (select ad_value from fiche_Detail as e where ad_id=1 and 
e.f_id=a.f_id) as fname,
+               (select ad_value from fiche_Detail as f where ad_id=23 and 
f.f_id=a.f_id) as fqcode
+               from fiche as a
+               where
+               fd_id=$1
+               ", array($g_copro_parameter->categorie_lot));
+if ( count($alot)==0) {
+       echo h2info('Aucune fiche de lot');
+       exit();
+}
 ?>
 <table>
        <tr>
@@ -73,51 +84,22 @@
                <th>Pourcentage</th>
        </tr>
 <?
-for ($i=0;$i<20;$i++):
-       $lot=new ICard();
-  $lot->label="Lot : ".HtmlInput::infobulle(0) ;
-  $lot->name="w_lot".$i;
-  $lot->tabindex=1;
-  $lot->value="";
-  $lot->table=0;
+for ($i=0;$i<count($alot);$i++):
 
- // name of the field to update with the name of the card
-  $lot->set_attribute('label','w_lot_label'.$i);
-  // Type of card : deb, cred,
-  $lot->set_attribute('typecard',$g_copro_parameter->categorie_lot);
-
-  $lot->extra=$g_copro_parameter->categorie_lot;
-
-// Add the callback function to filter the card on the jrn
-  $lot->set_callback('filter_card');
-  $lot->set_attribute('ipopup','ipopcard');
-// when value selected in the autcomplete
-  $lot->set_function('fill_data');
-
-// when the data change
-  $lot->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ',
-            $lot->name);
-  $lot->set_dblclick("fill_ipopcard(this);");
-
-  $lot_label=new ISpan();
-  $lot_label->table=0;
-  $f_lot=$lot_label->input("w_lot_label".$i,"");
-
 // Search button for card
-  $f_lot_bt=$lot->search();
   $num=new INum("lot_per".$i);
+  $ck=new ICheckBox("lot[]");
+  $ck->value=$alot[$i]['f_id'];
 ?>
 <tr>
        <td>
-       <?=$f_lot_bt?>
-       <?=$lot->input()?>
+       <?=$ck->input()?>
        </td>
        <td>
-               <?=$num->input()?>
+               
<?=HtmlInput::card_detail($alot[$i]['fqcode'],$alot[$i]['fname'],' class="line" 
')?>
        </td>
        <td>
-
-               <?=$f_lot?>
+               <?=$num->input()?>
        </td>
 </tr>
 <? endfor;?>

Modified: trunk/coprop/include/template/coprop_lot_list.php
===================================================================
--- trunk/coprop/include/template/coprop_lot_list.php   2011-12-20 22:13:09 UTC 
(rev 213)
+++ trunk/coprop/include/template/coprop_lot_list.php   2011-12-25 17:27:34 UTC 
(rev 214)
@@ -37,20 +37,19 @@
        </tr>
 <?
 for ($i=0;$i<count($a_copro);$i++):
-       
$col_copro=HtmlInput::anchor($a_copro[$i]['copro_name'],"","mod_coprop($gDossier,'".$a_copro[$i]['jcl_copro']."','".$_REQUEST['plugin_code']."'");
+       
$col_copro=HtmlInput::anchor($a_copro[$i]['copro_name'],"","onclick=\"mod_coprop($gDossier,'".$a_copro[$i]['c_fiche_id']."','".$_REQUEST['plugin_code']."','".$_REQUEST['ac']."')\"");
 ?>
        <tr>
-               <td><?=col_copro?></td>
-       </tr>
+               <td><?=$col_copro?></td>
        <td>
                <?
-                       $rlot=$cn->execute('lot',$a_copro[$i]['jcl_id']);
+                       
$rlot=$cn->execute('lot',array($a_copro[$i]['c_fiche_id']));
                        $max=Database::num_row($rlot);
                        $sp="";
                        for ($e=0;$e<$max;$e++):
                                $row=Database::fetch_array($rlot,$e);
-                               
$js_lot=HtmlInput::card_detail($row['lot_qcode'],$row['lot_name']);
-                               echo $js_lot.$sp;
+                               
$js_lot=HtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],' 
class="line"');
+                               echo $sp.$js_lot.nb($row['l_part']);
                                $sp=" , ";
                        endfor;
                ?>

Added: trunk/coprop/include/template/coprop_lot_mod.php
===================================================================
--- trunk/coprop/include/template/coprop_lot_mod.php                            
(rev 0)
+++ trunk/coprop/include/template/coprop_lot_mod.php    2011-12-25 17:27:34 UTC 
(rev 214)
@@ -0,0 +1,104 @@
+<?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 by
+ *   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-1307  USA
+ */
+/* $Revision$ */
+
+// Copyright Author Dany De Bontridder address@hidden
+
+/**
+ * @file
+ * @brief included from ajax_mod_copro_lot.php
+ *
+ */
+
+?>
+<h1>
+       
Modification<?=HtmlInput::card_detail($copro->strAttribut(ATTR_DEF_QUICKCODE),$copro->strAttribut(ATTR_DEF_NAME),'
 class="line"')?>
+</h1>
+<h2>Lot affecté à ce copropriétaire</h2>
+<form method="post" onsubmit="return confirm('Vous confirmez ?')">
+               <?=HtmlInput::hidden("copro_id",$copro->id)?>
+<table>
+       <tr>
+               <th>
+                       Lot
+               </th>
+               <th>
+                       Pourcentage
+               </th>
+       </tr>
+<? for ($i=0;$i<count($acurrent);$i++): ?>
+       <tr id="row<?=$acurrent[$i]['l_id']?>">
+               <td>
+                       <?=$acurrent[$i]['fiche_name']?>
+               </td>
+               <td>
+                       <?
+                               $num=new INum("num".$acurrent[$i]['l_id']);
+                               $num->value=$acurrent[$i]['l_part'];
+                               echo $num->input();
+                       ?>
+               </td>
+               <td id="col<?=$acurrent[$i]['l_id']?>">
+                       <?
+                       
$js="onclick=remove_lot('".$_REQUEST['plugin_code']."','".$_REQUEST['ac']."','".$_REQUEST['gDossier']."','".$acurrent[$i]['l_id']."')";
+                       echo HtmlInput::anchor("enlever","",$js);
+                       ?>
+               </td>
+       </tr>
+<? endfor; ?>
+</table>
+<?=HtmlInput::submit('updexist',"Mise à jour")?>
+</form>
+<hr>
+<h2>Autre lots</h2>
+<form method="post" onsubmit="return confirm('Vous confirmez ?')">
+       <?=HtmlInput::hidden("copro_id",$copro->id)?>
+<table>
+       <tr>
+               <th>
+                       Lot
+               </th>
+               <th>
+                       Pourcentage
+               </th>
+       </tr>
+<? for ($i=0;$i<count($not_assigned);$i++): ?>
+       <tr >
+               <td>
+                       <?=$not_assigned[$i]['fiche_name']?>
+               </td>
+               <td>
+                       <?
+                       $par=new Inum("Part".$not_assigned[$i]['f_id']);
+                       echo $par->input();
+                       ?>
+               </td>
+               <td>
+                       <?
+                               $ck=new ICheckBox("lot[]");
+                               $ck->value=$not_assigned[$i]['f_id'];
+                               echo $ck->input();
+                       ?>
+               </td>
+       </tr>
+<? endfor; ?>
+</table>
+<?=HtmlInput::submit('addlot',"Ajout des lots sélectionnés")?>
+</form>




reply via email to

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