KUJUNTI.ID MINISH3LL
Path : /var/www/html/usd_loan_system/storage/framework/views/
(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/usd_loan_system/storage/framework/views/372b1586a46c59bfb9dbe24b30690293820376e9.php


<?php $__env->startSection('title'); ?>
    <?php echo e(translate('collection sheet')); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="panel panel-white">
        <div class="panel-heading">
            <h6 class="panel-title">
                <?php echo e(translate('collection sheet')); ?>

                <?php if(!empty($start_date)): ?>
                    for period: <b><?php echo e($start_date); ?> to <?php echo e($end_date); ?></b>
                <?php endif; ?>
            </h6>

            <div class="heading-elements">

            </div>
        </div>
        <div class="panel-body hidden-print">
            <?php echo Form::open(array('url' => Request::url(), 'method' => 'GET','class'=>'form-horizontal', 'name' => 'form')); ?>

            <div class="row">
                <div class="col-md-4">
                    <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.date-range-picker','data' => ['name' => 'date_range','startDate' => $start_date,'endDate' => $end_date]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('forms.date-range-picker'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'date_range','start-date' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($start_date),'end-date' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($end_date)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                </div>
                <div class="col-md-4">
                    <?php echo Form::label('user_id',translate('loan_officer'),array('class'=>'')); ?>

                    <?php echo Form::select('user_id',$users,$user_id, array('class' => 'form-control select2')); ?>

                </div>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-xs-12">
                        <button type="submit" class="btn btn-success"><?php echo e(translate('search')); ?>!
                        </button>
                        <a href="<?php echo e(Request::url()); ?>"
                           class="btn btn-danger"><?php echo e(translate('reset')); ?>!</a>

                        <div class="btn-group">
                            <button type="button" class="btn bg-blue dropdown-toggle legitRipple"
                                    data-toggle="dropdown"><?php echo e(translate('download report')); ?>

                                <span class="caret"></span></button>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li>
                                    <a href="<?php echo e(url('report/loan_report/collection_sheet/print?start_date='.$start_date.'&end_date='.$end_date."&user_id=".$user_id)); ?>"
                                       target="_blank"><i
                                            class="icon-file-pdf"></i> <?php echo e(translate('print')); ?>

                                    </a></li>
                                <li>
                                <li>
                                    <a href="<?php echo e(url('report/loan_report/collection_sheet/pdf?start_date='.$start_date.'&end_date='.$end_date."&user_id=".$user_id)); ?>"
                                       target="_blank"><i
                                            class="icon-file-pdf"></i> <?php echo e(translate('download to pdf')); ?>

                                    </a></li>
                                <li>
                                    <a href="<?php echo e(url('report/loan_report/collection_sheet/excel?start_date='.$start_date.'&end_date='.$end_date."&user_id=".$user_id)); ?>"
                                       target="_blank"><i
                                            class="icon-file-excel"></i> <?php echo e(translate('download to excel')); ?>

                                    </a></li>
                                <li>
                                    <a href="<?php echo e(url('report/loan_report/collection_sheet/csv?start_date='.$start_date.'&end_date='.$end_date."&user_id=".$user_id)); ?>"
                                       target="_blank"><i
                                            class="icon-download"></i> <?php echo e(translate('download to csv')); ?>

                                    </a></li>
                            </ul>
                        </div>

                    </div>
                </div>
            </div>
            <?php echo Form::close(); ?>


        </div>
        <!-- /.panel-body -->

    </div>

    <!-- /.box -->
    <?php if(!empty($start_date)): ?>
        <div class="panel panel-white">
            <div class="panel-body table-responsive no-padding">

                <table class="table table-bordered table-condensed table-hover">
                    <thead>
                    <tr class="bg-green">
                        <th>#</th>
                        <th><?php echo e(translate('loan_officer')); ?></th>
                        <th><?php echo e(translate('borrower')); ?></th>
                        <th><?php echo e(translate('phone')); ?></th>
                        <th><?php echo e(translate('loan id')); ?></th>
                        <th><?php echo e(translate('product')); ?></th>
                        <th><?php echo e(translate('expected repayment date')); ?></th>
                        <th><?php echo e(translate('maturity date')); ?></th>
                        <th><?php echo e(translate('expected amount')); ?></th>
                        <th><?php echo e(translate('due')); ?></th>
                        <th><?php echo e(translate('outstanding')); ?></th>
                    </tr>
                    </thead>
                    <tbody>
                        <?php
                        $total_outstanding = 0;
                        $total_due = 0;
                        $total_expected = 0;
                        $total_actual = 0;
                        $row_count = 0;
                        ?>


                    <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index=> $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php

                            //select appropriate schedules

                            if (!empty($key->latest_schedule)) {
                                //$balance = \App\Helpers\GeneralHelper::loan_total_balance($key->id);
                                $balance = $key->schedules_sum_penalty + $key->schedules_sum_fees + $key->schedules_sum_interest + $key->schedules_sum_principal + $key->schedules_sum_interest_waived + $key->schedules_sum_pay_off - $key->transactions_sum_credit;
                                // $loan_due_items = \App\Helpers\GeneralHelper::loan_due_items($key->id, $key->release_date, $key->latest_schedule->due_date);
                                // $loan_paid_items = \App\Helpers\GeneralHelper::loan_paid_items($key->id, $key->release_date, $key->latest_schedule->due_date);
                                $loan_paid_items = $key->loan_paid_items();

                                $expected = $key->latest_schedule->principal + $key->latest_schedule->interest + $key->latest_schedule->fees + $key->latest_schedule->panalty;

                                // $due = ($loan_due_items["principal"] + $loan_due_items["interest"] + $loan_due_items["fees"] + $loan_due_items["penalty"]) - ($loan_paid_items["principal"] + $loan_paid_items["interest"] + $loan_paid_items["fees"] + $loan_paid_items["penalty"]);

                                // $due = ($key->schedules_sum_penalty_by_date + $key->schedules_sum_fees_by_date + $key["schedules_sum_interest_by_date"] + $key["schedules_sum_principal_by_date"]) - ($loan_paid_items["principal"] + $loan_paid_items["interest"] + $loan_paid_items["fees"] + $loan_paid_items["penalty"]);
                                $due = ($key->schedules_sum_penalty_by_date + $key->schedules_sum_fees_by_date + $key["schedules_sum_interest_by_date"] + $key["schedules_sum_principal_by_date"]) - $loan_paid_items;

                                if ($due < 0) {
                                    $actual = $expected;
                                } else {
                                    $actual = 0;
                                }

                                $total_outstanding += $balance;
                                $total_due = $total_due + $due;
                                $total_expected = $total_expected + $expected;
                                $total_actual = $total_actual + $actual;
                                $row_count++;
                            }


                            ?>

                        <?php if(!empty($key->latest_schedule)): ?>
                            <tr class="<?php if($key->latest_schedule->loan_transactions_count > 0): ?> danger <?php endif; ?>">
                                <td>
                                    <?php echo e($row_count); ?>

                                </td>
                                <td>
                                    <?php if(!empty($key->loan_officer)): ?>
                                        <a href="<?php echo e(url('user/'.$key->loan_officer_id.'/show')); ?>"><?php echo e($key->loan_officer->first_name); ?> <?php echo e($key->loan_officer->last_name); ?></a>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if(!empty($key->borrower)): ?>
                                        <a href="<?php echo e(url('borrower/'.$key->borrower_id.'/show')); ?>"><?php echo e($key->borrower->first_name); ?> <?php echo e($key->borrower->last_name); ?></a>
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <?php if(!empty($key->borrower)): ?>
                                        <?php echo e($key->borrower->mobile); ?>

                                    <?php endif; ?>
                                </td>
                                <td><a href="<?php echo e(url('loan/'.$key->id.'/show')); ?>"><?php echo e($key->id); ?></a></td>
                                <td>
                                    <?php if(!empty($key->loan_product)): ?>
                                        <?php echo e($key->loan_product->name); ?>

                                    <?php endif; ?>
                                </td>
                                <td><?php echo e($key->latest_schedule->due_date); ?></td>
                                <td><?php echo e($key->maturity_date); ?></td>
                                <td class="credit"><?php echo e(currency_converter($expected)); ?></td>
                                <td class="credit"><?php echo e(currency_converter($due)); ?></td>
                                <td class="credit"><?php echo e(currency_converter($balance)); ?></td>
                            </tr>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="8"></td>
                        <td class="credit"><b><?php echo e(currency_converter($total_expected)); ?></b></td>
                        <td class="credit"><b><?php echo e(currency_converter($total_due)); ?> </b></td>
                        <td class="credit"><b><?php echo e(currency_converter($total_outstanding)); ?> </b></td>

                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
        <script>
            $(document).ready(function () {
                // $("body").addClass('sidebar-xs');
            });
        </script>
    <?php endif; ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer-scripts'); ?>

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

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/usd_loan_system/resources/views/loan_report/collection_sheet.blade.php ENDPATH**/ ?>

© KUJUNTI.ID