<!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>
    <span>
        <?php
            $ticket_date_crt = date("d-M-Y", strtotime($ticket_date));
        ?>
        <span style="text-align: center;"><u><b>FINANCIAL STATEMENT FOR THE DATE <?php echo e($ticket_date_crt); ?></b></u><br></span>
    </span>
    <?php $__currentLoopData = $facilities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $facility): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <table width="100%" style="font-size:90%;" class="table">
            <span style="color: blue;"><b><?php echo e(strtoupper($facility->facility_name)); ?></b></span>
            <thead>
                <tr>
                <td>#</td>
                <th>Date</th>
                <th>Show Time</th>
                <th># of Adults</th>
                <th># of Children</th>
                <th>Amount</th>
                </tr>
            </thead>
            <?php                                                        
                $facility_id = $facility->id;
                $total_adults =0;
                $total_children = 0;
                $totalamount=0;
                $n = 0;
            ?>                                                
            <?php if(isset($financial_ticket_array[$facility_id][$ticket_date])): ?>
                <tr>
                    <td colspan="6">
                        <b style="color: green;">REGULAR SHOW</b>
                    </td>
                </tr>           
                <?php $__currentLoopData = $financial_ticket_array[$facility_id][$ticket_date]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tickets): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($tickets['date']): ?>
                        <?php
                            $n++;
                            if($total_adults)
                            {
                                $total_adults = $total_adults+$tickets['noofadults'];
                            }
                            else
                            {
                                $total_adults = $tickets['noofadults'];
                            }
                            if($total_children)
                            {
                                $total_children = $total_children+$tickets['noofchildren'];
                            }
                            else
                            {
                                $total_children = $tickets['noofchildren'];
                            }
                            if($totalamount)
                            {
                                $totalamount = $totalamount+$tickets['amount'];
                            }
                            else
                            {
                                $totalamount = $tickets['amount'];
                            }
                        ?>
                        <tr>
                            <td><?php echo e($n); ?></td>
                            <td><?php echo e(date("d-M-Y", strtotime($tickets['date']))); ?></td>
                            <td><?php echo e($tickets['showtime']); ?></td>
                            <td style="text-align: center;"><?php echo e($tickets['noofadults']); ?></td>
                            <td style="text-align: center;"><?php echo e($tickets['noofchildren']); ?></td>
                            <td style="text-align: right;"><i class='fa fa-rupee'></i>&nbsp;<?php echo e($tickets['amount']); ?></td>
                        </tr>
                    <?php endif; ?>             
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php endif; ?>   

            <!--special shows-->  
            <?php if(isset($spl_ticket_array[$facility_id][$ticket_date])): ?>   
                <tr>
                    <td colspan="6">
                        <b style="color: green;">SPECIAL SHOW</b>
                    </td>
                </tr>                                         
                <?php $__currentLoopData = $spl_ticket_array[$facility_id][$ticket_date]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $spl_tickets): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if($spl_tickets['date']): ?>
                        <?php
                            $n++;
                            if($total_adults)
                            {
                                $total_adults = $total_adults+$spl_tickets['noofadults'];
                            }
                            else
                            {
                                $total_adults = $spl_tickets['noofadults'];
                            }
                            if($total_children)
                            {
                                $total_children = $total_children+$spl_tickets['noofchildren'];
                            }
                            else
                            {
                                $total_children = $spl_tickets['noofchildren'];
                            }
                            if($totalamount)
                            {
                                $totalamount = $totalamount+$spl_tickets['amount'];
                            }
                            else
                            {
                                $totalamount = $spl_tickets['amount'];
                            }
                        ?>
                        <tr>
                            <td><?php echo e($n); ?></td>
                            <td><?php echo e(date("d-M-Y", strtotime($spl_tickets['date']))); ?></td>
                            <td><?php echo e($spl_tickets['showtime']); ?></td>
                            <td style="text-align: center;"><?php echo e($spl_tickets['noofadults']); ?></td>
                            <td style="text-align: center;"><?php echo e($spl_tickets['noofchildren']); ?></td>
                            <td style="text-align: right;"><i class='fa fa-rupee'></i>&nbsp;<?php echo e($spl_tickets['amount']); ?></td>
                        </tr>
                    <?php endif; ?>             
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <?php endif; ?>
            <tr>
                <td><b>Total</b></td>
                <td></td>
                <td></td>
                <td style="text-align: center;"><b><?php echo e($total_adults); ?></b></td>
                <td style="text-align: center;"><b><?php echo e($total_children); ?></b></td>
                <td style="text-align: right;"><i class='fa fa-rupee'></i>&nbsp;<b><?php echo e($totalamount); ?></b></td>
            </tr> 
        </table>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
    </body>                   
</html><?php /**PATH /var/www/html/ksstmprod/resources/views/Reports/download_financial_report_pdf.blade.php ENDPATH**/ ?>