$(document).ready(function(){

  $('#pi_trashed').on('click',function(){

    $.ajaxSetup({

      headers: {

        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')

      } 

    });

 
    $.ajax({ 
    
      url:url_viewtrash,

      method:"POST",
 
      data:{},

      success:function(result)

      {
        
        var section="";
        var count=(result).length;
        

        for(i=0;i<(count);i++)
        {
        
          section=section+
          
          '<tr>'+ 
          
            '<td><label class="control-label" for="company name"> '+result[i]['pi_no']+'</label></td>'+
           
            '<td><label class="control-label" for="GST NO"> '+result[i]['quotation_id']+'</label></td>'+
								
            '<td><label class="control-label" for="Email"> '+result[i]['pi_no']+'</label></td>'+
								
            '<td><a href="#" class="btn btn-success pi_trashbtnRestore" data-id="'+result[i]['id']+'">Restore</a>|<a href="#" class="btn btn-danger pi_trashbtnDelete" data-id="'+result[i]['id']+'">Delete</a></td>'+

          '</tr>'
  
        }
          $('#pi_trashedlist').append(section);
      }

    });
    
    $("#pi-trash").modal('show');

  });

});