<?php 
require("conectar.php");
$no=$_POST['no'];
$idcheck=$_POST['idcheck'];

$indice = $_POST['indice'];
$idprop=$_POST['idprop'];
$clave=$_POST['clave'];
$fi=$_POST['fi'];
$ff=$_POST['ff'];
$nomprop=$_POST['nomprop'];
$clv=$_POST['clv'];
$totpagar=$_POST['totpagar'];
$deposito=$_POST['deposito'];
$capacidad=$_POST['capacidad'];
$limite=$_POST['limite'];
$tipotarifa=$_POST['tipotarifa'];
$consecutivo=$_POST['consecutivo'];
$iddep=$_POST['iddep'];
$descripciondepa=$_POST['descripciondepa'];
$totnoche=$_POST['totnoche'];
$totsemana=$_POST['totsemana'];
$totmes=$_POST['totmes'];
$taanual=$_POST['taanual'];
$clavesistema=$_POST['clavesistema'];
$carpeta=$_POST['carpeta'];

$limpcost=$_POST['limpcost'];
$frec=$_POST['frec'];
$periodolim=$_POST['periodolim'];
$limpieza=$_POST['limpieza'];
$blancost=$_POST['blancost'];
$mesesblan=$_POST['mesesblan'];

$anios=$_POST['anios'];
$meses=$_POST['meses'];
$semred=$_POST['semred'];
$restodias=$_POST['restodias'];
$descing=$_POST['descing'];
$nodepto=$_POST['nodepto'];
$agencia=$_POST['agencia'];
$tc=$_POST['tc'];
$tipocomp=$_POST['tipocomp'];
$v1=$_POST['v1'];
$estmtost=$_POST['estmtost'];
$camaexstatus=$_POST['camaexstatus'];
$cunastatus=$_POST['cunastatus'];
$mascotastatus=$_POST['mascotastatus'];
$nopersonas=$_POST['nopersonas'];
$mtoper_extra=$_POST['mtoper_extra'];
$descuento=$_POST['descuento'];

include('tarifasextras.php');



if($tipocomp =="FACTURA"){
	$totpagar = $totpagar * $tc;
	$deposito = $deposito * $tc;
	
	$personaextN = $personaextN * $tc;
	$personaextS = $personaextS * $tc;
	$personaextM = $personaextM * $tc;
	
	$estacionamientoN = $estacionamientoN * $tc;
	$estacionamientoS = $estacionamientoS * $tc;
	$estacionamientoM = $estacionamientoM * $tc;
	
	$cama_extraN = $cama_extraN * $tc;
	$cama_extraS = $cama_extraS * $tc;
	$cama_extraM = $cama_extraM * $tc;
	
	$mascotaN = $mascotaN * $tc;
	$mascotaS = $mascotaS * $tc;
	$mascotaM = $mascotaM * $tc;	
	
	$cunaN = $cunaN * $tc;
	
	$limpiezaN = $limpiezaN * $tc;
	
	$blancosN = $blancosN * $tc;
	
	$IVA = $totpagar * .16;
	$ISH = $totpagar * .03;
	$oculto = "";
}else{
	$totpagar = $totpagar;
	$deposito = $deposito;
	
	$personaextN = $personaextN;
	$personaextS = $personaextS;
	$personaextM = $personaextM;
	
	$estacionamientoN = $estacionamientoN;
	$estacionamientoS = $estacionamientoS;
	$estacionamientoM = $estacionamientoM;
	
	$cama_extraN = $cama_extraN;
	$cama_extraS = $cama_extraS;
	$cama_extraM = $cama_extraM;
	
	$mascotaN = $mascotaN;
	$mascotaS = $mascotaS;
	$mascotaM = $mascotaM;	
	
	$cunaN = $cunaN;
	
	$limpiezaN = $limpiezaN;
	
	$blancosN = $blancosN;
			
	$IVA = 0;
	$ISH = 0;
	$oculto = "none";
}

