<?php $__env->startSection('page-title', app('general_setting')->site_title .' | Quotations List'); ?>
<?php $__env->startSection('mainContent'); ?>
    <div class="row justify-content-center">
        <div class="col-12">
            <div class="box_header common_table_header">
                <div class="main-title d-md-flex">
                    <h3 class="mb-0 mr-30 mb_xs_15px mb_sm_20px"><?php echo e(__('quotation.Quotations')); ?></h3>
                    <?php if(permissionCheck('quotation.store')): ?>
                    <ul class="d-flex">
                        <li><a class="primary-btn radius_30px mr-10 fix-gr-bg"
                               href="<?php echo e(route("quotation.create")); ?>"><i
                                    class="ti-plus"></i><?php echo e(__('quotation.New Quotation')); ?></a>
                        </li>
                    </ul>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <div class="col-lg-12">
            <div class="QA_section QA_section_heading_custom check_box_table">
                <div class="QA_table ">
                    <!-- table-responsive -->
                    <div class="">
                        <table class="table Crm_table_active3">
                            <thead>
                            <tr>
                                <th scope="col"><?php echo e(__('common.No')); ?></th>
                                <th scope="col"><?php echo e(__('quotation.Date')); ?></th>
                                <th scope="col"><?php echo e(__('quotation.Reference No')); ?></th>
                                <th scope="col"><?php echo e(__('quotation.Customer')); ?></th>
                                <th scope="col"><?php echo e(__('quotation.Branch')); ?></th>
                                <th scope="col"><?php echo e(__('quotation.User')); ?></th>
                                <th scope="col"><?php echo e(__('common.Convert Status')); ?></th>
                                <th scope="col"><?php echo e(__('common.Action')); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $quotations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=> $quotation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($key+1); ?></td>
                                    <td><?php echo e(showDate($quotation->created_at)); ?></td>
                                    <td><?php echo e($quotation->invoice_no); ?></td>
                                    <td><?php echo e(@$quotation->customer->name); ?></td>
                                    <td><?php echo e(@$quotation->quotationable->name); ?></td>
                                    <td><?php echo e(@$quotation->user->name); ?></td>
                                    <td>
                                        <?php if($quotation->convert_status == 0): ?>
                                            <h6><span class="badge_4"><?php echo e(__('common.Pending')); ?></span></h6>
                                        <?php else: ?>
                                            <h6><span class="badge_1"><?php echo e(__('quotation.Converted To Sale')); ?></span></h6>
                                        <?php endif; ?>
                                    </td>
                                    <td>
                                        <div class="dropdown CRM_dropdown">
                                            <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                <?php echo e(__('common.Select')); ?>

                                            </button>
                                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu2">
                                            <?php if($quotation->status != 1): ?>
                                                <?php if(permissionCheck('quotation.edit')): ?>
                                                    <a href="<?php echo e(route('quotation.edit',$quotation->id)); ?>" class="dropdown-item" type="button"><?php echo e(__('common.Edit')); ?></a>
                                                <?php endif; ?>
                                            <?php else: ?>
                                                <a href="#" class="dropdown-item" type="button"><?php echo e(__('quotation.Mail Sent')); ?></a>
                                            <?php endif; ?>
                                            <a href="<?php echo e(route('quotation.show',$quotation->id)); ?>" class="dropdown-item" type="button"><?php echo e(__('quotation.Details View')); ?></a>
                                            <?php if($quotation->convert_status == 0): ?>
                                                <a href="<?php echo e(route('quotation.convert', $quotation->id)); ?>" class="dropdown-item" type="button"><?php echo e(__('quotation.Convert To Sale')); ?></a>
                                            <?php else: ?>
                                                <a class="dropdown-item" type="button"><?php echo e(__('quotation.Converted To Sale')); ?></a>
                                            <?php endif; ?>

                                            <a href="<?php echo e(route('quotation.order.pdf',$quotation->id)); ?>" class="dropdown-item" type="button"><?php echo e(__('quotation.Download')); ?></a>
                                            <a href="<?php echo e(route('quotation.clone',$quotation->id)); ?>" class="dropdown-item" type="button"><?php echo e(__('quotation.Clone to Quotation')); ?></a>
                                            <?php if(permissionCheck('quotation.delete')): ?>
                                                <a onclick="confirm_modal('<?php echo e(route('quotation.delete', $quotation->id)); ?>')" class="dropdown-item edit_brand"><?php echo e(__('common.Delete')); ?></a>
                                            <?php endif; ?>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php echo $__env->make('backEnd.partials.delete_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('backEnd.partials.approve_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

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

<?php echo $__env->make('backEnd.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/penastud/public_html/InfixBiz/Modules/Quotation/Resources/views/quotation/index.blade.php ENDPATH**/ ?>