/home/awneajlw/.trash/storage.2/framework/views/4e7436e6801673b9b24b323e96788fbf.php
<?php echo $__env->make('admin.component.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin.component.topnav', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin.component.navbar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="content-body">
    <div class="container-fluid">
        <div class="row justify-content-center">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">
                        <h4 class="text-uppercase"><?php echo e(__('SE.all_zakat_records')); ?></h4>

                        <?php if($zakatRecords->isNotEmpty()): ?>
                            <table class="table table-bordered mt-4">
                                <thead>
                                    <tr>
                                        <th><?php echo e(__('SE.year')); ?></th>
                                        <th><?php echo e(__('SE.total_income')); ?></th>
                                        <th><?php echo e(__('SE.total_zakat')); ?> (2.5%)</th>
                                        <th><?php echo e(__('SE.zakat')); ?></th>
                                        <th><?php echo e(__('SE.details')); ?></th>
                                        <th><?php echo e(__('SE.action')); ?></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $zakatRecords; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $zakatRecord): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo e($zakatRecord->year); ?></td>
                                            <td><?php echo e(number_format($zakatRecord->total_income, 2)); ?></td>
                                            <td><?php echo e(number_format($zakatRecord->zakat_amount, 2)); ?></td>
                                            <td><?php echo e(ucfirst($zakatRecord->status)); ?></td>
                                            <td>
                                                <!-- Button to trigger modal with branch details -->
                                                <button type="button" class="btn btn-info" data-toggle="modal" data-target="#detailsModal<?php echo e($zakatRecord->id); ?>">
                                                    <?php echo e(__('SE.view_details')); ?>

                                                </button>

                                                <!-- Modal for branch details -->
                                                <div class="modal fade" id="detailsModal<?php echo e($zakatRecord->id); ?>" tabindex="-1" role="dialog" aria-labelledby="detailsModalLabel" aria-hidden="true">
                                                    <div class="modal-dialog" role="document">
                                                        <div class="modal-content">
                                                            <div class="modal-header">
                                                                <h5 class="modal-title" id="detailsModalLabel">  <?php echo e(__('SE.branch_details_for_year')); ?> <?php echo e($zakatRecord->year); ?></h5>
                                                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                                    <span aria-hidden="true">&times;</span>
                                                                </button>
                                                            </div>
                                                            <div class="modal-body">
                                                                <?php
                                                                    $branchData = json_decode($zakatRecord->branch_data, true);
                                                                ?>
                                                                <?php if($branchData): ?>
                                                                    <table class="table table-bordered">
                                                                        <thead>
                                                                            <tr>
                                                                                <th>  <?php echo e(__('SE.branch_name')); ?></th>
                                                                                <th><?php echo e(__('SE.total_inventory')); ?></th>
                                                                                <th><?php echo e(__('SE.total_price')); ?></th>
                                                                                <th><?php echo e(__('SE.zakat')); ?> (2.5%)</th>
                                                                            </tr>
                                                                        </thead>
                                                                        <tbody>
                                                                            <?php $__currentLoopData = $branchData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                                <tr>
                                                                                    <td><?php echo e($data['branch_name']); ?></td>
                                                                                    <td><?php echo e($data['total_inventory']); ?></td>
                                                                                    <td><?php echo e(number_format($data['total_price'], 2)); ?></td>
                                                                                    <td><?php echo e(number_format($data['zakat'], 2)); ?></td>
                                                                                </tr>
                                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                        </tbody>
                                                                    </table>
                                                                <?php else: ?>
                                                                    <p><?php echo e(__('SE.    no_branch_data_available')); ?></p>
                                                                <?php endif; ?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                            <td>
                                                <a href="<?php echo e(route('admin.zakat.edit', $zakatRecord->id)); ?>" class="btn btn-primary">
                                                    <?php echo e(__('SE.update_status')); ?>

                                                </a>
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        <?php else: ?>
                            <p><?php echo e(__('SE.no_zakat_records_found')); ?></p>
                        <?php endif; ?>

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

<?php echo $__env->make('admin.component.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH /home/awneajlw/public_html/safeeyesjewelers.com/resources/views/admin/zakat/index.blade.php ENDPATH**/ ?>