phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r224 - in trunk/coprop/include: . template
Date: Wed, 4 Jan 2012 13:52:36 +0100 (CET)

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 
Ajout description


Modified: trunk/coprop/include/ajax_mod_copro_lot.php
===================================================================
--- 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=$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
+                       (select ad_value from fiche_detail where 
f_id=l_fiche_id and ad_id=9) as fiche_desc
                        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
+                        (select ad_value from fiche_detail where 
f_id=l_fiche_id and ad_id=9) as fiche_desc
                        from coprop.lot
                        right join fiche as a on (l_fiche_id=a.f_id)
                        where

Modified: trunk/coprop/include/class_copro_lot.php
===================================================================
--- 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=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));
+                                               " values ($1,$2)",
+                                               array($flot->id,$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)
@@ -105,30 +86,11 @@
                                $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));
+                                               " values ($1,$2)",
+                                               array($flot->id,$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)
@@ -142,52 +104,9 @@
        }
        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'];
+               
+            return;
 
-                               $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    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=$cn->get_array($sql);
 
 $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
+       (select ad_value from fiche_detail where f_id=l_fiche_id and ad_id=23) 
as lot_qcode,
+        (select ad_value from fiche_detail where f_id=l_fiche_id and ad_id=9) 
as lot_desc
        from coprop.lot where coprop_fk=$1");
 
 echo $f_add_button->input();

Modified: trunk/coprop/include/template/coprop_lot_add.php
===================================================================
--- 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=$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
+               (select ad_value from fiche_Detail as f where ad_id=9 and 
f.f_id=a.f_id) as fdesc
                from fiche as a
                where
                fd_id=$1
@@ -81,13 +82,12 @@
 <table>
        <tr>
                <th>Lot</th>
-               <th>Pourcentage</th>
+               <th>Description</th>
        </tr>
 <?
 for ($i=0;$i<count($alot);$i++):
 
 // Search button for card
-  $num=new INum("lot_per".$i);
   $ck=new ICheckBox("lot[]");
   $ck->value=$alot[$i]['f_id'];
 ?>
@@ -99,7 +99,7 @@
                
<?=HtmlInput::card_detail($alot[$i]['fqcode'],$alot[$i]['fname'],' class="line" 
')?>
        </td>
        <td>
-               <?=$num->input()?>
+               <?=$alot[$i]['fdesc']?>
        </td>
 </tr>
 <? endfor;?>

Modified: trunk/coprop/include/template/coprop_lot_list.php
===================================================================
--- 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="";
                        for ($e=0;$e<$max;$e++):
                                $row=Database::fetch_array($rlot,$e);
-                               
$js_lot=HtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],' 
class="line"');
-                               echo $sp.$js_lot.nb($row['l_part']);
+                               
$js_lot=HtmlInput::card_detail($row['lot_qcode'],$row['lot_name'],$row['lot_desc'],'
 class="line"');
+                               echo $sp.$js_lot;
                                $sp=" , ";
                        endfor;
                ?>

Modified: trunk/coprop/include/template/coprop_lot_mod.php
===================================================================
--- 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=0;$i<count($acurrent);$i++): ?>
@@ -49,11 +49,7 @@
                        <?=$acurrent[$i]['fiche_name']?>
                </td>
                <td>
-                       <?
-                               $num=new INum("num".$acurrent[$i]['l_id']);
-                               $num->value=$acurrent[$i]['l_part'];
-                               echo $num->input();
-                       ?>
+                    <?=$acurrent[$i]['fiche_desc']?>
                </td>
                <td id="col<?=$acurrent[$i]['l_id']?>">
                        <?
@@ -85,10 +81,7 @@
                        <?=$not_assigned[$i]['fiche_name']?>
                </td>
                <td>
-                       <?
-                       $par=new Inum("Part".$not_assigned[$i]['f_id']);
-                       echo $par->input();
-                       ?>
+                    <?=$not_assigned[$i]['fiche_name']?>
                </td>
                <td>
                        <?




reply via email to

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