<?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('order.index')); ?>">Orders</a></li>
      <li class="active">New Order</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>
        New Order
    </div>
    <div class="panel-body">
          <?php echo Form::model($order, array('route' => array('order.update', $order->id), 'method' => 'PUT', 'id' => 'form-edit-order')); ?>

           <?php echo Form::open(array('url' => 'order', 'id' => 'form-orders', 'method' => 'POST')); ?>

            <div class="form-group">
                <?php echo Form::label('order_number ', 'Order Number'); ?>

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

            </div>
             <div class="form-group">
                <?php echo Form::label('commodity_id', 'Item'); ?>

                <?php echo Form::select('commodity_id', $commodities, Input::old('commodity_id'), array('class' => 'form-control')); ?>

            </div>
             <div class="form-group">
                <?php echo Form::label('fund_manager_id', 'Fund Manager'); ?>

                <?php echo Form::select('fund_manager_id', $fund_managers, Input::old('fund_manager_id'), array('class' => 'form-control')); ?>

            </div>
             <div class="form-group">
                <?php echo Form::label('fund_source_id', 'Fund Source'); ?>

                <?php echo Form::select('fund_source_id', $fund_sources, Input::old('fund_source_id'), array('class' => 'form-control')); ?>

            </div>
             <div class="form-group">
                <?php echo Form::label('supplier_id', 'Supplier'); ?>

                <?php echo Form::select('supplier_id', $suppliers, Input::old('supplier_id'), array('class' => 'form-control')); ?>

            </div>
            <div class="form-group">
                <?php echo Form::label('quantity', 'Quantity'); ?>

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

            </div>
            <div class="form-group">
                <?php echo Form::label('unit_cost', 'Unit Cost'); ?>

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

            </div>
            <div class="form-group">
                <?php echo Form::label('total_cost', 'Total Cost'); ?>

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

            </div>
            <div class="form-group">
                <?php echo Form::label('due_date', 'Date Expected'); ?>

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

            </div>
             <div class="form-group">
                <?php echo Form::label('metric_id', 'Units'); ?>

                <?php echo Form::select('metric_id', $metrics, Input::old('metric_id'), array('class' => 'form-control')); ?>

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