⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpt_stock_card3.php

📁 warehouse management system
💻 PHP
字号:
<?
include("../application.php"); 
$username=$SESSION["user"]["user_name"];
$unit_set=$SESSION["user"]["unit_set"];
include("rptheader.php");
 ?>
<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" colspan="2">REPORT STOCK  CARD</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">Site   : <?echo site_info($site_id);?></td>
		<td  align ="right" class="txtThai" height='20'>Time Print : <?echo date('h:m:d');?></td>
</tr>
</table>
<br>
<?
$sql_info="SELECT  product_id,model,color FROM stock_product WHERE product_id='$product_id' ";
$qid=db_query($sql_info);
$frm=db_fetch_array($qid);
?>
<table width="100%"  border="1" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#ffffff" >
 
  <tr bgcolor="#ffffff">
		<td  align ="left" class="txtThai" colspan="3" height="25"><b>Product ID : &nbsp;<u><?echo $product_id;?></u></b>&nbsp;(<?echo "$frm[model] $frm[color]";?>)</td>
</tr>
</table>
<DIV class=outerframe>
<table  border="1" bgcolor="#ffffff" bordercolor="#000000" cellspacing="0" cellpadding="1" width="100%">
<THEAD>
<tr>
	<td  align="center" width="5%" class="txtThaiB" ><b>Item</b></td> 
	<td   align="center"   class="txtThaiLB"  width="80"><font color="#000000" ><b>Date</b></font>&nbsp;
	</td> 
	<td   align="center"   class="txtThaiLB" ><font color="#000000" ><b>R/F DOC NUMBER</b></font></td> 
	 <td   align="center"  class="txtThaiLB"><font color="#000000">IN</font></td> 
	 <td   align="center"  class="txtThaiLB"><font color="#000000">OUT</font></td>
	<td   align="center"   class="txtThaiLB" ><font color="#000000" ><b>Bal</b></font>&nbsp;
	</td> 
	
</tr>
</THEAD>
</DIV>
<DIV class=innerframe>
<?

$last_qty=0;
$sum_in=0;
$sum_out=0;
$row=1;


$tmp_bf=0;
$sql_list="SELECT  ".$data_style."stock_detail.type,".$data_style."stock_detail.type,SUM(".$data_style."stock_detail.qty) AS qty,stock_style_io.style_ord FROM ".$data_style."stock_detail ,stock_style_io  WHERE stock_style_io.style_type=".$data_style."stock_detail.doc_type AND stock_style_io.style_io=".$data_style."stock_detail.type AND  ".$data_style."stock_detail.product_id='$product_id' AND ".$data_style."stock_detail.log_status='1' AND ".$data_style."stock_detail.op_date<'$op_date' AND ".$data_style."stock_detail.site_id='$site_id' AND ".$data_style."stock_detail.product_id<>''  GROUP BY  stock_style_io.style_type ORDER BY ".$data_style."stock_detail.op_date ";
$qid = db_query($sql_list);
while ($d = db_fetch_object($qid)) { 
//$row++;

if($d->type=='+')$last_qty+=$d->qty;
else $last_qty-=$d->qty;
}
  	$tmp_bf=$last_qty;
echo "<tr>";
echo "<td colspan='5' class='txtThaiB' align='center'>&nbsp;BLANCE</td>";

echo "<td  align='right' class='txtThaiLB'>&nbsp;". number_format($last_qty,$unit_set,'.',',')."&nbsp;</td>";
echo "</tr>";
/*   试楣守词枨埂颐隆峦

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -