noalyss  Version-6.9.1.8
 All Data Structures Namespaces Files Functions Variables Pages
class_stock_goods_sql.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
26  *
27  */
28 require_once NOALYSS_INCLUDE.'/database/class_noalyss_sql.php';
29 
31 {
32 
33  function __construct($cn,$p_id = -1)
34  {
35  $this->table = "public.stock_goods";
36  $this->primary_key = "sg_id";
37  $this->date_format="DD.MM.YYYY";
38 
39  $this->name = array(
40  "sg_id" => "sg_id",
41  "j_id" => "j_id",
42  "f_id" => "f_id",
43  "sg_code" => "sg_code",
44  "sg_quantity" => "sg_quantity",
45  "sg_type" => "sg_type",
46  "sg_date" => "sg_date",
47  "sg_tech_date" => "sg_tech_date",
48  "sg_tech_user" => "sg_tech_user",
49  "sg_comment" => "sg_comment",
50  "sg_exercice" => "sg_exercice",
51  "r_id" => "r_id",
52  "c_id"=>"c_id"
53  );
54 
55  $this->type = array(
56  "sg_id" => "numeric",
57  "j_id" => "numeric",
58  "f_id" => "numeric",
59  "sg_code" => "text",
60  "sg_quantity" => "text",
61  "sg_type" => "text",
62  "sg_date" => "date",
63  "sg_tech_date" => "date",
64  "sg_tech_user" => "text",
65  "sg_comment" => "text",
66  "sg_exercice" => "sg_exercice",
67  "r_id" => "numeric",
68  "c_id" => "numeric"
69 
70  );
71 
72  $this->default = array(
73  "sg_id" => "auto",
74  "sg_tech_date" => "auto",
75  "sg_user" => "auto"
76  );
77  global $cn;
78 
79  parent::__construct($cn, $p_id);
80  }
81 
82 }
83 
85 {
86 
87  function __construct($cn,$p_id = -1)
88  {
89  $this->date_format="DD.MM.YYYY";
90  $this->table = "public.stock_change";
91  $this->primary_key = "c_id";
92 
93  $this->name = array(
94  "id" => "c_id",
95  "c_comment" => "c_comment",
96  "c_date" => "c_date",
97  "tech_date"=>"tech_date",
98  "tech_user"=>"tech_user",
99  "r_id"=>"r_id"
100  );
101 
102  $this->type = array(
103  "c_id" => "numeric",
104  "c_comment" => "text",
105  "c_date" => "date",
106  "tech_date"=>"date",
107  "tech_user"=>"text",
108  "r_id"=>"numeric"
109  );
110 
111  $this->default = array(
112  "c_id" => "auto",
113  "tech_date" => "auto"
114  );
115  global $cn;
116 
117  parent::__construct($cn, $p_id);
118  }
119 }
120 ?>
__construct($cn, $p_id=-1)
Match a table into an object, you need to add the code for each table.
__construct($cn, $p_id=-1)
$from_poste name
$input_from type
Definition: balance.inc.php:70
$select_type table