noalyss Version-9
lettering.card.inc.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21
22/*!\file
23 * \brief show the lettering by account
24 */
25if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
26
28
29echo '<div class="content">';
30echo '<div id="search">';
31echo '<FORM METHOD="GET">';
32echo dossier::hidden();
33echo HtmlInput::hidden('ac',$http->request('ac'));
34echo HtmlInput::hidden('sa','qc');
35echo HtmlInput::hidden('p_jrn','0');
36echo '<table width="50%">';
37
38$poste=new ICard('acc');
39$poste->name="acc";
40$poste->extra="all";
41$poste->set_attribute('popup','ipopcard');
42$poste->set_attribute('typecard','all');
43$poste->set_callback('filter_card');
44
45
46
47if (isset($_GET['acc'])) $poste->value=strtoupper(trim($http->get('acc')));
48$poste_span=new ISpan('account_label');
49$r= td(_('Lettrage pour la fiche ')).
50 td($poste->input().$poste->search()).
51 td($poste_span->input());
52echo tr($r);
53// limit of the year
54$exercice=$g_user->get_exercice();
56list($first_per,$last_per)=$periode->get_limit($exercice);
57
58// date limit
59$start=new IDate('start');
60$end=new IDate('end');
61try {
62 $start_value=$http->get("start","date",$first_per->first_day());
63 $end_value=$http->get("end","date",$last_per->last_day());
64 $start->value=$start_value;
65 $end->value=$end_value;
66}catch (Exception $e) {
67 $start_value=$first_per->first_day();
68 $end_value=$last_per->last_day();
69 echo '<span class="warning">'._('Date malformée, désolé').'</span>';
70}
71
72$start->value=$start_value;
73$end->value=$end_value;
74
75
76$r=td(_('Date début'));
77$r.=td($start->input());
78echo tr($r);
79
80
81
82$r=td(_('Date fin'));
83$r.=td($end->input());
84echo tr($r);
85
86// type of lettering : all, lettered, not lettered
87$sel=new ISelect('type_let');
88$sel->value=array(
89 array('value'=>0,'label'=>_('Toutes opérations')),
90 array('value'=>1,'label'=>_('Opérations lettrées')),
91 array('value'=>3,'label'=>_('Opérations lettrées montants différents')),
92 array('value'=>2,'label'=>_('Opérations NON lettrées'))
93 );
94$sel->selected=$http->get("type_let","number",0);
95
96$r= td(_("Filtre")).
97 td($sel->input());
98
99echo tr($r);
100echo '</table>';
101echo '<br>';
102echo HtmlInput::submit("seek",_('Recherche'));
103echo '</FORM>';
104echo '</div>';
105if (! isset($_REQUEST['seek'])) exit;
106echo '<hr>';
107//--------------------------------------------------------------------------------
108// record the data
109//--------------------------------------------------------------------------------
110if ( isset($_POST['record']))
111{
113 $letter->save($_POST);
114}
115//--------------------------------------------------------------------------------
116// Show the result
117//--------------------------------------------------------------------------------
118echo '<div id="list">';
119
120
122$quick_code=strtoupper(trim($http->get('acc')));
123$letter->set_parameter('quick_code',$quick_code);
124$letter->set_parameter('start',$start->value);
125$letter->set_parameter('end',$end->value);
126$letter->remove_incoherent();
127if ( $sel->selected == 0 )
128 echo $letter->show_list('all');
129if ( $sel->selected == 1 )
130 echo $letter->show_list('letter');
131if ( $sel->selected == 2 )
132 echo $letter->show_list('unletter');
133if ( $sel->selected == 3 )
134 echo $letter->show_list('letter_diff');
135echo '</div>';
136echo '<div id="detail" style="display:none">';
137echo 'Un instant...';
138echo '<IMG SRC=image/loading.gif>';
139echo '</div>';
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
$_REQUEST['ac']
$_GET['qcode']
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
manage the http input (get , post, request) and extract from an array
Input HTML for the card show buttons, in the file, you have to add card.js How to use :
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Definition: idate.class.php:34
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Html Input.
Definition: ispan.class.php:32
only for operation retrieved thanks a account (jrnx.j_poste) manage the accounting entries for a give...
only for operation retrieved thanks a quick_code manage the accounting entries for a given card
For the periode tables parm_periode and jrn_periode.
$_POST['ac']
Definition: do.php:310
for($e=0; $e< count($afiche); $e++) exit