 <?php
        $general->pageHeader($rModule['title']);
  ?>
    <div class="row">
        <div class="col-sm-12">
            <div class="white-box">
                <div class="row">
                    <div class="col-sm-12 col-lg-12">
                        <div class="col-md-2">
                            <h5 class="box-title">Date</h5>
                            <input type="text" name="dRange" id="dRange" class="daterangepickerMulti form-control" value="">
                        </div>
                        <?php 
                        $heads=$acc->getAllHead();
                        $general->inputBoxSelectForReport($heads,'Ledger','ledger_id','id','title',@$_GET['ledger_id']);
                        $general->inputBoxSelectForReport([['i'=>0,'t'=>'Type 1'],['i'=>1,'t'=>'Type 2']],'Type','type','i','t',needFirstOption:false);
                        ?>
                        
                        <div class="col-md-2">
                            <h5 class="box-title">Search </h5>
                            <input type="submit" value="Search" class="btn btn-success" name="s" onclick="headStatement();">
                        </div>
                       
                            <script>
                            $(document).ready(function(){
                                const report_data = JSON.parse(localStorage.getItem('headStatement'));
                                if(report_data){
                                    if(report_data.hasOwnProperty('dRange')){
                                        $('#dRange').val(report_data.dRange);
                                        if(report_data.ledger_id>0){
                                            $('#ledger_id').val(report_data.ledger_id);
                                        }
                                        $('#type').val(report_data.type);
                                        select2Call();
                                    }
                                }
                                headStatement();
                            });
                            </script>
                          
                    </div>
                    <div class="col-sm-12 col-lg-12"><?php show_msg();?></div>
                    <div class="col-sm-12 col-lg-12" id="reportArea"></div>
                </div>
            </div>
        </div>
    </div>