<?php

header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=Reporte_Condicion_Pago.xls");

 include ("../conexion.php");	

       $parametros = "SELECT * FROM web_0000 ";
       $result_parametros = $mysqli->query($parametros);
       $row_para = $result_parametros->fetch_array();
     
	   $NombreComercial =  $row_para["NOMCOM"];
	   $Razon           =  $row_para["RAZSOC"];
	   $Direccion       =  $row_para["DIREMP"];
	   $Cedula          =  $row_para["CEDJUR"];
	   $Telefono        =  $row_para["NUMTEL"];
	   $reb_imp_ser     =  $row_para["reb_imp_ser"];
	   
  

 
		$cdgcaj      =$_GET["cdgcaj"];
		//$cdgtipven   =$_GET["combotipoventa"];
		$fecini    = $_GET["fechainicio"];
		$fecfin    = $_GET["fechafin"];
		//$mediopago    =$_GET["combotipopago"];

	 
	 
	$exento_tot    = 0;
	$gravado_tot   = 0;
	$subtotal_tot  = 0;
	$descuento_tot = 0;
	$impuesto_tot  = 0;
	$total_tot     = 0;
    $where_notas   = "";
    $where         = "";
	$exento_fac    = 0;
	$gravado_fac   = 0;
	$subtotal_fac  = 0;
	$descuento_fac = 0;
	$impuesto_fac  = 0;
	$total_fac     = 0;	 
	$exento        = 0  ;
	$gravado       = 0 ;
	$subtotal      = 0 ;
	$descuento     = 0  ;
	$impuesto      = 0 ;
	$total         = 0  ;
	
 $fechainicio= implode("-", array_reverse(explode("-", $fecini))); 
 $fechafin= implode("-", array_reverse(explode("-", $fecfin))); 


$where  = "";

if ($cdgcaj <> "") { $where.=" AND cdgcaj='$cdgcaj'"; }
/*
if (($fechainicio<>"") and ($fechafin<>"")) {
	 $where.=" AND feccie between '".$fechainicio."' AND '".$fechafin."'";
} else {
	if ($fechainicio<>"") {
	 	$where.=" AND feccie>='".$fechainicio."'";
	} else {
		if ($fechafin<>"") {
		$where.=" AND feccie<='".$fechafin."'";
		}
	}
}
*/


