-
Notifications
You must be signed in to change notification settings - Fork 4
/
UnassignedStkCust.php
288 lines (243 loc) · 9.66 KB
/
UnassignedStkCust.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>unassigned Cust expenses</title>
<style type="text/css">
hr.pme-hr { border: 0px solid; padding: 0px; margin: 0px; border-top-width: 1px; height: 1px; }
table.pme-main { border: #004d9c 1px solid; border-collapse: collapse; border-spacing: 0px; width: 100%; }
table.pme-navigation { border: #004d9c 0px solid; border-collapse: collapse; border-spacing: 0px; width: 100%; }
td.pme-navigation-0, td.pme-navigation-1 { white-space: nowrap; }
th.pme-header { border: #004d9c 1px solid; padding: 4px; background: #add8e6; }
td.pme-key-0, td.pme-value-0, td.pme-help-0, td.pme-navigation-0, td.pme-cell-0,
td.pme-key-1, td.pme-value-1, td.pme-help-0, td.pme-navigation-1, td.pme-cell-1,
td.pme-sortinfo, td.pme-filter { border: #004d9c 1px solid; padding: 3px; }
td.pme-buttons { text-align: left; }
td.pme-message { text-align: center; }
td.pme-stats { text-align: right; }
</style>
</head>
<body>
<?php
require_once 'header.php';
?>
<a href = 'selectCustAssignStkInv.php'>Assign customer's Stock to Customer's invoice</a>
assignStkInv</br></br>
<a href = 'selectCustAssignStk.php'>Assign any Stock to a Customer and then invoice</a></br></br>
<a href = 'UnassignedStkCust.php'>Unassigned Stock of Customer</a></br></br>
<a href = 'AssignedStkCust.php'>Assigned Stock of Customer</a></br></br>
<?php
@session_start();
if (@$_SESSION['CustNo'] == "") //works if session was destroyed
echo @$_SESSION['CustNo'];
$CustNo = @$_SESSION['CustNo'];
//echo "CustNo:".$CustNo;
if(isset($_GET["CustNo"]))
echo "GET CustNo: ".$CustNo."<br>";
if (!empty($_POST["CustNo"])) {
// echo "Yes, CustNo is set";
}else{
//echo "No, CustNo is not set";
}
//eg. URL: editExpCQ.php?CustNo=3
/* function url() {
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}
echo "The current page name is ".url();
$url = url();
$url = $_SERVER["SCRIPT_NAME"];
$url = $_SERVER["REQUEST_URI"];
$url = $_SERVER["QUERY_STRING"];
echo "request uri is ".$url."]]";
$path = parse_url($url, PHP_URL_PATH);
$pathPart = explode('?CustNo=', $path);
$end = end($pathPart);
echo "End: ". $end. ".";
*/
//editExpCQ.php?CustNo=3&name=eddie
// echo "<h1>Hello " . $_GET["name"] . "</h1>";
if(isset($_GET["CustNo"]))
{
//echo "GET CustNo: ".$_GET["CustNo"]."<br>";
$CustNo= $_GET["CustNo"];
//force session:
$_SESSION['CustNo'] = $_GET["CustNo"];
}
else{echo " no Getter";}
$opts['filters'] = "InvNo like '' AND CustNo = '$CustNo'"; // THIS IS FOR IF BY CUSTOMER NUMBER
/*
* IMPORTANT NOTE: This generated file contains only a subset of huge amount
* of options that can be used with phpMyEdit. To get information about all
* features offered by phpMyEdit, check official documentation. It is available
* online and also for download on phpMyEdit project management page:
*
* http://platon.sk/projects/main_page.php?project_id=5
*
* This file was generated by:
*
* phpMyEdit version: 5.7.1
* phpMyEdit.class.php core class: 1.204
* phpMyEditSetup.php script: 1.50
* generating setup script: 1.50
*/
// MySQL host name, user name, password, database, and table
require_once "phpmyEditdb.php";
$opts['tb'] = 'expenses';
// Name of field which is the unique key
$opts['key'] = 'ExpNo';
// Type of key field (int/real/string/date etc.)
$opts['key_type'] = 'int';
// Sorting field(s)
$opts['sort_field'] = array('ExpNo');
// Number of records to display on the screen
// Value of -1 lists all records in a table
$opts['inc'] = 1500000;
// Options you wish to give the users
// A - add, C - change, P - copy, V - view, D - delete,
// F - filter, I - initial sort suppressed
$opts['options'] = 'ACPVDF';
// Number of lines to display on multiple selection filters
$opts['multiple'] = '4';
// Navigation style: B - buttons (default), T - text links, G - graphic links
// Buttons position: U - up, D - down (default)
$opts['navigation'] = 'DB';
// Display special page elements
$opts['display'] = array(
'form' => true,
'query' => true,
'sort' => true,
'time' => true,
'tabs' => true
);
// Set default prefixes for variables
$opts['js']['prefix'] = 'PME_js_';
$opts['dhtml']['prefix'] = 'PME_dhtml_';
$opts['cgi']['prefix']['operation'] = 'PME_op_';
$opts['cgi']['prefix']['sys'] = 'PME_sys_';
$opts['cgi']['prefix']['data'] = 'PME_data_';
/* Get the user's default language and use it if possible or you can
specify particular one you want to use. Refer to official documentation
for list of available languages. */
$opts['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '-UTF8';
/* Table-level filter capability. If set, it is included in the WHERE clause
of any generated SELECT statement in SQL query. This gives you ability to
work only with subset of data from table.
$opts['filters'] = "column1 like '%11%' AND column2<17";
$opts['filters'] = "section_id = 9";
$opts['filters'] = "PMEtable0.sessions_count > 200";
*/
/* Field definitions
Fields will be displayed left to right on the screen in the order in which they
appear in generated list. Here are some most used field options documented.
['name'] is the title used for column headings, etc.;
['maxlen'] maximum length to display add/edit/search input boxes
['trimlen'] maximum length of string content to display in row listing
['width'] is an optional display width specification for the column
e.g. ['width'] = '100px';
['mask'] a string that is used by sprintf() to format field output
['sort'] true or false; means the users may sort the display on this column
['strip_tags'] true or false; whether to strip tags from content
['nowrap'] true or false; whether this field should get a NOWRAP
['select'] T - text, N - numeric, D - drop-down, M - multiple selection
['options'] optional parameter to control whether a field is displayed
L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
Another flags are:
R - indicates that a field is read only
W - indicates that a field is a password field
H - indicates that a field is to be hidden and marked as hidden
['URL'] is used to make a field 'clickable' in the display
e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
['URLtarget'] HTML target link specification (for example: _blank)
['textarea']['rows'] and/or ['textarea']['cols']
specifies a textarea is to be used to give multi-line input
e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
['values'] restricts user input to the specified constants,
e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
['values']['table'] and ['values']['column'] restricts user input
to the values found in the specified column of another table
['values']['description'] = 'desc_column'
The optional ['values']['description'] field allows the value(s) displayed
to the user to be different to those in the ['values']['column'] field.
This is useful for giving more meaning to column values. Multiple
descriptions fields are also possible. Check documentation for this.
*/
$opts['fdd']['ExpNo'] = array(
'name' => 'ExpNo',
'select' => 'T',
'maxlen' => 11,
'sort' => true
);
$opts['fdd']['InvNo'] = array(
'name' => 'InvNo',
'select' => 'T',
'maxlen' => 30,
'sort' => true
);$opts['fdd']['ExpDesc'] = array(
'name' => 'ExpDesc',
'select' => 'T',
'maxlen' => 1500,
'sort' => true
);
$opts['fdd']['PurchDate'] = array(
'name' => 'PurchDate',
'select' => 'T',
'maxlen' => 10,
'sort' => true
);
$opts['fdd']['ProdCostExVAT'] = array(
'name' => 'ProdCostExVAT',
'select' => 'T',
'maxlen' => 45,
'sort' => true
);
$opts['fdd']['Notes'] = array(
'name' => 'Notes',
'select' => 'T',
'maxlen' => 1500,
'sort' => true
);
$opts['fdd']['CustNo'] = array(
'name' => 'CustNo',
'select' => 'T',
'maxlen' => 30,
'sort' => true
);
$opts['fdd']['Category'] = array(
'name' => 'Category',
'select' => 'T',
'maxlen' => 90,
'sort' => true
);
$opts['fdd']['SupCode'] = array(
'name' => 'SupCode',
'select' => 'T',
'maxlen' => 90,
'sort' => true
);
$opts['fdd']['SerialNo'] = array(
'name' => 'SerialNo',
'select' => 'T',
'maxlen' => 120,
'sort' => true
);
// Now important call to phpMyEdit
require_once 'phpMyEdit.class.php';
new phpMyEdit($opts);
include 'viewExpCustSelect.php';
//include 'viewExpCustSelect.php?mydropdownEC=$yo';
?>
<b><br><font size = "4" type="arial">View Expenses H & Exp</b></font> viewExpHEandExp.php
</br>
<a href = 'viewExpHEandExpCust.php'>viewExpHEandExpCust</a> all expenses of Customer</br>
<a href = 'viewExpHEandExpD.php'>viewExpHEandExpD by Date</a></br>
<a href = 'viewExp.php'>viewExp only</a></br>
<a href = 'viewExpHEandExp.php'>viewExpHEandExp</a></br>
<a href = 'viewExpmyedit.php'>viewExpmyedit</a></br>
<a href = 'viewExpEmyedit.php'>viewExpEmyedit</a></br>
<a href = 'viewExpHmyedit.php'>viewExpHmyedit</a></br>
<a href = 'UnassignedCustStk.php'>UnassignedCustStk</a></br>
<a href = 'viewExpSelectCatg.php'>viewExpSelectCatg</a></br>
<a href = '../phpmyadmin/#PMAURL-3:sql.php?db=kc&table=expensese&server=1&target='>phpMyadmin</a></br>
</body>
</html>