Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/02/2009, 09:55
antmegev
 
Fecha de Ingreso: septiembre-2008
Mensajes: 58
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: ayuda con pasar a pdf

y aka esta el html
<html>
<head>
<title></title>
</head>
<body topmargin="1" style="text-align: center">
<form method="POST" action="factura.php">
<table border="0" width="740" height="160" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" id="table3">
<tr>
<td height="15" width="740" align="center" colspan="2">
<img border="0" src="images/line_03.jpg" width="740" height="15"></td>
</tr>
<tr>
<td height="40" width="740" align="left"><b>
<font face="Arial" size="2" color="#333333">&nbsp;No. Cliente:
<?php
if ( $id_venta_activa == 0 ) {
echo ' <select size="1" name="ctrl_select_cliente">
<option value="0">-- Seleccione al Cliente --</option>';
if (isset($arr_clientes)) {
foreach( $arr_clientes as $values ){
echo '<option value="'.$values["id_cliente"].'">'.$values["cliente"].'</option>';
}
}
echo '</select>';
} else { echo '<font face="Arial" size="2" color="#FF0000">'.$vc_select_cliente.'</font>';}
?>
</font></b></td>
<td height="40" width="740" align="left"><b>
<font face="Arial" size="2" color="#333333">&nbsp;Nombre del Cliente: <?php echo $vc_nombre_cliente; ?></font></b></td>
</tr>
<tr>
<td height="40" width="740" align="left"><b>
<font face="Arial" size="2" color="#333333">&nbsp;Domicilio: <?php echo $vc_domicilio; ?></font></b></td>
<td height="40" width="740" align="left"><b>
<font face="Arial" size="2" color="#333333">&nbsp;Ciudad: <?php echo $vc_ciudad; ?></font></b></td>
</tr>
<tr>
<td height="40" width="740" align="left"><b>
<font face="Arial" size="2" color="#333333">&nbsp;Telefono: <?php echo $vc_telefono; ?></font></b></td>
<td height="40" width="740" align="left"><b>
<font face="Arial" size="2" color="#333333">&nbsp;R.F.C: <?php echo $vc_rfc; ?></font></b></td>
</tr>
<tr>
<td height="15" width="740" align="left" colspan="2">
<img border="0" src="images/line_03.jpg" width="740" height="15"></td>
</tr>
<tr>
<td height="15" width="740" align="left" colspan="2">
<input type="submit" value="Cargar Cliente" name="B1" style="float: right"></td>
</tr>
</table>
</form>
<form method="POST" action="factura.php">
<table border="0" width="740" height="15" cellspacing="0" cellpadding="0" id="table21">
<tr>
<td height="15" width="320" align="left"><b>
<font face="Arial" size="2" color="#333333">N&uacute;mero de Venta: </font>
<font face="Arial" size="2" color="#FF0000"><?php echo $id_venta_activa>0?$id_venta_activa:'No Hay venta Activa.'; ?></b></font>
</td>
</table>
<table border="0" width="740" height="35" cellspacing="0" cellpadding="0" background="images/line_04.jpg" id="table16">
<tr>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Cantidad</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Unidad</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Descripci&oacute;n</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">P. Unitario</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Importe</font></b></td>
</tr>
<tr>
<td height="35" width="148" align="center">
<input type="text" name="in_carga_cantidad" size="18"></td>
<td height="35" width="148" align="center">
<input type="text" name="in_carga_unidad" size="18"></td>
<td height="35" width="148" align="center">
<input type="text" name="in_carga_descripcion" size="18"></td>
<td height="35" width="148" align="center">
<input type="text" name="in_carga_precio_unitario" size="18"></td>
<td height="35" width="148" align="center">
<input type="text" name="in_carga_importe" size="18"></td>
</tr>
</table>
<table border="0" width="740" height="35" cellspacing="0" cellpadding="0" id="table17">
<tr>
<!-- DIA, MES Y AÑO -->
<td height="17" width="370" align="center">
<p align="left"><b>
<font face="Arial" size="2" color="#333333">D&iacute;a: </font></b>
<input name="in_carga_dia" size="2" value=<?php echo $in_carga_dia; ?>><b>
<font face="Arial" size="2" color="#333333">Mes: </font></b>
<input name="in_carga_mes" size="12" value=<?php echo $in_carga_mes; ?>><b>
<font face="Arial" size="2" color="#333333">A&ntilde;o: </font></b>
<input name="in_carga_anio" size="4" value=<?php echo $in_carga_anio; ?>>
<!-- PASAMOS LA VARIABLE DE NUMERO DE CLIENTE POR POST -->
<input type="hidden" name="ctrl_select_cliente" value=<?php echo $vc_select_cliente; ?> />
</td>
<td height="17" width="370" align="center">
<input type="submit" value="Registrar Venta" name="registrar_venta" style="float: right">
</td>
</tr>
</table>
</form>
<table border="0" width="740" height="35" cellspacing="0" cellpadding="0" id="table12">
<tr>
<td height="25" width="740" align="center" valign="top">
<p align="left">
<img border="0" src="images/line_03.jpg" width="740" height="15"></td>
</tr>
</table>
<table border="0" width="740" height="35" cellspacing="0" cellpadding="0" background="images/line_04.jpg" id="table13">
<tr>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Cantidad</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Unidad</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Descripción</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">P. Unitario</font></b></td>
<td height="35" width="148" align="center"><b>
<font face="Arial" size="2" color="#FFFFFF">Importe</font></b></td>
</tr>
</table>
<table border="1" width="740" height="35" cellspacing="0" cellpadding="0" id="table14" bordercolor="#6B381B">
<?php
$vc_query = "select * from tb_venta_articulo where id_venta = '$id_venta_activa' order by id_venta_articulo ";
$MySQL->query( $GLOBAL_MySQL_host, $vc_query, 0 );
$arr_venta_articulo = $MySQL->arr;
if ( isset($arr_venta_articulo) ) {
foreach( $arr_venta_articulo as $values ) {
echo'
<!-- replica desde aqui -->
<tr>
<td height="35" width="148" align="center">
<font face="Arial" size="2" color="#333333"><b>'.$values["int_cantidad"].'</b></font></td>
<td height="35" width="148" align="center">
<font face="Arial" size="2" color="#333333"><b>'.$values["int_unidad"].'</b></font></td>
<td height="35" width="148" align="center">
<font face="Arial" size="2" color="#333333"><b>'.$values["vc_descripcion"].'</b></font></td>
<td height="35" width="148" align="center">
<font face="Arial" size="2" color="#333333"><b>'.number_format($values["dec_precio_unitario"], 2, ".", ",").'</b></font></td>
<td height="35" width="148" align="center">
<font face="Arial" size="2" color="#333333"><b>'.number_format($values["dec_precio_importe"], 2, ".", ",").'</b></font></td>
</tr>
<!-- replica hasta aqui -->
';
}
}
?>
</table>
<div align="center">
<table border="0" width="740" height="81" cellspacing="0" cellpadding="0" id="table15">
<tr>
<td height="20" width="444">&nbsp;</td>
<td height="20" width="296" align="right" colspan="2">&nbsp;</td>
</tr>
<tr>
<td height="41" width="444"><font face="Arial"><b>
<font size="2" color="#333333">Importe con letra:</font></b></font></td>
<td height="41" width="148" align="right"><b>
<font face="Arial" size="2" color="#333333">Subtotal: </font></b>
<font color="#333333" face="Arial">
&nbsp;&nbsp;
</font></td>
<td height="41" width="148" align="right">
<font face="Arial" size="2" color="#333333">$
<?php
$dec_precio_subtotal = $MySQL->query( $GLOBAL_MySQL_host, " select sum(dec_precio_importe) from tb_venta_articulo where id_venta = '$id_venta_activa' ", 1 );
echo number_format($dec_precio_subtotal, 2, ".", ",")
?>
</font></td>
</tr>
<tr>
<td height="40" width="444"><b>
<font size="2" face="Arial" color="#333333"><?php echo $cantidadLetra->ValorEnLetras($dec_precio_subtotal * 1.15," Pesos") ?></font></b></td>
<td height="40" width="148" align="right"><b>
<font face="Arial" size="2" color="#333333">IVA: </font></b>
<font color="#333333" face="Arial">
&nbsp;&nbsp;
</font></td>
<td height="40" width="148" align="right">
<font face="Arial" size="2" color="#333333">$ <?php $dec_precio_iva = $dec_precio_subtotal * 0.15; echo number_format($dec_precio_iva, 2, ".", ","); ?> </font></td>
</tr>
<tr>
<td height="40" width="444">&nbsp;</td>
<td height="40" width="148" align="right"><b>
<font face="Arial" size="2" color="#333333">Total: </font></b>
<font color="#333333" face="Arial">
&nbsp;&nbsp;
</font></td>
<td height="40" width="148" align="right">
<font face="Arial" size="2" color="#333333">$ <?php $dec_precio_total = $dec_precio_iva + $dec_precio_subtotal; echo number_format($dec_precio_total, 2, ".", ","); ?> </font></td>
</tr>
<tr>
<td height="40" width="444">&nbsp;</td>
<td height="40" width="296" align="right" colspan="2">
<a target="_self" href="factura.php?b_imprime_factura=1">
<img border="0" src="images/btn_enviar.jpg" width="90" height="30"></a></td>
</tr>
<tr>
<td height="15" width="740" colspan="3">
<img border="0" src="images/line_03.jpg" width="740" height="15"></td>
</tr>
</table>
</div>
</body>
</html>
esta todo seguido el anterior esta junto con este muchas gracias . en el anterior en la impresion de factura ay una s, ese error es mio =S onde le andube moviendo