noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
lettering.gestion.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// Copyright(2004) Dany De Bontridder danydb@aevalys.eu
20/*!
21 * \file
22 * \brief lettering : included from include/category_card.inc.php, which is part of manager.inc.php, customer.inc.php,...
23 *
24 * some variable are already defined ($cn, $g_user ...)
25 */
27if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
28global $g_user;
29echo '<div class="content">';
31echo '<div id="search">';
32echo '<FORM METHOD="GET">';
33echo dossier::hidden();
34echo HtmlInput::hidden('ac',$http->request('ac'));
35echo HtmlInput::hidden('sb',$http->request('sb'));
36echo HtmlInput::hidden('sc',$http->request('sc'));
37echo HtmlInput::hidden('f_id',$http->request('f_id'));
38
39echo '<table width="50%">';
40
41// limit of the year
42$exercice=$g_user->get_exercice();
43$periode=new Periode($cn);
44list($first_per,$last_per)=$periode->get_limit($exercice);
45
46$start=new IDate('start');
47$start->value=(isset($_GET['start']))?$http->get('start','date'):$first_per->first_day();
48$r=td(_('Date début'));
49$r.=td($start->input());
50echo tr($r);
51
52$end=new IDate('end');
53$end->value=(isset($_GET['end']))?$http->get('end','date'):$last_per->last_day();
54$r=td(_('Date fin'));
55$r.=td($end->input());
56echo tr($r);
57
58// type of lettering : all, lettered, not lettered
59$sel=new ISelect('type_let');
60$sel->value=array(
61 array('value'=>0,'label'=>_('Toutes opérations')),
62 array('value'=>1,'label'=>_('Opérations lettrées')),
63 array('value'=>2,'label'=>_('Opérations NON lettrées'))
64 );
65if (isset($_GET['type_let'])) $sel->selected=$http->get('type_let');
66else $sel->selected=1;
67
68$r= td("Filtre ").
69 td($sel->input());
70
71echo tr($r);
72echo '</table>';
73echo '<br>';
74echo HtmlInput::submit("seek",_('Recherche'));
75echo '</FORM>';
76echo '</div>';
77
78echo '<hr>';
79//--------------------------------------------------------------------------------
80// record the data
81//--------------------------------------------------------------------------------
82if ( isset($_POST['record']))
83{
85 $letter->save($_POST);
86}
87//--------------------------------------------------------------------------------
88// Show the result
89//--------------------------------------------------------------------------------
90if ( isset($_GET['start']) && isset($_GET['end']))
91 {
92 if ( isDate($http->get('start') ) == null || isDate($http->get ('end') ) == null )
93 {
94 echo alert(_('Date malformée, désolé'));
95 return;
96 }
97 }
98echo '<div id="list">';
99$fiche=new Fiche($cn, $http->request('f_id',"number"));
100$quick_code=$fiche->get_quick_code();
102$letter->set_parameter('quick_code',$quick_code);
103$letter->set_parameter('start',$start->value);
104$letter->set_parameter('end',$end->value);
105
106if ( $sel->selected == 0 )
107 echo $letter->show_list('all');
108if ( $sel->selected == 1 )
109 echo $letter->show_list('letter');
110if ( $sel->selected == 2 )
111 echo $letter->show_list('unletter');
112
113echo '</div>';
114echo '<div id="detail" style="display:none">';
115echo 'Un instant...';
116echo '<IMG SRC=image/loading.gif>';
117echo '</div>';
118echo '</div>';
119?>
isDate($p_date)
Verifie qu'une date est bien formaté en d.m.y et est valable.
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
alert($p_msg, $buffer=false)
alert in javascript
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
_("actif, passif,charge,...")
$_GET['qcode']
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
manage the http input (get , post, request) and extract from an array
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...
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
static echo_file($msg, $print=true)
display the file
Definition dbg.php:88
$_POST['ac']
Definition do.php:323