

@extends('layouts.agencies')
 

 @section('content')
 <?php Fun::lang()?>
 <div class="main-content-wrapper">
	  <div class="main-content-wrapper">
		 <div class="breadcrumb">
			 <div class="container">
				 <ul class="">
					 <li><a href="{{route('dashboard-agencies.index')}}">Dashboard<span>/</span></a></li>
					 <li><a href="#">Funds<span>/</span></a></li>
					 <li><a href="">History</a></li>
				 </ul>
			 </div>
		 </div>
 	</section>

 	<div class="main-box">
         <div class="main-content">
             <div class="main-admin-dashboard">
                 <div class="container">
                     <div class="page-wrapper">
						 <form action="{{url('/realty/funds-transaction-print')}}" method="POST">
							 @csrf
							 <div class="form-search">
								 <div class="row">
									 <div class="col-xs-12 col-sm-12 col-md-12 text-right">
										 <button type="submit" class="button_primary btn-sm search"><span class="fa fa-print"> Print</span></button>
									 </div>
								 </div>
							 </div>
							 {!! Form::close() !!}
                         <div class="row">	
                             <div class="col-sm-12 col-xs-12">
                             	<div class="form-wrapper" style="overflow-x:auto;">
                                     <table id="datatable_item" class="table table-striped table-bordered table-hover nowrap">
                                         <thead>
											<tr>
												<th>No</th>
							                    <th>Requested Date</th>
												<th>Transaction</th>
												<th>Transaction ID</th>
												<th>Credit</th>
												<th>Debit</th>
												<th>Balance</th>
												<th>Remark</th>
												<th>Status</th>
											</tr>
										</thead>
                                     </table>
                                 </div>
                             </div>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
     </div>
 </div> 

 
@endsection


@section('script')

	<script type="text/javascript">

	    $(document).ready(function() {
	    	$('.main-spinner').show();
			$('#datatable_item').DataTable({
				"lengthMenu": [[20, 25, 50, 100, 500], [20, 25, 50, 100, 500]],
				ordering:  false,
				serverSide: true,
				ajax: "{{ route('datatable.get_funds_transactions') }}",
					columns: [
						{data: 'DT_RowIndex'},
						{data: 'request_date'},
						{data: 'operation_type'},
						{data: 'transaction_code'},
						{data: 'credit'},
						{data: 'debit'},
						{data: 'balance'},
						{data: 'remark'},
						{data: 'status'},
					],  

					"initComplete": function(settings, json) {
					$('.main-spinner').hide();
				}	       
			});
			
			$.fn.dataTable.ext.errMode = 'throw';
		});

	</script>
@endsection

