KUJUNTI.ID MINISH3LL
Path : /var/www/html/thb_loan_system/resources/views/guarantor/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/thb_loan_system/resources/views/guarantor/show.blade.php


@extends('layouts.master')
@section('title')
    {{translate('guarantor detail')}}
@endsection
@section('content')
    <div class="box box-widget">
        <div class="panel-heading">
            <div class="row">
                <div class="col-sm-3">
                    <div class="user-block">
                        @if(!empty($guarantor->photo))
                            <a href="{{asset('uploads/'.$guarantor->photo)}}" class="fancybox"> <img class="img-circle"
                                                                                                     src="{{asset('uploads/'.$guarantor->photo)}}"
                                                                                                     alt="user image"/></a>
                        @else
                            <img class="img-circle"
                                 src="{{asset('assets/dist/img/user.png')}}"
                                 alt="user image"/>
                        @endif
                        <span class="username">
                                {{$guarantor->title}}
                            . {{$guarantor->first_name}} {{$guarantor->last_name}}
                            </span>
                        <span class="description" style="font-size:13px; color:#000000">{{$guarantor->unique_number}}
                            <br>
                                <a href="{{url('borrower/'.$guarantor->id.'/edit')}}">{{translate('edit')}}</a><br>
                            {{$guarantor->business_name}}, {{$guarantor->working_status}}
                            <br>{{$guarantor->gender}}
                            , {{date("Y-m-d")-$guarantor->dob}} {{translate('year')}}
                            </span>
                        <a data-toggle="collapse" data-parent="#accordion" href="#viewFiles">
                            {{translate('view guarantor file')}}
                        </a>

                        <div id="viewFiles" class="panel-collapse collapse">
                            <div class="panel-body">
                                <ul class="no-margin" style="font-size:12px; padding-left:10px">

                                    @foreach(unserialize($guarantor->files) as $key=>$value)
                                        <li><a href="{!!asset('uploads/'.$value)!!}"
                                               target="_blank">{!!  $value!!}</a></li>
                                    @endforeach
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!-- /.user-block -->
                </div>
                <!-- /.col -->
                <div class="col-sm-3">
                    <ul class="list-unstyled">
                        <li><b>{{translate('address')}}:</b> {{$guarantor->address}}</li>
                        <li><b>{{translate('city')}}:</b> {{$guarantor->city}}</li>
                        <li><b>{{translate('state')}}:</b> {{$guarantor->state}}</li>
                        <li><b>{{translate('zip')}}:</b> {{$guarantor->zip}}</li>
                        <li>
                            <b>{{translate('country')}}:</b>
                            @if($guarantor->country)
                                {{$guarantor->country->name}}
                            @endif
                        </li>
                        <li><b>{{translate('blacklisted')}}:</b>
                            @if($guarantor->blacklisted==1)
                                <span class="label label-danger">{{translate('yes')}}</span>
                            @else
                                <span class="label label-success">{{translate('no')}}</span>
                            @endif
                        </li>
                    </ul>
                </div>
                <div class="col-sm-3">
                    <ul class="list-unstyled">
                        <li><b>{{translate('phone')}}:</b> {{$guarantor->phone}}</li>
                        <li><b>{{translate('email')}}:</b> <a
                                    onclick="javascript:window.open('mailto:{{$guarantor->email}}', 'mail');event.preventDefault()"
                                    href="mailto:{{$guarantor->email}}">{{$guarantor->email}}</a>

                            <div class="btn-group-horizontal hidden"><a type="button" class="btn-xs bg-red"
                                                                        href="{{url('communication/email/create?borrower_id='.$guarantor->id)}}">{{translate('send')}}
                                    {{translate('email')}}</a></div>
                        </li>
                        <li><b>{{translate('mobile')}}:</b> {{$guarantor->mobile}}
                            <div class="btn-group-horizontal hidden"><a type="button" class="btn-xs bg-red"
                                                                        href="{{url('communication/sms/create?borrower_id='.$guarantor->id)}}">{{translate('send')}}
                                    {{translate('sms')}}</a></div>
                        </li>

                    </ul>
                </div>
                <div class="col-sm-3">
                    <ul class="list-unstyled">
                        <li><b>{{translate('custom_field')}}</b></li>
                        @foreach($custom_fields as $key)
                            <li>
                                @if(!empty($key->custom_field))
                                    <strong>{{$key->custom_field->name}}:</strong>
                                @endif
                                {{$key->name}}
                            </li>
                        @endforeach

                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="box box-info">
        <div class="panel-heading">
            <h3 class="panel-title">{{translate('loan')}}</h3>

            <div class="heading-elements">

            </div>
        </div>
        <div class="panel-body table-responsive ">
            <table id="data-table" class="table table-bordered table-condensed table-hover">
                <thead>
                <tr style="background-color: #D1F9FF">
                    <th>#</th>
                    <th>{{translate('principal')}}</th>
                    <th>{{translate('released')}}</th>
                    <th>{{translate('interest')}}%</th>
                    <th>{{translate('due')}}</th>
                    <th>{{translate('paid')}}</th>
                    <th>{{translate('balance')}}</th>
                    <th>{{translate('status')}}</th>
                    <th>{{ translate('action') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($guarantor->loans as $key)
                    @if(!empty($key->loan))
                        <tr>

                            <td>{{$key->loan->id}}</td>
                            <td>{{currency_converter(\App\Helpers\GeneralHelper::loan_total_principal($key->loan->id))}}</td>
                            <td>{{$key->loan->release_date}}</td>
                            <td>
                                {{round($key->loan->interest_rate)}}%/{{$key->loan->interest_period}}
                            </td>
                            <td>{{round(\App\Helpers\GeneralHelper::loan_total_due_amount($key->loan->id))}}</td>
                            <td>{{round(\App\Helpers\GeneralHelper::loan_total_paid($key->loan->id))}}</td>
                            <td>{{round(\App\Helpers\GeneralHelper::loan_total_balance($key->loan->id))}}</td>
                            <td>
                                @if($key->loan->maturity_date<date("Y-m-d") && \App\Helpers\GeneralHelper::loan_total_balance($key->loan->id)>0)
                                    <span class="label label-danger">{{translate('past_maturity')}}</span>
                                @else
                                    @if($key->loan->status=='pending')
                                        <span class="label label-warning">{{translate('pending approval')}}</span>
                                    @endif
                                    @if($key->loan->status=='approved')
                                        <span class="label label-info">{{translate('awaiting disbursement')}}</span>
                                    @endif
                                    @if($key->loan->status=='disbursed')
                                        <span class="label label-info">{{translate('active')}}</span>
                                    @endif
                                    @if($key->loan->status=='declined')
                                        <span class="label label-danger">{{translate('declined')}}</span>
                                    @endif
                                    @if($key->loan->status=='withdrawn')
                                        <span class="label label-danger">{{translate('withdrawn')}}</span>
                                    @endif
                                    @if($key->loan->status=='written_off')
                                        <span class="label label-danger">{{translate('written_off')}}</span>
                                    @endif
                                    @if($key->loan->status=='closed')
                                        <span class="label label-success">{{translate('closed')}}</span>
                                    @endif
                                    @if($key->loan->status=='pending_reschedule')
                                        <span class="label label-warning">{{translate('pending reschedule')}}</span>
                                    @endif
                                    @if($key->loan->status=='rescheduled')
                                        <span class="label label-info">{{translate('rescheduled')}}</span>
                                    @endif
                                @endif
                            </td>
                            <td>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-info btn-flat dropdown-toggle"
                                            data-toggle="dropdown" aria-expanded="false">
                                        {{ translate('choose') }} <span class="caret"></span>
                                        <span class="sr-only">Toggle Dropdown</span>
                                    </button>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="{{ url('loan/'.$key->loan->id.'/show') }}"><i
                                                        class="fa fa-search"></i> {{ translate('detail') }}
                                            </a></li>
                                        <li><a href="{{ url('loan/'.$key->loan->id.'/edit') }}"><i
                                                        class="fa fa-edit"></i> {{ translate('edit') }} </a></li>
                                        <li><a href="{{ url('loan/'.$key->loan->id.'/delete') }}"
                                               data-toggle="confirmation"><i
                                                        class="fa fa-trash"></i> {{ translate('delete') }} </a></li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                    @endif
                @endforeach
                </tbody>
            </table>
        </div>
    </div>

@endsection
@section('footer-scripts')
    <script src="{{ asset('assets/plugins/datatable/media/js/jquery.dataTables.js')}}"></script>
    <script src="{{ asset('assets/plugins/datatable/media/js/dataTables.bootstrap.js')}}"></script>
    <script src="{{ asset('assets/plugins/datatable/extensions/Buttons/js/dataTables.buttons.min.js')}}"></script>
    <script src="{{ asset('assets/plugins/datatable/extensions/Buttons/js/buttons.html5.min.js')}}"></script>
    <script src="{{ asset('assets/plugins/datatable/extensions/Buttons/js/buttons.print.min.js')}}"></script>
    <script src="{{ asset('assets/plugins/datatable/extensions/Responsive/js/dataTables.responsive.min.js')}}"></script>
    <script src="{{ asset('assets/plugins/datatable/extensions/Buttons/js/buttons.colVis.min.js')}}"></script>
    <script>
        $('#data-table').DataTable({
            dom: 'frtip',
            "paging": true,
            "lengthChange": true,
            "displayLength": 15,
            "searching": true,
            "ordering": true,
            "info": true,
            "autoWidth": true,
            "order": [[2, "asc"]],
            "columnDefs": [
                {"orderable": false, "targets": [0, 8]}
            ],
            "language": {
                "lengthMenu": "{{ translate('lengthMenu') }}",
                "zeroRecords": "{{ translate('zeroRecords') }}",
                "info": "{{ translate('info') }}",
                "infoEmpty": "{{ translate('infoEmpty') }}",
                "search": "{{ translate('search') }}",
                "infoFiltered": "{{ translate('infoFiltered') }}",
                "paginate": {
                    "first": "{{ translate('first') }}",
                    "last": "{{ translate('last') }}",
                    "next": "{{ translate('next') }}",
                    "previous": "{{ translate('previous') }}"
                }
            },
            responsive: false
        });
        $('#view-repayments').DataTable({
            dom: 'frtip',
            "paging": true,
            "lengthChange": true,
            "displayLength": 15,
            "searching": true,
            "ordering": true,
            "info": true,
            "autoWidth": true,
            "order": [[0, "asc"]],
            "columnDefs": [
                {"orderable": false, "targets": [4, 5]}
            ],
            "language": {
                "lengthMenu": "{{ translate('lengthMenu') }}",
                "zeroRecords": "{{ translate('zeroRecords') }}",
                "info": "{{ translate('info') }}",
                "infoEmpty": "{{ translate('infoEmpty') }}",
                "search": "{{ translate('search') }}",
                "infoFiltered": "{{ translate('infoFiltered') }}",
                "paginate": {
                    "first": "{{ translate('first') }}",
                    "last": "{{ translate('last') }}",
                    "next": "{{ translate('next') }}",
                    "previous": "{{ translate('previous') }}"
                }
            },
            responsive: false
        });
    </script>
    <script>
        $(document).ready(function () {
            $('.deletePayment').on('click', function (e) {
                e.preventDefault();
                var href = $(this).attr('href');
                swal({
                    title: '{{translate('are_you_sure')}}',
                    text: 'If you delete a payment, a fully paid loan may change status to open.',
                    type: 'warning',
                    showCancelButton: true,
                    confirmButtonColor: '#3085d6',
                    cancelButtonColor: '#d33',
                    confirmButtonText: '{{translate('ok')}}',
                    cancelButtonText: '{{translate('cancel')}}'
                }).then(function () {
                    window.location = href;
                })
            });
        });
    </script>
@endsection

© KUJUNTI.ID