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
|
<?php $formid = "Product"; require_once "inc/configure.php";
if(havePermission("RTu")==false){ myerror("Invalid Permission"); }
$refid = setDefaultReqVar("refid", -1); $bom = setDefaultReqVar("bom", ""); $lv = setDefaultReqVar("lv", -1);
if($refid){ switch ($lv) { case 0: $table = "opr_route"; break; case 1: $table = "opr_subroute"; break; case 2: $table = "opr_subsubroute"; break; } $sql = "SELECT * from $table where refid=:refid"; //echo $sql; $sth = $dbh->prepare($sql); $sth->execute( array(':refid'=>$refid) ); //echo $sth->getSQL( array(':refid'=>$refid) ); $row = $sth->fetch(); unset($sth); }
$r = getDB_where("inv_product", "bom = '$bom'"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?=$system_var['COMPANY_NAME']?></title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <?php require_once "inc/jsheader.php"; ?> <script> function delete_opr() { if (confirm("Are you sure you want to delete?")) { window.location.href='inv_product_operation_delete.php?bom=<?=$bom?>&lv=<?=$lv?>&refid=<?=$refid?>'; } } </script> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <!--<td valign="top" class="top"><?php //require"mod_webhead.php"; ?></td>--> </tr> <tr> <td><table width="1000" border="0" cellpadding="0" cellspacing="0"> <tr> <!--<td width="200" valign="top" class="menu_bg"><?php //require"mod_menu.php"; ?></td>--> <td valign="top" class="padding1"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr></tr> <tr> <td class="c1_bg"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="search"> <tr> <td width="180" valign="top" ><span class="stext1"><?=OPERATION?>:</span></td> <td width="400" valign="top"><?=$r['itemno']?> - <span><?=$r['name_'.SYS_LANG]?></span> <?php //vdump($row['refid']); if( $row && bnr_check("Item", $r['refid'], $m)===false ) {?> <span class="ui-state-error tip" title="<?=$m?>">(!)</span> <?php } ?></td> <?php if(havePermission("RTu")){ //RTu----------------?> <td align="right" valign="top"><a href="inv_product_operation_addform.php?bom=<?=$bom?>&refid=<?=$refid?>&lv=<?=$lv?>&opr_code=<?=$row['opr_code']?>"><img src="image/btn_new.jpg" width="52" height="20" /></a></td> <?php } //RTu-------------------------------------------?> </tr> </table></td> </tr> <tr>
<td valign="top" class="c2_bg"> <!-- content--> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="tablelist"> <!-- <tr> <th align="left">ModifyForm</th> <th align="left">Table</th> </tr>--> <tr>
<td valign="top" width="400px"><!--master add form--> <?php if($row){ ?> <?php if(havePermission("RTu")){ //RTu----------------?> <form action="inv_product_operation_modify.php" method="post"> <input type="hidden" name="refid" value="<?=$row['refid']?>" /> <input type="hidden" name="bom" value="<?=$row['bom']?>" /> <input type="hidden" name="lv" value="<?=$lv?>" /> <table> <tr> <th colspan="2"><?=MODIFY?><?=WS?><?=OPERATION?></th> </tr>
<tr> <td>OP#</td> <td><input name="opr_nbr" type="text" value="<?=$row['opr_nbr']?>" /></td> </tr> <tr> <td><?=OPERATION?></td> <td><input name="opr_code" type="text" value="<?=$row['opr_code']?>" readonly="readonly" /></td> </tr> <tr> <td><?=WORKPLACE?></td> <td><select name="workplace_code"><option value=""></option><?=master_option("WORKPLACE", $row['workplace_code'], true)?></select></td> </tr> <tr> <td><?=ITEMNO?></td> <td><?php if($row['opr_code']=='MODS') { ?> <input type="text" name="itemno" value="<?=$row['itemno']?>" /> <?php } else { ?> <select name="itemno"><?=bom_item_select($bom, $row['itemno'])?></select> <?php } ?> </td> </tr> <tr> <td><?=QTY?></td> <td><input name="opr_svc" type="text" value="<?=numf($row['opr_svc'])?>"class="positive shortfield" /><select name="uom_svc"><?=master_option("UOM_SVC", $row['uom_svc'])?></select></td> </tr> </table> <input name="submit" type="submit" value="<?=SUBMIT?>" /> <input type="hidden" name="action" value="inv_product_operation_modifyform"/> <input name="Cancel" value="<?=CANCEL?>" type="button" onclick="location.href='inv_product_operation_modifyform.php?bom=<?=$bom?>'"/> <input name="<?=DELETE?>" value="<?=DELETE?>" type="button" onclick="delete_opr()"/> </form> <?php } elseif(havePermission("RTr")){ //RTu----------------?> <table> <tr> <th colspan="2"><?=MODIFY?><?=WS?><?=OPERATION?></th> </tr>
<tr> <td>OP#</td> <td><input name="opr_nbr" type="text" value="<?=$row['opr_nbr']?>" readonly="readonly" /></td> </tr> <tr> <td><?=OPERATION?></td> <td><input name="opr_code" type="text" value="<?=$row['opr_code']?>" readonly="readonly" /></td> </tr> <tr> <td><?=WORKPLACE?></td> <td><?=resolveCode_master_type_code("WORKPLACE", $row['workplace_code'], true)?></td> </tr> <tr> <td><?=ITEMNO?></td> <td> <input type="text" name="itemno" value="<?=$row['itemno']?>" readonly="readonly" /> </td> </tr> <tr> <td><?=QTY?></td> <td><input name="opr_svc" type="text" value="<?=numf($row['opr_svc'])?>" readonly="readonly" class="positive shortfield" /><?=$row['uom_svc']?></td> </tr> </table> <?php } //RT----------------------------------------------------------?> <?php } ?> <!-- end of addform--> </td>
<td valign="top" ><div id="opr_tree"><?=showBOMOperationTree($bom, $refid, basename($_SERVER['PHP_SELF'])."?bom=$bom&refid=[refid]&lv=[lv]")?></div></td> </tr> </table></td> </tr> </table> <!-- end of content--> </td>
</tr> </table></td> </tr> </table></td> </tr> </table> </body> </html>
|