<?php $__env->startSection('title'); ?><?php echo app('translator')->get('quickadmin.customer-management.fields.list'); ?><?php $__env->stopSection(); ?>

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

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

<?php $__env->startSection('content'); ?>
    <div class="page-header">
        <header style="padding: 1px 0; max-width: 100%; margin: 0 auto;">
            <h2 style="margin: 0;color: #2a2a33;font-size: 18px;font-weight: bold; text-align:center;"><strong><?php echo app('translator')->get('quickadmin.customer-management.fields.list'); ?></strong></h2>
        </header>
    </div>
    <main class="main" style="max-width: 100%;margin: 0 auto;padding: 40px 0;padding-top: 20px;">
        <table cellpadding="0" cellspacing="0" width="100%" style="color: #000;font-size: 15px;">
            <tbody>
                <?php if(!empty($areaNames)): ?>
                <tr>
                    <td colspan="4" style="padding-bottom: 20px:text-align:center"> <strong>Area :</strong>
                        <?php echo e(implode(', ', $areaNames)); ?>

                    </td>
                </tr>
                <?php endif; ?>
                <tr>
                    <th style="padding: 8px;border: 1px solid #000;border-right: none;" align="left"><?php echo app('translator')->get('quickadmin.qa_sn'); ?></th>
                    <th style="padding: 8px;border: 1px solid #000;border-right: none;" align="center"><?php echo app('translator')->get('quickadmin.customers.fields.name'); ?></th>
                    <th style="padding: 8px;border: 1px solid #000;border-right: none;" align="center"><?php echo app('translator')->get('quickadmin.customers.fields.phone_number'); ?></th>
                    <th style="padding: 8px;border: 1px solid #000;border-right: none;" align="center"><?php echo app('translator')->get('quickadmin.transaction.fields.debit_amount'); ?> (₹)</th>
                    <th style="padding: 8px;border: 1px solid #000;" align="center"><?php echo app('translator')->get('quickadmin.transaction.fields.credit_amount'); ?>(₹)</th>
                </tr>

                <?php $__empty_1 = true; $__currentLoopData = $allcustomers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

                <?php
                    $getTotalBlance = getTotalBlance($customer->id,1);
                    $debit_blance = "";
                    if($getTotalBlance < 0){
                        // $debit_blance =  number_format(abs($getTotalBlance/100),2);
                        $debit_blance =  number_format(abs($getTotalBlance),2);
                    }

                    $credit_blance = "";
                    if($getTotalBlance > 0){
                        // $credit_blance = number_format(abs($getTotalBlance/100),2);
                        $credit_blance = number_format(abs($getTotalBlance),2);
                    }
                ?>

                <tr>
                    <td style="padding: 8px;border: 1px solid #000;border-right: none;" align="left"><?php echo e($key + 1); ?></td>
                    <td style="padding: 8px;border: 1px solid #000;border-right: none;" align="center"><?php echo e($customer->name ?? ''); ?></td>
                    <td style="padding: 8px;border: 1px solid #000;border-right: none;" align="center"><?php echo e($customer->phone_number ?? ''); ?></td>
                    <td style="padding: 8px;border: 1px solid #000;border-right: none;" align="center"><i class="fa fa-inr" aria-hidden="true"></i> <?php echo e($debit_blance ?? ''); ?></td>
                    <td style="padding: 8px;border: 1px solid #000;" align="center"><i class="fa fa-inr" aria-hidden="true"></i> <?php echo e($credit_blance ?? ''); ?></td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="5" style="padding: 8px;border: 1px solid #000;border-top: none;" align="center">No Record Found!</td>
                </tr>
                <?php endif; ?>

            </tbody>
        </table>
    </main>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.print-view.print-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/hipldemo2/public_html/billing-software.hipl-staging2.com/resources/views/admin/customer/print-customer-list.blade.php ENDPATH**/ ?>