if(!$periodolim)
		 {
			if(($meses>0||$anios>0)){$frec=4;$periodolim=1;$limpieza=1;$mesesblan=1;}
			else{$frec=4;$periodolim=1;$limpieza=0;$mesesblan=0;}
		 }
if($v1 == "mod"){
	$nomtabla=$tipotarifa.$clave.$consecutivo;
}else{
	$nomtabla=$tipotarifa.$clave;
}		 
//para extras
$estmtost == "true" ? $chkest = "checked" : $chkest = "";
$cunastatus == "true" ? $chkcun = "checked" : $chkcun = "";
$mascotastatus == "true" ? $chkmas = "checked" : $chkmas = "";
$camaexstatus > 0 ? $cuantascamas = $camaexstatus : $cuantascamas = "";
$nopersonas > 0 ? $cuantaspersonas = $nopersonas : $cuantaspersonas = "";

?>		 
<style>table, th, td {
   padding:0px !important;
}</style>
<table id="<?php echo $nomtabla;?>" name="<?php echo $no;?>"  class="table" style="font-size:11px !important;padding:0px !important;">
 <tr>

  <input type="hidden" name="comples[]" id="comples<?php echo $no;?>" value="<?php echo $idprop;?>">
  <input type="hidden" name="depars[]" id="depars<?php echo $no;?>" value="<?php echo $clave;?>">
  <input type="hidden" name="nov[]" id="nov<?php echo $no;?>" value="1">
  <input type="hidden" name="idd[]" id="idd<?php echo $no;?>" value="<?php echo $iddep;?>">
  <input type="hidden" name="desc[]" id="desc<?php echo $no;?>" value="<?php echo $descripciondepa;?>">
  <input type="hidden" name="comp[]" id="comp<?php echo $no;?>" value="<?php echo $idprop;?>">
  <input type="hidden" name="inc[]" id="inc<?php echo $no;?>" value="<?php echo $no;?>">
  <input type="hidden" name="tarifa[]" id="tarifa<?php echo $no;?>" value="<?php echo $tipotarifa;?>">
  <input type="hidden" name="noanios[]" id="noanios<?php echo $no;?>" value="<?php echo $anios;?>">
  <input type="hidden" name="nomeses[]" id="nomeses<?php echo $no;?>" value="<?php echo $meses;?>">
  <input type="hidden" name="nosem[]" id="nosem<?php echo $no;?>" value="<?php echo $semred;?>">
  <input type="hidden" name="nodias[]" id="nodias<?php echo $no;?>" value="<?php echo $restodias;?>">
  <input type="hidden" name="totnoche[]" id="totnoche<?php echo $no;?>" value="<?php echo $totnoche;?>">
  <input type="hidden" name="totsem[]" id="totsem<?php echo $no;?>" value="<?php echo $totsemana;?>">
  <input type="hidden" name="totmes[]" id="totmes<?php echo $no;?>" value="<?php echo $totmes;?>">  
  <input type="hidden" name="totanos[]" id="totanos<?php echo $no;?>" value="<?php echo $taanual;?>">
  <input type="hidden" name="clavesis[]" id="clavesis<?php echo $no;?>" value="<?php echo $clavesistema;?>">
  <input type="hidden" name="descing[]" id="descing<?php echo $no;?>" value="<?php echo $descing;?>">
  <input type="hidden" name="nodepto[]" id="nodepto<?php echo $no;?>" value="<?php echo $nodepto;?>">
  <input type="hidden" name="tc[]" id="tc<?php echo $no;?>" value="<?php echo $tc;?>">
 
