<div class="doc-to-by-container">

    <div class="row">

        <!--COMPANY DETAILS-->
        <div class="col-6">
            <div class="doc-to-by">
                <!--title-->
                <div class="">
                    <h3><?php echo app('translator')->get('lang.service_provider'); ?></h3>
                </div>
                <!--organisation & address-->
                <div class="x-title resizetext">
                    <h4 class="font-weight-500"><?php echo e(config('system.settings_company_name')); ?></h4>
                    <?php if(config('system.settings_company_address_line_1')): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_address_line_1')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_city')): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_city')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_state')): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_state')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_zipcode')): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_zipcode')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_country')): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_country')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_customfield_1') != ''): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_customfield_1')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_customfield_2') != ''): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_customfield_2')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_customfield_3') != ''): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_customfield_3')); ?></div>
                    <?php endif; ?>
                    <?php if(config('system.settings_company_customfield_4') != ''): ?>
                    <div class="text-muted"><?php echo e(config('system.settings_company_customfield_4')); ?></div>
                    <?php endif; ?>
                </div>
            </div>
        </div>


        <!--CLIENT RESOURCE-->
        <?php if($document->docresource_type == 'client'): ?>
        <div class="col-6">
            <div class="doc-to-by text-right">
                <!--title-->
                <div class="">
                    <h3><?php echo app('translator')->get('lang.client'); ?></h3>
                </div>
                <!--organisation & address-->
                <div class="x-title resizetext">
                    <h4 class="font-weight-500"><?php echo e($document->client_company_name); ?></h4>
                    <?php if($document->client_billing_street): ?>
                    <div class="text-muted"><?php echo e($document->client_billing_street); ?></div>
                    <?php endif; ?>
                    <?php if($document->client_billing_city): ?>
                    <div class="text-muted"><?php echo e($document->client_billing_city); ?></div>
                    <?php endif; ?>
                    <?php if($document->client_billing_state): ?>
                    <div class="text-muted"><?php echo e($document->client_billing_state); ?></div>
                    <?php endif; ?>
                    <?php if($document->client_billing_zip): ?>
                    <div class="text-muted"><?php echo e($document->client_billing_zip); ?></div>
                    <?php endif; ?>
                    <?php if($document->client_billing_country): ?>
                    <div class="text-muted"><?php echo e($document->client_billing_country); ?></div>
                    <?php endif; ?>
                    <!--custom fields-->
                    <?php $__currentLoopData = $customfields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($field->customfields_show_invoice == 'yes' && $field->customfields_status == 'enabled'): ?>
                    <?php $key = $field->customfields_name; ?>
                    <?php $customfield = $document[$key] ?? ''; ?>
                    <?php if($customfield != ''): ?>
                    <div class="text-muted m-t-3"><?php echo e($field->customfields_title); ?>: <?php echo e(runtimeCustomFieldsFormat($customfield, $field->customfields_datatype)); ?></div>
                    <?php endif; ?>
                    <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
        <?php endif; ?>



        <!--LEAD RESOURCE-->
        <?php if($document->docresource_type == 'lead'): ?>
        <div class="col-sm-12 col-lg-6">
            <div class="doc-to-by text-right">
                <!--title-->
                <div class="">
                    <h3><?php echo app('translator')->get('lang.client'); ?></h3>
                </div>
                <!--organisation & address-->
                <div class="x-title resizetext">
                    <?php if($document->lead_company_name): ?>
                    <h4 class="font-weight-500"><?php echo e($document->lead_company_name); ?></h4> 
                    <?php else: ?> 
                    <h4 class="font-weight-500"><?php echo e($document->lead_firstname); ?> <?php echo e($document->lead_lastname); ?>

                    </h4>
                    <?php endif; ?>
                    <?php if($document->lead_street): ?>
                    <div class="text-muted"><?php echo e($document->lead_street); ?></div>
                    <?php endif; ?>
                    <?php if($document->lead_city): ?>
                    <div class="text-muted"><?php echo e($document->lead_city); ?></div>
                    <?php endif; ?>
                    <?php if($document->lead_state): ?>
                    <div class="text-muted"><?php echo e($document->lead_state); ?></div>
                    <?php endif; ?>
                    <?php if($document->lead_zip): ?>
                    <div class="text-muted"><?php echo e($document->lead_zip); ?></div>
                    <?php endif; ?>
                    <?php if($document->lead_country): ?>
                    <div class="text-muted"><?php echo e($document->lead_country); ?></div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        <?php endif; ?>





    </div>
</div><?php /**PATH /home/btijrmyl/crm.codenova.com.ng/application/resources/views/pages/documents/elements/doc-to-by.blade.php ENDPATH**/ ?>