
         @php($transaction_count = 0)


          @isset($trasnaction)
          @foreach($trasnaction as $rows)

          <tr>

              @php($journal_list = $rows->getJournalListByTransaction($rows->id))
              @php($journal_count = @count($journal_list))

              @php($count = 0)

              @foreach($journal_list as $journal_rows)
                @php($uniqId = uniqId())
                @php($other_info = $journal_rows->payment->showGenericTypeDetail($journal_rows->payment))
                <tr class="row_{{$uniqId}}">
                 @if($count == 0)
                      
                    <td rowspan="{{$journal_count}}">{{++$transaction_count}}</td>
                    <td rowspan="{{$journal_count}}"><input type="checkbox"  name="transaction[]" class="checkbox_transaction" onclick="show_approve_selected(this,event,'row_{{$uniqId}}')" value="{{Crypt::encrypt($rows->id)}}"></td>

                    <td rowspan="{{$journal_count}}">{{EF::dateFormat($rows->created_at)}}</td>
                    <td rowspan="{{$journal_count}}">
                      <input disabled type="date" name="date[]" class="form-control form-control-sm">
                    </td>
                    <td rowspan="{{$journal_count}}">
                      <select disabled name="status[]">
                        <option value="Approve">Approve</option>
                        <option value="Reject">Reject</option>

                     </select>
                  </td>


                    <td rowspan="{{$journal_count}}"><a target="_blank" href="{{route('document.voucherpreview',['id' => Crypt::encrypt($rows->id)])}}" > VR / {{sprintf('%04d', $rows->id)}} </a></td>
                    <td rowspan="{{$journal_count}}">{{$rows->getBranch($rows->id)}}</td>

                    <td rowspan="{{$journal_count}}">{{$rows->compound_type}}</td>
                    <td rowspan="{{$journal_count}}">
                      @if($rows->status == "Unapprove")
                         <span class="badge badge-danger">{{EF::getstatus($rows->status)}}</span>
                      @endif
                    </td>
                 @endif
                    <td>{!!wordwrap($rows->description,50,'<br>')!!} </td>
                    <td>{{EF::numberFormat($journal_rows->debit)}}</td>
                    <td>{{EF::numberFormat($journal_rows->credit)}}</td>

                    @if($count == 0)
                    <td rowspan="{{$journal_count}}">
                      @if(Auth::user()->hasAnyPermission(['All','Update Voucher']))
                      <span onclick="showVoucher(event,this)"  href="{{route('voucher.show',['id' => Crypt::encrypt($rows->id) ])}}" class="btn btn-sm btn-primary">Edit</span>
                      @endif
                    </td>
                    @endif

                 @php($count++)
                </tr>
              @endforeach



         @endforeach
         @endisset