 <div class="col-sm-12">
                        <div class="white-box">
                            
                            <h3 class="box-title">All Receipts ({{number_format(count($receipts))}})</h3>

                            <div class="table-responsive">
                                <table id="myTable" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>Project</th>
                                            <th>Receipt No.</th>
                                            <th>Unit No. </th>
                                            <th>Payment Mode</th>
                                            <th>Payment Head</th>
                                            <th>Received Amount </th>
                                            <th>Date</th>
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                        @permission('print-receipt')
                                            <?php $print_receipt = true;?>
                                        @else
                                            <?php $print_receipt = false;?>
                                        @endpermission

                                        @permission('view-receipt')
                                            <?php $view_receipt = true;?>
                                        @else
                                            <?php $view_receipt = false;?>
                                        @endpermission

                                        @permission('edit-receipt')
                                            <?php $edit_receipt = true;?>
                                        @else
                                            <?php $edit_receipt = false;?>
                                        @endpermission

                                        @permission('download-receipt')
                                            <?php $download_receipt = true;?>
                                        @else
                                            <?php $download_receipt = false;?>
                                        @endpermission

                                        @permission('delete-receipt')
                                            <?php $delete_receipt = true;?>
                                        @else
                                            <?php $delete_receipt = false;?>
                                        @endpermission

                                        @foreach($receipts as $receipt)
                                        <tr>
                                            
                                            <td>{{$receipt->multiProject?$receipt->multiProject->name:'None'}}</td>
                                           <td>{{$receipt->receipt_no}}</td>
                                           
                                           
                                            <td>{{$receipt->property->inventory->unit_number}}</td>
                                             
                                           

  @if(!empty($receipt->payment_method))

                                                @if($receipt->payment_method == \App\Receipt::cash)
                                                <td>Cash</td>
                                                @elseif($receipt->payment_method == \App\Receipt::bank)
                                                <td>Bank</td>
                                                @elseif($receipt->payment_method == \App\Receipt::adjustment)
                                                <td>Adjustment</td>
                                                @elseif($receipt->payment_method == \App\Receipt::cheque)
                                                <td>Cheque</td>
                                                @elseif($receipt->payment_method == \App\Receipt::merging)
                                            <td>Merging</td>
                                                @else
                                                <td></td>
                                                @endif
                                            
                                            @else
                                                
                                                @if($receipt->payment_mode == \App\Receipt::cash)
                                                <td>Cash</td>
                                                @elseif($receipt->payment_mode == \App\Receipt::bank)
                                                <td>Bank</td>
                                                @elseif($receipt->payment_mode == \App\Receipt::adjustment)
                                                <td>Adjustment</td>
                                                @elseif($receipt->payment_mode == \App\Receipt::cheque)
                                                <td>Cheque</td>
                                                @else
                                                <td></td>
                                                @endif

                                             @endif

 @if($receipt->payment_head == \App\CustomerStatement::down_payment)
                                    <td class="printFV">Down Payment</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::possession)
                                    <td class="printFV">Possession Fee</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::installment)
                                    <td class="printFV">Installment </td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::other)
                                    <td class="printFV">Other</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::allotment)
                                    <td class="printFV">Allotment</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::confirmation)
                                    <td class="printFV">Confirmation</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::booking)
                                    <td class="printFV">Booking</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::development)
                                    <td class="printFV">Development</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::file_processing)
                                    <td class="printFV">File Processing</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::registration)
                                    <td class="printFV">Registration</td>
                                    @elseif($receipt->payment_head == \App\CustomerStatement::transfer_fee)
                                    <td class="printFV">Transfer Fee</td>
                                    @else
                                    <td class="printFV"></td>
                                    @endif

                                            
                                           
                                            <td>{{number_format($receipt->amount)}} PKR</td>
                                           
                                             <td> {{date('d-m-Y', strtotime($receipt->receipt_date)) }}</td>
                                            <td class="text-nowrap">
                                                
                                                <!-- @if($print_receipt)
                                                <a target="_blank" href="{{route('receipt.print',['id'=>$receipt->id])}}" data-toggle="tooltip" data-original-title="Print"> <i class="fa fa-print text-inverse m-r-10"></i>&nbsp;&nbsp;&nbsp;  </a>
                                                @endif -->

                                                @if($view_receipt)
                                                <a href="{{route('receipt.detail',['id'=>$receipt->id])}}" data-toggle="tooltip" data-original-title="View"> <i class="fa fa-eye text-inverse m-r-10"></i>&nbsp;&nbsp;&nbsp;  </a>
                                                @endif

                                               <!--  @if($edit_receipt)
                                                <a href="{{route('receipt.editView',['id'=>$receipt->id])}}" data-toggle="tooltip" data-original-title="Edit"> <i class="fa fa-pencil text-inverse m-r-10"></i>&nbsp;&nbsp;&nbsp;  </a>
                                                @endif -->

                                                <!-- @if($download_receipt)
                                                <a target="_blank" href="{{route('receipt.download',['id'=>$receipt->id])}}" data-toggle="tooltip" data-original-title="Download"> <i class="fa fa-download text-inverse m-r-10"></i> &nbsp;&nbsp;&nbsp; </a>
                                                @endif -->
                                                
                                                @if($delete_receipt)
                                                <a href="{{route('receipt.delete',['id'=>$receipt->id])}}" onclick="return  confirm('Are you sure to delete?')" data-toggle="confirmation" data-placement="left" data-title="Are you sure to delete?" > <i class="fa fa-close text-danger"></i> </a>
                                                @endif
                                            </td>
                                        </tr>
                                        @endforeach


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