<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-quote-left"></i> Estimates</h1>
</div>

<section class="content">
    <div class="row">
        <div class="col-md-12">
            <!--    Hover Rows  -->
            <a href="<?php echo e(route('estimates.create')); ?>" class="btn btn-primary btn-sm pull-right"> <i class="fa fa-plus"></i> New Estimate</a> <br/><br/>
            <?php if(Session::has('flash_notification.message')): ?>
            <?php echo message(); ?>

            <?php endif; ?>
            <div class="panel panel-default">
                <div class="panel-heading">
                    Estimates
                </div>
                <div class="panel-body">
                    <table class="table table-bordered table-striped table-hover datatable">
                        <thead>
                        <tr>
                            <th></th>
                            <th>Estimate No.</th>
                            <th>Client</th>
                            <th>Date</th>
                            <th class="text-right">Amount</th>
                            <th>Action </th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php foreach($estimates as $estimate): ?>
                        <tr>
                            <td></td>
                            <td><?php echo e($estimate->estimate_no); ?> </td>
                            <td><a href="<?php echo e(route('clients.show', $estimate->client_id )); ?>"><?php echo e($estimate->client->name); ?></a> </td>
                            <td><?php echo e($estimate->estimate_date); ?> </td>
                            <td class="text-right"><?php echo e($estimate->currency.''.$estimate->totals['grandTotal']); ?> </td>
                            <td>
                                <a href="<?php echo route('estimates.show',$estimate->id); ?>" class="btn btn-sm btn-info"><i class="fa fa-eye"></i> View </a>
                                <a href="<?php echo route('estimates.edit',$estimate->id); ?>" class="btn btn-sm btn-success"><i class="fa fa-pencil"></i> Edit </a>
                                <?php echo delete_btn('estimates.destroy', $estimate->id); ?>

                            </td>
                        </tr>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- End  Hover Rows  -->
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

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