<?php 
  $header_file=APPPATH.'views/include/header.php';
  require($header_file);
?>
<!-- BEGIN: Content-->
    <div class="app-content content">
      <div class="content-overlay"></div>
      <div class="content-wrapper" ng-app="anglist" ng-controller="anglistctlr">
        <div class="content-header row">
          
         <div class="content-header-left col-md-12 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-inline-block">Closed List</h3>
            <div class="row breadcrumbs-top d-inline-block">
              <div class="breadcrumb-wrapper col-12">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item"><a href="#">Home</a>
                  </li>
                  <li class="breadcrumb-item"><a href="#">Purchase Order</a>
                  </li>
                  <li class="breadcrumb-item active">Closed List
                  </li>
                </ol>
              </div>
            </div>
          </div>
        </div>
        <div class="content-body"><!-- Zero configuration table -->
<section id="configuration">
    <div class="row justify-content-md-right">
        
            <div class="card"  >
                <div class="card-header">
                    <!--<h4 class="card-title">Closed List</h4>-->
                    <a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
                    <div class="heading-elements">
                        <ul class="list-inline mb-0">
                            <li><a data-action="collapse"><i class="ft-minus"></i></a></li>
                            <li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
                            <li><a data-action="expand"><i class="ft-maximize"></i></a></li>
                            <li><a data-action="close"><i class="ft-x"></i></a></li>
                        </ul>
                    </div>
                </div>
                <div class="card-content collapse show">
                    <div class="card-body card-dashboard" >
                       
                        <div class="table-responsive" >
                            <table id="myTable" class="table table-striped table-bordered ">
                                <thead>
                                    <tr>
                                        <th>Sl No</th>
                                        <th>Purchase No</th>
                                        <th>Purchase Date</th>
                                        <th>Supplier Name</th>
                                        <th>Status</th>         
                                        <th>Remarks</th>
                                        <th>View PO</th>
                                    </tr>
                                </thead>
                            </table>
                                <!--<tbody>
                 <tr ng-repeat="res in results | filter : search">
                          <td>{{res.purchase_no}}</td>
                          <td>{{res.purchase_date}}</td>
                          <td>{{res.venders_name}}</td>
                          <td class="pending_data" ng-if="res.purchase_status == 'Pending' "><span class="badge badge-danger">{{res.purchase_status}}</span></td>
                          <td class="success_data" ng-if="res.purchase_status == 'Closed' "><span class="badge badge-success">{{res.purchase_status}}</span></td>
                          <td>{{res.purchase_remarks}}</td>
                          <td class="uk-text-nowrap">
                        <a href="<?php //echo site_url('Purchase/view_po_close/{{res.mid}}/'.$sub_mod_id.''); ?>" id="view" name="view" class="btn btn-sm btn-primary">View</a>
                    </td>
                        </tr>
                        </tbody>
                         <div ng-show='loading' class='loading'>Loading...</div>-->
                        </div>
                    </div>
                </div>
            </div>
        
    </div>
</section>
<!--/ Zero configuration table -->

<!--/ Language - Comma decimal place table -->

        </div>
      </div>
    </div>
    <!-- END: Content-->

   <?php //require('include/theme_customizer.php');?>
 <?php 
  $footer_file=APPPATH.'views/include/footer.php';
  require($footer_file);
  ?>
<script>
  $('.param_check').each(function() { $(this).on( {'click contextmenu': function() {
    //contextmenu
    var i = $(this).data('value');
    var anchor = $("a");
    var anchorTarget = $(this).parent().find('.parmetre').val();
    var submodid = $(this).parent().find('.submod_id').val();
    var link = $(this).attr('href');
    $(this).attr("href", link + submodid +'/'+anchorTarget);

    location.reload();
  }
  })
  })
</script>  
  <script type="text/javascript">
             var fetch = angular.module('anglist', ['infinite-scroll']);
            
            fetch.controller('anglistctlr', ['$scope', '$http', function ($scope, $http) {
            
              // Variables
              //var branch1 = angular.element(document.getElementById("branch"));
         // $scope.branch = branch1.val();
              $scope.row = 0;
              $scope.rowperpage = 16000;
              $scope.results = [];
              $scope.busy = false;
              $scope.loading = false;
            
              // Fetch data
              $scope.getResults = function(){
            
              if ($scope.busy) return;
            
                $scope.busy = true;
            
                // Fetch data
                $http({
                  method: 'post',
                  url: '<?php echo base_url() ?>index.php/Purchase/get_closeddata',
                  data: {row:$scope.row,rowperpage:$scope.rowperpage}
                }).then(function successCallback(response) {
            
                  if(response.data !='' ){
                     // New row value 
                     $scope.row+=$scope.rowperpage;
            
                     $scope.loading = true;
                     setTimeout(function() {
                        $scope.$apply(function(){
            
                          // Assign response to results Array 
                          angular.forEach(response.data,function(item) {
                             $scope.results.push(item);
                          });
                          $scope.busy = false;
                          $scope.loading = false;
                        });
            
                     },500);
                  }
                });
              }
            
              // Call function
              $scope.getResults();
            
            }]);
            </script>
<script type='text/javascript'>
    $(document).ready(function() {
        $("#myTable").DataTable({
           "ajax": '<?php echo base_url();?>index.php/Purchase/get_PCloseddata',
            dom: "Bfrtip",
            displayLength: 25,
            buttons: ["copyHtml5", "excelHtml5", "csvHtml5", "pdfHtml5"]
    }) 
   });
</script>
  </body>
  <!-- END: Body-->

<!-- Mirrored from pixinvent.com/modern-admin-clean-bootstrap-4-dashboard-html-template/html/ltr/vertical-modern-menu-template/form-layout-basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Apr 2020 09:38:02 GMT -->
</html>