<?php 
require_once('../Connections/courier.php'); 
$id = $_POST['hiddenID'];
/////////////////// Get item from stock taking table ////////////////////////
$row_rsodest_1 = mysql_fetch_assoc(mysql_query("SELECT * FROM stocktaking WHERE item_id = '$id'", $courier));
$item_id = $row_rsodest_1['item_id'];
$Item = $row_rsodest_1['item'];


$row_rsodest_2 = mysql_query("SELECT DISTINCT * FROM service_items", $courier);
?>
<div class="modal-dialog modal-sm">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
            <h4 class="modal-title">Stock Taking Report</h4>
        </div>
        <div class="modal-body" id="job_activities_wrapper">
            <div class="form-group">
                <label class="control-label">Please Select Date</label>
                <input placeholder="YYYY-MM-DD" type="date" name="reportDate" value="" id="reportDate" class="form-control date_time_picker hasDatepicker"> 
            </div>
            <div class="form-group">
              <label class="control-label">Please Select Item</label>
              <select class="form-control" name="item" id="item">
                <option value="<?php echo $item_id ?>"><?php echo $Item; ?></option>
                <option value="All">All</option>
                <?php 
                while($row = mysql_fetch_assoc($row_rsodest_2)) {?>
                    <option value="<?php echo $row['id']?>"><?php echo $row['item']; ?></option>
                    <?php } ?>
                </select>  
            </div>
            <div class="modal-footer">
                <div class="form-actions right">
                    <a class="btn green" onclick="printReport3('procurements/printStockReport.php','<?php echo $id ?>')"> Print Report </a>
                </div>

            </div>
        </div>
    </div>
</div>