
@extends('adminlte::page')
 
@section('content')
@include('administrator.deposit.form-cancel')
<?php Fun::lang()?>
    <div class="title-page">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
                <li><a href="#">Manage Project Owner</a></li>
                <li><a href="#">Payment History</a></li>
            </ul>
        </div>
    </div>
<div class="page">
    <div class="top-content">
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="title-page">
                  <div class="pull-left">
                      <h3>Payment History</h3>
                  </div>
              </div>

            </div>
        </div>
    </div>
   <div class="row">
      <div class="col-sm-12 col-xs-12">
        <div class="box-body table-responsive">
          <table id="datatable_item_deposit" class="table table-striped table-bordered table-hover nowrap">
              <thead>
              <tr>
              
                  <th>No</th>
                  <th>Date</th>
                  <th>Client Name</th>
                  <th>Project Name</th>
                  <th>Category Name</th>
                  <th>Item Code</th>
                  <th>Payment Amount</th>
                  <th>Step</th>
                  
              </tr>
            </thead>
          </table>
        </div>
      </div>
    </div>
</div>

 @endsection
@section('js')

<script type="text/javascript">
      $(document).ready(function(){
        $('.main-spinner').show();    
        $('#datatable_item_deposit').DataTable({
          ordering: false,
          "serverSide": true,
          ajax: "{{ route('datatable.get_external_payment') }}",
          columns: [
            {data: 'DT_RowIndex'},
            {data: 'payment_date'},
            {data: 'client_fullname'},
            {data: 'project_name'},
            {data: 'category_name'},
            {data: 'item_name'},
            {data: 'payment_amount'},
            {data: 'payment_no'},
          ],  

          "initComplete": function(settings, json) {
          $('.main-spinner').hide();
          }        
          });
      });

      function cancel_deposit(obj) {
        var id = $(obj).closest("tr").attr("id");
        $("#ps_id").val(id);    
      }

  </script>

@endsection
