

<?php $__env->startSection('title'); ?>
    Transfer Documents
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
    <ol class="breadcrumb pull-right">
        <li><a href="<?php echo e(route('home')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="<?php echo e(route('transfer.all')); ?>">Transfers</a></li>
        <li class="active">Transfer Documents</li>
    </ol>
<?php $__env->stopSection(); ?>

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

    <style type="text/css">
        .spanha {
            color: red;
        }

        .divider:after,
        .divider:before {
            content: "";
            flex: 1;
            height: 1px;
            background: #eee;
        }
       

    </style>

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

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

    <div class="container-fluid">
        <div class="row">

            <form method='post' autocomplete="off" action="<?php echo e(route('transfer.approve.tore.document')); ?>" enctype="multipart/form-data">
                <?php echo e(csrf_field()); ?>

                <div class="col-lg-12 col-sm-12 col-xs-12">
                    <div class="white-box">
                        <h3 class="box-title m-b-0"><i class="icon-layers fa-fw"></i> Transfer Documents</h3>
                        <p class="text-muted m-b-30 font-13"> <span class="spanha">Note:</span> All * fields are mandatory
                        </p>
                        <hr>





                    </div>
                </div>

                <input type='hidden' name='id' value="<?php echo e($transfer_property->id); ?>">


                
                <div class="col-lg-12 col-sm-12 col-xs-12">
                    <div class="white-box">
                        <h3 class="box-title m-b-0"><i class="icon-layers fa fa-file-text"></i> Required Documents </h3>
                        
                               <?php if($transfer_property->transfer_type == \App\TransferProperty::normal_transfer): ?>
                               <h4>Normal Transfer</h4>
                               <?php elseif($transfer_property->transfer_type == \App\TransferProperty::gift_transfer): ?>
                               <h4>Gift Transfer</h4>
                               <?php elseif($transfer_property->transfer_type == \App\TransferProperty::family_transfer): ?>
                               <h4>Family Transfer</h4>
                               <?php elseif($transfer_property->transfer_type == \App\TransferProperty::death_transfer): ?>
                               <h4>Death Transfer</h4>
                               <?php endif; ?>
                            
                        
                        <hr>
                        <div class="clearfix"></div>
                       
                            
                        
                        <div class="clearfix"></div>
                        
                        <section class="vh-100">
                            <div class="container py-5 h-100">
                                <div class="row d-flex justify-content-center align-items-center h-100">
                                    <div class="col col-lg-8 col-xl-6">
                                        <div class="card rounded-3">
                                            <div class="card-body p-4">

                                                <p class="mb-2"><span class="h2 me-2">Documents</span> <span
                                                        class="badge bg-danger">checklist</span></p>

                                                <ul class="list-group rounded-0">
                                                    <?php $__currentLoopData = $transfer_document; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $document): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                                    <li class="list-group-item border-0 d-flex align-items-center ps-0">
                                                        <?php
                                                        $result=     $transfer_property->transferDocument->where('transfer_property_type_document_id',$document->id)->first();    
 
                                                       
                                                             ?>
                                                       
                                                            <?php if(!empty($result)): ?>
                                                            <input class="form-check-input me-3 " type="checkbox" value=""
                                                            aria-label="..." checked disabled/>
                                                          
                                                        <s>
                                                            <?php echo e($document->name); ?>

                                                        </s>
                                                        <?php else: ?>
                                                        <input class="form-check-input me-3 " type="checkbox" value=""
                                                        aria-label="..."  disabled/>
                                                      
                                                    
                                                        <?php echo e($document->name); ?>

                                                    
                                                        <?php endif; ?>
                                                        <input type='hidden'   value="<?php echo e($document->id); ?>"
                                                         name='document_id[]'/>
                                                        <a target="_blank" href="<?php echo e(route($document->route_name,$transfer_property->id)); ?>"
                                                            data-toggle="tooltip" data-original-title="print form">
                                                            <i class="fa fa-print text-inverse m-r-10"></i>&nbsp;&nbsp;</a>
                                                   
                                                            <?php if(!empty($result)): ?>
                                                            <a target="_blank" href="<?php echo e(asset('documents/' . $result->document_path)); ?>" 
                                                                data-toggle="tooltip" data-original-title="uploaded form">
                                                                <i class="fa fa-download text-inverse m-r-10"></i>&nbsp;&nbsp;
                                                            </a>
                                                            <?php endif; ?>
                                                            
                                                            <label for="myfile">Upload a file:</label>
                                                            <input type="file" id="myfile" name="file[]" style='display: inline;'>
                                                        </li>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                    
                                                </ul>



                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group m-b-0 ">
                                    <div  >
                                        <button type="submit" class="btn btn-info  waves-effect waves-light ">Save</button>
                                    </div>
                                </div>
                            </div>
                          
                        </section>
                    </div>
                </div>
                


               




            </form>
        </div>
    </div>


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

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

    <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/jquery.inputmask.bundle.js"></script>

    <script>
        $(":input").inputmask();
        $(document).ready(function() {
            $('.js-example-basic-single').select2();
        });

        function updateSchedule() {
            $('.preloader').fadeIn();
            var id = $('#property-no').val();

            var data = {
                'id': id
            };

            $.get('/transfer/updateInfo', data, function(data) {

                if (data) {
                    $('#cost-amount').val(new Intl.NumberFormat().format(data['info'].net_pay));
                    $('#owner-name').val(data['info'].customer.name);
                    $('#old_client_id').val(data['info'].membership_no);
                    $('#received-amount').val(new Intl.NumberFormat().format(data['received']));

                    $('#transfer_type').val();
                    $('#pending_due').val(new Intl.NumberFormat().format(data['due']));

                    if (data['due'] > 0) {
                        toastr.error('Pending Due Amount.');
                    }
                    $('#transfer_type').empty();
                    if (data['transfer_type'] == <?php echo e(\App\TransferProperty::normal_transfer); ?>) {
                        $('#transfer_type').val('Normal Transfer');
                    } else if (data['transfer_type'] == <?php echo e(\App\TransferProperty::gift_transfer); ?>) {
                        $('#transfer_type').val('Gift Transfer');
                    } else if (data['transfer_type'] == <?php echo e(\App\TransferProperty::family_transfer); ?>) {
                        $('#transfer_type').val('Family Transfer');
                    } else if (data['transfer_type'] == <?php echo e(\App\TransferProperty::death_transfer); ?>) {
                        $('#transfer_type').val('Death Transfer');
                    }







                }

            });
            $('.preloader').fadeOut();
        }

        $('#country_id').change(function() {
            $('.preloader').fadeIn();
            var data = {
                'country_id': $(this).val()
            };

            $.get('/getCitiesByCountry', data, function(data) {
                var model = $('#city_id');
                model.empty();

                model.append("<option value='' disabled selected>" + '' + "</option>");


                $.each(data, function(index, element) {
                    model.append("<option value='" + element.id + "'>" + element.name +
                        "</option>");
                });
            });
            $('.preloader').fadeOut();
        });
    </script>


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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/proje372/akram-city.projecterp.net/resources/views/statement/transfer/transfer-document.blade.php ENDPATH**/ ?>