@isset($vendor_payment_list)
            @php($pass_data = [])
            @foreach($vendor_payment_list as $rows)

            @php(

            $pass_data = array(

              'vendor_payment'    => Crypt::encrypt($rows->id),
              'invoice_no'        => $rows->invoice_no,
              'payment_option'    => $rows->payment_option,
              'amount'            => $rows->amount,
              'amount_in_words'   => EF::numberToWords($rows->amount),
              'description'       => $rows->description,
              'vendor_name'       => $curr_vendor->vendor_name,
                'debit_account'      => trim($rows->debitAccount->head->code.' '.$rows->debitAccount->head->name.' | '.$rows->debitAccount->code.' '.$rows->debitAccount->name),

         'credit_account'      => trim($rows->creditAccount->head->code.' '.$rows->creditAccount->head->name.' | '.$rows->creditAccount->code.' '.$rows->creditAccount->name),

            ))

            <tr>
              <td>{{$loop->iteration}}</td>

              <td>{{$rows->invoice_no}}</td>

              <td>{{$rows->description}}</td>

              <td>{{($rows->payment_option)}}</td>

              <td>{{EF::numberFormat($rows->amount)}}</td>

              <td>{{EF::numberFormat($rows->received_amount)}}</td>


              <td>{{EF::numberFormat($rows->amount - $rows->received_amount)}}</td>

              <td>{{$rows->status}}</td>


              <td>{{EF::dateFormat($rows->created_at)}}</td>

                <td class="text-center">
                  <div class="item-action dropdown">
                    <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fa fa-list-ul"></i></a>


                      <div class="dropdown-menu dropdown-menu-right">
                        @if(Auth::user()->hasAnyPermission(['All','Add Payment']) && $rows->amount > 0 && $rows->status === "Unpaid")
                         <a href="#" id="pay" class="dropdown-item" onclick="showPayPaymentModel(event,'{{Crypt::encrypt(EF::getGenericTableIndex()['Vendor Payment'])}}','{{Crypt::encrypt($rows->id)}}')"><i class="dropdown-icon fa fa-money"   ></i> Pay </a>
                         @endif
                     @if(Auth::user()->hasAnyPermission(['All','Update Vendor Payment']) && $rows->received_amount == 0)

                          @php($update_route = route('showvendorpaymentmodel',['id' => Crypt::encrypt($rows->id)]))
                          <a onclick="showVendorPaymentUpdateModel(event,'{{$update_route}}','xyz')" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-edit"></i> Update</a>
                   @endif

                    @if(Auth::user()->hasAnyPermission(['All','Remove Vendor Payment']) && $rows->received_amount == 0)
                          <a  href="{{route('trashvendorandpayment',['id' => Crypt::encrypt($rows->id)])}}" class="dropdown-item cls_delete" content="remove vendor payment" ><i class="dropdown-icon fa fa-edit"></i> Remove</a>
                    @endif                
                          

                    </div>

                   



                  </div>
                </td>
           </tr>
           @endforeach
           @endisset 