
@isset($inventory_list)
  @php($pass_data = [])
        @foreach($inventory_list as $rows)
    
    @php($dimesnion = explode('X',$rows->dimensions))

     @if(isset($dimesnion[0]) && isset($dimesnion[1]))
        
    @else
    @php($dimesnion[0] = 0)
        @php($dimesnion[1] = 0)
     @endif

     
      @php(
        $pass_data = array(
            'inventory'                           => Crypt::encrypt($rows->id),
            $plot_labels['plot_name']             => $rows->plot_id,
            $plot_labels['block']                 => $rows->block_name,
            $plot_labels['floor']                 => $rows->floor,
            $plot_labels['size']                  => $rows->size,
            $plot_labels['category']              => $rows->category,
            $plot_labels['rate']                  => $rows->rate,
            $plot_labels['type']                  => $rows->type,
            $plot_labels['location']              => $rows->location,
            $plot_labels['feature_charges']       => $rows->featurecharges,
            'parking_check'                       => $rows->parking_check,
            $plot_labels['dimension_x']           => trim($dimesnion[0]),
            $plot_labels['dimension_y']           => trim($dimesnion[1]),




            $plot_labels['feature_description']       => $rows->feature_description,

            $plot_labels['branch']     => trim($rows->branch->code.' '.$rows->branch->name),

            'feature_charges_into_words' => EF::numberToWords($rows->featurecharges),

            'price_into_words' => EF::numberToWords($rows->rate),


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

        <td>{{$rows->branch->name}}</td>
       <td>{{$rows->block_name}}</td>

                <td>{{EF::showPlotFormat($rows)}}</td>

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

        <td>{{ucfirst($rows->category)}}</td>
        

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



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


        <td>{{EF::numberFormat($rows->rate)}}</td>
        <td>{{$rows->status}}</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','Update Inventory']))

                <a onclick="showUpdatePlotModel(event,'{{Crypt::encrypt($rows->id)}}')" href="#" class="dropdown-item"><i class="dropdown-icon fa fa-edit"></i> Update </a>
                @endif
                    
                @if(Auth::user()->hasAnyPermission(['All','Remove Inventory']) && ($rows->bookings->count() == 0))

               <a  href="{{route('plot.trash',['id' => Crypt::encrypt($rows->id)])}}"  class="dropdown-item cls_delete" content="delete"><i class="dropdown-icon fa fa-trash "></i> Remove </a>
               @endif
                     
                     
                     
                    </div>
                  </div>
               </td>
            </tr>


    @endforeach
@endisset	
