@extends('layouts.dashboard')

@section('page_title')
	Bill and Payments
@endsection

@section('page_header_title')
Bill and Payments
@endsection

@section('page_body')

{{ Breadcrumbs::render('commit_bill') }}
<div class="row row-cards row-deck">
						<div class="col-12">
							<div class="card">
								<div class="card-header">


						 @if(Auth::user()->hasAnyPermission(['All','Store Bill']))
						 <button  class="float-right btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#md_add_bill" ><i class="fa fa-plus"></i></button> &nbsp;&nbsp;
						 <h3 class="card-title">Add Bills</h3>
						 @endif
					
					</div>

								<div class="card-status card-status-left bg-blue"></div>
								<div class="table-responsive table-height">

									<table class="table table-hover table-outline table-vcenter text-nowrap card-table cls_datatable">
										<thead>
											<tr>
												<th>Sr #</th>
												<th>Laibility Type</th>
												<th>Payable Type</th>
												<th>Total Amount</th>
												<th>Description</th>
												<th>Created At</th>
												<th>Action</th>
											</tr>
										</thead>
										<tbody>
										@foreach($curr_payable as $row)
										<tr>
											<td>{{$loop->iteration}}</td>
											<td>{{$row->laibility_type}}</td>
											<td>{{$row->payable_type}}</td>
											<td>{{EF::numberFormat($row->amount)}}</td>
											<td>{{$row->description}}</td>
											<td>{{EF::dateFormat($row->created_at)}}</td>
											<td> <a href="{{route('show_bill_installments',['id' => Crypt::encrypt($row->id)])}}" class="btn-sm btn-success"><i class="fa fa-eye"></i> Details</a>


											</td>
										</tr>
										@endforeach
										</tbody>
										<tfoot>

										</tfoot>
								</div>
							</div>
						</div>
				</div>


@endsection

@section('page_modal')
@include('bills.modals.add_bill')
@include('bills.modals.list_subcategory')
@endsection

@section('page_script')
@include('bills.modals.add_bill_script')
@endsection
