<?php $__env->startSection('content'); ?>

<div class="col-md-12 content-header" >
    <h1><i class="fa fa-quote-left"></i> <?php echo e(trans('application.estimates')); ?></h1>
</div>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-header with-border">
                    <h3 class="box-title pull-right">
                    <div class="box-tools">
                        <a href="<?php echo e(route('estimates.create')); ?>" class="btn btn-primary btn-sm pull-right"> <i class="fa fa-plus"></i> <?php echo e(trans('application.new_estimate')); ?></a>
                    </div>
                    </h3>
                </div>

                <div class="box-body">
                    <table class="table table-bordered table-striped table-hover datatable">
                        <thead>
                        <tr>
                            <th></th>
                            <th><?php echo e(trans('application.estimate_number')); ?></th>
                            <th><?php echo e(trans('application.client')); ?></th>
                            <th><?php echo e(trans('application.date')); ?></th>
                            <th class="text-right"><?php echo e(trans('application.amount')); ?></th>
                            <th><?php echo e(trans('application.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->uuid); ?>" data-rel="tooltip" data-placement="top" title="View estimate" class="btn btn-sm btn-info"><i class="fa fa-eye"></i> <?php echo e(trans('application.view')); ?> </a>
                                <a href="<?php echo url('estimates/pdf',$estimate->uuid); ?>" data-rel="tooltip" data-placement="top" title="Download estimate" class="btn btn-sm btn-primary"><i class="fa fa-envelope"></i> <?php echo e(trans('application.send')); ?></a>
                                <a href="<?php echo route('estimates.edit',$estimate->uuid); ?>" class="btn btn-sm btn-success"><i class="fa fa-pencil"></i> <?php echo e(trans('application.edit')); ?> </a>
                                <?php echo delete_btn('estimates.destroy', $estimate->uuid); ?>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>

<?php $__env->stopSection(); ?>


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