<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <link rel="stylesheet" href="<?php echo e(asset('vendor/bootstrap/dist/css/bootstrap.min.css')); ?>">
        <style type="text/css">
            @import  url("https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800");
            @import  url("https://fonts.googleapis.com/css?family=Open+Sans:400,600,700");
            @import  url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700");
            @import  url("https://fonts.googleapis.com/css?family=Roboto:400,500,700");
            @import  url("https://fonts.googleapis.com/css?family=Nunito:400,600,700");
        </style>
    </head>
    <body>
        <?php
            $ticket_date_crt = date("d-M-Y", strtotime($ticket_date));
        ?>
        <span style="text-align: center;"><u><b><?php echo e($org_name); ?></b></u><br></span>
        <span style="text-align: center;"><u><b>CONSOLIDATED REPORT FOR THE INVOICE DATE <?php echo e($ticket_date_crt); ?></b></u><br></span>
        <table width="100%" class="table" style="font-size: 70%;" border="1">
            <thead class="thead-info">
                <tr>
                    <th>Sl No</th>
                    <th>Facility Name</th>
                    <th># of Tickets</th>
                    <th># of Adults</th>
                    <th># of Child</th>
                    <th>Online Amount</th>
                    <th>Offline (Cash)</th>
                    <th>Offline (Card)</th>
                    <th>Offline (UPI)</th>
                    <th>Refund Amount</th>
                    <th>Net Amount</th>
                </tr>
            </thead>
            <tbody>
                <?php
                    $n = 0;
                    $total_online_amt = 0;
                    $total_cash_amt = 0;
                    $total_card_amt = 0;
                    $total_upi_amt = 0;
                    $total_refund_amt = 0;
                    $total_net_amt = 0;
                ?>
                <?php $__currentLoopData = $facility_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $facility_id): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($ticket_count[$facility_id]!=0): ?>
                        <?php
                            $n++;
                        ?>
                        <tr>
                            <td><?php echo e($n); ?></td>
                            <td>
                                <?php if(isset($facility_name[$facility_id])): ?>
                                    <?php echo e($facility_name[$facility_id]); ?>

                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if(isset($ticket_count[$facility_id])): ?>
                                    <?php echo e($ticket_count[$facility_id]); ?>

                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if(isset($adult_count[$facility_id])): ?>
                                    <?php echo e($adult_count[$facility_id]); ?>

                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if(isset($child_count[$facility_id])): ?>
                                    <?php echo e($child_count[$facility_id]); ?>

                                <?php endif; ?>
                            </td>
                            <td style="text-align: center;">
                                <?php if(isset($online_ticket_amount[$facility_id])): ?>
                                    <?php echo e($online_ticket_amount[$facility_id]); ?>

                                    <?php
                                        $total_online_amt += $online_ticket_amount[$facility_id];
                                    ?>
                                <?php endif; ?>
                            </td>
                            <td style="text-align: center;">
                                <?php if(isset($cash_ticket_amount[$facility_id])): ?>
                                    <?php echo e($cash_ticket_amount[$facility_id]); ?>

                                    <?php
                                        $total_cash_amt += $cash_ticket_amount[$facility_id];
                                    ?>
                                <?php endif; ?>
                            </td>
                            <td style="text-align: center;">
                                <?php if(isset($card_ticket_amount[$facility_id])): ?>
                                    <?php echo e($card_ticket_amount[$facility_id]); ?>

                                    <?php
                                        $total_card_amt += $card_ticket_amount[$facility_id];
                                    ?>
                                <?php endif; ?>
                            </td>
                            <td style="text-align: center;">
                                <?php if(isset($upi_ticket_amount[$facility_id])): ?>
                                    <?php echo e($upi_ticket_amount[$facility_id]); ?>

                                    <?php
                                        $total_upi_amt += $upi_ticket_amount[$facility_id];
                                    ?>
                                <?php endif; ?>
                            </td>
                            <td style="text-align: center;">
                                <?php if(isset($refund_amount[$facility_id])): ?>
                                    <?php echo e($refund_amount[$facility_id]); ?>

                                    <?php
                                        $total_refund_amt += $refund_amount[$facility_id];
                                    ?>
                                <?php endif; ?>
                            </td>
                            <td style="text-align: center;">
                                <?php if(isset($totalamount[$facility_id])): ?>
                                    <?php echo e($totalamount[$facility_id]); ?>

                                    <?php
                                        $total_net_amt += $totalamount[$facility_id];
                                    ?>
                                <?php endif; ?>
                            </td>                                                                    
                        </tr>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            <tfoot class="tfoot-info">
                <tr>
                    <th>Total</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    <th align="right"><?php echo e($total_online_amt); ?></th>
                    <th align="right"><?php echo e($total_cash_amt); ?></th>
                    <th align="right"><?php echo e($total_card_amt); ?></th>
                    <th align="right"><?php echo e($total_upi_amt); ?></th>
                    <th align="right"><?php echo e($total_refund_amt); ?></th>
                    <th align="right"><?php echo e($total_net_amt); ?></th>
                </tr>
            </tfoot>
        </table>
    </body>
</html>
                                    <?php /**PATH /var/www/html/ksstmprod/resources/views/Reports/download_consolidated_report_pdf.blade.php ENDPATH**/ ?>