<?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><a href="<?php echo e(URL::route('commodity.index')); ?>"><?php echo trans('messages.commodityList'); ?></a></li>
	 	<li class="active"><?php echo Lang::choice('messages.commodities',2); ?></li>
	</ol>
</div>
<?php if(Session::has('message')): ?>
	<div class="alert alert-info"><?php echo trans(Session::get('message')); ?></div>
<?php endif; ?>
<?php if($errors->all()): ?>
                <div class="alert alert-danger">
                    <?php echo HTML::ul($errors->all()); ?>

                </div>
<?php endif; ?>
<div class="panel panel-default">
	<div class="panel-heading ">
		<span class="glyphicon glyphicon-user"></span>
		<?php echo Lang::choice('messages.commodities',2); ?>

	</div>
	<div class="panel-body">
		   <?php echo Form::open(array('route' => 'commodity.store', 'id' => 'form-store_commodity', 'method' => 'POST')); ?>


			 <div class="form-group">
				 <?php echo Form::label('name', Lang::choice('messages.commodity', 1)); ?>

				 <?php echo Form::text('name', Input::old('commodity'), array('class' => 'form-control', 'rows' => '2')); ?>

			 </div>

			 <div class="form-group">
					<?php echo Form::label('category', trans('Commodity Category')); ?>

					<?php echo Form::select('category', array(null => '')+$category,'', array('class' => 'form-control', 'id' => 'category_id')); ?>

						</div>

						<div class="form-group">
								<?php echo Form::label('pack_size', trans('Pack Size')); ?>

								<?php echo Form::text('pack_size', Input::old('pack_size'), array('class' => 'form-control', 'rows' => '2')); ?>

						</div>

						<div class="form-group">
							 <?php echo Form::label('stores', trans('Store Section')); ?>

							 <?php echo Form::select('stores', array(null => '')+$stores,'', array('class' => 'form-control', 'id' => 'stores_id')); ?>

								 </div>

             <div class="form-group">
                <?php echo Form::label('description', trans('messages.description')); ?>

                <?php echo Form::textarea('description', Input::old('description'),array('class' => 'form-control', 'rows' => '2')); ?>

            </div>
             <div class="form-group">
                <?php echo Form::label('unit_of_issue', trans('Unit of Measure')); ?>

                <?php echo Form::select('unit_of_issue', array(null => '')+$metrics,'', array('class' => 'form-control', 'id' => 'metrics_id')); ?>

                  </div>
            <!-- <div class="form-group">
                <?php echo Form::label('item_code', trans('messages.item-code')); ?>

                <?php echo Form::text('item_code', Input::old('item_code'),array('class' => 'form-control', 'rows' => '2')); ?>

            </div> -->
            <!-- <div class="form-group">
                <?php echo Form::label('storage_req', trans('messages.storage-req')); ?>

                <?php echo Form::textarea('storage_req', Input::old('storage_req'),array('class' => 'form-control', 'rows' => '2')); ?>

            </div> -->
            <div class="form-group">
                <?php echo Form::label('min_level ', trans('Min Stock Level')); ?>

                <?php echo Form::text('min_level', Input::old('min_level'),array('class' => 'form-control', 'rows' => '2')); ?>

            </div>
            <div class="form-group">
                <?php echo Form::label('max_level ', trans('Max Stock Level')); ?>

                <?php echo Form::text('max_level', Input::old('max_level'),array('class' => 'form-control', 'rows' => '2')); ?>

            </div>

            <div class="form-group actions-row">
                    <?php echo Form::button("<span class='glyphicon glyphicon-save'></span> ".trans('messages.save'),
                        array('class' => 'btn btn-primary', 'onclick' => 'submit()')); ?>

            </div>
        <?php echo Form::close(); ?>


		<?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(); ?>