Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/irp/irp/pcstore/
Upload File :
Current File : /var/www/html/mmishra/irp/irp/pcstore/parts_issued.php

<?php
//show page head
include "page_header.inc";

echo "<b>Parts Issued</b>";

echo "<table width='100%'><tr><th width='5%'>No.</th><th width='10%'>Parts Code</th><th width='20%' nowrap>Description</th><th>Model/Make</th><th width='15%' nowrap>Issue Date</th><th width='10%'>Purpose</th><th width='15%'>User</th><th width='20%'>Remark</th></tr>";

$sql1="select im.category_code, im.description,im.model_make, pm.parts_code, pi.issue_date, pi.destination, pi.issue_for, pi.user_code, pi.remark from item_master im, parts_master pm, parts_issued pi where im.row_id=pm.item_code and pm.row_id=pi.parts_code order by im.category_code, pi.issue_date";
$rs1 = mysql_query($sql1, $link_id);
if(!$rs1) echo sql_error();
while ($qd1 = mysql_fetch_array($rs1)){
  $i++; $j++;
  $parts_code=$qd1["parts_code"];
  $issue_date=$qd1["issue_date"];
  $destination=$qd1["destination"];
  $issue_for=$qd1["issue_for"];
  $user_code=$qd1["user_code"];
  $user_detail=user_detail($user_code, $link_id);
  $remark=$qd1["remark"];
  $description=$qd1["description"];
  $model_make=$qd1["model_make"];
  if ($cat_code != $qd1["category_code"]){
    $cat_code=$qd1["category_code"];
    $cat_detail=category_detail($cat_code, $link_id);
    echo "<tr><td colspan='8'><font color='red'>$cat_detail</font></td></tr>";
    $i=1;
  }
  if ($i % 2) echo "<tr id='row1'>"; else echo "<tr id='row2'>";
  echo "<td align='right'>$i</td><td>$parts_code</td><td>$description</td><td>$model_make</td><td align='center' nowrap>$issue_date</td><td>$destination ($issue_for)</td><td>$user_detail</td><td>$remark</td></tr>";
}
echo "<tr><td colspan='7'><font color='red' size='+1'>Total: $j</font></td></tr>";
echo "</table>";

include "page_footer.inc";
?>