noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
ajax_boxcard_search.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21// Copyright Author Dany De Bontridder danydb@aevalys.eu
22
23/**
24 * @file
25 * @brief show result card search
26 *
27 */
28if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
29global $g_user;
31 select distinct vw.f_id,vw_name,vw_first_name,vw_description,fd_label,quick_code,tva_num,(select ad_value from fiche_Detail where f_id=pc.f_id and ad_id=5) as poste
32 from vw_fiche_attr as vw
33 join fiche_def as fd on (vw.fd_id=fd.fd_id)
34 left join fiche_detail as pc on (pc.f_id=vw.f_id)
35 where
36 ad_value ~* $1
37 order by 2
38";
39$preference=$g_user->get_preference();
40$array=$cn->get_array($sql,array($_GET['card']));
41echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div");
42
43$max=($preference['PAGESIZE'] > -1 && count($array)> $preference['PAGESIZE'])? $preference['PAGESIZE']:count($array);
44
45?>
46<?php if ( $preference['PAGESIZE'] > -1 && count($array)>$preference['PAGESIZE'] ): ?>
47<h2 class="notice"><?php printf (_("Résultat limité à %d dans vos préférences, %d fiches trouvées"), $preference['PAGESIZE'],count($array))?> </h2>
48
49<?php endif?>
50<?php echo _('Cherche')?> <?php echo Icon_Action::infobulle(26);echo HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1); ?>
51<div style="padding:2px">
52<table id="tb_fiche" class="sorttable" style="width:100%">
53 <tr>
54 <th>
55 <?php echo _("Quick Code");?> <?php echo Icon_Action::infobulle(17); ?>
56 </th>
57 <th class=" sorttable_sorted">
58 Nom
59 </th>
60 <th>
61 <?php echo _("Categorie");?>
62 </th>
63 <th>
64 <?php echo _("Description");?>
65 </th>
66 <th>
67 <?php echo _("Numéro TVA");?>
68 </th>
69 <th>
70 <?php echo _("Poste comptable");?>
71 </th>
72
73 </tr>
74<?php if (count($array)==0) : ?>
75 <h2 class="notice"> <?php echo _("Aucun résultat");?></h2>
76<?php endif?>
77<?php for ($i=0;$i<$max;$i++):?>
78 <tr class="<?php echo ($i%2 == 0)?'even':'odd';?>">
79
80 <td>
81 <?php echo HtmlInput::card_detail($array[$i]['quick_code'])?>
82 </td>
83 <td>
84 <?php echo h($array[$i]['vw_name'])?>&nbsp;
85 <?php echo h($array[$i]['vw_first_name'])?>
86 </td>
87 <td>
88 <?php echo h($array[$i]['fd_label'])?>
89 </td>
90 <td>
91 <?php echo h($array[$i]['vw_description'])?>
92
93 </td>
94 <td>
95 <?php echo h($array[$i]['tva_num'])?>
96
97 </td>
98 <td style="text-align:right">
99 <?php echo HtmlInput::history_account($array[$i]['poste'],$array[$i]['poste'])?>
100
101 </td>
102 </tr>
103
104
105<?php endfor; ?>
106</table>
107</div>
108<?php echo HtmlInput::button_close("boxsearch_card_div")?>
h2($p_string, $p_class="", $raw="")
Definition ac_common.php:68
th($p_string, $p_extra='', $raw='')
Definition ac_common.php:58
tr($p_string, $p_extra='')
Definition ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition ac_common.php:83
global $g_user
if no group available , then stop
h( $row[ 'oa_description'])
$opd_description style
_("actif, passif,charge,...")
$_GET['qcode']
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
$all table