/var/www/hkosl.com/oneMotorChunHing_delete20240201/html/productpopup_20100525.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
<?php require("inc/configure.php"); ?>
<?php 
require("inc/global.php"); ?>
<?
$formname    
$_GET['formname'];
$fieldname    $_GET['fieldname'];
?>
<html>
<head>
<title>One Solution Limited - oneERP</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="main.css" type="text/css">

<SCRIPT LANGUAGE="javascript">
function data_popin(a,b,c,d,e,f,g,h,i)

    //invoicedetail, quotationdetail
    window.opener.<?=$formname?>.prodid.value = a;
    window.opener.<?=$formname?>.prodiddisplay.value = a;
    window.opener.<?=$formname?>.prodname.value = b;
    window.opener.<?=$formname?>.uom.value = c;
    window.opener.<?=$formname?>.price.value = d;
    window.opener.<?=$formname?>.qty.value = 1;
    window.opener.<?=$formname?>.discount.value = 0;
    window.opener.<?=$formname?>.uomid.value = f;
    window.opener.<?=$formname?>.cost.value = g;
    window.opener.insertAtCaret('description','');
    window.opener.insertAtCaret('description',e);
    window.opener.<?=$formname?>.soh.value = h;
    window.opener.<?=$formname?>.typeid.value = i;
    self.close() 

</SCRIPT>
</head>
<body bgcolor="#FFFFFF" leftmargin="10" topmargin="10" marginwidth="0" marginheight="0">
<center>
<p class="pageheader">Product Search</p>
<table width="500" border='0' cellspacing='1' cellpadding='1' bgcolor='#111111'>
<tr><td class="content" width='80'  align="center" valign="top" bgcolor='#ffffff'>Product code</td>
    <td class="content" width='100' align="center" valign="top" bgcolor='#ffffff'>Product name</td>
    <td class="content" width='150' align="center" valign="top" bgcolor='#ffffff'>Major category</td>
    <td class="content" width='100' align="center" valign="top" bgcolor='#ffffff'>Sub category</td>
    <td class="content" width='70' align="center" valign="top" bgcolor='#ffffff'>UOM</td></tr>
<?
$sql 
"select * from INV_PRODUCT a
, INV_CATEGORY_MAJ b
, INV_CATEGORY_SUB c
, INV_UOM d
where 
a.subcatid = c.subcatid
and b.majcatid = c.majcatid
and a.uomid = d.uomid
and a.status = 1
order by prodname
"
;
$result mysql_query($sql);
while (
$row mysql_fetch_array($result,MYSQL_ASSOC))

    
?>
    <tr><td class='content' bgcolor='#ffffff'><a href='#' 
    onclick='data_popin("<?=$row{'prodid'}?>","<?=$row{'prodname'}?>","<?=$row{'uom'}?>","<?=$row{'price'}?>","<?=$row{'description'}?>","<?=$row{'uomid'}?>","<?=$row{'cost'}?>","<?=getSOH($row{'prodid'})?>","<?=$row{'typeid'}?>")'>
    <b><i><?=$row{'prodid'}?></i></b></a></td>
    <?
    
echo "<td class='content' bgcolor='#ffffff'>".$row{'prodname'}."</td>";
    echo 
"<td class='content' bgcolor='#ffffff'>".$row{'majcatname'}."</td>";
    echo 
"<td class='content' bgcolor='#ffffff'>".$row{'subcatname'}."</td>";
    echo 
"<td class='content' bgcolor='#ffffff'>".$row{'uom'}."</td></tr>";
}
?>
<tr><td colspan="5" class="content" align="center" bgcolor='#ffffff'>--End--</td></tr>
</table>
</center>
</body>
</html>