<style type="text/css" media="print">
@page{
   margin: 2px;
}


* {
  font-family:"Arial";
  @font-weight: 100;
  font-size:12px;
}
h3{
	font-size:14px;
	font-weight:bolder;
}
h5{
	font-size:12px
}
th{
	background: green;
	color:white;
	text-align: center;

}

</style>
<?php
$id = $_GET['id'];
include_once("../php/config.php");
$sql_ingreso = mysql_query("select * from ingresos where id='$id'") or die (mysql_error());


$cliente = @mysql_result($sql_ingreso,0,"cliente");

$sql_cliente = mysql_query("select * from clientes where nombre='$cliente'") or die (mysql_error());
$sql_venta = mysql_query("select sum(balance) as balance from ventas where cliente='$cliente'") or die (mysql_error());


?>
<center>
	
<br><br>
<?php

$sql_empresa = mysql_query("SELECT * FROM empresa") or die(mysql_error());
$enombre= @mysql_result($sql_empresa,0,"nombre");
$etelefono= @mysql_result($sql_empresa,0,"telefono");	
$edireccion= @mysql_result($sql_empresa,0,"direccion");	
$ernc= @mysql_result($sql_empresa,0,"rnc");	
$eemail= @mysql_result($sql_empresa,0,"email");	
	
?>
<span class="datos_empres2" style="font-size: 30px;font-weight: bolder;font-family: 'Arial'"><?php echo $enombre;?></span><br>
<span class="datos_empres"><?php echo $etelefono;?> </span><br>
<span class="datos_empres"><?php echo $edireccion;?> </span><br>
<span class="datos_empres"><?php echo $ernc;?></span><br>

	<h2>RECIBO DE INGRESO</h2>

</center>
<br>
<br>
No. Trans. #: <?php echo $_GET["id"]?><br>
Fecha : <?php echo  @mysql_result($sql_ingreso,0,"hora");?><br>

<br>

Cliente: <?php echo $cliente?><br>
RNC/ Cedula: <?php echo @mysql_result($sql_cliente,0,"cedula");?><br>
<?php echo @mysql_result($sql_cliente,0,"telefono");?><br>
<?php echo @mysql_result($sql_cliente,0,"direccion");?><br><br>
Concepto:
<?php echo @mysql_result($sql_ingreso,0,"concepto");?><br>
<div style="width: 200px;">
<br>

<span><b>MONTO</b> </span> <span style="float: right;"><?php echo @decimal(mysql_result($sql_ingreso,0,"monto"))?></span><br>
<hr>
<span><b >RECIBIDO EN PESOS: </span> <span style="float: right;"><?php echo @decimal(mysql_result($sql_ingreso,0,"monto_pesos"))?></span></b><br>

<span>Balance pendiente: </span> <span style="float: right;"><?php echo @decimal(mysql_result($sql_venta,0,"balance"))?></span><br>
</div>	
	
</div>

<br><br><br>
<br><br><br>
<center>
<div>

______________________________<br>
Firma cajero

</div>
</center>

<br><br>
<a href="ingresos.php"> <----VOLVER ATRAS</a>
<script>
	window.print()
	setTimeout(function(){
		window.close()
	},10000)
</script>

<?php
if($_GET["from"]=="abono"){
	///sleep(2);
	echo "<script>
	setTimeout(function(){
		window.location.href='../clientes/creditos.php'
	},3000)
	
	</script>";
}
?>