0000817: CARD Recherche Fiche
Ajout d'un filtre javascript + max ligne = 550
This commit is contained in:
parent
75ad07e816
commit
b5b4c5ec3d
2 changed files with 15 additions and 17 deletions
|
|
@ -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,17 +43,19 @@ $max=(count($array)>MAX_CARD_SEARCH)?MAX_CARD_SEARCH:count($array);
|
|||
<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>
|
||||
|
|
@ -74,10 +71,8 @@ $max=(count($array)>MAX_CARD_SEARCH)?MAX_CARD_SEARCH:count($array);
|
|||
<h2 class="notice"> Aucun résultat</h2>
|
||||
<?endif?>
|
||||
<? for ($i=0;$i<$max;$i++):?>
|
||||
<tr>
|
||||
<td>
|
||||
<?=h($array[$i]['fd_label'])?>
|
||||
</td>
|
||||
<tr class="<?php echo ($i%2 == 0)?'even':'odd';?>">
|
||||
|
||||
<td>
|
||||
<?=HtmlInput::card_detail($array[$i]['quick_code'])?>
|
||||
</td>
|
||||
|
|
@ -85,6 +80,9 @@ $max=(count($array)>MAX_CARD_SEARCH)?MAX_CARD_SEARCH:count($array);
|
|||
<?=h($array[$i]['vw_name'])?>
|
||||
<?=h($array[$i]['vw_first_name'])?>
|
||||
</td>
|
||||
<td>
|
||||
<?=h($array[$i]['fd_label'])?>
|
||||
</td>
|
||||
<td>
|
||||
<?=h($array[$i]['vw_description'])?>
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ define ('NOTFOUND','--not found--');
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue