noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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$poste->set_attribute('label' ,'account_label');
45
46
47
48if (isset($_GET['acc'])) $poste->value=strtoupper(noalyss_trim($http->get('acc')));
49$poste_span=new ISpan('account_label');
50$r= td(_('Lettrage pour la fiche ')).
51 td($poste->input().$poste->search()) ;
52echo tr($r);
53echo tr(td(""). td($poste_span->input(),'colspan="2"'));
54// limit of the year
55$exercice=$g_user->get_exercice();
56$periode=new Periode($cn);
57list($first_per,$last_per)=$periode->get_limit($exercice);
58
59// date limit
60$start=new IDate('start');
61$end=new IDate('end');
62try {
63 $start_value=$http->get("start","date",$first_per->first_day());
64 $end_value=$http->get("end","date",$last_per->last_day());
65 $start->value=$start_value;
66 $end->value=$end_value;
67}catch (Exception $e) {
68 $start_value=$first_per->first_day();
69 $end_value=$last_per->last_day();
70 echo '<span class="warning">'._('Date malformée, désolé').'</span>';
71}
72
73$start->value=$start_value;
74$end->value=$end_value;
75
76
77$r=td(_('Date début'));
78$r.=td($start->input());
79echo tr($r);
80
81
82
83$r=td(_('Date fin'));
84$r.=td($end->input());
85echo tr($r);
86
87// type of lettering : all, lettered, not lettered
88$sel=new ISelect('type_let');
89$sel->value=array(
90 array('value'=>0,'label'=>_('Toutes opérations')),
91 array('value'=>1,'label'=>_('Opérations lettrées')),
92 array('value'=>3,'label'=>_('Opérations lettrées montants différents')),
93 array('value'=>2,'label'=>_('Opérations NON lettrées'))
94 );
95$sel->selected=$http->get("type_let","number",0);
96
97$r= td(_("Filtre")).
98 td($sel->input());
99
100echo tr($r);
101echo '</table>';
102echo '<br>';
103echo HtmlInput::submit("seek",_('Recherche'));
104echo '</FORM>';
105echo '</div>';
106if (! isset($_REQUEST['seek'])) exit;
107echo '<hr>';
108//--------------------------------------------------------------------------------
109// record the data
110//--------------------------------------------------------------------------------
111if ( isset($_POST['record']))
112{
114 $letter->save($_POST);
115}
116//--------------------------------------------------------------------------------
117// Show the result
118//--------------------------------------------------------------------------------
119echo '<div id="list">';
120
121
123$quick_code=strtoupper(trim($http->get('acc')));
124$letter->set_parameter('quick_code',$quick_code);
125$letter->set_parameter('start',$start->value);
126$letter->set_parameter('end',$end->value);
127$letter->remove_incoherent();
128if ( $sel->selected == 0 )
129 echo $letter->show_list('all');
130if ( $sel->selected == 1 )
131 echo $letter->show_list('letter');
132if ( $sel->selected == 2 )
133 echo $letter->show_list('unletter');
134if ( $sel->selected == 3 )
135 echo $letter->show_list('letter_diff');
136echo '</div>';
137echo '<div id="detail" style="display:none">';
138echo 'Un instant...';
139echo '<IMG SRC=image/loading.gif>';
140echo '</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
noalyss_trim($p_string)
global $g_user
if no group available , then stop
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
catch(Exception $e) $exercice
$_REQUEST['ac']
_("actif, passif,charge,...")
$_GET['qcode']
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...
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Html Input.
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
$_POST['ac']
Definition do.php:312
for($e=0; $e< count($afiche); $e++) exit
if(isset($_GET['acc'])) $poste_span