<?php $__env->startSection('headCss'); ?>
    <link href="<?php echo e(asset('assets/stylesheets/jquery.fancybox.css')); ?>" rel="stylesheet" type="text/css">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('headJs'); ?>
    <script src="<?php echo e(asset('assets/javascripts/jquery.fancybox.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="col-xs-12">
        <div class="col-xs-offset-3 col-xs-6">
            <div class="col-xs-4">
                <img src="<?php echo e(asset('assets/images/logo.png')); ?>" height="80px"/>
            </div>
            <div class="col-xs-8">
                Willow Park, Wash Road Basildon Essex SS15 4AZ<br/>T: 01268 531099<br/>W: www.rnwholdings.com
            </div>
        </div>
    </div> <!-- / .header -->
    <div class="col-xs-12">
        <hr/>
    </div>

    <div class="panel-body">
        <div class="col-xs-12">
            <div class="col-xs-6 ">
                <form>
                    <div class="row form-group">
                        <label class="col-xs-4 control-label">Quotation Ref:</label>

                        <div class="col-xs-8">
                            <input type="text" id="updateCustomerRef" class="form-control"
                                   value="<?php echo e($quotation['quotationRef']); ?>"/>
                        </div>
                    </div>
                    <div class="row form-group">
                        <label class="col-xs-4 control-label">Job:</label>

                        <div class="col-xs-8">
                            <input id="updateQuotationJob" class="form-control" value="<?php echo e($quotation['jobId']); ?>"/>
                        </div>
                    </div>
                    <div class="row form-group">
                        <label class="col-xs-4 control-label">Customer Ref:</label>

                        <div class="col-xs-8">
                            <input type="text" id="updateCustomerRef" class="form-control"
                                   value="<?php echo e($quotation['customerRef']); ?>"/>
                        </div>
                    </div>
                    <div class="row form-group">
                        <label class="col-xs-4 control-label">Quotation Date:</label>

                        <div class="col-xs-8">
                            <input type="text" id="updateQuotationDate"
                                   value="<?php echo e(date('d/m/Y H:i:s', strtotime($quotation['quotationDate']))); ?>"
                                   class="form-control"/>
                        </div>
                    </div>
            </div>
            <div class="col-xs-6">
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Quotation Type:</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateQuotationType" class="form-control"
                               value="<?php echo e($quotation['quotationType']); ?>"/>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Lead-in Time (days):</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateLeadInTime" class="form-control"
                               value="<?php echo e($quotation['leadInTime']); ?>"/>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Work duration (days):</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateWorkDuration" class="form-control"
                               value="<?php echo e($quotation['workDuration']); ?>"/>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Discipline:</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateDiscipline" class="form-control"
                               value="<?php echo e($quotation['discipline']); ?>"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="col-xs-6">
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Client Name:</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateSiteName" class="form-control"
                               value="<?php echo e($quotation['clientName']); ?>"/>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Building Name:</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateSiteName" class="form-control"
                               value="<?php echo e($quotation['siteName']); ?>"/>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Building address:</label>

                    <div class="col-xs-8">
                        <textarea type="text" id="updateSiteAddress" rows="5" class="form-control"
                                  value="<?php echo e($quotation['siteAddress']); ?>"><?php echo e($quotation['siteAddress']); ?></textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="row form-group">
                    <label class="col-xs-4 control-label">Out of hours work required:</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateOutOfHoursWork" class="form-control"
                               value="<?php echo e($quotation['outOfHoursWork']); ?>"/>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-xs-4 control-label">We require another discipline contractor for
                        these works:</label>

                    <div class="col-xs-8">
                        <input type="text" id="updateDisciplineContractor" class="form-control"
                               value="<?php echo e($quotation['disciplineContractor']); ?>"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-xs-12">
            <h4>Work detail</h4>

            <p>
                <?php foreach($workDetailLines as $aLine): ?>
                    <?php echo e($aLine); ?><br/>
                <?php endforeach; ?>
            </p>
        </div>

        <div class="col-xs-12">
            <h4>Quotes</h4>

            <div class="table-striped">
                <table cellpadding="0" cellspacing="0" border="0" class="table table-striped">
                    <thead>
                    <tr>
                        <th>Quantity</th>
                        <th>Name</th>
                        <th>Unit Price</th>
                        <th>Mark up &percnt;</th>
                        <th>Unit Time</th>
                        <th>Type</th>
                        <th>Description</th>
                        <th>Line Total (£)</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($quotationItems as $quotationItem): ?>
                        <tr>
                            <td><?php echo e($quotationItem['itemQuantity']); ?></td>
                            <td><?php echo e($quotationItem['itemName']); ?></td>
                            <td>&pound; <?php echo e($quotationItem['itemUnitPrice']); ?></td>
                            <td><?php echo e($quotationItem['itemUnitMargin']); ?> &percnt;</td>
                            <td><?php echo e($quotationItem['itemDuration']); ?></td>
                            <td><?php echo e($quotationItem['itemType']); ?></td>
                            <td><?php echo e($quotationItem['itemDescription']); ?></td>
                            <td>&pound; <?php echo e(number_format($quotationItem['itemTotalPrice'],2)); ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="col-xs-12 text-right">
            <h4><b>Quotation Total: &pound; <?php echo e(number_format($quotation['quotationTotal'], 2)); ?></b></h4>
        </div>

        <div class="col-xs-12">
            <h4>General qualifications to this offer</h4>
            <p>
                <?php foreach($generalQualificationsLines as $aLine): ?>
                    <?php echo e($aLine); ?><br/>
                <?php endforeach; ?>
            </p>
        </div>

        <div class="col-xs-12">
            <hr/>
        </div>

        <div class="col-xs-12">
            <?php foreach($beforeImages as $beforeImage): ?>
                <?php if(!empty($hideConflict)): ?>
                    <div class="col-xs-2 text-center">
                        <img src="<?php echo e(url($beforeImage, $parameters = [], $secure = null)); ?>" class="col-xs-12"/>
                        <p class="col-xs-12" style="overflow-wrap: break-word"><?php echo e(basename(url($beforeImage, $parameters = [], $secure = null))); ?></p>
                    </div>
                <?php else: ?>
                    <a href="<?php echo e(url($beforeImage, $parameters = [], $secure = null)); ?>" class="fancybox">
                        <div class="col-xs-2 text-center">
                            <img src="<?php echo e(url($beforeImage, $parameters = [], $secure = null)); ?>" class="col-xs-12"/>
                            <p class="col-xs-12" style="overflow-wrap: break-word"><?php echo e(basename(url($beforeImage, $parameters = [], $secure = null))); ?></p>
                        </div>
                    </a>
                <?php endif; ?>
            <?php endforeach; ?>
        </div>

        <div class="col-xs-12">
            <hr/>
        </div>

        <div class="col-xs-12">
            <h4>Special Terms</h4>

            <p>
                <?php foreach($additionalTermsLines as $aLine): ?>
                    <?php echo e($aLine); ?><br/>
                <?php endforeach; ?>
            </p>
        </div>

        <div class="col-xs-12">
            <hr/>
        </div>

        <div class="col-xs-12">
            I trust that we have interpreted your requirements correctly. Should you indeed require any further
            information or assistance, please do not hesitate to contact me.
        </div>

        <div class="col-xs-12">
            <br/>
            Yours Sincerely<br/>
            <b><?php echo e($quotation['creator']); ?></b><br/>
            <b><?php echo e($quotation['creatorEmail']); ?></b>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('footerJs'); ?>
    <script type="text/javascript">
        $('body').css("background-color", "#ffffff");
        $('.demo-logo').css("background-color", "#ffffff");

        if ($('.fancybox').length > 0) {
            $('.fancybox').fancybox({
                openEffect: 'fade',
                closeEffect: 'fade'
            });
        }
    </script>
<?php $__env->stopSection(); ?>

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