</tr>
  <tr>
     <td colspan="3">
	  <a href="solicitadescuento.php?idn=<?php echo $no;?>" target="popup" onClick="window.open(this.href, this.target, 'width=500,height=600,top=120,left=110'); return false;">Solicita descuento</a>
	 <!--input type='button' value='Solicitar Descuento' name='soldesc<?php echo $no; ?>' id='soldesc<?php echo $no; ?>' onclick='soldesc("<?php echo $no; ?>")'-->
	 </td>
	 <td colspan="4" align="right"><b>Vista previa (correo) <input type='checkbox' name='mailsi[]' id='mailsi<?php echo $no; ?>' checked='checked' onclick="javascript:if(document.getElementById('mailsi<?php echo $no;?>').checked){document.getElementById('mailsi<?php echo $no;?>').value='si';}else{document.getElementById('mailsi<?php echo $no;?>').value='no';}" value="si"></b></td>
  </tr>
  <tr>
     <td colspan="2">Periodo</td>  
     <td colspan="2">Propiedad</td>  
     <td>Clave</td>  
     <td>Hospedaje</td>  
     <td>T.C</td>  
  </tr>
  <tr>
     <td colspan="2">
		<input type="text" style="border:none;text-align:right" name="fini[]" id="fini<?php echo $no;?>" value="<?php echo $fi;?>" readonly> - <input type="text" style="border:none;" name="ffin[]" id="ffin<?php echo $no;?>" value="<?php echo $ff;?>">
	 </td>  
     <td colspan="2">
	    <input type="text" style="border:none;text-align:center" name="deparprop[]" id="deparprop<?php echo $no;?>" value="<?php echo $nomprop;?>" readonly>
	 </td>  
     <td>
	    <input type="text" style="border:none;text-align:center" name="clavedep[]" id="clavedep<?php echo $no;?>" value="<?php echo $clv;?>" readonly>
	 </td>  
     <td>
	    <input type="text" style="border:none;text-align:center" name="monto[]" id="monto<?php echo $no;?>" value="<?php echo $totpagar;?>" readonly>
	 </td>  
     <td>
	    <input type="text" style="border:none;text-align:center" name="divisa[]" id="dolar<?php echo $no;?>" value="<?php echo $tc;?>" readonly>
	 </td>  
  </tr>
  <tr>
     <td>Estacionamiento</td>  
     <td>Cama extra</td>  
     <td>Cuna</td>  
     <td>Mascota</td>  
     <td>No.Personas</td>  
     <td>Descuento</td>  
     <td>Garantía</td>  
  </tr>
  <tr>
     <input type="hidden" name="motivodesc[]" id="motivodesc<?php echo $no;?>" value="">
     <input type="hidden" name="autorizadesc[]" id="autorizadesc<?php echo $no;?>" value="">
     <input type="hidden" name="descsol[]" id="descsol<?php echo $no;?>" value="">
     <input type="hidden" name="solicitud[]" id="solicitud<?php echo $no;?>" value="0">

     <td>
	     <input type="hidden" value="<?php echo $indice;?>" name="indice<?php echo $no;?>" id="indice<?php echo $no;?>">
	     <input type="checkbox" name="estmnto[]" id="estmnto<?php echo $no;?>" value="n" <?php echo $chkest;?> onclick="javascript:if(!this.checked){calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');this.value='n'}else{calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');this.value='s'}">
	 </td>  
     <td><input type="text" name="camaex[]" id="camaex<?php echo $no;?>" value="<?php echo $cuantascamas;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeyup="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');")></td>  
     <td><input type="checkbox" name="cuna[]" id="cuna<?php echo $no;?>" value="n" <?php echo $chkcun;?> onclick="javascript:if(!this.checked){calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');this.value='n'}else{calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');this.value='s'}"></td>  
     <td><input type="checkbox" name="mascota[]" id="mascota<?php echo $no;?>" value="n" <?php echo $chkmas;?> onclick="javascript:if(!this.checked){calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');this.value='n'}else{calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');this.value='s'}"></td>
	 
     <td><input type="text" name="npers[]" id="npers<?php echo $no;?>" value="<?php echo $nopersonas;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeyup="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');"></td>  
	 
	 
     <td><input type="text" name="descuento[]" id="descuento<?php echo $no;?>" value="<?php echo $descuento;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeyup="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');" readonly></td>  
     <td><input type="text" name="deposito[]" id="deposito<?php echo $no;?>" value="<?php echo number_format($deposito, 2, '.', '');?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" style="border:none;text-align:right" readonly></td> 
  </tr>
  <tr id="huespedes<?php echo  $no;?>" style="display:none">
     <td></td>
     <td></td>
     <td></td>
     <td></td>
     <td>
	     
			<table id="tab<?php echo $no;?>" style="display:none">
			   <tr>
			     <td>Apellido Paterno</td> 
			     <td>Apellido Materno</td> 
				 <td>Nombre</td>
				 <td><a href="javascript:crear('',<?php echo $no;?>)" onmouseover="javascript:altbtn(event,'Agregar huesped');" onmouseout="javascript:cierrate('altboton');">Crear</a></td>
			   </tr>
            </table>			   
		 
	 </td>
     <td></td>
  </tr>
   <tr>
     <td>Tot. Estacionamiento</td>  
     <td>Tot. Cama extra</td>  
     <td>Tot. Cuna</td>  
     <td>Tot. Mascota</td>  
     <td>Persona Extra</td>  
     <td></td>  
     <td></td>  
  </tr>   
  <tr>
     <td><input type="text" name="estmnto2[]" id="estmnto2<?php echo $no;?>" value="0.00" style="border:none;text-align:right" readonly></td>  
     <td><input type="text" name="camaex2[]" id="camaex2<?php echo $no;?>" value="0.00" style="border:none;text-align:right" readonly></td>  
     <td><input type="text" name="cuna2[]" id="cuna2<?php echo $no;?>" value="0.00" style="border:none;text-align:right" readonly></td>  
     <td><input type="text" name="mascota2[]" id="mascota2<?php echo $no;?>" value="0.00" style="border:none;text-align:right" readonly></td>  
     <td><input type="text" name="persext[]" id="persext<?php echo $no;?>" value="0.00" style="border:none;text-align:right" readonly></td>
     <td></td>  
     <td></td>  
  </tr>
   <tr>
     <td>Meses de limpieza</td>  
     <td>Periodo</td>  
     <td>Frecuencia</td>  
     <td>Costo Limpiezas</td>  
     <td></td>  
     <td></td>  
     <td></td>  
  </tr>   
  <tr>
      <?php 
	    if($meses >= 1){
			$limpcost = $limpiezaN * 4;
			$blancost = $blancosN;
			$totpagar = $totpagar + $limpcost + $blancost;
		}else{
			$totpagar = $totpagar;
		}
        if($periodolim==4){$chk ="checked";}else{$chk1 ="checked";}	
		
		if($tipocomp =="FACTURA"){
		    $IVA = $totpagar * .16;
		}
        ?>
     <td><input type="text" name="limpiezas[]" id="limpiezas<?php echo $no;?>" value="<?php echo $limpieza;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeyup="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');"></td>  
     <td><input type="hidden" name="periodolim[]" id="periodolim<?php echo $no;?>" value="<?php echo $periodolim;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onclick="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');">
	 
	 Sem: <input type="radio" name="opcionper<?php echo $no;?>[]" id="opcionpersem<?php echo $no;?>" value="4" onclick="javascript:document.getElementById('periodolim<?php echo $no?>').value=this.value;calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');" <?php echo $chk;?>>
	 <?php
	 //if($periodolim<4){$chk ="checked";}	
     ?>
	 Mes: <input type="radio" name="opcionper<?php echo $no;?>[]" id="opcionpermes<?php echo $no;?>" value="1" onclick="javascript:document.getElementById('periodolim<?php echo $no?>').value=this.value;calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');" <?php echo $chk1;?>></td>  
     <td> 
		<input type="text" name="frecuencia[]" id="frecuencia<?php echo $no;?>" value="<?php echo $frec;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeyup="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');"></td>  
     <td><input type="text" name="limpcost[]" id="limpcost<?php echo $no;?>" value="<?php echo $limpcost;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" readonly></td>  
     <td></td>  
  </tr> 
  <tr>
     <td></td>
     <td></td>
     <td>Meses de blancos</td>
     <td>Costo Blancos</td>
     <td></td>
     <td></td>
     <td></td>
  </tr>  
  <tr>
     <td></td>
     <td></td>
     <td><input type="text" name="blancos[]" id="blancos<?php echo $no;?>" value="<?php echo $mesesblan;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" onkeyup="javascript:calculamontos(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');"></td>
     <td><input type="text" name="blancost[]" id="blancost<?php echo $no;?>" value="<?php echo $blancost;?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" readonly></td>
     <td></td>
     <td align="right">SUBTOTAL</td>
     <td><input type="text" name="subtotal[]" id="subtotal<?php echo $no;?>" value="<?php echo number_format($totpagar, 2, '.', '');?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" readonly style="border:none;text-align:right"></td>
  </tr>
  <tr style="display:<?php echo $oculto;?>;" id="triva<?php echo $no?>">
     <td></td>
     <td></td>
     <td></td>
     <td></td>
     <td></td>
     <td align="right">IVA</td>
     <td><input type="text" name="iva[]" id="iva<?php echo $no;?>" value="<?php echo number_format((float)$IVA, 2, '.', '');?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" readonly style="border:none;text-align:right"></td>
  </tr>
  <tr style="display:<?php echo $oculto;?>;" id="trish<?php echo $no?>">
     <td></td>
     <td></td>
     <td></td>
     <td></td>
     <td></td>
     <td align="right">ISH</td>
     <td><input type="text" name="ish[]" id="ish<?php echo $no;?>" value="<?php echo number_format((float)$ISH, 2, '.', ''); ?>" onkeypress="javascript:if (event.keyCode < 45 || event.keyCode > 57){ event.returnValue=false;};" readonly style="border:none;text-align:right"></td>
  </tr>
  <tr>
  <td>Capacidad: <input type="text" name="cap[]" id="cap<?php echo $no;?>" value="<?php echo $capacidad;?>" readonly style="border:none;text-align:right"></td>
  <td>Límite: <input type="text" name="lim[]" id="lim<?php echo $no;?>" value="<?php echo $limite;?>" readonly style="border:none;text-align:right"></td>
     <td></td>
     <td></td>
     <td></td>
     <td align="right">TOTAL</td>
	 <?php 
	   //echo $deposito."--".$totpagar;
	 $totpagar = number_format((float)($deposito + $ISH + $IVA + $totpagar), 2, '.', '');
	         
	 ?>
     <td><input type="text" name="total[]" id="total<?php echo $no;?>" value="<?php echo $totpagar;?>" readonly style="border:none;text-align:right"></td>
	 
	 <input type="hidden" name="cont[]" id="cont<?php echo $no;?>" value="1" readonly>
	 <input type="hidden" name="ant[]" id="ant<?php echo $no;?>" value="0" readonly>
	 <input type="hidden" name="ant2[]" id="ant2<?php echo $no;?>" value="<?php echo $deposito;?>" readonly>
	 <input type="hidden" name="x[]" id="x<?php echo $no;?>" value="1" readonly>
  </tr>
  <tr>
   <td colspan="7"><hr style="border-top: 1px solid #8c8b8b;"></td>
  </tr>
</table>
<?php if($v1 == "mod"){ ?>
<script> 
	calculamontosmod(<?php echo $no ?>,<?php echo $personaextN;?>,<?php echo $personaextS;?>,<?php echo $personaextM;?>,<?php echo $estacionamientoN;?>,<?php echo $estacionamientoS;?>,<?php echo $estacionamientoM;?>,<?php echo $cama_extraN;?>,<?php echo $cama_extraS;?>,<?php echo $cama_extraM;?>,<?php echo $mascotaN;?>,<?php echo $mascotaS;?>,<?php echo $mascotaM;?>,<?php echo $cunaN;?>,<?php echo $limpiezaN;?>,<?php echo $blancosN;?>,'<?php echo $tipocomp;?>');	   
</script>
<?php } ?>    
	
