<div class="col-sm-12">
                        <div class="white-box">
                        	<div class="pull-right">
                                @permission('create-expense')
								<a href="{{route('payment.addView')}}" class="btn  btn-primary">
									<i class="fa fa-plus-square"></i>&nbsp; Add New
								</a>
                                @endpermission
							</div>
                            <h3 class="box-title">Payments ({{number_format($amount)}})</h3>

                            <div class="table-responsive">
                                <table id="myTable" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>#</th>
                                            <th>DATE</th>
                                            <th>NUMBER</th>
                                            <th>AMOUNT</th>
                                            <th>VENDOR</th>
                                            <th>Account Head</th>
                                            <th>Approval Status</th>
                                            
                                            <th>Action</th>                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $count =1;?>
                                        @foreach($allPayments as $payment)
                                        <tr>
                                            <td>{{$count++}}</td>
                                            <td>{{date('d-m-Y', strtotime($payment->date)) }}</td>
                                            <td>BILL-000{{$payment->bill->id}}</td>
                                            <td>{{number_format($payment->amount)}}</td>
                                             <td>@if($payment->bill->vendor){{$payment->bill->vendor->name}}@endif</td>
                                             <td>@if($payment->bill->category)<b>{{$payment->bill->category->name}}@endif</b></td>
                                              <td>@if($payment->approval_status)
                                                <span style="color: Green;">Approved</span>
                                                <a target="_blank" href="{{asset('uploads/'.$payment->file)}}"><i class="fa fa-file"></i> &nbsp;&nbsp;File
                                                </a>
                                                @else
                                                <span style="color:Orange">Pending</span>
                                                @endif
                                            </td>

                                            
                                            <td class="text-nowrap">
                                                

                                                @permission('edit-expense')
                                                 <a href="{{route('payment.print',['id'=>$payment->id])}}" data-toggle="tooltip" data-original-title="Print"><i class="fa fa-print text-success"></i></a>
                                                @endpermission
                                                &nbsp;&nbsp;&nbsp;

                                                @permission('delete-expense')
                                                <a href="{{route('payment.delete',['id'=>$payment->id])}}" data-toggle="confirmation" data-title="Are you sure to delete?" > <i class="fa fa-close text-danger"></i> </a>
                                                @endpermission
                                            </td>
                                        </tr>
                                        @endforeach

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>