<?php
  $page_title = 'Allocated PO';
  require_once('includes/load.php');
?>
<?php
// Checkin What level user has permission to view this page
 page_require_level(3);
//pull out all user form database
 $all_allocated = find_all_allocatedpo();
 //print_r($all_allocated);die();
?>
<?php include_once('layouts/header.php'); ?>
<div class="row">
   <div class="col-md-12">
     <?php echo display_msg($msg); ?>
   </div>
</div>
<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading clearfix">
        <strong>
          <span class="glyphicon glyphicon-th"></span>
          <span>Allocated PO</span>
       </strong>
         <!--<a href="add_user.php" class="btn btn-info pull-right">Add New User</a>---->
      </div>
     <div class="panel-body">
      <table id="usertable" class="table table-bordered table-striped table-hover">
        <thead>
          <tr>
            <th class="text-center" style="width: 50px;">#</th>
            <th>Plan </th>
            <th>Unit </th>
            <th class="text-center" style="width: 15%;">Article</th>
            <th class="text-center" style="width: 10%;">Pending Order Quantity</th>
          </tr>
        </thead>
        <tbody>
        <?php foreach($all_allocated as $a_alot): ?>
          <tr>
           <td class="text-center"><?php echo count_id();?></td>
           <td><?php echo remove_junk(ucwords($a_alot['PlanName']))?></td>
           <td><?php echo remove_junk(ucwords($a_alot['UnitName']))?></td>
           <td class="text-center"><?php echo remove_junk(ucwords($a_alot['SAPCode']))?></td>
           <td class="text-center"><?php echo remove_junk(ucwords($a_alot['Quantity']))?></td>
          </tr>
        <?php endforeach;?>
       </tbody>
     </table>
     </div>
    </div>
  </div>
</div>
  <?php include_once('layouts/footer.php'); ?>
