phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5240 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5240 - phpcompta/trunk/include
Date: Sat, 11 May 2013 22:01:52 +0200 (CEST)

Author: danydb
Date: 2013-05-11 22:01:52 +0200 (Sat, 11 May 2013)
New Revision: 5240

Modified:
   phpcompta/trunk/include/ajax_boxcard_search.php
   phpcompta/trunk/include/constant.php
Log:
0000817: CARD Recherche Fiche

Ajout d'un filtre javascript + max ligne = 550

Modified: phpcompta/trunk/include/ajax_boxcard_search.php
===================================================================
--- phpcompta/trunk/include/ajax_boxcard_search.php     2013-05-11 19:49:00 UTC 
(rev 5239)
+++ phpcompta/trunk/include/ajax_boxcard_search.php     2013-05-11 20:01:52 UTC 
(rev 5240)
@@ -27,17 +27,12 @@
  *
  */
 $sql="
-       select 
vw.f_id,vw_name,vw_first_name,vw_description,fd_label,quick_code,pc.ad_value as 
poste,tva_num
+       select distinct 
vw.f_id,vw_name,vw_first_name,vw_description,fd_label,quick_code,tva_num
        from vw_fiche_attr as vw
        join fiche_def as fd on (vw.fd_id=fd.fd_id)
-       left join (select f_id,ad_value from fiche_detail where ad_id=5) as pc 
on (pc.f_id=vw.f_id)
+       left join fiche_detail as pc on (pc.f_id=vw.f_id)
        where
-       vw_name ~* $1
-       or vw_first_name ~* $1
-       or vw_description ~* $1
-       or tva_num ~* $1
-       or pc.ad_value like $1||'%'
-       or quick_code like upper($1||'%')
+       ad_value ~* $1
        order by 2
 ";
 $array=$cn->get_array($sql,array($_GET['card']));
@@ -48,18 +43,20 @@
 <h2 class="notice">Résultat limité à <?=MAX_CARD_SEARCH?>, nombre de fiches 
trouvées : <?=count($array)?> </h2>
 
 <? endif?>
-<table class="sortable">
+Filtre  .<?php echo HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1); ?>
+<table id="tb_fiche" class="sorttable">
        <tr>
+
                <th>
-                       Categorie
-               </th>
-               <th>
                        Quick Code
                </th>
                <th>
                        Nom
                </th>
                <th>
+                       Categorie
+               </th>
+               <th>
                        Description
                </th>
                <th>
@@ -74,11 +71,9 @@
        <h2 class="notice"> Aucun résultat</h2>
 <?endif?>
 <? for ($i=0;$i<$max;$i++):?>
-       <tr>
+       <tr class="<?php echo ($i%2 == 0)?'even':'odd';?>">
+
                <td>
-                       <?=h($array[$i]['fd_label'])?>
-               </td>
-               <td>
                        <?=HtmlInput::card_detail($array[$i]['quick_code'])?>
                </td>
                <td>
@@ -86,6 +81,9 @@
                        <?=h($array[$i]['vw_first_name'])?>
                </td>
                <td>
+                       <?=h($array[$i]['fd_label'])?>
+               </td>
+               <td>
                        <?=h($array[$i]['vw_description'])?>
 
                </td>

Modified: phpcompta/trunk/include/constant.php
===================================================================
--- phpcompta/trunk/include/constant.php        2013-05-11 19:49:00 UTC (rev 
5239)
+++ phpcompta/trunk/include/constant.php        2013-05-11 20:01:52 UTC (rev 
5240)
@@ -56,7 +56,7 @@
 define ("MAX_COMPTE",4);
 define ('MAX_ARTICLE',12);
 define ('MAX_CAT',15);
-define ('MAX_CARD_SEARCH',50);
+define ('MAX_CARD_SEARCH',550);
 define ('MAX_FORECAST_ITEM',10);
 define ('MAX_PREDEFINED_OPERATION',30);
 define ('MAX_COMPTE_CARD',4);



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



reply via email to

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