noalyss Version-9
stock_goods_sql.class.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 abstract of the table public.stock_goods and public.stock_change
26 */
27/**
28 * @class Stock_Goods_Sql
29 * @brief ORM abstract of the table public.stock_goods
30 *
31 */
32
34{
35
36 function __construct($cn,$p_id = -1)
37 {
38 $this->table = "public.stock_goods";
39 $this->primary_key = "sg_id";
40 $this->date_format="DD.MM.YYYY";
41
42 $this->name = array(
43 "sg_id" => "sg_id",
44 "j_id" => "j_id",
45 "f_id" => "f_id",
46 "sg_code" => "sg_code",
47 "sg_quantity" => "sg_quantity",
48 "sg_type" => "sg_type",
49 "sg_date" => "sg_date",
50 "sg_tech_date" => "sg_tech_date",
51 "sg_tech_user" => "sg_tech_user",
52 "sg_comment" => "sg_comment",
53 "sg_exercice" => "sg_exercice",
54 "r_id" => "r_id",
55 "c_id"=>"c_id"
56 );
57
58 $this->type = array(
59 "sg_id" => "numeric",
60 "j_id" => "numeric",
61 "f_id" => "numeric",
62 "sg_code" => "text",
63 "sg_quantity" => "text",
64 "sg_type" => "text",
65 "sg_date" => "date",
66 "sg_tech_date" => "date",
67 "sg_tech_user" => "text",
68 "sg_comment" => "text",
69 "sg_exercice" => "sg_exercice",
70 "r_id" => "numeric",
71 "c_id" => "numeric"
72
73 );
74
75 $this->default = array(
76 "sg_id" => "auto",
77 "sg_tech_date" => "auto",
78 "sg_user" => "auto"
79 );
80 global $cn;
81
82 parent::__construct($cn, $p_id);
83 }
84
85}
86
87/**
88 * @class Stock_Change_Sql
89 * @brief ORM abstract of the table public.stock_change
90 */
92{
93
94 function __construct($cn,$p_id = -1)
95 {
96 $this->date_format="DD.MM.YYYY";
97 $this->table = "public.stock_change";
98 $this->primary_key = "c_id";
99
100 $this->name = array(
101 "id" => "c_id",
102 "c_comment" => "c_comment",
103 "c_date" => "c_date",
104 "tech_date"=>"tech_date",
105 "tech_user"=>"tech_user",
106 "r_id"=>"r_id"
107 );
108
109 $this->type = array(
110 "c_id" => "numeric",
111 "c_comment" => "text",
112 "c_date" => "date",
113 "tech_date"=>"date",
114 "tech_user"=>"text",
115 "r_id"=>"numeric"
116 );
117
118 $this->default = array(
119 "c_id" => "auto",
120 "tech_date" => "auto"
121 );
122 global $cn;
123
124 parent::__construct($cn, $p_id);
125 }
126}
127?>
$from_poste name
$input_from type
Definition: balance.inc.php:65
ORM abstract of the table public.stock_change.
__construct($cn, $p_id=-1)
ORM abstract of the table public.stock_goods.
__construct($cn, $p_id=-1)
Interface : this wrapper is used to created easily a wrapper to a table (ORM) You must create a class...
$all table