<?php $__env->startSection("content"); ?>
<div>
	<ol class="breadcrumb">
	  <li><a href="<?php echo e(URL::route('user.home')); ?>"><?php echo trans('messages.home'); ?></a></li>
	  <li class="active"><?php echo Lang::choice('messages.commodityList',2); ?></li>
	</ol>
</div>
<?php if(Session::has('message')): ?>
	<div class="alert alert-info"><?php echo trans(Session::get('message')); ?></div>
<?php endif; ?>
<div  class="panel panel-default row" style="width:97%">
	<div class="panel-heading ">
		<span class="glyphicon glyphicon-user"></span>
		<?php echo trans('messages.commodityList'); ?>

		<div class="panel-btn">
			<a class="btn btn-sm btn-info" href="<?php echo URL::route('commodity.create'); ?>">
				<span class="glyphicon glyphicon-plus-sign"></span>
				<?php echo trans('messages.add-commodity'); ?>

			</a>
		</div>
	</div>
	<div class="panel-body">
	<div class="table-responsive">
  	<table class="table table-striped table-bordered search-table">
			<thead>
				<tr>
					<th>#</th>
					<th><?php echo Lang::choice('messages.commodity',1); ?></th>
					 <th>Commodity Category</th>
					<th><?php echo Lang::choice('messages.description',1); ?></th>
					<th>Pack <br> Size	</th>
					<th><?php echo Lang::choice('messages.unit-of-issue',1); ?></th>
					<!-- <th class="text-center"><?php echo Lang::choice('messages.item-code',1); ?></th> -->
					<th class="text-center">Store Section</th>
					<!-- <th class="text-center"><?php echo Lang::choice('messages.storage-req',1); ?></th> -->
					<th class="text-center">Qty <br> Available</th>
					<th class="text-center">Min <br> Level</th>
					<th class="text-center">Max <br> Level</th>
					<th class="text-center">AMC <br></th>

				</tr>
			</thead>
			<tbody>
				 <?php $row=1;
					 ?>
			<?php foreach($commodities as $value): ?>
				<tr>
					<th><?php echo $row; ?></th>
          <td><?php echo $value->name; ?></td>
         <td><?php echo $value->category->name; ?></td>
          <td><?php echo $value->description; ?></td>
          <td><?php echo $value->pack_size; ?></td>
          <td><?php echo $value->metric->name; ?></td>
      	<td><?php echo $value->stores->name; ?></td>
          <!-- <td class="text-center"><?php echo $value->item_code; ?></td> -->
					<!-- <td class="text-center"><?php echo $value->storage_req; ?></td> -->

					<td class="text-center"><?php echo $value->available(); ?></td>
					<td class="text-center"><?php echo $value->min_level; ?></td>
					<td class="text-center"><?php echo $value->max_level; ?></td>
					<td class="text-center"><?php echo $value->amc(); ?></td>
					<!--<td>
					 edit this commodity (uses the edit method found at GET /inventory/{id}/edit

						<a class="btn btn-sm btn-info" href="<?php echo URL::route('commodity.edit', array($value->id)); ?>" >
								<span class="glyphicon glyphicon-edit"></span>
								<?php echo trans('messages.edit'); ?>

						</a>
							<!-- delete this commodity (uses the delete method found at GET /inventory/{id}/delete
						 <button class="btn btn-sm btn-danger delete-item-link"
								data-toggle="modal" data-target=".confirm-delete-modal"
								data-id="<?php echo URL::route('commodity.delete', array($value->id)); ?>">
								<span class="glyphicon glyphicon-trash"></span>
								<?php echo trans('messages.delete'); ?>

						</button>
					</td>-->
				</tr>
				<?php $row++; ?>
				<?php endforeach; ?>
			</tbody>
		</table>
		<?php Session::put('SOURCE_URL', URL::full());?>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make("layout", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>