	<style>	
	 /*estilo especifico para el scroll*/
	  .search-table-outter {
	    overflow-x: scroll;
	  }
	  
	  table.feesT{
  			border-collapse: collapse; 
 	  }
 
	 th, td 
	  {
		     border    : 1px solid black;		                   		     
		     min-width : 10% !important;
	  }  		 	      		 
		
	  table.feesT input{
		      border:0px solid #000; 
		      margin:0; 
		      background:transparent;
		      width:100%;
		      text-align: center;
	  }
	  
	  .encabezados{
	  	text-align: center;
	  }
	  
	  .encabezadoTabla{
	  	color: #FFF;
    	background: #CB2C25;
    	font-size: 1.1em;
    	font-weight: 400;
	  }
	  
	  .labelEtiqueta {
		  background-color: #CB2C25;
		  color: white;		  
		  padding: 4px;
		  text-transform: uppercase;
		  font-family: Verdana, Arial, Helvetica, sans-serif;
		  font-size: xx-small;
	  }
	  
	  .filSpan3{
	     rowspan:3;
	  }	
	  
	  .tdPrecio{
		 min-width : 60px !important;    	
	  }  		  		
    </style>

	<div  ng-controller="estController">
				   
			  <div class="container">
				 <div class="form-inline">
					  <div class="form-group col-sm-2" >
					     <br>
					     <label class="labelEtiqueta">Minimo Garantizado</label>		    
					  </div>
					  
					  <div class="form-group col-sm-2">
					     <label class="radio-inline"><input type="radio" value="categoria" ng-model="tipoMinE" ng-click="inicializarDivMinimos()">Por Categoria</label>
					  </div>
					  <div class="form-group col-sm-2">
					     <label class="radio-inline"><input type="radio" value="anio" ng-model="tipoMinE" ng-click="inicializarDivMinimos()">Por Año</label>
					  </div>
					  <div class="form-group col-sm-6" id="divMinCateEst">
					    <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-exportar" data-bs-toggle="tooltip" data-placement="top" title="Exportar a excel"  ng-click="exportarExcel('est', 'min_cat', tablaMinGarEst, tablaMinGarEst.encabezados)" disabled> <i class="fa fa-file-excel-o"></i></button></div>					    
					    
					    <div class="col-sm-3"><button type="button" class="btn btn-primary btn-sm btn-importar" ng-click="abrirModalMinimos()" disabled>Importar Categoría</button></div>
					    
					    <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-agregar" ng-click="abrirModalFechas(0,0,'periodo')" disabled>Agregar Periodo</button></div>
					  </div>
					  <div class="col-sm-1"></div>
					  <div class="form-group col-sm-6" id="divMinAnioEst">
					    <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-exportar" data-bs-toggle="tooltip" data-placement="top" title="Exportar a excel"  ng-click="exportarExcel('est', 'min_anio', tablaMinAnioEst, tablaMinAnioEst.encabezados)" disabled> <i class="fa fa-file-excel-o"></i></button></div>
					    <div class="col-sm-1"></div>
					  	<div class="col-sm-2"><button type="button" class="btn btn-primary btn-sm btn-agregar" ng-click="abrirModalFechas(0,0,'periodo')" disabled>Agregar Periodo</button></div>
					  </div>
				 </div>
			   </div>
			   
			   <br/>
			   <br/>
					
			   <div id="divMinCat" class="search-table-outter wrapper"  >                    				
	           	   
	           	   <table id="tabMinCatEst" class="table table-responsive feesT"  ng-show="tipoMinE == 'categoria'">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla" colspan="{{setColspan(x)}}" ng-repeat="x in tablaMinGarEst.encabezados" ng-click="abrirModalFechas(1,$index)">{{x.valor}}</th>
								<th colspan="1" class="encabezadoTabla">
	                					<i role="button" class="fa fa-plus" ng-click="editarTablaMinGarantizados('addRow')" data-bs-toggle="tooltip" data-placement="top" title="Agregar Filas"></i> 	                					
	                			</th>																	     	                			 	
				    		</tr>
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaMinGarEst.datos">                                                                        
		                        <td ng-repeat="field in datum">
 		                            <input ng-if="$index <= 2 && $parent.$index == 0" type="{{tablaMinGarEst.metadatos[$index].tipo}}" ng-model="field.valor" readonly/>
		                            <input ng-if="$index > 2 && $parent.$index == 0 " type="{{tablaMinGarEst.metadatos[$index].tipo}}" ng-model="field.valor" ng-blur="actualizarMinCelda($parent.$parent.$index, $index, $event)" ng-model-options="{updateOn: 'blur'}"/>
		                            <input ng-if="$parent.$index > 0 " type="{{tablaMinGarEst.metadatos[$index].tipo}}" ng-model="field.valor" ng-blur="actualizarMinCelda($parent.$parent.$index, $index, $event)" ng-model-options="{updateOn: 'blur'}"/>		                                              			
		                  		 </td>                  	
		                  		 <td> 
		                  		    <label> {{tablaMinGarEst.mensajes[$index] }} </label>		                  		     
		                  		    <i ng-if="$index > 0" role="button" class="fa fa-times" ng-click="editarTablaMinGarantizados('removeRow',$index)"></i>
		                  		 </td>		                  		 	
		                    </tr>		                    
	                    </tbody>
	                </table>
	                
	                <table id="tabAnioMinEst" class="table table-responsive feesT" ng-show="tipoMinE == 'anio'">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla" colspan="{{setColspan(x)}}" ng-repeat="x in tablaMinAnioEst.encabezados" ng-click="abrirModalFechas(2,$index)">{{x.valor}}</th>
								<th colspan="1" class="encabezadoTabla">	                					 	                					
	                			</th>																	     	                			 	
				    		</tr>
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaMinAnioEst.datos">                                                                        
		                        <td ng-repeat="field in datum">		                            
		                            <input type="{{tablaMinAnioEst.metadatos[$index].tipo}}" ng-model="field.valor" ng-blur="actualizarMinCelda($parent.$index, $index, $event)" ng-model-options="{updateOn: 'blur'}"/>	                           	                           	                          		                                              			
		                  		 </td>                  	
		                  		 <td> 
		                  		    <label> {{tablaMinAnioEst.mensajes[$index] }} </label> 
		                  		 </td>		                  		 	
		                    </tr>		                    
	                    </tbody>
	                </table>
	           	   	           	   	           	  
	           </div>
	           
			   <br/>
			   <br/>
					
			   <!-- Impuestos -->        					             	   					   
          	   <div id="scrollH" class="search-table-outter wrapper">                    				
	              <table class="table table-responsive feesT">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla"  ng-repeat="x in tablaImpuestosEst.encabezados">{{x.valor}}</th>																									     	                			 	
				    		</tr>
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaImpuestosEst.datos">                                                                        
		                        <td ng-repeat="field in datum">		                            
		                            <input ng-if="field.valor !== 'false' && field.valor !== 'true'"  type="text" ng-model="field.valor" readonly/>
		                            <input ng-if="field.valor === 'false'" type="checkbox" ng-click="actualizarImpCelda($parent.$parent.$index, $index, $event)"        />
		                            <input ng-if="field.valor === 'true'"  type="checkbox" ng-click="actualizarImpCelda($parent.$parent.$index, $index, $event)" checked />	                           	                           	                          		                                              			
		                  		</td>                  			                  		 		                  		 	
		                    </tr>		                    
	                    </tbody>
	                </table>
	           </div>				

			   <br/>
			   <br/>			      			  
			   	   			
			   <div class="container">
				 <div class="form-inline">
					  <div class="form-group col-sm-2"></div>
					  <div class="form-group col-sm-2"></div>		    					  					  
					  <div class="form-group col-sm-2"></div>
					  <div class="form-group col-sm-2"></div>			 
					  <div class="form-group col-sm-1">
					  <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-exportar" data-bs-toggle="tooltip" data-placement="top" title="Exportar a excel" ng-click="exportarExcel('est', 'precio movies', tablaDtoMovies, tablaDtoMovies.encabezados)" disabled> <i class="fa fa-file-excel-o"></i></button></div>
					  </div>					  
					  <div class="form-group col-sm-2" >						    						    
					   	    <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-importar" ng-click="abrirModalPrecioMovies()" disabled>Importar Precio</button></div>
					  </div>
				  </div>					  
			   </div>			   
			   
			   <br/>
			   <br/>
              	   
               <!-- DTO Movies -->	   					   
          	   <div id="scrollH" class="search-table-outter wrapper">                    				
	              <table class="table table-responsive feesT">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla" colspan="2">Precio por Evento DTO Movies</th>
								<th class="encabezados encabezadoTabla" colspan="2"  ng-repeat="x in tablaDtoMovies.encabezados">{{x.valor}}</th>																									     	                			 	
				    		</tr>
				    		<tr>
								<th class="encabezados encabezadoTabla">Categoria</th>
								<th class="encabezados encabezadoTabla">Formato</th>												
								<th class="encabezados encabezadoTabla"  ng-repeat="y in tablaDtoMovies.subEncabezadosPrecio track by $index">{{y}}</th>													     	                			 	
				    		</tr>
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaDtoMovies.datos" >                                                                        		                        		                      		                  		
		                        <td ng-if="$index == 0 && ($parent.$index % 3 == 0)" ng-repeat="field in datum" class="encabezados encabezadoTabla filSpan3">
		                        		{{field.valor}}		                            		                            		                            		                             		                            	                           	                           	                          		                                              
		                  		</td>
		                  		<td ng-if="$index == 0 && ($parent.$index % 3 != 0)" ng-repeat="field in datum" class="encabezados encabezadoTabla">		                        				                            		                            		                            		                             		                            	                           	                           	                          		                                             
		                  		</td>
		                  		<td ng-if="$index == 1" ng-repeat="field in datum" class="encabezados encabezadoTabla">		                            
		                            {{field.valor}}		                            		                             		                            	                           	                           	                          		                                              	
		                  		</td>
		                  		<td ng-if="$index > 1" ng-repeat="field in datum" class="tdPrecio">		                            
		                            <input type="text" ng-model="field.valor" ng-blur="actualizarDtoCelda($parent.$parent.$index, $index, $event, 'movies')" ng-model-options="{updateOn: 'blur'}"/>		                            		                             		                            	                           	                           	                          		                                              	
		                  		</td>		                  		
		                    </tr>	
		                    	                    
	                    </tbody>
	                </table>
	           </div>
	           
	           <br/>
			   <br/>
			   
			   <div class="container">
				 <div class="form-inline">
					  <div class="form-group col-sm-2" >
					     <br>
					     <label class="labelEtiqueta">REVENUE SHARE DTO Movies</label>		    
					  </div>					  
				 </div>
			   </div>
			   
			   <br/>
			   <br/>       
			   
               <!-- Revenue -->			   
          	   <div id="scrollH" class="search-table-outter wrapper">                    				
	              <table class="table table-responsive feesT">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla" >Categoria</th>
								<th class="encabezados encabezadoTabla" >% DLA</th>
								<th class="encabezados encabezadoTabla" >% Estudio</th>																									     	                			 	
				    		</tr>				    		
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaRevenueMovies.datos" >                                                                        		                        		                      		                  		
		                        <td  ng-repeat="field in datum">		                            
		                            <input ng-if="$index == 1" type="text" ng-model="field.valor" ng-blur="actualizarRevenueCelda($parent.$parent.$index, $index, $event, 'movies')" ng-model-options="{updateOn: 'blur'}" />
		                            <input ng-if="$index == 0 || $index == 2" type="text" ng-model="field.valor" readonly />		                            		                             		                            			                                                       	                           	                          		                                              
		                  		</td>		                  				                  		
		                    </tr>	
		                    	                    
	                    </tbody>
	                </table>
	           </div>
	           
	           <br/>
			   <br/>
			   
	           <div class="container">
				 <div class="form-inline">
					  <div class="form-group col-sm-2"></div>
					  <div class="form-group col-sm-2"></div>		    					  					  
					  <div class="form-group col-sm-2"></div>
					  <div class="form-group col-sm-2"></div>			 
					  <div class="form-group col-sm-1">
					  <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-exportar" data-bs-toggle="tooltip" data-placement="top" title="Exportar a excel" ng-click="exportarExcel('est', 'precio series', tablaDtoSeries, tablaDtoSeries.encabezados)" disabled> <i class="fa fa-file-excel-o"></i></button></div>
					  </div>					  
					  <div class="form-group col-sm-2" >						    						    
						    <div class="col-sm-1"><button type="button" class="btn btn-primary btn-sm btn-importar" ng-click="abrirModalPrecioSeries()" disabled>Importar Precio</button></div>
					  </div>
				  </div>					  
			   </div>		
			   
			   <br/>
			   <br/>
              	   
               <!-- DTO Series -->	   					   
          	   <div id="scrollH" class="search-table-outter wrapper">                    				
	              <table class="table table-responsive feesT">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla" colspan="2">Precio por Evento DTO Series</th>
								<th class="encabezados encabezadoTabla" colspan="2"  ng-repeat="x in tablaDtoSeries.encabezados">{{x.valor}}</th>																									     	                			 	
				    		</tr>
				    		<tr>
								<th class="encabezados encabezadoTabla">Categoria</th>
								<th class="encabezados encabezadoTabla">Formato</th>												
								<th class="encabezados encabezadoTabla"  ng-repeat="y in tablaDtoSeries.subEncabezadosPrecio track by $index">{{y}}</th>													     	                			 	
				    		</tr>
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaDtoSeries.datos" >                                                                        		                        		                      		                  		
		                        <td ng-if="$index == 0 && ($parent.$index % 3 == 0)" ng-repeat="field in datum" class="encabezados encabezadoTabla filSpan3">
		                        		{{field.valor}}		                            		                            		                            		                             		                            	                           	                           	                          		                                              
		                  		</td>
		                  		<td ng-if="$index == 0 && ($parent.$index % 3 != 0)" ng-repeat="field in datum" class="encabezados encabezadoTabla">		                        				                            		                            		                            		                             		                            	                           	                           	                          		                                             
		                  		</td>
		                  		<td ng-if="$index == 1" ng-repeat="field in datum" class="encabezados encabezadoTabla">		                            
		                            {{field.valor}}		                            		                             		                            	                           	                           	                          		                                              	
		                  		</td>
		                  		<td ng-if="$index > 1" ng-repeat="field in datum" class="tdPrecio">		                            
		                            <input type="text" ng-model="field.valor" ng-blur="actualizarDtoCelda($parent.$parent.$index, $index, $event, 'series')" ng-model-options="{updateOn: 'blur'}"/>		                            		                             		                            	                           	                           	                          		                                              	
		                  		</td>		                  		
		                    </tr>	
		                    	                    
	                    </tbody>
	                </table>
	           </div>
	           
	           <br/>
			   <br/>
			   
			   <div class="container">
				 <div class="form-inline">
					  <div class="form-group col-sm-2" >
					     <br>
					     <label class="labelEtiqueta">REVENUE SHARE DTO Series</label>		    
					  </div>					  
				 </div>
			   </div>
			   
			   <br/>
			   <br/>       
			   
               <!-- Revenue -->			   
          	   <div id="scrollH" class="search-table-outter wrapper">                    				
	              <table class="table table-responsive feesT" id="tReven">
	                	<thead class="">                		
				      		<tr>
								<th class="encabezados encabezadoTabla" >Categoria</th>
								<th class="encabezados encabezadoTabla" >% DLA</th>
								<th class="encabezados encabezadoTabla" >% Estudio</th>																									     	                			 	
				    		</tr>				    		
				        <thead>
				        <tbody>
		                    <tr ng-repeat="datum in tablaRevenueSeries.datos" >                                                                        		                        		                      		                  		
		                        <td  ng-repeat="field in datum">		                            
		                            <input ng-if="$index == 1" type="text" ng-model="field.valor" ng-blur="actualizarRevenueCelda($parent.$parent.$index, $index, $event, 'series')" ng-model-options="{updateOn: 'blur'}" />
		                            <input ng-if="$index == 0 || $index == 2" type="text" ng-model="field.valor" readonly />		                            		                             		                            			                                                       	                           	                          		                                              
		                  		</td>		                  				                  		
		                    </tr>	
		                    	                    
	                    </tbody>
	                </table>
	           </div>
	           
	           <br/>
			   <br/>
				
			   <div class="container">
				 <div class="form-inline">
					  <div class="form-group col-sm-6"></div>					  
					  <div class="form-group col-sm-3"></div>			 
					  <div class="form-group col-sm-2">
					    <button type="button" class="btn btn-success btn-guardar" ng-click="guardarEst()" disabled>Guardar Est (Venta)</button>
					  </div>
				 </div>
			   </div>
			   
			   <%@include file="/jsp/dda/contrato/transaccion/fees/feesModalesEst.jsp"%>  
    </div>