

<?php $__env->startSection('title'); ?>
    Customer Vouchers
<?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 class="active">Customer Vouchers</li>
    </ol>
<?php $__env->stopSection(); ?>


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


    <div class="container-fluid">


        <!-- /row -->
        <div class="row">
            <div class="col-sm-12">

                <div class="white-box">
                    <h3 class="box-title">Customers</h3>

                    <!-- Nav tabs -->
                    <ul class="nav customtab nav-tabs" role="tablist">
                        <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab"
                                data-toggle="tab" aria-expanded="true"><span class="visible-xs"><i
                                        class="ti-home"></i></span><span class="hidden-xs">List</span></a></li>
                        <!-- <li role="presentation" class=""><a href="#home1" aria-controls="home" role="tab" data-toggle="tab" aria-expanded="true"><span class="visible-xs"><i class="ti-home"></i></span><span class="hidden-xs">Pending Bookings <?php if(count($allStatements) > 0): ?>
    )<span class="label label-rounded pull-right" style="line-height: 1.8;    min-width: 0px;font-size: 14px;padding: 0px 8px;background-color: rgb(204 2 2);"><?php echo e(count($allStatements)); ?></span>
    <?php endif; ?>
        </span>
        </a></li> -->
                        <li role="presentation" class=""><a href="#profile1" aria-controls="profile" role="tab"
                                data-toggle="tab" aria-expanded="false"><span class="visible-xs"><i
                                        class="ti-user"></i></span> <span class="hidden-xs">Pending Receipts <?php if(count($receipts) > 0): ?>
                                        <span class="label label-rounded pull-right"
                                            style="line-height: 1.8;    min-width: 0px;font-size: 14px;padding: 0px 8px;background-color: rgb(204 2 2);"><?php echo e(count($receipts)); ?></span>
                                    <?php endif; ?>
                                </span>
                            </a></li>
                        <li role="presentation" class=""><a href="#profile3" aria-controls="profile" role="tab"
                                data-toggle="tab" aria-expanded="false"><span class="visible-xs"><i
                                        class="ti-user"></i></span> <span class="hidden-xs">Customer Tax Pending Receipts
                                    <?php if(count($customer_tax_receipts) > 0): ?>
                                        <span class="label label-rounded pull-right"
                                            style="line-height: 1.8;    min-width: 0px;font-size: 14px;padding: 0px 8px;background-color: rgb(204 2 2);"><?php echo e(count($customer_tax_receipts)); ?></span>
                                    <?php endif; ?>
                                </span>
                            </a></li>
                        <li role="presentation" class=""><a href="#cancelreceipt" aria-controls="profile"
                                role="tab" data-toggle="tab" aria-expanded="false"><span class="visible-xs"><i
                                        class="ti-user"></i></span> <span class="hidden-xs">Pending Cancel Receipt
                                    <?php if(count($cancel_receipts) > 0): ?>
                                        <span class="label label-rounded pull-right"
                                            style="line-height: 1.8;    min-width: 0px;font-size: 14px;padding: 0px 8px;background-color: rgb(204 2 2);"><?php echo e(count($cancel_receipts)); ?></span>
                                    <?php endif; ?>
                                </span></a></li>
                        <li role="presentation" class=""><a href="#profile4" aria-controls="profile" role="tab"
                                data-toggle="tab" aria-expanded="false"><span class="visible-xs"><i
                                        class="ti-user"></i></span> <span class="hidden-xs">Pending Refunded Receipt
                                    <?php if(count($refund_properties) > 0): ?>
                                        <span class="label label-rounded pull-right"
                                            style="line-height: 1.8;    min-width: 0px;font-size: 14px;padding: 0px 8px;background-color: rgb(204 2 2);"><?php echo e(count($refund_properties)); ?></span>
                                    <?php endif; ?>
                                </span></a></li>

                        <li role="presentation" class=""><a href="#profile2" aria-controls="profile" role="tab"
                                data-toggle="tab" aria-expanded="false"><span class="visible-xs"><i
                                        class="ti-user"></i></span> <span class="hidden-xs">Vouchers</span></a></li>


                    </ul>
                    <!-- Tab panes -->
                    <div class="tab-content">

                        <div role="tabpanel" class="tab-pane fade active in" id="home">
                            <div class="table-responsive">

                                <a href="<?php echo e(route('control-account.addView', ['id' => \App\ControlAccount::CUSTOMER])); ?>"
                                    target="_blank" class="btn btn-default pull-right" style="background-color: #0282ca; color: white;"> Add New </a>
                                <br>
                                <br>
                                <div class="clearfix"></div>
                                <table id="myTable8" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>#</th>

                                            <th>Name</th>
                                            <th>Description</th>
                                            <th>balance</th>


                                            <th style="width: 185px!important;">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $count = 1; ?>


                                        <?php $__currentLoopData = $list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $l): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($count++); ?></td>
                                                <td>
                                                    <?php echo e($l->name); ?>



                                                </td>

                                                <td><?php echo e($l->description); ?></td>
                                                <td>
                                                    <?php if($balance[$l->id] < 0): ?>
                                                        (<?php echo e(number_format(abs($balance[$l->id]))); ?>)
                                                    <?php elseif($balance[$l->id] > 0): ?>
                                                        <?php echo e(number_format($balance[$l->id])); ?>

                                                    <?php else: ?>
                                                        -
                                                    <?php endif; ?>
                                                </td>


                                                <td class="text-nowrap">

                                                    <a href="<?php echo e(route('control-account.detail', ['id' => $l->id])); ?>"
                                                        target="_blank" class="btn btn-default" style="background-color: #0282ca; color: white;"> View </a>


                                                    <a href="<?php echo e(route('control-account.editView', ['id' => $l->id])); ?>"
                                                        target="_blank" class="btn btn-default" style="background-color: #008000; color: white;"> Edit</a>



                                                </td>

                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </tbody>
                                </table>

                            </div>
                            <div class="clearfix"></div>
                        </div>


                        <div role="tabpanel" class="tab-pane fade" id="home1">
                            <div class="table-responsive">
                                <table id="myTable" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>#</th>

                                            <th>Registration #</th>
                                            <th>Unit #</th>
                                            <th>Size</th>
                                            <th>Member Name</th>
                                            <th>Net Amount</th>



                                            <th>Booking Date</th>

                                            <th style="width: 185px!important;">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $count = 1; ?>


                                        <?php $__currentLoopData = $allStatements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $statement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($count++); ?></td>
                                                <td>
                                                    <a href="<?php echo e(route('statement.detail', ['id' => $statement->id])); ?>">
                                                        <?php echo e($statement->membership_no); ?>

                                                    </a>

                                                </td>

                                                <td><?php echo e($statement->inventory->unit_number); ?></td>
                                                <td>
                                                    <?php if($statement->inventory): ?>
                                                        <?php if($statement->inventory->size): ?>
                                                            <?php echo e($statement->inventory->size->name); ?> <?php echo e(env('SIZE')); ?>

                                                        <?php endif; ?>
                                                    <?php endif; ?>
                                                </td>
                                                <td><?php echo e($statement->customer ? $statement->customer->name : ''); ?><br><b>Dealer:
                                                    </b><?php echo e($statement->dealer ? $statement->dealer->name : ''); ?></td>

                                                <td><b><?php echo e(number_format($statement->net_pay)); ?></b></td>

                                                <td><?php echo e(date('d-m-Y', strtotime($statement->booking_date))); ?></td>

                                                <td class="text-nowrap">

                                                    <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'create-voucher')): ?>
                                                        <a href="<?php echo e(route('statement.detail', ['id' => $statement->id])); ?>"
                                                            target="_blank" class="btn btn-default"> View </a>
                                                        <a href="#" onclick="$('#voucher-form').submit()"
                                                            class="btn btn-primary"> Make JV</a>
                                                    <?php endif; ?>

                                                    <form id="voucher-form" method="post"
                                                        action="<?php echo e(route('create-voucher')); ?>">
                                                        <?php echo e(csrf_field()); ?>

                                                        <input type="hidden" name="type"
                                                            value="<?php echo e(\App\GeneralJournalEntry::booking); ?>">
                                                        <input type="hidden" name="id"
                                                            value="<?php echo e($statement->id); ?>">
                                                        <input type="hidden" name="control"
                                                            value="<?php echo e(\App\ControlAccount::CUSTOMER); ?>">

                                                    </form>




                                                </td>

                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </tbody>
                                </table>

                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div role="tabpanel" class="tab-pane fade" id="profile3">
                            <div class="table-responsive">
                                <table id="myTable6" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>Receipt No.</th>
                                            <th>Unit No. </th>
                                            <th>Payment Method</th>
                                            <th>Payment Head</th>
                                            <th>Received Amount </th>
                                            <th>Date</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>



                                        <?php $__currentLoopData = $customer_tax_receipts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $receipt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($receipt->receipt_no); ?></td>


                                                <td><?php echo e($receipt->customerPropertyTax->statement->receipt->customer->name); ?>

                                                </td>





                                                <?php if($receipt->payment_method == \App\Receipt::cash): ?>
                                                    <td>Cash</td>
                                                <?php elseif($receipt->payment_method == \App\Receipt::bank): ?>
                                                    <td>Bank</td>
                                                <?php elseif($receipt->payment_method == \App\Receipt::adjustment): ?>
                                                    <td>Adjustment</td>
                                                <?php else: ?>
                                                    <td></td>
                                                <?php endif; ?>


                                                <?php if($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::down_payment): ?>
                                                    <td class="printFV">Down Payment</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::possession): ?>
                                                    <td class="printFV">Possession Fee</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::installment): ?>
                                                    <td class="printFV">Installment </td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::other): ?>
                                                    <td class="printFV">Other</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::allotment): ?>
                                                    <td class="printFV">Allotment</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::confirmation): ?>
                                                    <td class="printFV">Confirmation</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::booking): ?>
                                                    <td class="printFV">Booking</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::development): ?>
                                                    <td class="printFV">Development</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::file_processing): ?>
                                                    <td class="printFV">File Processing</td>
                                                <?php elseif($receipt->customerPropertyTax->statement->receipt->payment_head == \App\CustomerStatement::registration): ?>
                                                    <td class="printFV">Registration</td>
                                                <?php else: ?>
                                                    <td class="printFV"></td>
                                                <?php endif; ?>



                                                <td><?php echo e(number_format($receipt->receipt_amount)); ?> PKR</td>


                                                <td> <?php echo e(date('d-m-Y', strtotime($receipt->receipt_date))); ?></td>

                                                <td class="text-nowrap">

                                                    <a href="<?php echo e(route('pending-customer-tax-receipts.detail', ['id' => $receipt->id])); ?>"
                                                        class="btn btn-default" style="background-color: #0282CA; color: white;">View</a>

                                                </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                                    </tbody>
                                </table>

                            </div>
                            <div class="clearfix"></div>
                        </div>


                        <div role="tabpanel" class="tab-pane fade" id="cancelreceipt">
                            <div class="table-responsive">
                                <table id="myTable" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>Receipt No.</th>
                                            <th>Project</th>
                                            <th>Unit No. </th>
                                            <th>Payment Method</th>
        
                                            <th>Received Amount </th>
                                            <th>Date</th>
                                            <th>Status</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
        
        
        
                                        <?php $__currentLoopData = $cancel_receipts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c_receipt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($c_receipt->receipt_no); ?></td>
                                                <td><?php echo e($c_receipt->multiProject ? $c_receipt->multiProject->name : 'None'); ?></td>
        
                                                <td><?php echo e($c_receipt->property ? ($c_receipt->property->inventory ? $c_receipt->property->inventory->unit_number : '') : ''); ?>

                                                </td>
        
        
                                                <?php if($c_receipt->payment_method == \App\Receipt::cash): ?>
                                                    <td>Cash</td>
                                                <?php elseif($c_receipt->payment_method == \App\Receipt::bank): ?>
                                                    <td>Bank</td>
                                                <?php elseif($c_receipt->payment_method == \App\Receipt::adjustment): ?>
                                                    <td>Adjustment</td>
                                                <?php elseif($c_receipt->payment_method == \App\Receipt::cheque): ?>
                                                    <td>Cheque</td>
                                                <?php elseif($c_receipt->payment_method == \App\Receipt::merging): ?>
                                                    <td>Merging</td>
                                                <?php else: ?>
                                                    <td></td>
                                                <?php endif; ?>
        
        
        
        
        
                                                <?php if($c_receipt->tax_paid_by == \App\Receipt::company): ?>
                                                    <td><?php echo e(number_format($c_receipt->amount + $c_receipt->tax_amount)); ?> PKR</td>
                                                <?php else: ?>
                                                    <td><?php echo e(number_format($c_receipt->amount)); ?> PKR</td>
                                                <?php endif; ?>
                                                <td> <?php echo e(date('d-m-Y', strtotime($c_receipt->receipt_date))); ?></td>
                                             
                                             
    
    
    
    
                                               
                                                <?php if($c_receipt->is_approved == true): ?>
                                                    <td>
                                                        <span class="label label-success">
                                                            Approved
                                                        </span>
                                                    </td>
                                                <?php else: ?>
                                                    
                                                        <td>
                                                            <span class="label label-warning">
                                                                Pending
                                                            </span>
                                                        </td>
                                                    <?php endif; ?>
                                              
    
    
                                             
                                                    <td class="text-nowrap">

                                                    
                                                        <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'create-voucher')): ?>
                                                            <a onclick="$('#voucher-cancel-form<?php echo e($c_receipt->id); ?>').submit()"
                                                                href="#"><button class="btn btn-default btn-outline"
                                                                    type="button"> <span><i class="fa fa-money "></i> Make
                                                                        JV</span> </button></a>
                                                        <?php endif; ?>
    
    
    
                                                        <form id="voucher-cancel-form<?php echo e($c_receipt->id); ?>" method="post"
                                                            action="<?php echo e(route('create-voucher')); ?>">
                                                            <?php echo e(csrf_field()); ?>

                                                            <input type="hidden" name="type"
                                                                value="<?php echo e(\App\GeneralJournalEntry::customer_cancel_unit); ?>">
                                                            <input type="hidden" name="id"
                                                                value="<?php echo e($c_receipt->id); ?>">
                                                            <input type="hidden" name="control"
                                                                value="<?php echo e(\App\ControlAccount::CUSTOMER); ?>">
    
                                                        </form>
                                                    </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        
        
                                    </tbody>
                                </table>
                            </div>
                            <div class="clearfix"></div>
                        </div>


                        <div role="tabpanel" class="tab-pane fade" id="profile4">
                            <div class="table-responsive">
                                <table id="myTable4" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>Receipt No.</th>
                                            <th>Project</th>
                                            <th>Member Name .</th>
                                            <th>Unit No. </th>
                                            <th>Payment Method</th>

                                            <th>Received Amount </th>
                                            <th>Total Amount</th>
                                            <th>Total Refunded Amount</th>
                                            <th>Total Deduction</th>
                                            <th>Cancellation Process Charges</th>
                                            <th>Date</th>


                                           
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                        <?php $__currentLoopData = $refund_properties; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $refund): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>

                                                <td><?php echo e($refund->receipt_no); ?></td>
                                                <td><?php echo e($refund->multiProject ? $refund->multiProject->name : 'None'); ?></td>

                                                <td><?php echo e($refund->customer ? $refund->customer->name : 'None'); ?></td>

                                                <td><?php echo e($refund->property ? ($refund->property->inventory ? $refund->property->inventory->unit_number : '') : ''); ?>

                                                </td>


                                                <?php if($refund->payment_method == \App\Receipt::cash): ?>
                                                    <td>Cash</td>
                                                <?php elseif($refund->payment_method == \App\Receipt::bank): ?>
                                                    <td>Bank</td>
                                                <?php elseif($refund->payment_method == \App\Receipt::adjustment): ?>
                                                    <td>Adjustment</td>
                                                <?php elseif($refund->payment_method == \App\Receipt::cheque): ?>
                                                    <td>Cheque</td>
                                                <?php elseif($refund->payment_method == \App\Receipt::merging): ?>
                                                    <td>Merging</td>
                                                <?php else: ?>
                                                    <td></td>
                                                <?php endif; ?>





                                                <?php if($refund->tax_paid_by == \App\Receipt::company): ?>
                                                    <td><?php echo e(number_format($refund->amount + $refund->tax_amount)); ?> PKR</td>
                                                <?php else: ?>
                                                    <td><?php echo e(number_format($refund->amount)); ?> PKR</td>
                                                <?php endif; ?>

                                                <td><b><?php echo e(number_format($refund->property->unitRefundHistory->total_amount)); ?></b>
                                                </td>

                                                <td><b><?php echo e(number_format($refund->property->unitRefundHistory->total_refund)); ?></b>
                                                </td>

                                                <td><b><?php echo e(number_format($refund->property->unitRefundHistory->total_deduct)); ?></b>
                                                </td>


                                                <td>Cancellation Charges</td>



                                                <td> <?php echo e(date('d-m-Y', strtotime($refund->receipt_date))); ?></td>















                                                <td class="text-nowrap">

                                                    
                                                    <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'create-voucher')): ?>
                                                        <a onclick="$('#voucher-form<?php echo e($refund->id); ?>').submit()"
                                                            href="#"><button class="btn btn-default btn-outline"
                                                                type="button"> <span><i class="fa fa-money "></i> Make
                                                                    JV</span> </button></a>
                                                    <?php endif; ?>



                                                    <form id="voucher-form<?php echo e($refund->id); ?>" method="post"
                                                        action="<?php echo e(route('create-voucher')); ?>">
                                                        <?php echo e(csrf_field()); ?>

                                                        <input type="hidden" name="type"
                                                            value="<?php echo e(\App\GeneralJournalEntry::customer_refund_unit); ?>">
                                                        <input type="hidden" name="id"
                                                            value="<?php echo e($refund->id); ?>">
                                                        <input type="hidden" name="control"
                                                            value="<?php echo e(\App\ControlAccount::CUSTOMER); ?>">

                                                    </form>
                                                </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>




                                    </tbody>
                                </table>

                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div role="tabpanel" class="tab-pane fade" id="profile1">
                            <div class="table-responsive">
                                <table id="myTable1" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>Receipt No.</th>
                                            <th>Project.</th>
                                            <th>Unit No. </th>
                                            <th>Payment Method</th>
                                            <th>Payment Head</th>
                                            <th>Received Amount </th>
                                            <th>Date</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>



                                        <?php $__currentLoopData = $receipts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $receipt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($receipt->receipt_no); ?></td>

                                                <td><?php echo e($receipt->multiProject ? $receipt->multiProject->name : 'None'); ?></td>

                                                <td><?php echo e($receipt->property->inventory->unit_number); ?></td>





                                                <?php if($receipt->payment_method == \App\Receipt::cash): ?>
                                                    <td>Cash</td>
                                                <?php elseif($receipt->payment_method == \App\Receipt::bank): ?>
                                                    <td>Bank</td>
                                                <?php elseif($receipt->payment_method == \App\Receipt::adjustment): ?>
                                                    <td>Adjustment</td>
                                                <?php elseif($receipt->payment_method == \App\Receipt::cheque): ?>
                                                    <td>Cheque</td>
                                                <?php else: ?>
                                                    <td></td>
                                                <?php endif; ?>


                                                <?php if($receipt->payment_head == \App\Receipt::down_payment): ?>
                                                    <td>Down Payment</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::possession_fee): ?>
                                                    <td>Possession Fee</td>
                                                    <?php elseif($receipt->payment_head == \App\Receipt::registration): ?>
                                                    <td>Registration Fee</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::installment): ?>
                                                    <td>Installment</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::other): ?>
                                                    <td>Other</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::confirmation): ?>
                                                    <td>Confirmation</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::allotment): ?>
                                                    <td>Allotment</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::booking): ?>
                                                    <td>Booking</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::ballon): ?>
                                                    <td>Ballon</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::balloting): ?>
                                                    <td>Balloting</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::file_processing): ?>
                                                    <td>File Processing</td>
                                                <?php elseif($receipt->payment_head == \App\Receipt::token_amount): ?>
                                                    <td>Token Amount</td>
                                                    <?php elseif($receipt->payment_head == \App\Receipt::transfer_fee): ?>
                                                    <td>Transfer Fee</td>
                                                   
                                                <?php else: ?>
                                                    <td></td>
                                                <?php endif; ?>
                                                <?php if($receipt->tax_paid_by == \App\Receipt::company): ?>
                                                    <td><?php echo e(number_format($receipt->amount + $receipt->tax_amount)); ?> PKR
                                                    </td>
                                                <?php else: ?>
                                                    <td><?php echo e(number_format($receipt->amount)); ?> PKR</td>
                                                <?php endif; ?>
                                                <td> <?php echo e(date('d-m-Y', strtotime($receipt->receipt_date))); ?></td>
                                                <td class="text-nowrap">

                                                    <a href="<?php echo e(route('pending-receipts.detail', ['id' => $receipt->id])); ?>"
                                                        class="btn btn-default" style="background-color: #0282CA; color: white;">View</a>


                                                </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                                    </tbody>
                                </table>

                            </div>
                            <div class="clearfix"></div>
                        </div>

                        <div role="tabpanel" class="tab-pane fade" id="profile2">
                            <div class="table-responsive">
                                <table id="myTable3" class="table table-striped table-bordered">
                                    <thead>
                                        <tr>
                                            <th>Type</th>
                                            <th>Checked</th>
                                            <th>Posted</th>
                                            <th>Date</th>
                                            <th>Entry No.</th>
                                            <th>Receipt No</th>
                                            <th>ADJ</th>
                                            <th>Account</th>
                                            <th>Memo</th>
                                            <!-- <th>Class</th> -->
                                            <th>Debit/Credit (+/-)</th>
                                            <th>Action</th>

                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $allEntries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr ondblclick="showEntry('<?php echo e($entry->entry_no); ?>')">

                                                <?php if($entry->voucher_type == \App\GeneralJournalEntry::CRV): ?>
                                                    <td>CRV-<?php echo e($entry->voucher_no); ?></td>
                                                <?php elseif($entry->voucher_type == \App\GeneralJournalEntry::BRV): ?>
                                                    <td>BRV-<?php echo e($entry->voucher_no); ?></td>
                                                <?php elseif($entry->voucher_type == \App\GeneralJournalEntry::CPV): ?>
                                                    <td>CPV-<?php echo e($entry->voucher_no); ?></td>
                                                <?php elseif($entry->voucher_type == \App\GeneralJournalEntry::BPV): ?>
                                                    <td>BPV-<?php echo e($entry->voucher_no); ?></td>
                                                <?php elseif($entry->voucher_type == \App\GeneralJournalEntry::JV): ?>
                                                    <td>JV-<?php echo e($entry->voucher_no); ?></td>
                                                <?php else: ?>
                                                    <td></td>
                                                <?php endif; ?>

                                                <td>
                                                    <?php if($entry->is_check): ?>
                                                        <i class="fa fa-check" style="color:green"></i>
                                                    <?php else: ?>
                                                        <i class="fa fa-close" style="color: red;"></i>
                                                    <?php endif; ?>

                                                <td>
                                                    <?php if($entry->is_post): ?>
                                                        <i class="fa fa-check" style="color:green"></i>
                                                    <?php else: ?>
                                                        <i class="fa fa-close" style="color: red;"></i>
                                                    <?php endif; ?>
                                                </td>

                                                <td><?php echo e(date('d/m/Y', strtotime($entry->date))); ?></td>
                                                <td><?php echo e($entry->entry_no); ?></td>

                                                <td>


                                                    <?php if($entry->transaction_type == \App\GeneralJournalEntry::receipt && $entry->receipt): ?>
                                                        <?php echo e($entry->receipt->receipt_no); ?>

                                                    <?php endif; ?>
                                                </td>
                                                <td>
                                                    <?php if($entry->adjusting_entry): ?>
                                                        <i class="fa fa-check"></i>
                                                    <?php endif; ?>
                                                </td>
                                                <td><?php echo e($entry->account ? $entry->account->name : ''); ?></td>
                                                <td><?php echo e($entry->memo); ?></td>
                                                <td><?php echo e(number_format($totalAmount[$entry->entry_no])); ?></td>


                                                <td>
                                                    <!-- <span onclick="showEntry('<?php echo e($entry->entry_no); ?>')" style="cursor: pointer;" class="btn btn-sm btn-primary"> Show</span> -->

                                                    <a href="<?php echo e(route('voucher-detail', ['id' => $entry->entry_no])); ?>"
                                                        class="btn btn-default" style="background-color: #0282CA; color: white;">View</a>

                                                    <?php if(!$entry->is_approved): ?>
                                                        <br><br>
                                                        <span onclick="approveEntryModal('<?php echo e($entry->entry_no); ?>')"
                                                            style="cursor: pointer;" class="btn btn-default btn-sm">
                                                            Approve</span>
                                                    <?php endif; ?>

                                                </td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </tbody>
                                </table>

                            </div>
                            <div class="clearfix"></div>
                        </div>


                    </div>
                </div>


            </div>
        </div>
        <!-- /.row -->
    </div>
    <!-- /.container-fluid -->

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

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

    <script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.7.0/js/dataTables.buttons.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.7.0/js/buttons.html5.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/1.7.0/js/buttons.print.min.js"></script>



    <script>
        $(function() {
            $('#myTable').DataTable({
                'pageLength': 25,
                'paging': true,
                'searching': true,
                'info': true,
                'ordering': false,
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ]
            });

            $('#myTable1').DataTable({
                'pageLength': 25,
                'paging': true,
                'searching': true,
                'info': true,
                'ordering': false,
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ]
            });
            $('#myTable6').DataTable({
                'pageLength': 25,
                'paging': true,
                'searching': true,
                'info': true,
                'ordering': false,
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ]
            });
            $('#myTable3').DataTable({

                'paging': false,
                'searching': true,
                'info': true,
                'ordering': false,
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ]
            });

            $('#myTable8').DataTable({
                'pageLength': 25,
                'paging': true,
                'searching': true,
                'info': true,
                'ordering': false,
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ]
            });

            $('#myTable4').DataTable({
                'pageLength': 25,
                'paging': true,
                'searching': true,
                'info': true,
                'ordering': false,
                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ]
            });
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\erpv7\resources\views/general-entry/customer.blade.php ENDPATH**/ ?>