$where.=" ORDER BY feccie DESC";

 if ($cdgcaj=="") {
	 
	 $nomcomusu="TODOS LOS CAJEROS";
	 
	     } else {


	   $query_codcaj="SELECT * FROM usuarios  WHERE codusu=$cdgcaj ";
       $resultado = $mysqli->query( $query_codcaj);
       $row = $resultado->fetch_array();
        
		$nomcomusu    = $row["nomcomusu"];
     }
					
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Reporte Modo de Pagos </title>
<style type="text/css">
<!--
.Estilo1 {color: #CCCCCC}
.Estilo4 {font-size: medium}
.Estilo6 {
	color: #000000;
	font-weight: bold;
}
.Estilo17 {color: #000000; font-weight: bold; font-size: 14px; }
-->
</style>
</head>
<body>
<table width="92%" border="0" cellspacing="0" cellpadding="0">
    
    <tr>
      <td><div align="center"></div></td>
      <td colspan="11"  ><div align="center"><font size=8 ><?php echo $NombreComercial?></font></div>
      <div align="center"></div><div align="center"></div></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="11" ><div align="center"><font size="3" ><?php echo $Razon?></font></div></td>
    </tr>
    <tr>
      <td><div align="center"></div></td>
      <td colspan="11" ><div align="center"><font size="2" ><?php echo $Cedula; ?></font></div></td>
    </tr>
    <tr>
      <td><div align="center"></div></td>
      <td colspan="11" ><div align="center"><font size="2" ><?php echo $Direccion; ?></font></div></td>
    </tr>
    <tr>
      <td><div align="center"></div></td>
      <td colspan="11" ><div align="center"><font size="2" ><?php echo $Telefono; ?></font></div></td>
    </tr>
    <tr>
      <td><span class="Estilo1"></span></td>
      <td colspan="11" ><span class="Estilo1"></span></td>
    </tr>
  <tr>
     <td></td>
 <td colspan="11"  bgcolor="skyblue"><div align="center"><strong><font size="3" >Reporte de cierres</font>  </div></td>
  </tr>
     
     <tr>
       <td></td>
       <td colspan="11"   border="1"><div align="center"><font size="3" >Fecha del <?php echo $fecini; ?> Al <?php echo $fecfin; ?> -  <?php echo $nomcomusu; ?></font></div></td>
     </tr>

  <tr>
       <td></td>
       <td colspan="11"   border="1"><div align="center"><font size="3" > <?php  //  echo $nomcomusu; ?></font></div></td>
     </tr>


  <tr>
	 
  <tr>
      <td width="1%"></td>

	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CIERRE</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>FECHA INICIAL</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>FECHA FINAL</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CAJERO </strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>APERTURA</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>TOTAL SISTEMA</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>TOTAL DIGITADO</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>EFECTIVO</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CHEQUES</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>VOUCHERS</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DOLARES</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DEPOSITOS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>OTROS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DIFERENCIA</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>FACTURAS CONTADO</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>FACTURAS CREDITO</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>RECIBOS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>NOTAS DE CREDITO</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>NOTAS DE DEBITOS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>VALES 	 COMPRAS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>ENTRADAS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>SALIDAS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>ADELANTOS</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>IMPUESTO. SERVI</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CINCUENTAMIL </strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>VEINTEMIL</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DIEZ MIL</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CINCOMIL</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DOSMIL</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>MIL</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>QUINIENTOS</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CIEN</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CINCUENTA</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>VEINTICINCO</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DIEZ</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>CINCO</strong></font></span></td> 
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>TIPO DE CAMBIO</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>DOLARES</strong></font></span></td>
	<td width="20%"  align="center"bgcolor="skyblue" ><span class="Estilo4"><strong>HORA CIERRE</strong></font></span></td>

		
		<td width="20%" align="center" ><span class="Estilo4"><strong></strong></font></span></td>
	
   
  </tr>
  
<?PHP
			  

  $submonapecaj =0;
  $submonsis =0;
  $submondig =0;
  $submonefe =0;
  $submoncks =0;
  $submonvou =0;
  $submondol =0;
  $submonval  =0;
  $submonotr =0;
  $submondif =0;

  $subtotfac =0;
  $subtotcre =0;
  $subtotrec =0;
  $subtotnotcre =0;
  $subtotnotdeb =0;
  $subtotval=0;
  $subtotcom =0;
  $subtotent =0;
  $subtotsal =0;
  $subtotade =0;
  $subtotimpser=0;

  $subcincuentamil =0;
  $subveintemil =0;
  $subdiezmil =0;
  $subcincomil =0;
  $subdosmil =0;
  $submil =0;
  $subquinientos =0;
  $subcien =0;
  $subcincuenta=0; 
  $subveinticinco =0;
  $subdiez =0;
  $subcinco =0;
  
 

	    $consulta= "SELECT * FROM cierres WHERE  feccie  between '$fechainicio' AND '$fechafin'   ".$where;


if ($resultado = $mysqli->query($consulta)) 

    while ($fila = $resultado->fetch_assoc()) {

  $numcie = $fila["numcie"];
  $feccie = $fila["feccie"];
  $feccie         = implode("-", array_reverse(explode("-", $feccie)));
  $fecfin = $fila["fecfin"];
  $fecfin         = implode("-", array_reverse(explode("-", $fecfin)));
  $cdgcaj = $fila["cdgcaj"];
  $monapecaj = $fila["monapecaj"];
  $monsis = $fila["monsis"];
  $mondig = $fila["mondig"];
  $monefe = $fila["monefe"];
  $moncks = $fila["moncks"];
  $monvou = $fila["monvou"];
  $mondol = $fila["mondol"];
  $monval = $fila["monval"];
  $monotr = $fila["monotr"];
  $mondif = $fila["mondif"];
  $estcie = $fila["estcie"];
  $totfac = $fila["totfac"];
  $totcre = $fila["totcre"];
  $totrec = $fila["totrec"];
  $totnotcre = $fila["totnotcre"];
  $totnotdeb = $fila["totnotdeb"];
  $totval = $fila["totval"];
  $totcom = $fila["totcom"];
  $totent = $fila["totent"];
  $totsal = $fila["totsal"];
  $totade = $fila["totade"];
  $totimpser = $fila["totimpser"];
  
  $cincuentamil = $fila["cincuentamil"];
  $veintemil = $fila["veintemil"];
  $diezmil = $fila["diezmil"];
  $cincomil = $fila["cincomil"];
  $dosmil = $fila["dosmil"];
  $mil = $fila["mil"];
  $quinientos = $fila["quinientos"];
  $cien = $fila["cien"];
  $cincuenta = $fila["cincuenta"];
  $veinticinco = $fila["veinticinco"];
  $diez = $fila["diez"];
  $cinco = $fila["cinco"];
  $tipcamdol = $fila["tipcamdol"];
  $candol = $fila["candol"];
  $horape = $fila["horape"];
  $horcie = $fila["horcie"];
  
  	/***************REBAJO EL IMPUESTO DE SERVICIO************************************/
		if ($reb_imp_ser==1){
		
			$monsis=$monsis-$totimpser;
		}
		
		else {
			$monsis=$monsis;
		}
		
		
  
  $submonapecaj =$monapecaj + $submonapecaj;
  $submonsis =$monsis + $submonsis ;
  $submondig =$mondig +  $submondig ;
  $submonefe =$monefe + $submonefe ;
  $submoncks =$moncks + $submoncks  ;
  $submonvou =$monvou + $submonvou ;
  $submondol =$mondol +  $submondol ;
  $submonval  =$monval + $submonval ;
  $submonotr =$monotr + $submonotr ;
  $submondif =$mondif +$submondif  ;

  $subtotfac =$totfac + $subtotfac;
  $subtotcre =$totcre + $subtotcre;
  $subtotrec =$totrec + $subtotrec;
  $subtotnotcre =$totnotcre + $subtotnotcre ;
  $subtotnotdeb =$totnotdeb +  $subtotnotdeb ;
  $subtotval=$totval + $subtotval;
 $subtotcom =$totcom + $subtotcom;
  $subtotent =$totent + $subtotent ;
  $subtotsal =$totsal + $subtotsal ;
  $subtotade =$totade + $subtotade;
  
  $subtotimpser=$totimpser + $subtotimpser;

  $subcincuentamil =$cincuentamil + $subcincuentamil  ;
  $subveintemil =$veintemil + $subveintemil ;
  $subdiezmil =$diezmil + $subdiezmil ;
  $subcincomil =$cincomil + $subcincomil;
  $subdosmil =$dosmil + $subdosmil;
  $submil =$mil + $submil ;
  $subquinientos =$quinientos  + $subquinientos;
  $subcien =$cien  + $subcien ;
  $subcincuenta=$cincuenta + $subcincuenta; 
  $subveinticinco =$veinticinco  + $subveinticinco;
  $subdiez =$diez  + $subdiez;
  $subcinco =$cinco + $subcinco;
  
		$consulta2 = "SELECT * FROM usuarios WHERE codusu='$cdgcaj'";
		$resultado2 = $mysqli->query($consulta2);
		$row = $resultado2->fetch_array();
		$filas_cajero =$resultado2->num_rows;

if ($filas_cajero > 0) { 
$nomcomusu = $row["nomcomusu"]; }else { $nomcomusu  = "DESCONOCIDO"; }

?>  

 <tr>
   <td></td>
   <td align="left"><font size=1 ><?php echo "#".$numcie?></font></td>
   <td align="center"><font size=1 ><?php echo $feccie?></font></td>
   <td align="left"><font size=1 ><?php echo $fecfin?></font></td>
   <td align="center"><font size=1 ><?php echo $nomcomusu?></font></td>
   <td align="center"><font size=1 ><?php echo number_format($monapecaj,2,".",",")?></font></td>
   <td align="right"><font size=1 ><?php echo number_format($monsis,2,".",",")?></font></td>
   <td align="right"><font size=1 ><?php echo number_format($mondig,2,".",",") ?></font></td>
   <td align="right"><font size=1 ><?php echo  number_format($monefe,2,".",",") ?></font></td>
   <td align="right"><font size=1 ><?php echo number_format($moncks,2,".",",")?></font></td>
  <td align="right"><font size=1 ><?php echo number_format($monvou,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($mondol,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($monval,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($monotr,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($mondif,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totfac,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totcre,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totrec,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totnotcre,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totnotdeb,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totcom,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totent,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totsal,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totade,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($totimpser,2,".",",") ?></font></td>
	 
	
	<td align="right"><font size=1 ><?php echo number_format($cincuentamil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($veintemil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($diezmil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($cincomil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($dosmil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($mil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($quinientos,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($cien,2,".",",") ?></font></td>
 
	<td align="right"><font size=1 ><?php echo number_format($cincuenta,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($veinticinco,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($diez,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($cinco,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($tipcamdol,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($candol,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo $horcie?></font></td>
 
 </tr>

  
  <?php
	 
  	}	        
	

  ?>
  
</table>

<table width="92%" border="0" cellspacing="0" cellpadding="0">

 <tr>
   <td></td>
   <td align="left">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="left">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
      <td align="center">&nbsp;</td>
   <td align="left">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
      <td align="center">&nbsp;</td>
   <td align="left">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="center">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
      <td align="center">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
   <td align="right">&nbsp;</td>
 </tr>
 <tr>
 <tr>
    <td width="1%"></td>
    <td align="left"><strong><font size=1 >TOTALES </font></strong></td>
   <td align="center"><font size=1 ><?php // echo $feccie?></font></td>
   <td align="left"><font size=1 ><?php // echo $fecfin?></font></td>
   <td align="center"><font size=1 ><?php //echo $nomcomusu?></font></td>
   <td align="center"><font size=1 ><?php echo number_format($submonapecaj,2,".",",")?></font></td>
   <td align="right"><font size=1 ><?php echo number_format($submonsis,2,".",",")?></font></td>
   <td align="right"><font size=1 ><?php echo number_format($submondig,2,".",",") ?></font></td>
   <td align="right"><font size=1 ><?php echo  number_format($submonefe,2,".",",") ?></font></td>
   <td align="right"><font size=1 ><?php echo number_format($submoncks,2,".",",")?></font></td>
  <td align="right"><font size=1 ><?php echo number_format($submonvou,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($submondol,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($submonval,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($submonotr,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($submondif,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotfac,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotcre,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotrec,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotnotcre,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotnotdeb,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotcom,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotent,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotsal,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotade,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subtotimpser,2,".",",") ?></font></td>

	
	<td align="right"><font size=1 ><?php echo number_format($subcincuentamil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subveintemil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subdiezmil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subcincomil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subdosmil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($submil,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subquinientos,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subcien,2,".",",") ?></font></td>
 
	<td align="right"><font size=1 ><?php echo number_format($subcincuenta,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subveinticinco,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subdiez,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php echo number_format($subcinco,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php// echo number_format($tipcamdol,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php //echo number_format($candol,2,".",",") ?></font></td>
	<td align="right"><font size=1 ><?php// echo $horcie?></font></td>
 
 </tr>
</table>
<?php
	
	
	
	


?>
    <?php
	
	
/*
				$exento = $exento_fac - $exento_not +  $exento_deb  ;
				$gravado = $gravado_fac - $gravado_not + $gravado_deb  ;
				$subtotal =$subtotal_fac - $subtotal_not + $subtotal_deb ;
				$descuento  = $descuento_fac - $descuento_not + $descuento_deb   ;
				$impuesto =  $impuesto_fac - $impuesto_not +  $impuesto_deb ;
				$total = $total_fac - $total_not +  $total_deb ;*/
  ?>
  
  
  




</body>
</html>

 <?php