📄 rpt_stk_blance3.php
字号:
<?
include("../application.php");
$username=$SESSION["user"]["user_name"];
$unit_set=$SESSION["user"]["unit_set"];
include("rptheader.php");
$sql_list="SELECT stock_detail.stock_id,stock_detail.site_id,stock_product.color,stock_product.group_id,stock_detail.lot_number,stock_detail.op_date, stock_detail.product_id,stock_product.model,SUM(concat(stock_detail.type , stock_detail.qty)) as bf_qty FROM stock_detail ,stock_product WHERE stock_product.product_id=stock_detail.product_id AND stock_detail.log_status='1' AND stock_detail.site_id='$site_id' AND stock_detail.op_date<='$op_date' ";
//$sql_list.=" AND stock_detail.doc_type NOT IN ('".get_not_inven()."')";
if($group_id<>"")$sql_list.=" AND stock_product.group_id='$group_id'";
$sql_list.=" GROUP BY stock_product.product_id,stock_detail.op_date,stock_detail.lot_number";
if($show_zero=="1")$sql_list.=" HAVING bf_qty > 0";
$sql_list.=" ORDER BY stock_product.product_id,stock_detail.op_date,stock_detail.lot_number";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#ffffff" >
<tr bgcolor="#ffffff">
<td align ="left" class="txtThai" colspan="2">Hitachi Transport System (Thailand ) Co.,Ltd.<br></td>
<td align ="right" class="txtThai" height='20'>User Print : <?echo $username;?></td>
</tr>
<tr bgcolor="#ffffff">
<td align ="left" class="txtThai">STOCK BLANCE : <?echo $group_id;?></td>
<td align ="center" class="txtThai">DATE BLANCE : <b><?
list($op_year,$op_month,$op_day)= split ("-", $op_date, 3);
echo $op_day." ".engmonth($op_month)." ".$op_year;
?></b></td>
<td align ="right" class="txtThai" height='20'>Date Print : <?echo date('y-m-d');?></td>
</tr>
<tr bgcolor="#ffffff">
<td align ="left" class="txtThai" colspan="2">CUSTOMMER : <?echo site_info($site_id);?></td>
<td align ="right" class="txtThai" height='20'>Time Print : <?echo date('h:m:d');?></td>
</tr>
</table>
<br>
<DIV class=outerframe>
<table border="1" bgcolor="#ffffff" bordercolor="#000000" cellspacing="0" cellpadding="1" width="100%">
<THEAD>
<tr>
<td align="center" height="30" width="5%" class="txtThaiB" rowspan="2" ><b>Item</td>
<td align="center" class="txtThaiLB" rowspan="2" width="15%"><b>Part</b> </td>
<td align="center" class="txtThaiLB" rowspan="2" width="35%"><b>Description> </td>
<td align="center" class="txtThaiLB" rowspan="2" width="10%"><b>Color</b> </td>
<td align="center" class="txtThaiLB" rowspan="2" width="10%"><b>Data Recive</b> </td>
<td align="center" class="txtThaiLB" rowspan="2" width="10%"><b>Lotnumber</b> </td>
<td align="center" class="txtThaiLB" rowspan="2" width="15%"><b>Blance</b> </td>
</tr>
</THEAD>
</DIV>
<DIV class=innerframe>
<?
$row=0;
$last_qty=0;
$qty_in=0;
$qty_out=0;
$bf_qty=0;
$ttlqty=0;
$qid = db_query($sql_list);
while ($r = db_fetch_object($qid)) {
$row++;
$bf_qty+=$r->bf_qty;
?>
<tr bgcolor="#ffffff">
<td align="center" class="txtThaiB" ><?echo $row;?> </td>
<td align="left" class="txtThaiLB" > <?echo $r->product_id;?></td>
<td align="left" class="txtThaiLB" > <?echo $r->model;?></td>
<td align="left" class="txtThaiLB" > <?echo $r->color;?></td>
<td align="center" class="txtThaiLB" > <?echo $r->op_date;?></td>
<td align="left" class="txtThaiLB" > <?echo $r->lot_number;?></td>
<td align="right" class="txtThaiLB"><?echo number_format($r->bf_qty,$unit_set,'.',',');?> </td>
</tr>
<?}?>
<tr>
<td colspan="6" align="center" class="txtThai">TOTAL</td>
<td align="right" class="txtThaiL"><?echo number_format($bf_qty,0,'.',',');?> </td>
</tr>
</DIV>
</table>
<script language="javascript">
print_pv(7);
this.window.close();
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -