@extends('layoutx')
@section('title', 'Ver detalles')
@section('content')
<div class="col-sm-12 col-md-10 col-lg-10 col-xl-10">
    <div class="form-group row sin-salto">
        <div class="col-sm-2 col-md-2 col-lg-1 col-xl-1">
            <a class="btn-sm btn-primary cursor" href="{{ route('ListarResolucion') }}" title="Volver"><i class="fa fa-arrow-left"></i></a>
        </div>
        <div class="col-sm-9 col-md-9 col-lg-10 col-xl-10">
            <h6 class="text-center marca-pagina">{{ "Resolución: ".$dd->numero}}</h6>
        </div>
    </div>
    <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
        <table class="table table-striped table-condensed table-bordered" id="table" data-toggle="dataTable" data-form="deleteForm">
            <thead>
                <tr>

                    <th rowspan="2" class="text-center align-middle">ESTADO</th>
                    <th rowspan="2" class="text-center align-middle">NRO PREDIO</th>
                    <th colspan="3" class="text-center">PROPIETARIO</th>
                    <th class="text-center">E-C</th>
                    <th class="text-center" colspan="3">AREA</th>
                    <th colspan="2" class="text-center">CATASTRO</th>
                </tr>
                <tr>
                    <th class="text-center align-middle" rowspan="2">PROP</th>
                    <th class="text-center">NOMBRES</th>
                    <th class="text-center">DIRECCION O VEREDA</th>
                    <th class="text-center align-middle">DES</th>
                    <th class="text-center align-middle">HECT</th>
                    <th class="text-center align-middle">MET2</th>
                    <th class="text-center align-middle">A-CONS</th>
                    <th class="text-center align-middle">AVALUO</th>
                    <th class="text-center align-middle">VIGENCIA</th>
                </tr>
            </thead>
            <tbody>
                @foreach($data as $row)
                   <tr>
                        <td class="text-left">{{ $row->estado }}</td>
                        <td class="text-right">{{ $row->codigo_catastral }}</td>
                        <td class="text-right">{{ $row->orden_propietario }}</td>
                        <td class="text-left">{{ $row->nombre_propietario }}</td>
                        <td class="text-left">{{ $row->direccion }}</td>
                        <td class="text-left">{{ $row->des }}</td>
                        <td>
                            @if(!empty($row->ec))
                                {{ $row->ec }}
                            @else
                                {{ $row->hectarea }}
                            @endif
                        </td>
                        <td class="text-right">{{ $row->metros_c }}</td>
                        <td class="text-right">{{ $row->area_cons }}</td>
                        <td class="text-right">
                            {{ !empty($row->avaluo)?number_format($row->avaluo, 0, ',', '.'):"" }}
                        </td>
                        <td class="text-right">{{ $row->vigencia }}</td>
                   </tr>
                @endforeach
            </tbody>
        </table>
    </div>
    <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 text-right superior">
        <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
            <form action="{{ route("SaveDetailsResInfo") }}" method="post" accept-charset="utf-8">
                {{ csrf_field() }}
                <input type="hidden" name="txtResolucion" value="{{ encrypt($dd->id_unico) }}">
                <button type="submit" class="btn btn-primary fa fa-play sombra" title="Cargar resolución"></button>
            </form>
        </div>
    </div>
</div>
@stop