/var/www/enzatesting.onesolution.hk/01_20240711_full_backup/ajax_ord_picking.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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<?php 
$formid
=$_REQUEST['formid'];
require_once 
"inc/configure.php";

/*$action=$_REQUEST['action'];
if($action=="PICKING"){
    $picking = 1;
    $actual_readonly = '';
}else{
    $picking = 0;
    $actual_readonly = ' readonly="readonly" ';
}
*/
//$actual_readonly = ' readonly="readonly" ';

$product['refid']=(int)$_REQUEST['refid'];
$prod_qty = (float)$_REQUEST['qty'];

$editable=1;
$BM_readonly ' readonly="readonly" ';

//echo $permissionstr;
if($editable){ ?>

<?php if(havePermission("PKu")){ //PKu-----------------------------?>  
<table width="100%" border="0">
    <tr>
    <td><select name="bomcategy" id="bomcategy" onchange="refreshtab6()"><option value="0"><?=ALL?><?=bomcategy_option($_REQUEST['bomcategy'])?></option><option value="H1S2" <?=optionSelected($_REQUEST['bomcategy'], 'H1S2')?> ><?=resolveCode_master_type_code('ITEMGP''DD')?>/<?=resolveCode_master_type_code('ITEMGP''S2')?></option></select>
    <!--<form action="<?=basename($_SERVER['REQUEST_URI'])?>" name="bomcatform" ><select name="bomcategy" onchange='document.forms["bomcatform"].submit();'><option value="0"><?=ALL?></option><?=bomcategy_option()?></select><input type="submit" value="Submit" /></form>-->&nbsp;</td>
    <td align="right"><!--<a id="refreshtab6" onclick="refreshtab6()" class="uibutton pressnhide"><?=REFRESH?></a>--><a href="xls_ord_picking.php?refid=<?=$product['refid']?>&bomcategy=<?=$_REQUEST['bomcategy']?>" target="_blank" class="uibutton"><?=PRINT_?></a></td>
    </tr>
</table>
<?php //PKu---------------------------------------------------------?>     

<?php } else{ $readatt'readonly="readonly"';} ?>

    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tablelist" id="bom_table">
    <tr>
        <th><?=BOMCATEGY?></th>
        <th><?=ITEMNO?></th>
        <th style="width:80px"><?=QTY?></th>
        <th style="width:80px"><?=STANDARD?><?=WS?><?=WEIGHT?></th>
        <th style="width:80px"><?=ACTUAL?><?=WS?><?=WEIGHT?></th>
<?php if(havePermission("BPr")){ //BP-----------------------------?>     
        <th style="width:80px"><?=PRICE?></th>
        <th><?=TOTAL?><?=WS?><?=PRICE?></th>
<?php //BP---------------------------------------------------------?>            
        <th><?=NAME?></th>
        <th><?=PRINT_?><?=WS?><?=LABEL?></th>
        <!--<th>Edit</th>-->
<?php if(havePermission("BMu")){ //BP-----------------------------?>        
        <!--<th><?=PICKING?></th>-->
<?php //BP---------------------------------------------------------?>             
    </tr>
<?php
$entry
=0;

if(empty(
$_REQUEST['bomcategy']) || $_REQUEST['bomcategy']=="stone" || $_REQUEST['bomcategy']=="H1S2"  ){ 

    if(
$_REQUEST['bomcategy']=='H1S2'){
        
$sql_itemgp "AND (itemgp='S2') ";    
    }

    
$sql "SELECT
inv_stone.name_en,
inv_stone.name_sc,
inv_stone.refid,
inv_stone.itemno,
ord_item_bom.itemnoid,
ord_item_bom.bomcategy,
ord_item_bom.actual_qty,
ord_item_bom.uom_actualqty,
ord_item_bom.qty,
ord_item_bom.weight,
ord_item_bom.uom_wt,
ord_item_bom.price,
ord_item_bom.uom_price,
ord_item_bom.uom_qty,
ord_item_bom.unitprice,
ord_item_bom.refid as bomrefid,
master_type_code.codedesc_en,
master_type_code.codedesc_sc
FROM
ord_item_bom 
INNER JOIN inv_stone ON ord_item_bom.itemnoid = inv_stone.refid
INNER JOIN master_type_code ON master_type_code.codeid = inv_stone.verified
WHERE
master_type_code.typeid = 'VERIFIED' AND
ord_item_bom.bomcategy = 'stone' AND
ord_item_bom.orddtl_refid = :refid
$sql_itemgp
order by inv_stone.itemno"
;        //20210509
//echo $sql;    
    
$sth $dbh->prepare($sql);
    
$sth->execute( array(':refid'=>$product['refid'])  );
    
//echo $sth->getSQL( array(':refid'=>$product['refid'])  );
    
while($row $sth->fetch() ){
        
$entry++; ?>
    <tr class="bomrow">
        <td><?=STONE?><input type="hidden" name="bom_detail[<?=$entry?>][bomcategy]" value="<?=$row['bomcategy']?>" class="bomcategy" /><input type="hidden" name="bom_detail[<?=$entry?>][bomrefid]" value="<?=$row['bomrefid']?>" class="bomrefid" /></td>
        <td class="code"><a href="inv_<?=$row['bomcategy']?>_modifyform.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox"><?=$row['itemno']?></a><input type="hidden" name="bom_detail[<?=$entry?>][itemnoid]" value="<?=$row['itemnoid']?>" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][qty]" value="<?=numf($row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive bomqty0 minifield" /><?=$row['uom_qty']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_qty]" value="<?=$row['uom_qty']?>" class="uom_qty" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][weight]" value="<?=qtyf($row['weight']*$row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive std_qty minifield"  /><?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_wt]" value="<?=$row['uom_wt']?>"  class="uom_wt" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][actual_qty]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomqty bomactual_qty minifield" tabindex=<?=$entry?>  />
            <input type="hidden" name="bom_detail[<?=$entry?>][actual_qty_old]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomactual_qty_old minifield" tabindex=<?=$entry?>  />
            <?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_actualqty]" value="<?=$row['uom_wt']?>"/></td>
        
<?php if(havePermission("BPr")){ //BP-------------------------------?>         
        <td><input type="text" name="bom_detail[<?=$entry?>][unitprice]" value="<?=numf($row['price'])?>" class="positive bomunitprice minifield"  readonly="readonly"  />/<?=$row['uom_price']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_price]" value="<?=$row['uom_price']?>" class="uom_price" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][subtotal]" value="<?=numf(itemBOMCost($row$prod_qty))?>" class="positive bomsubtotal minifield"  readonly /></td>
<?php //BP---------------------------------------------------------?>            
        
        <!--<td><?=numf($row['weight'])?><?=$row['uom_wt']?></td>-->
        <td><?=$row['name_'.SYS_LANG]?></td>
        <!--<td><?=$row['codedesc_'.SYS_LANG]?></td>-->
        <td><a href="javascript:;" class="uibutton printbutton"><?=PRINT_?></a>&nbsp;</td>
        <!--<td><a href="stone_index.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox">Edit</a></td>-->
<?php if(havePermission("BMu")){ //BP-----------------------------?>        
        <!--<td align="cneter"><a href="ord_pick_submitform.php?refid=<?=$row['refid']?>" class="fbox uibutton"><?=PICKING?></a></td>-->
<?php //BP---------------------------------------------------------?>             
    </tr>
    <?php }    unset($sth);
}
?>
    
<?php

if(empty($_REQUEST['bomcategy']) || $_REQUEST['bomcategy']=="diamond" || $_REQUEST['bomcategy']=="H1S2"){ 

    
$sql "SELECT
inv_diamond.name_en,
inv_diamond.name_sc,
inv_diamond.refid,
inv_diamond.itemno,
ord_item_bom.itemnoid,
ord_item_bom.bomcategy,
ord_item_bom.actual_qty,
ord_item_bom.uom_actualqty,
ord_item_bom.qty,
ord_item_bom.weight,
ord_item_bom.uom_wt,
ord_item_bom.price,
ord_item_bom.uom_price,
ord_item_bom.uom_qty,
ord_item_bom.unitprice,
ord_item_bom.refid as bomrefid,
master_type_code.codedesc_en,
master_type_code.codedesc_sc
FROM
ord_item_bom
INNER JOIN inv_diamond ON ord_item_bom.itemnoid = inv_diamond.refid
INNER JOIN master_type_code ON master_type_code.codeid = inv_diamond.verified
WHERE
master_type_code.typeid = 'VERIFIED' AND
ord_item_bom.bomcategy = 'diamond' AND
ord_item_bom.orddtl_refid = :refid
order by inv_diamond.itemno"
;        //20210509
//echo $sql;    
    
$sth $dbh->prepare($sql);
    
$sth->execute( array(':refid'=>$product['refid'])  );
    while(
$row $sth->fetch() ){ 
        
$entry++;?>
    <tr class="bomrow">
        <td><?=DIAMOND?><input type="hidden" name="bom_detail[<?=$entry?>][bomcategy]" value="<?=$row['bomcategy']?>" class="bomcategy" /><input type="hidden" name="bom_detail[<?=$entry?>][bomrefid]" value="<?=$row['bomrefid']?>" class="bomrefid" /></td>
        <td class="code"><a href="inv_<?=$row['bomcategy']?>_modifyform.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox"><?=$row['itemno']?></a><input type="hidden" name="bom_detail[<?=$entry?>][itemnoid]" value="<?=$row['itemnoid']?>" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][qty]" value="<?=numf($row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive bomqty0 minifield" /><?=$row['uom_qty']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_qty]" value="<?=$row['uom_qty']?>" class="uom_qty" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][weight]" value="<?=qtyf($row['weight']*$row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive std_qty minifield"  /><?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_wt]" value="<?=$row['uom_wt']?>" class="uom_wt" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][actual_qty]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomqty bomactual_qty minifield"  tabindex=<?=$entry?> />
            <input type="hidden" name="bom_detail[<?=$entry?>][actual_qty_old]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomactual_qty_old minifield" tabindex=<?=$entry?>  />
            <?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_actualqty]" value="<?=$row['uom_wt']?>"/></td>
            
        
<?php if(havePermission("BPr")){ //BP-------------------------------?>         
        <td><input type="text" name="bom_detail[<?=$entry?>][unitprice]" value="<?=numf($row['price'])?>" class="positive bomunitprice minifield"  readonly="readonly"  />/<?=$row['uom_price']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_price]" value="<?=$row['uom_price']?>" class="uom_price" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][subtotal]" value="<?=numf(itemBOMCost($row$prod_qty))?>" class="positive bomsubtotal minifield"  readonly /></td>
<?php //BP---------------------------------------------------------?>            
        
        <!--<td><?=numf($row['weight'])?><?=$row['uom_wt']?></td>-->
        <td><?=$row['name_'.SYS_LANG]?></td>
        <!--<td><?=$row['codedesc_'.SYS_LANG]?></td>-->
        <td><a href="javascript:;" class="uibutton printbutton"><?=PRINT_?></a>&nbsp;</td>
        <!--<td><a href="stone_index.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox">Edit</a></td>-->
<?php if(havePermission("BMu")){ //BP-----------------------------?>        
        <!--<td align="cneter"><a href="ord_pick_submitform.php?refid=<?=$row['refid']?>" class="fbox uibutton"><?=PICKING?></a></td>-->
<?php //BP---------------------------------------------------------?>             
        
    </tr>
    <?php }    unset($sth);
}
?>

<?php

if(empty($_REQUEST['bomcategy']) || $_REQUEST['bomcategy']=="accessory"){ 

    
$sql "SELECT
inv_accessory.name_en,
inv_accessory.name_sc,
inv_accessory.refid,
inv_accessory.itemno,
ord_item_bom.itemnoid,
ord_item_bom.bomcategy,
ord_item_bom.actual_qty,
ord_item_bom.uom_actualqty,
ord_item_bom.qty,
ord_item_bom.weight,
ord_item_bom.uom_wt,
ord_item_bom.price,
ord_item_bom.uom_price,
ord_item_bom.uom_qty,
ord_item_bom.unitprice,
ord_item_bom.refid as bomrefid,
master_type_code.codedesc_en,
master_type_code.codedesc_sc
FROM
ord_item_bom
INNER JOIN inv_accessory ON ord_item_bom.itemnoid = inv_accessory.refid
INNER JOIN master_type_code ON master_type_code.codeid = inv_accessory.verified
WHERE
master_type_code.typeid = 'VERIFIED' AND
ord_item_bom.bomcategy = 'accessory' AND
ord_item_bom.orddtl_refid = :refid
order by inv_accessory.itemno"
;        //20210509
//echo $sql;    
    
$sth $dbh->prepare($sql);
    
$sth->execute( array(':refid'=>$product['refid'])  );
    while(
$row $sth->fetch() ){ 
        
$entry++;?>
    <tr class="bomrow">
        <td><?=ACCESSORY?><input type="hidden" name="bom_detail[<?=$entry?>][bomcategy]" value="<?=$row['bomcategy']?>" class="bomcategy" /><input type="hidden" name="bom_detail[<?=$entry?>][bomrefid]" value="<?=$row['bomrefid']?>" class="bomrefid" /></td>
        <td class="code"><a href="inv_<?=$row['bomcategy']?>_modifyform.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox"><?=$row['itemno']?></a><input type="hidden" name="bom_detail[<?=$entry?>][itemnoid]" value="<?=$row['itemnoid']?>" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][qty]" value="<?=numf($row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive bomqty0 minifield" /><?=$row['uom_qty']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_qty]" value="<?=$row['uom_qty']?>" class="uom_qty" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][weight]" value="<?=qtyf($row['weight']*$row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive std_qty minifield" /><?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_wt]" value="<?=$row['uom_wt']?>" class="uom_wt" /></td>
        
        <td><input type="text" name="bom_detail[<?=$entry?>][actual_qty]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomqty bomactual_qty minifield"  tabindex=<?=$entry?> />
            <input type="hidden" name="bom_detail[<?=$entry?>][actual_qty_old]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomactual_qty_old minifield" tabindex=<?=$entry?>  />
            <?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_actualqty]" value="<?=$row['uom_wt']?>"/></td>
        
<?php if(havePermission("BPr")){ //BP-------------------------------?>         
        <td><input type="text" name="bom_detail[<?=$entry?>][unitprice]" value="<?=numf($row['unitprice'])?>" class="positive bomunitprice minifield"  readonly="readonly"  />/<?=$row['uom_price']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_price]" value="<?=$row['uom_price']?>" class="uom_price" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][subtotal]" value="<?=numf(itemBOMCost($row$prod_qty))?>" class="positive bomsubtotal minifield"  readonly /></td>
<?php //BP---------------------------------------------------------?>            
        
        <!--<td><?=numf($row['weight'])?><?=$row['uom_wt']?></td>-->
        <td><?=$row['name_'.SYS_LANG]?></td>
        <!--<td><?=$row['codedesc_'.SYS_LANG]?></td>-->
        <td><a href="javascript:;" class="uibutton printbutton"><?=PRINT_?></a>&nbsp;</td>
        <!--<td><a href="stone_index.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox">Edit</a></td>-->
<?php if(havePermission("BMu")){ //BP-----------------------------?>        
        <!--<td align="cneter"><a href="ord_pick_submitform.php?refid=<?=$row['refid']?>" class="fbox uibutton"><?=PICKING?></a></td>-->
<?php //BP---------------------------------------------------------?>             
        
    </tr>
    <?php }    unset($sth);
}
?>    

<?php
if(empty($_REQUEST['bomcategy']) || $_REQUEST['bomcategy']=="material"){ 
    
$sql "SELECT
inv_material.name_en,
inv_material.name_sc,
inv_material.refid,
inv_material.itemno,
ord_item_bom.itemnoid,
ord_item_bom.bomcategy,
ord_item_bom.actual_qty,
ord_item_bom.uom_actualqty,
ord_item_bom.qty,
ord_item_bom.weight,
ord_item_bom.uom_wt,
ord_item_bom.price,
ord_item_bom.uom_price,
ord_item_bom.uom_qty,
ord_item_bom.unitprice,
ord_item_bom.refid as bomrefid,
master_type_code.codedesc_en,
master_type_code.codedesc_sc
FROM
ord_item_bom
INNER JOIN inv_material ON ord_item_bom.itemnoid = inv_material.refid
INNER JOIN master_type_code ON master_type_code.codeid = inv_material.verified
WHERE
master_type_code.typeid = 'VERIFIED' AND
ord_item_bom.bomcategy = 'material' AND
ord_item_bom.orddtl_refid = :refid
order by inv_material.itemno"
;        //20210509
//echo $sql;    
    
$sth $dbh->prepare($sql);
    
$sth->execute( array(':refid'=>$product['refid'])  );
    while(
$row $sth->fetch() ){  //vdump($row);
        
$entry++;?>
    <tr class="bomrow">
        <td><?=MATERIAL?><input type="hidden" name="bom_detail[<?=$entry?>][bomcategy]" value="<?=$row['bomcategy']?>" class="bomcategy" /><input type="hidden" name="bom_detail[<?=$entry?>][bomrefid]" value="<?=$row['bomrefid']?>" class="bomrefid" /></td>
        <td class="code"><a href="inv_<?=$row['bomcategy']?>_modifyform.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox"><?=$row['itemno']?></a><input type="hidden" name="bom_detail[<?=$entry?>][itemnoid]" value="<?=$row['itemnoid']?>" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][qty]" value="<?=numf($row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive bomqty0 minifield" /><?=$row['uom_qty']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_qty]" value="<?=$row['uom_qty']?>" class="uom_qty" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][weight]" value="<?=numf($row['qty']*$prod_qty)?><?=$BM_readonly?> class="positive std_qty minifield" /><?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_wt]" value="<?=$row['uom_wt']?>" class="uom_wt" /></td>
        
        <td><input type="text" name="bom_detail[<?=$entry?>][actual_qty]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomqty bomactual_qty minifield"  tabindex=<?=$entry?> />
            <input type="hidden" name="bom_detail[<?=$entry?>][actual_qty_old]" value="<?=numf($row['actual_qty'], 3)?><?=$actual_readonly?> class="positive bomactual_qty_old minifield" tabindex=<?=$entry?>  />
            <?=$row['uom_wt']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_actualqty]" value="<?=$row['uom_wt']?>"/></td>

