 
<?php $__env->startSection('dynamic_css'); ?>
<link href="<?php echo asset('/plugins/bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker.css'); ?>" rel="stylesheet" />
<link href="<?php echo asset('/css/fullcalendar.min.css'); ?>" rel="stylesheet" />
<link href="<?php echo asset('/css/fullcalendar.print.min.css'); ?>" rel="stylesheet" media="print" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css" rel="stylesheet" />
<style>
    body {
        font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
        font-size: 14px;
        background-color: #fff;
    }

    #calendar {
        max-width: 1050px;
        margin: 0 auto;
        background-color: white;
        width: 100%;
    }

    .h2,
    h2 {
        font-size: 1.5rem !important;
    }

    #calendar table .fc-head {
        background-color: #2bbbad!important;
        color: white;
    }

    .fc-day-header {
        height: 43px;
        font-size: 18px;
        padding-top: 16px !important;
    }

    .color_indegator {
        margin-left: 10px;
        margin-top: 2px;
        font-weight: 700;
    }

    .fc-scroller {
        height: auto !important;
        /* max-height: 350px !important; */
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }


    #agenda_d {
        /*   height: 300px;*/
        border: 1px solid #d4c8c8;
        /* padding: 39px; */
        /* padding-top: 10px;*/
        /*background-color: #17a2b8;*/
    }

    .row_pading {
        padding-right: 0px;
        padding-left: 0px;
    }

    .row_margin {
        margin-right: 0px;
        margin-left: 0px;
    }

    .card_header {
        padding: 0rem 0rem;
    }


    .dtp-btn-ok {
        background-color: #007bff;
        opacity: .7;
    }

    .dtp-btn-cancel {
        background-color: #dc3545;
        opacity: .7;
    }

    .dtp-btn-clear {
        background-color: #ffc107;
        opacity: .7;
    }




    /* fallback */

    @font-face {
        font-family: 'Material Icons';
        font-style: normal;
        font-weight: 400;
        src: url(https://fonts.gstatic.com/s/materialicons/v38/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
    }

    .material-icons {
        font-family: 'Material Icons';
        font-weight: normal;
        font-style: normal;
        font-size: 24px;
        line-height: 1;
        letter-spacing: normal;
        text-transform: none;
        display: inline-block;
        white-space: nowrap;
        word-wrap: normal;
        direction: ltr;
        -webkit-font-feature-settings: 'liga';
        -webkit-font-smoothing: antialiased;
    }



    .docs-tab-content {
        position: relative;
        border: 1px solid rgba(0, 0, 0, .15);
        padding: 0;
    }

    .docs-tabs .nav-link {
        border-width: 1px 1px 0 1px;
        border-color: rgba(0, 0, 0, .15);
        border-style: solid;
        border-radius: 5px 5px 0 0;
        margin-right: 8px;
        margin-bottom: -1px;
        color: #212529;
    }


    .switch {
        position: relative;
        display: inline-block;
        width: 60px;
        height: 26px;
    }

    .switch input {display:none;}

    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        -webkit-transition: .4s;
        transition: .4s;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

    input:checked + .slider {
        background-color: #2196F3;
    }

    input:focus + .slider {
        box-shadow: 0 0 1px #2196F3;
    }

    input:checked + .slider:before {
        -webkit-transform: translateX(26px);
        -ms-transform: translateX(26px);
        transform: translateX(26px);
    }

    /* Rounded sliders */
    .slider.round {
        border-radius: 34px;
    }

    .slider.round:before {
        border-radius: 50%;
    }


    .df{
        display: flex;
    }

    .slider_label{
        font-size: 18px;
        margin-left: 5px;
        margin-right: 5px;
    }    


    .border_bottom{
        border-bottom: 1px solid #e7e1e1;
        border-left: 3px solid #28a745;;
    }
    .border_left_red{
        border-left: 3px solid red;
    }   

    .show{
        border-bottom: 1px solid #e7e1e1;
    }

    .over_flow{
        overflow: hidden;
        text-align: left;
        text-decoration: none;
    }




</style>
<?php $__env->stopSection(); ?> 
<?php $__env->startSection('badcome'); ?>

<?php $__env->stopSection(); ?> 
<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="row">
        <div class="col-md-12">
            
        </div>
    </div>
    <div class="row">&nbsp;</div>
    <div class="row">
        <div class="col-md-12" id="table_div">
            <table class="table table-responsive-lg table-bordered">
                <thead>
                   <tr>
                        <th rowspan="2">SL No.</th><th rowspan="2">Districts Name</th>
                        <th colspan="3" style='text-align:center'>Expenditure Till Date Against GPC</th>
                        <th colspan="3" style='text-align:center'>Expenditure Till Date Other Then GPC</th>
                   </tr>
                   <tr>
                    <?php for($j = 1; $j < ($currentYear-2017); $j++): ?>
                        <?php for($y = $currentYear; $y > 2017; $y--): ?>
                        <th><?php echo e($y-1); ?>-<?php echo e($y); ?></th>
                        <?php endfor; ?>
                    <?php endfor; ?>
                    
                   </tr>
                </thead>
                <tbody>
                        <?php
                            $i = 1;
                            $total = [];
                        ?>
                        
                        <?php $__currentLoopData = $districts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php
                                $j = 0;
                                
                            ?>
                            <tr>
                            <td><?php echo e($i); ?></td><th><?php echo e($value->district_name); ?></th>
                           <?php for($j = 0; $j < ($currentYear - 2017); $j++): ?>

                            <?php for($y = $currentYear; $y > 2017; $y--): ?>
                                <?php
                                    $k = 0;
                                ?>
                                    
                                <?php if($j < ($currentYear - 2017-1)): ?>
                                <?php
                                    
                                    $expenditure = $districtSalary[$i-1][$y][$j][0];
                                    $expenditure = moneyFormatIndia($expenditure);
                                ?>
                                    <td><?php echo e($expenditure); ?></td>

                                <?php
                                    $total[$k][$value->district_code] = $expenditure;
                                   
                                ?>
                                    
                                <?php endif; ?>
                                <?php
                                
                            ?>
                            <?php endfor; ?>
                                
                           <?php endfor; ?>
                           
                            </tr>
                            <?php
                                $i++;
                                
                            ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        


                    <?php
                        $j = 0;
                        
                    ?>
                    <tr>
                      <th colspan="2" class="text-center"> TOTAL</th>
                   <?php for($j = 0; $j < ($currentYear - 2017); $j++): ?>

                    <?php for($y = $currentYear; $y > 2017; $y--): ?>
                        <?php
                            $k = 0;
                        ?>
                            
                        <?php if($j < ($currentYear - 2017-1)): ?>
                        <?php
                            
                            $expenditure = $totalData[$y][$j][0];
                            $expenditure = moneyFormatIndia($expenditure);
                            
                            

                        ?>
                                              
                            <th> <?php echo e($expenditure); ?> </th>
                            
                        <?php endif; ?>
                        <?php
                        
                    ?>
                    <?php endfor; ?>
                        
                   <?php endfor; ?>
                   
                    </tr>
                    <?php
                        $i++;
                        
                    ?>
                        
                </tbody>
            </table>
        </div>
    </div>
    <?php
        function moneyFormatIndia($num) {
                                $explrestunits = "";
                                if (strlen($num) > 3) {
                                    $lastthree = substr($num, strlen($num) - 3, strlen($num));
                                    $restunits = substr($num, 0, strlen($num) - 3); // extracts the last three digits
                                    $restunits = (strlen($restunits) % 2 == 1) ? "0" . $restunits : $restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
                                    $expunit = str_split($restunits, 2);
                                    for ($i = 0; $i < sizeof($expunit); $i++) {
                                        // creates each of the 2's group and adds a comma to the end
                                        if ($i == 0) {
                                            $explrestunits .= (int) $expunit[$i] . ","; // if is first value , convert into integer
                                        } else {
                                            $explrestunits .= $expunit[$i] . ",";
                                        }
                                    }
                                    $thecash = $explrestunits . $lastthree;
                                } else {
                                    $thecash = $num;
                                }
                                return $thecash; // writes the final format where $currency is the currency symbol.
    }
    ?>
</div>
<?php $__env->stopSection(); ?> 
<?php $__env->startSection('dynamic_js'); ?>
<script src="<?php echo e(asset('plugins/bootstrap-select/js/bootstrap-select.js')); ?>"></script>
<script src="<?php echo e(asset('js/lib/moment.min.js')); ?>"></script>
<script src="<?php echo e(asset('plugins/bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker.js')); ?>"></script>
<script src="<?php echo e(asset('js/lib/fullcalendar.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/custom/calender_minutes.js')); ?>"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

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

<?php echo $__env->make('layouts.app2', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>