 <div class="content">
            <!-- Animated -->
            <div class="animated fadeIn">
                <!-- Widgets  -->
                <div class="row">
                    
                    <?php  ?>
                    <div class="col-lg-3 col-md-6">
                        <div class="card">
                            <div class="card-body">
                                <div class="stat-widget-five">
                                    <div class="stat-icon dib flat-color-1">
                                        <img src="<?php echo base_url(); ?>assets/images/supplier.png" alt="" style="height: 65px;">
                                    </div>
                                    <div class="stat-content">
                                        <div class="text-left dib">
                                            <div class="stat-text"><span class="count"><?php echo  $cus;  ?></span></div>
                                            <div class="stat-heading">Customers</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-3 col-md-6">
                        <div class="card">
                            <div class="card-body">
                                <div class="stat-widget-five">
                                    <div class="stat-icon dib flat-color-2">
                                         <img src="<?php echo base_url(); ?>assets/images/supplier.png" alt="" style="height: 65px;">
                                    </div>
                                    <div class="stat-content">
                                        <div class="text-left dib">
                                            <div class="stat-text"><span class="count"><?php echo $rep;  ?></span></div>
                                            <div class="stat-heading">Salseman</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-3 col-md-6">
                        <div class="card">
                            <div class="card-body">
                                <div class="stat-widget-five">
                                    <div class="stat-icon dib flat-color-3">
                                         <img src="<?php echo base_url(); ?>assets/images/supplier.png" alt="" style="height: 65px;">
                                    </div>
                                    <div class="stat-content">
                                        <div class="text-left dib">
                                            <div class="stat-text"><span class="count"><?php echo $item;  ?></span></div>
                                            <div class="stat-heading">Products</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-3 col-md-6">
                        <div class="card">
                            <div class="card-body">
                                <div class="stat-widget-five">
                                    <div class="stat-icon dib flat-color-4">
                                        <img src="<?php echo base_url(); ?>assets/images/supplier.png" alt="" style="height: 65px;">
                                    </div>
                                    <div class="stat-content">
                                        <div class="text-left dib">
                                            <div class="stat-text"><span class="count"><?php echo $depo;  ?></span></div>
                                            <div class="stat-heading">Depot</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                
                <div class="row">
                    <div class="col-lg-4">
                        <div class="card">
                            <div class="card-body">
                                <h4 class="card-title box-title">To Do Authorize</h4>
                                <div class="card-content">
                                    <div class="todo-list">
                                        <div class="tdl-holder">
                                            <div class="tdl-content">
                                                <ul>
                                                    <a href="https://demo.webip.lk/nance/allqtn"> <li>
                                                        
                                                        <label>
                                                            
                                                           
                                                            <?php  
                                                            
                                                             
                                                            
                                                            if($todoinv > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?>
                                                           <span>Invoice - <?php echo  $todoinv; ?></span>
                                                            
                                                        </label>
                                                    </li></a>
                                                    <a href="https://demo.webip.lk/nance/view_grn"> <li>
                                                        <label>
                                                            
                                                             <?php 
                                                            
                                                             if($todogrn > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?>
                                                            
                                                            
                                                         <span>GRN - <?php echo  $todogrn; ?></span>
                                                         
                                                        </label>
                                                    </li></a>
                                                    <li>
                                                        <label>
                                                            
                                                             <?php 
                                                            
                                                             if($todoinvrtn > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?>
                                                            <span>Return Note - <?php echo  $todoinvrtn; ?></span>
                                                          
                                                        </label>
                                                    </li>
                                                    <li>
                                                        <label>
                                                            <?php 
                                                            
                                                            if($todopay > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?>
                                                          <span>Payment - <?php echo  $todopay; ?></span>
                                                       
                                                        </label>
                                                    </li>

                                                    <li>
                                                        <label>
                                                            
                                                            <?php 
                                                            
                                                            if($todotrnf > 0) {$imgurl2 = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl2 = "";}
                                                            
                                                            echo $imgurl2 ?>
                                                            <span>Transer Notes - <?php echo  $todotrnf; ?></span>
                                                       
                                                        </label>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div> <!-- /.todo-list -->
                                </div>
                            </div> <!-- /.card-body -->
                        </div><!-- /.card -->
                    </div>

                    <div class="col-lg-3">
                      <h4 class="card-title box-title">Today</h4>
                         <div class="card text-white bg-flat-color-6">
                            
                            <div class="card-body">
                                <div class="">
                                    <h3 class="mb-0 fw-r">
                                        <?php if($invtot==NULL){  $inv = "0.00";}else{$inv = $invtot;}  ?>
                                        <span class="count">Rs. <?php echo number_format($inv,2)  ?></span>
                                       
                                    </h3>
                                    <p class="text-light mt-1 m-0">Invoice / <?php echo $invtotqty  ?></p>
                                </div><!-- /.card-left -->


                            </div>

                        </div>
                        
                          <div class="card text-white bg-flat-color-3">
                            <div class="card-body">
                                <div class="">
                                    <h3 class="mb-0 fw-r">
                                         <?php if($paytot==NULL){$pay = "0.00";}else{$pay = $invtot;}  ?>
                                        
                                        <span class="count">Rs. <?php echo number_format($pay,2); ?></span>
                                    </h3>
                                    <p class="text-light mt-1 m-0">Payment / <?php echo $payqty  ?></p>
                                </div><!-- /.card-left -->

                              

                            </div>

                        </div>
                        
                   
                    
                        <div class="card text-white bg-flat-color-2">
                            <div class="card-body">
                                <div class="">
                                    <h3 class="mb-0 fw-r">
                                        <?php if($rtntot==NULL){  $trn = "0.00";}else{$trn = $rtntot;}  ?>
                                        <span class="count ">Rs. <?php echo number_format($trn,2)  ?></span>
                                       
                                    </h3>
                                    <p class="text-light mt-1 m-0">Return / <?php echo $trnqty  ?></p>
                                </div><!-- /.card-left -->


                            </div>

                        </div>
                    
                        
                        
                        
                    </div>
                    
                
                </div>
                
                
                </div>
                </div>
                
<script src="<?php echo base_url(); ?>assets/js/jquery.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/jquery.matchHeight.min.js"></script>                
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>           
               
                
                 <div class="clearfix"></div>
                 
    <script>
    
    $(document).ready(function(){
       show_data("showinv_dash"); 
      
    });
    
    setInterval(function() {
        show_data("showinv_dash");
    }, 20 * 1000); // 60 * 1000 milsec
        
        
        function get_inv(inv){
            for (var i = 0; i < inv; i++) {
                var data = i+"num";                
                            swal.fire(data);
                            }
        }
        
        
    function show_data(clickedID){
     var rt = clickedID;
     //alert(rt);
     $.ajax({
                type  : 'ajax',
                method : "POST",
                url   : "<?php echo site_url()?>"+rt,
                async : true,
                dataType : 'json',
                success : function(data){
                    $('#btn').html(data[0]);
                    $('#thed').html(data[1]);
                    $('#tb_bdy').html(data[2]);
                    
                }
 
            });
            return false;
     
    }    
        
        
        
        
        
        
        
        
        
        
        
        
        
    </script>             
                