<?php if(havePermission("BPr")){ //BP-------------------------------?> 
        <td><input type="text" name="bom_detail[<?=$entry?>][unitprice]" value="<?=numf($row['price'])?>" class="positive bomunitprice minifield"  readonly="readonly"  />/<?=$row['uom_price']?><input type="hidden" name="bom_detail[<?=$entry?>][uom_price]" value="<?=$row['uom_price']?>" class="uom_price" /></td>
        <td><input type="text" name="bom_detail[<?=$entry?>][subtotal]" value="<?=numf(itemBOMCost($row$prod_qty))?>" class="positive bomsubtotal minifield"  readonly /></td>
<?php //BP---------------------------------------------------------?>            
        
        <!--<td><?=numf($row['weight'])?><?=$row['uom_wt']?></td>-->
        <td><?=$row['name_'.SYS_LANG]?></td>
        <!--<td><?=$row['codedesc_'.SYS_LANG]?></td>-->
        <td><a href="javascript:;" class="uibutton printbutton"><?=PRINT_?></a>&nbsp;</td>
        <!--<td><a href="stone_index.php?refid=<?=$row['refid']?>&act=edit#tabs-2" target="_new" class="fbox">Edit</a></td>-->
<?php if(havePermission("BMu")){ //BP-----------------------------?>        
        <!--<td align="cneter"><a href="ord_pick_submitform.php?refid=<?=$row['refid']?>" class="fbox uibutton"><?=PICKING?></a></td>-->
<?php //BP---------------------------------------------------------?>             
        
    </tr>
    <?php }    unset($sth);
}
?>    
</table>
<?php if(havePermission("BPr")){ //BP-----------------------------?>  
<table>
    <tr>
        <td><?=MATERIAL?><?=WS?><?=LOSS?>:</td>
        <td><input type="text" name="mat_loss" value="<?=numf($system_var['LOSS'])?>" id="mat_loss" class="mat_loss" readonly="readonly" /></td>
    </tr>
    <tr>
        <td><?=TOTAL?>:</td>
        <td><input type="text" name="grandtotal" id="grandtotal" class="grandtotal" readonly="readonly" /></td>
    </tr>    
</table>
<?php //BP---------------------------------------------------------?>    
<!--<em>*Please use the refresh button the to view modified master</em>--><br/>
<input type="hidden" name="entry" id="entry" value="<?=++$entry?>" size="5"/>
<!--<input type="submit" name="submit" value="Save"/>--></p>