
    @isset($journal_list)
    @php($count = 0)
    @php($row_balance=0)

    @foreach($journal_list as $rows)

    @php($user           = $rows->user)
    @php($payment        = $rows->payment)
    @php($booking        = $rows->booking)
    @php($plot           = $booking->plot)
    @php($transaction    = $rows->transaction)

    <tr>
      @if($transaction->status == "Approve"|| $transaction->status == "Reversal" )

      <td>{{++$count}}</td>
      <td>{{EF::dateFormat($rows->created_at)}}</td>
      <td>{{$transaction->voucher_type}}-{{$transaction->voucher_number}}</td>
      <td>@isset($user->id){{$user->name}}@endisset</td>
      <td>{{$rows->narration}}</td>
      <td>{{$rows->mode}}</td>
      <td>{{$rows->drawn_on}}</td>
      <td>{{$rows->instrument}}</td>
      <td>{{$rows->instrument_date}}</td>
      
      <td>
        @if($transaction->status == "Approve") 
          <span class="badge badge-success">{{EF::getstatus($transaction->status)}}</span>
        @elseif($transaction->status == "Reversal") 
          <span class="badge badge-primary">{{EF::getstatus($transaction->status)}}</span>
        @else
          <span class="badge badge-warning"> {{$transaction->status}}</span>
        @endif
      </td>
      <td>{{EF::numberFormat($rows->debit)}}</td>
      <td>{{EF::numberFormat($rows->credit)}}</td>
      <td> {{EF::numberFormat((($rows->debit)-($rows->credit))+($row_balance))}}</td>
    
      @php($row_balance = (($rows->debit)-($rows->credit))+($row_balance))
    
            
      @if(Auth::user()->hasAnyPermission(['All','Preview Voucher']))
        <td>
            <a href="{{route('document.voucherpreview',['id' => Crypt::encrypt($rows->transaction_id)])}}" id="pay" class="dropdown-item" ><i class="dropdown-icon fa fa-print"></i>Print</a>    
        </td>
      @endif
          

     @endif
   </tr>
   @endforeach
   @endisset
