{% extends '::base.html.twig' %}
{% block title %}Servicio detalle programacion - Soga App{% endblock %}
{% block content %}
    <script>
        $('#myTab a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        })
    </script>
    <div class="container">
        <div class="page-header">
            <h3>Parametros de programacion del servicio</h3>
        </div>
        {{ form_start(form, { 'attr': {'class': 'form-horizontal', 'novalidate': 'novalidate'} }) }}
        {{ form_errors(form) }}

        <!-- Encabezado Movimiento -->
        <div class="panel panel-default">
            <div class="panel-heading">Información del servicio</div>
            <div class="panel-body">
                <table width="100%" class="table table-condensed table-bordered">
                    <tr>
                        <td class="titulo">CODIGO:</td>
                        <td class="td-in-well">{{ arServicioDetalle.codigoServicioDetallePk }}</td>
                        <td class="titulo">PUESTO:</td>
                        <td class="td-in-well">{{ arServicioDetalle.puestoRel.nombre |default('') }}</td>
                    </tr>                
                    <tr>
                        <td class="titulo">CLIENTE:</td>
                        <td class="td-in-well">{{ arServicioDetalle.servicioRel.clienteRel.nombreCorto |default('') }}</td>
                        <td class="titulo">SERVICIO:</td>
                        <td class="td-in-well">{{ arServicioDetalle.conceptoServicioRel.nombre |default('') }}</td>
                    </tr>
                    <tr>
                        <td class="titulo">DESDE:</td>
                        <td class="td-in-well">{{ arServicioDetalle.fechaDesde |date('Y/m/d') }}</td>
                        <td class="titulo">MODALIDAD:</td>
                        <td class="td-in-well">{{ arServicioDetalle.modalidadServicioRel.nombre |default('') }}</td>
                    </tr>                
                    <tr>
                        <td class="titulo">HASTA:</td>
                        <td class="td-in-well">{{ arServicioDetalle.fechaHasta |date('Y/m/d') }}</td>
                        <td class="titulo">PERIODO:</td>
                        <td class="td-in-well">{{ arServicioDetalle.periodoRel.nombre |default('') }}</td>
                    </tr>
                    <tr>
                        <td class="titulo"></td>
                        <td class="td-in-well"></td>
                        <td class="titulo">PLANTILLA:</td>
                        <td class="td-in-well">
                            {{ arServicioDetalle.plantillaRel.nombre |default('') }} 
                            {% if arServicioDetalle.codigoPlantillaFk is not null %} <a href="{{ path('brs_tur_base_plantilla_detalle', { 'codigoPlantilla': arServicioDetalle.codigoPlantillaFk }) }}" target="_blanck">Click para editar</a>{% endif %}
                        </td>

                    </tr>                
                </table>                    
            </div>
        </div>
        <div class="btn-toolbar" style="float:left">
            <div class="btn-group">
                <a class="btn btn-default btn-sm" href="javascript:abrirVentana3('{{ path('brs_tur_utilidad_simular_programacion', {'codigoServicio': arServicio.codigoServicioPk, 'codigoServicioDetalle': arServicioDetalle.codigoServicioDetallePk }) }}', 'SimularProgramacion', 600, 900)" >Simular programacion</a>
            </div>
        </div>
        <br /><br />
        <div class="panel panel-default">
            <div class="panel-heading">Información de la programacion</div>
            <div class="panel-body"> 
                <div class="form-group form-group-sm">
                    <label for="form_fecha" class="col-sm-3 control-label">Fecha inicia secuencia:</label>
                    <div class="col-sm-9">
                        {{ form_widget(form.fechaIniciaPlantilla) }}
                        <p style="font-size: 0.8em;">* Fecha en la que inicia la secuencia de la plantilla (general o especifica)</p> 
                    </div>
                </div>   
                <div class="form-group form-group-sm">
                    <label for="form_plantillaRel" class="col-sm-3 control-label">Plantilla general:</label>
                    <div class="col-sm-9">
                        {{ form_widget(form.plantillaRel, { 'attr': {'class': 'form-control'} }) }}
                        <p style="font-size: 0.8em;">* Plantilla de turnos general, si esta seleccionada prevalece sobre la especifica. {% if arServicioDetalle.codigoPlantillaFk is not null %} <a href="{{ path('brs_tur_base_plantilla_detalle', { 'codigoPlantilla': arServicioDetalle.codigoPlantillaFk }) }}" target="_blanck">Click para editar</a>{% endif %}</p>
                    </div>
                </div>                     
                <div class="form-group form-group-sm">
                    <div class="col-sm-offset-2 col-sm-10">
                        {{ form_widget(form.BtnGuardarServicioDetalle, { 'attr': {'class': 'btn btn-default btn-sm', 'style':'float:right'} }) }}
                    </div>
                </div>                     
                <br />    
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#plantillageneral" data-toggle="tab">Plantilla general</a></li>
                    <li><a href="#plantillaespecifica" data-toggle="tab">Plantilla especifica</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="plantillageneral">
                        <div id="plantillageneral" style="width: 100%"><br>
                            <table class="table table-striped table-bordered table-condensed">
                                <tr>
                                    <th>COD</th>                                
                                    <th style="background-color: #FA5858;">POS</th>
                                    <th>1</th>
                                    <th>2</th>
                                    <th>3</th>
                                    <th>4</th>
                                    <th>5</th>
                                    <th>6</th>
                                    <th>7</th>
                                    <th>8</th>
                                    <th>9</th>
                                    <th>10</th>
                                    <th>11</th>
                                    <th>12</th>
                                    <th>13</th>
                                    <th>14</th>
                                    <th>15</th>
                                    <th>16</th>
                                    <th>17</th>
                                    <th>18</th>
                                    <th>19</th>
                                    <th>20</th>
                                    <th>21</th>
                                    <th>22</th>
                                    <th>23</th>
                                    <th>24</th>
                                    <th>25</th>
                                    <th>26</th>
                                    <th>27</th>
                                    <th>28</th>
                                    <th>29</th>
                                    <th>30</th>
                                    <th>31</th>
                                    <th>LU</th>
                                    <th>MA</th>
                                    <th>MI</th>
                                    <th>JU</th>
                                    <th>VI</th>
                                    <th>SA</th>
                                    <th>DO</th>
                                    <th>DF</th>
                                    <th>FE</th>                
                                </tr>
                                {% for arPlantillaDetalle in arPlantillaDetalle %}
                                    <tr>
                                        <td>{{ arPlantillaDetalle.codigoPlantillaDetallePk  }}</td>                                                        
                                        <td style="background-color: #FA5858;">{{ arPlantillaDetalle.posicion  }}</td>    
                                        <td>{{ arPlantillaDetalle.dia1  }}</td>
                                        <td>{{ arPlantillaDetalle.dia2  }}</td>
                                        <td>{{ arPlantillaDetalle.dia3  }}</td>
                                        <td>{{ arPlantillaDetalle.dia4  }}</td>
                                        <td>{{ arPlantillaDetalle.dia5  }}</td>
                                        <td>{{ arPlantillaDetalle.dia6  }}</td>
                                        <td>{{ arPlantillaDetalle.dia7  }}</td>
                                        <td>{{ arPlantillaDetalle.dia8  }}</td>
                                        <td>{{ arPlantillaDetalle.dia9  }}</td>
                                        <td>{{ arPlantillaDetalle.dia10  }}</td>
                                        <td>{{ arPlantillaDetalle.dia11  }}</td>
                                        <td>{{ arPlantillaDetalle.dia12  }}</td>
                                        <td>{{ arPlantillaDetalle.dia13  }}</td>
                                        <td>{{ arPlantillaDetalle.dia14  }}</td>
                                        <td>{{ arPlantillaDetalle.dia15  }}</td>
                                        <td>{{ arPlantillaDetalle.dia16  }}</td>
                                        <td>{{ arPlantillaDetalle.dia17  }}</td>
                                        <td>{{ arPlantillaDetalle.dia18  }}</td>
                                        <td>{{ arPlantillaDetalle.dia19  }}</td>
                                        <td>{{ arPlantillaDetalle.dia20  }}</td>
                                        <td>{{ arPlantillaDetalle.dia21  }}</td>
                                        <td>{{ arPlantillaDetalle.dia22  }}</td>
                                        <td>{{ arPlantillaDetalle.dia23  }}</td>
                                        <td>{{ arPlantillaDetalle.dia24  }}</td>
                                        <td>{{ arPlantillaDetalle.dia25  }}</td>
                                        <td>{{ arPlantillaDetalle.dia26  }}</td>
                                        <td>{{ arPlantillaDetalle.dia27  }}</td>
                                        <td>{{ arPlantillaDetalle.dia28  }}</td>
                                        <td>{{ arPlantillaDetalle.dia29  }}</td>
                                        <td>{{ arPlantillaDetalle.dia30  }}</td>
                                        <td>{{ arPlantillaDetalle.dia31  }}</td>
                                        <td>{{ arPlantillaDetalle.lunes  }}</td>
                                        <td>{{ arPlantillaDetalle.martes  }}</td>
                                        <td>{{ arPlantillaDetalle.miercoles  }}</td>
                                        <td>{{ arPlantillaDetalle.jueves  }}</td>
                                        <td>{{ arPlantillaDetalle.viernes  }}</td>
                                        <td>{{ arPlantillaDetalle.sabado  }}</td>
                                        <td>{{ arPlantillaDetalle.domingo  }}</td>
                                        <td>{{ arPlantillaDetalle.domingoFestivo  }}</td>
                                        <td>{{ arPlantillaDetalle.festivo  }}</td>                                        
                                    </tr>
                                {% endfor %}
                            </table> 
                        </div>
                    </div>
                    <div class="tab-pane" id="plantillaespecifica">
                        <div id="plantillaespecifica" style="width: 100%"><br>
                            <div class="form-group form-group-sm">
                                <label for="form_TxtDiasSecuencia" class="col-sm-2 control-label">Dias secuencia:</label>
                                <div class="col-sm-10">
                                    {{ form_widget(form.TxtDiasSecuencia, { 'attr': {'class': 'form-control'} }) }}                        
                                </div>                     
                            </div> 
                            <br />
                            <table class="table table-striped table-bordered table-condensed">
                                <tr>
                                    <th>COD</th>                                
                                    <th>POS</th>
                                    <th>1</th>
                                    <th>2</th>
                                    <th>3</th>
                                    <th>4</th>
                                    <th>5</th>
                                    <th>6</th>
                                    <th>7</th>
                                    <th>8</th>
                                    <th>9</th>
                                    <th>10</th>
                                    <th>11</th>
                                    <th>12</th>
                                    <th>13</th>
                                    <th>14</th>
                                    <th>15</th>
                                    <th>16</th>
                                    <th>17</th>
                                    <th>18</th>
                                    <th>19</th>
                                    <th>20</th>
                                    <th>21</th>
                                    <th>22</th>
                                    <th>23</th>
                                    <th>24</th>
                                    <th>25</th>
                                    <th>26</th>
                                    <th>27</th>
                                    <th>28</th>
                                    <th>29</th>
                                    <th>30</th>
                                    <th>31</th>
                                    <th>LU</th>
                                    <th>MA</th>
                                    <th>MI</th>
                                    <th>JU</th>
                                    <th>VI</th>
                                    <th>SA</th>
                                    <th>DO</th>
                                    <th>DF</th>
                                    <th>FE</th>
                                    <th><input type="checkbox" name="ChkSeleccionarTodos" OnClick="ChequearTodos(this);"/></th>
                                </tr>
                                {% for arServicioDetallePlantilla in arServicioDetallePlantilla %}
                                    <tr>
                                        <td>{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk  }}<input type="hidden" name="LblCodigoDetallePlantilla[]" value="{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}"></td>                                        
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtPosicion{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.posicion  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>    
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia1{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia1  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia2{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia2  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia3{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia3  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia4{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia4  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia5{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia5  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia6{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia6  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia7{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia7  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia8{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia8  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia9{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia9  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia10{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia10  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia11{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia11  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia12{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia12  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia13{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia13  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia14{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia14  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia15{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia15  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia16{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia16  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia17{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia17  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia18{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia18  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia19{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia19  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia20{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia20  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia21{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia21  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia22{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia22  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia23{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia23  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia24{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia24  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia25{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia25  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia26{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia26  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia27{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia27  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia28{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia28  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia29{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia29 }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia30{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia30  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDia31{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.dia31  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtLunes{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.lunes  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtMartes{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.martes  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtMiercoles{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.miercoles  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtJueves{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.jueves  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtViernes{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.viernes  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtSabado{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.sabado  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDomingo{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.domingo  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtDomingoFestivo{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.domingoFestivo  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>                                        
                                        <td style="text-align: right"><input class="input-grid" type="text" name="TxtFestivo{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" value="{{ arServicioDetallePlantilla.festivo  }}" size="5" style="width:25px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>
                                        <td><input type="checkbox" name="ChkSeleccionarPlantilla[]" value="{{ arServicioDetallePlantilla.codigoServicioDetallePlantillaPk }}" /></td>
                                    </tr>
                                {% endfor %}
                            </table>   
                            <div class="btn-toolbar" style="float: right">
                                <div class="btn-group">            
                                    {{ form_widget(form.BtnPlantillaNuevo, { 'attr': {'class': 'btn btn-default btn-sm'} }) }}                       
                                </div>
                                <div class="btn-group">
                                    {{ form_widget(form.BtnPlantillaActualizar, { 'attr': {'class': 'btn btn-default btn-sm'} }) }}
                                </div>        
                                <div class="btn-group">
                                    {{ form_widget(form.BtnPlantillaEliminar, { 'attr': {'class': 'btn btn-danger btn-sm'} }) }}
                                </div>  
                            </div>
                        </div>        

                    </div>
                </div>     
                <br />
                <h3>Recursos</h3>
                <table class="table table-striped table-bordered table-condensed">
                    <tr>
                        <th>COD</th>
                        <th>IDENTIFICACION</th>
                        <th>RECURSO</th>
                        <th>TIPO</th>
                        <th style="background-color: #FA5858;">POSICION</th>
                        <th></th>
                    </tr>
                    {% for arServicioDetalleRecursos in arServicioDetalleRecursos %}
                        <tr>
                            <td>{{ arServicioDetalleRecursos.codigoServicioDetalleRecursoPk  }}<input type="hidden" name="LblCodigo[]" value="{{ arServicioDetalleRecursos.codigoServicioDetalleRecursoPk }}"></td>
                            <td>{{ arServicioDetalleRecursos.recursoRel.numeroIdentificacion | default('') }}</td>                     
                            <td>{{ arServicioDetalleRecursos.recursoRel.nombreCorto | default('') }}</td>                     
                            <td>{{ arServicioDetalleRecursos.recursoRel.recursoTipoRel.nombre | default('') }}</td>                     
                            <td style="text-align: right; background-color: #FA5858;"><input class="input-grid" type="text" name="TxtPosicion{{ arServicioDetalleRecursos.codigoServicioDetalleRecursoPk }}" value="{{ arServicioDetalleRecursos.posicion  }}" size="3" style="width:30px" onkeypress="return validarNumeros(event)" onclick="this.select()"/></td>                        
                            <td><input type="checkbox" name="ChkSeleccionar[]" value="{{ arServicioDetalleRecursos.codigoServicioDetalleRecursoPk }}" /></td>
                        </tr>
                    {% endfor %}
                </table> 
                <div class="btn-toolbar" style="float: right">                              
                    <div class="btn-group">
                        <a class="btn btn-default btn-sm" href="javascript:abrirVentana3('{{ path('brs_tur_movimiento_servicio_detalle_recurso_nuevo', {'codigoServicioDetalle': arServicioDetalle.codigoServicioDetallePk }) }}', 'AgregarNuevoDetalle', 600, 1200)">Nuevo</a>                        
                    </div>
                    <div class="btn-group">
                        {{ form_widget(form.BtnDetalleActualizar, { 'attr': {'class': 'btn btn-default btn-sm'} }) }}
                    </div>        
                    <div class="btn-group">
                        {{ form_widget(form.BtnDetalleEliminar, { 'attr': {'class': 'btn btn-danger btn-sm'} }) }}
                    </div>
                </div>                
            </div>
        </div>                    

        {{ form_rest(form) }}
        {{ form_end(form) }}
        <a  class="btn btn-default btn-sm" href="{{ path('brs_tur_movimiento_servicio_detalle', { 'codigoServicio': arServicioDetalle.codigoServicioFk }) }}">Volver</a>

    {% endblock %}
