 <link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/jquery-ui.css"> 
 <div class="content">
            <!-- Animated -->
            <div class="animated fadeIn">
                <!-- Widgets  -->
                
                <!--div class="row">
                    
                  <div class="col-lg-12 col-md-12">
                     <div class="card">
                            <div class="card-header">
                                <strong class="card-title">Card with switch</strong>
                            </div>
                            <div class="card-body">
                                <div class="col-lg-4 col-md-4">
                                <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>


                            </div>

                        </div>
                        </div>
                            </div>
                        </div>
                    </div>
                </div-->
                <div class="row">
                    
                    
                    
                    <?php  ?>
                    <div class="col-lg-3 col-md-6">
                        <a href="<?php  echo base_url()  ?>customer"> 
                        <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/334.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>
                        </a>
                    </div>

                    <div class="col-lg-3 col-md-6">
                        <a href="<?php  echo base_url()  ?>user"> 
                        <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/336.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></a>
                    </div>

                    <div class="col-lg-3 col-md-6">
                         <a href="<?php  echo base_url()  ?>product">  
                        <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/335.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>
                        </a>
                    </div>

                    <div class="col-lg-3 col-md-6">
                         <a href="<?php  echo base_url()  ?>setting"> 
                        <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/337.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>
                        </a>
                    </div>
                    
                  
                </div>
                
                
                <div class="row">
                    
                    
                    <div class="col-lg-4">
                        <div class="card">
                             <div class="card-header">
                                    <strong class="card-title">To Do Authorize</strong>
                                </div>
                            <div class="card-body">
                               
                                <div class="card-content">
                                    <div class="todo-list">
                                        <div class="tdl-holder">
                                           
                                        </div>
                                    </div> <!-- /.todo-list -->
                                    
                                    
                                    
                                    
                                     <ul class="list-group list-group-flush">
                                         
                                         
                                          <a href="<?php  echo base_url()  ?>allqtn">
                                          <li class="list-group-item">
                                        
                                        <?php  if($todoinv > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?> Invoice  <span class="badge badge-primary pull-right" style="margin-top: 10px;"><?php echo  $todoinv; ?></span>
                                    </li></a>
                                    
                                   
                                          <a href="<?php  echo base_url()  ?>view_grn">
                                          <li class="list-group-item">
                                        
                                        <?php  if($todogrn > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?> GRN  <span class="badge badge-primary pull-right" style="margin-top: 10px;"><?php echo  $todogrn; ?></span>
                                    </li></a>
                                    
                                     <a href="<?php  echo base_url()  ?>allinv_return">
                                          <li class="list-group-item">
                                        
                                        <?php  if($todoinvrtn > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?> Return Note  <span class="badge badge-primary pull-right" style="margin-top: 10px;"><?php echo  $todoinvrtn; ?></span>
                                    </li></a>
                                    
                                    
                                    <a href="<?php  echo base_url()  ?>payment"><li class="list-group-item">
                                        
                                         <?php 
                                                            
                                                            if($todopay > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?> Payment <span class="badge badge-primary pull-right" style="margin-top: 10px;"><?php echo  $todopay; ?></span>
                                    </li></a>
                                    
                                    <a href="<?php  echo base_url()  ?>transer"><li class="list-group-item">
                                        
                                         <?php 
                                                            
                                                            if($todotrnf > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?> Transer Notes <span class="badge badge-primary pull-right" style="margin-top: 10px;"><?php echo  $todotrnf; ?></span>
                                    </li></a>
                                    
                                     <a href="<?php  echo base_url()  ?>customer"><li class="list-group-item">
                                        
                                         <?php 
                                                            
                                                            if($todocus > 0) {$imgurl = "<img src='".base_url()."assets/images/200.gif' alt='' style='height: 40px;'>";}else {$imgurl = "";}
                                                            
                                                            echo $imgurl ?> Customer <span class="badge badge-primary pull-right" style="margin-top: 10px;"><?php echo  $todocus; ?></span>
                                    </li></a>
                                   
                                </ul>

                                </div>
                            </div> <!-- /.card-body -->
                        </div><!-- /.card -->
                    </div>

                    <div class="col-lg-4">
                        
                        <div class="card">
                                <div class="card-header">
                                    <strong class="card-title">Today</strong>
                                </div>
                      
                      <div class="card-body">
                         <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 = $paytot;}  ?>
                                        
                                        <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 class="col-lg-4">
                        
                         <div class="card">
                                <div class="card-header">
                                    <strong class="card-title">Warning Alerts</strong>
                                </div>
                                <div class="card-body">
                                    
                                    
                                    
                                     <?php if($todaymoq!=0){ ?>
                                     
                                      <div class="sufee-alert alert with-close alert-danger alert-dismissible fade show">
                                       
                                       MOQ level exceeded <?php echo $todaymoq  ?> items
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                     
                                     <?php
                                     }  ?>
                                     
                                         <?php if($todayexp!=0){ ?>
                                     
                                      <div class="sufee-alert alert with-close alert-danger alert-dismissible fade show">
                                      
                                       Expire date exceeded <?php echo $todayexp  ?> items
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                     
                                     <?php
                                     }  ?>
                                     
                                         <?php if( $todaybin!=0){ ?>
                                     
                                      <div class="sufee-alert alert with-close alert-danger alert-dismissible fade show">
                                      
                                       Stock bin authorize <?php echo  $todaybin  ?> items
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                     
                                     <?php
                                     }  ?>
                                     
                                

                                </div>
                            </div>
                        
                    </div>
                
                </div>
                
                
                </div>
                </div>
                
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/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="<?php echo base_url(); ?>assets/js/jquery-ui.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>   


               
                
                 <div class="clearfix"></div>
                 
    <script>
    
    $(document).ready(function(){
       show_data("showinv_dash"); 
      
    });
    
    setInterval(function() {
        location.reload();
        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(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>             
                