<?php require('../db/db.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/print.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="shortcut icon" href="../images/favicon.png">
    <title>Med2TEC Hospital Management Information System</title> 
    <link href="../css/print.css" rel="stylesheet">
    <link href="../datepicker/jquery-ui.css" rel="stylesheet" >  
    <script type="text/javascript" src="../datepicker/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="../datepicker/jquery-ui.js"></script> 
</head>

<body> 
<div align="right"> 
 <SCRIPT LANGUAGE="JavaScript">  
if (window.print) {
document.write('<form class="no-print"><input type=button name=print value="Print" onClick="window.print()"></form>');
}
</script></div>

<section class="wrapper">
<div style="background:#FFF; padding:0px 0px 0; height:auto;">
  <table cellspacing="0" cellpadding="0" width="100%" border="0" style="font-size:11px;">
    <tbody>
      <tr>
        <td align="left" style="background:#fff;"><img alt="" src="../images/org_print_logos/<?php echo $_SESSION['security']['org_id']?>.png" style="width:100%;"></td>
      </tr>
    </tbody>
  </table>
  
</br>

</div>

<div class="row">
          <section class="panel">
            <header class="panel-heading">
              <h2><!-- InstanceBeginEditable name="title" -->INVENTORY RECONCILIATIONS<!-- InstanceEndEditable --></h2>
            </header>

  <br />
  
<!-- InstanceBeginEditable name="main" -->

   <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%" align="left"><?php
                  if(isset($_GET['error'])&&$_GET['error']!="")
                  { 
                  ?>
                 <span style="float:left; color:red;"><?php echo $_GET['error'];?></span>
                  <?php
                  }
                  ?></td><form action="mgmtreconcile.php" method="POST" onsubmit="return check(this);"/>
   </form>
  </tr>
</table>

</td>
      </tr>
      <tr>
        <td><table width="100%" class="bottomBorder">
          <tr>
            
            <th align="center"><h3>ID</h3></th>
            <th align="left"><h3>Closing Date</h3></th>
            <th align="center"><h3>Report From</h3></th>
            <th align="center"><h3>End at</h3></th>
            <th align="center"><h3>Status</h3></th>
            <th align="center"><h3>Report By</h3></th>
            </tr>
		  <?php
	$raw_results = mysql_query("SELECT * FROM product_closing  WHERE status='CLOSED' order by productclosing_id desc") or die(mysql_error()); 
	 while($row = mysql_fetch_array($raw_results))
			{ 
			$productclosingid=$row['productclosing_id'];
			?>
          <tr>
            <td align="center"><?php echo $row['productclosing_id'];?><p></td>
            <td align="left"><?php echo date('d M Y',strtotime($row['closing_date']));?><p></td>
            <td align="center"><?php if($row['closing_start']!='') echo date('d M Y',strtotime($row['closing_start'])); ?><p></td>
            <td align="center"><?php if($row['closing_end']!='') echo date('d M Y',strtotime($row['closing_end'])); ?><p></td>
            <td align="center"><?php echo $row['status'];?><p></td>
            <td align="center"><?php echo $row['created_by'];?><p></td>
            
            </tr><?php }?>
          </table></td>
      </tr>
      <tr>
        <td></td>
  </tr>
  </table>
  
  	<link rel="stylesheet" href="../css/jquery-ui.css">
  	<script src="../css/jquery-1.9.1.js"></script>
  	<script src="../css/jquery-ui.js"></script>
  	<link rel="stylesheet" href="../css/style.css">
  
<script>
$("#datepicker").datepicker({
showOn: "button",
buttonImage: "../images/calendar.png",
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
dateFormat: "yy-mm-dd",
showButtonPanel: true,

onClose: function(dateText, inst) {
            var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
            var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
            $(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
        }
    });

$("#datepicker").focus(function () {
        $(".ui-datepicker-calendar").hide();
        $("#ui-datepicker-div").position({
            my: "center top",
            at: "center bottom",
            of: $(this)
        });
    });
		
</script>

  <!-- InstanceEndEditable -->
</section>
</div>

<!--<p align="center" style="font-size:12px; font-family:Arial, Helvetica, sans-serif; margin-top:260px;"><strong><!--317 A-1, Nursery Stop, Township, Lahore. 
Ph: 042-35151666</strong><br />
For Appointment call at 042-35151666 (bring your Patient ID Card) </p>-->

   <div class="sidepop" style="float:right;">
    <div class="sidepopbutton stemp"><div style="color: rgb(0, 0, 0); text-align: right; font-size: 10px; margin-top: 4px; position: absolute; right: 180px;">© Software by Softusion Inc. 0322 6155 219</div>   
    </div>
</div>

<!--<div class="sidepop" style="float:right;">
    <div class="sidepopbutton stemp"><div style="color:#000; text-align:right; font-size:9px;">© Software designed by Softusion Inc. Contact us at 0322 6155 219</div>   
    </div>
</div>-->


          
</body>
<!-- InstanceEnd --></html>
