Subversion Repositories Applications.gtt

Rev

Rev 104 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 jpm 1
<?php
170 mathias 2
// +------------------------------------------------------------------------------------------------------+
3
// | PHP version 5.1.1                                                                                    |
4
// +------------------------------------------------------------------------------------------------------+
5
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// +------------------------------------------------------------------------------------------------------+
7
// | This file is part of eFlore.                                                                         |
8
// |                                                                                                      |
9
// | Foobar is free software; you can redistribute it and/or modify                                       |
10
// | it under the terms of the GNU General Public License as published by                                 |
11
// | the Free Software Foundation; either version 2 of the License, or                                    |
12
// | (at your option) any later version.                                                                  |
13
// |                                                                                                      |
14
// | Foobar is distributed in the hope that it will be useful,                                            |
15
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
16
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                        |
17
// | GNU General Public License for more details.                                                         |
18
// |                                                                                                      |
19
// | You should have received a copy of the GNU General Public License                                    |
20
// | along with Foobar; if not, write to the Free Software                                                |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// +------------------------------------------------------------------------------------------------------+
10 jpm 23
// CVS : $Id$
170 mathias 24
/**
10 jpm 25
* Classe NoteFraisLigne
170 mathias 26
*
27
* Description
28
*
29
*@package eFlore
30
*@subpackage modele
31
//Auteur original :
32
*@version 3
33
*@author        Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com>
34
//Autres auteurs :
35
*@version 4
36
*@author        Jean-Pascal MILCENT <jpm@clapas.org>
37
*@author        aucun
38
*@copyright     Tela-Botanica 2000-2006
10 jpm 39
*@version       $Revision$ $Date$
170 mathias 40
// +------------------------------------------------------------------------------------------------------+
41
*/
42
 
43
/**
44
* class NoteFraisLigne : est à la fois le DAO et le conteneur de la table gestion_utilisateur.
45
* classe métier
46
*/
47
class NoteFraisLigne extends aGttSql {
48
	/*** Constantes : */
49
	const GNFL_ID = 'NOTEFRAISLIGNE_ID';
50
	const GNFL_ID_MAX = 'NOTEFRAISLIGNE_ID_MAX';
51
 
52
	/*** Attributs : */
53
	private $id_note_frais_ligne;
54
	private $ce_note_frais;
55
	private $date;
56
	private $montant_ht;
57
	private $taux_tva;
58
	private $montant_ttc;
59
 
60
	/*** Aggregations : */
61
 
62
	/*** Constructeur : */
63
	public function __construct($cmd = null, $parametres = null)
64
	{
65
		$this->dao_table_nom = GTT_BDD_PREFIXE . 'gestion_note_frais_ligne';
66
		$this->dao_correspondance = array(
10 jpm 67
			'gnfl_id_note_frais_ligne'	=> 'id_note_frais_ligne',
68
			'gnfl_ce_note_frais'	=> 'ce_note_frais',
69
			'gnfl_date'	=> 'date',
70
			'gnfl_montant_ht'	=> 'montant_ht',
71
			'gnfl_taux_tva'	=> 'taux_tva',
72
			'gnfl_montant_ttc'	=> 'montant_ttc');
170 mathias 73
 
74
		// Si l'on veut remplir l'objet à la création on lance la requete correspondante
75
		if (!is_null($cmd)) {
76
			$this->consulter($cmd, $parametres, true);
77
		}
78
	}
79
 
80
	/*** Accesseurs : */
10 jpm 81
	// Id Note Frais Ligne
170 mathias 82
	public function getIdNoteFraisLigne()
83
	{
84
		return $this->id_note_frais_ligne;
85
	}
86
	public function setIdNoteFraisLigne( $infl )
87
	{
88
		$this->id_note_frais_ligne = $infl;
89
	}
90
 
10 jpm 91
	// Ce Note Frais
170 mathias 92
	public function getCeNoteFrais()
93
	{
94
		return $this->ce_note_frais;
95
	}
96
	public function setCeNoteFrais( $cnf )
97
	{
98
		$this->ce_note_frais = $cnf;
99
	}
100
 
10 jpm 101
	// Date
170 mathias 102
	public function getDate()
103
	{
104
		return $this->date;
105
	}
106
	public function setDate( $d )
107
	{
108
		$this->date = $d;
109
	}
110
 
10 jpm 111
	// Montant Ht
170 mathias 112
	public function getMontantHt()
113
	{
114
		return $this->montant_ht;
115
	}
116
	public function setMontantHt( $mh )
117
	{
118
		$this->montant_ht = $mh;
119
	}
120
 
10 jpm 121
	// Taux Tva
170 mathias 122
	public function getTauxTva()
123
	{
124
		return $this->taux_tva;
125
	}
126
	public function setTauxTva( $tt )
127
	{
128
		$this->taux_tva = $tt;
129
	}
130
 
10 jpm 131
	// Montant Ttc
170 mathias 132
	public function getMontantTtc()
133
	{
134
		return $this->montant_ttc;
135
	}
136
	public function setMontantTtc( $mt )
137
	{
138
		$this->montant_ttc = $mt;
139
	}
140
 
141
	/*** Méthodes : */
142
 
143
	/**
144
	* Consulter la table gestion_note_frais_ligne.
145
	* @return mixed un tableau d'objets NoteFraisLigne s'il y en a plusieurs, l'objet NoteFraisLigne s'il y en a 1 seul sinon false.
146
	*/
147
	public function consulter($cmd = '', $parametres = array(), $instancier = false)
148
	{
149
		switch ($cmd) {
150
			case NoteFraisLigne::GNFL_ID:
151
				$requete = 	'SELECT * '.
152
							'FROM ' . GTT_BDD_PREFIXE . 'gestion_note_frais_ligne '.
153
							'WHERE gnfl_id_note_frais_ligne = #0 ';
154
				break;
155
			case NoteFraisLigne::GNFL_ID_MAX:
156
				$requete =	'SELECT MAX(gnfl_id_note_frais_ligne) '.
157
							'FROM ' . GTT_BDD_PREFIXE . 'gestion_note_frais_ligne ';
158
				break;
159
			default :
160
				$message = 'Commande '.$cmd.'inconnue!';
161
				$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message);
162
    			trigger_error($e, E_USER_ERROR);
163
		}
92 jpm 164
		return parent::consulter($requete, $parametres, $instancier);
170 mathias 165
	}
166
}
167
 
168
/* +--Fin du code ----------------------------------------------------------------------------------------+
169
*
10 jpm 170
* $Log$
170 mathias 171
*
172
* +-- Fin du code ----------------------------------------------------------------------------------------+
173
*/
10 jpm 174
?>