Foros del Web » Programando para Internet » PHP »

No entiendo fpdf

Estas en el tema de No entiendo fpdf en el foro de PHP en Foros del Web. Estoy intentando implementar el fpdf; pero no entiendo en donde lo debo colocar; he intentado antes de mis consultas; pero me imprime texto en el ...
  #1 (permalink)  
Antiguo 12/12/2009, 11:42
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Exclamación No entiendo fpdf

Estoy intentando implementar el fpdf; pero no entiendo en donde lo debo colocar; he intentado antes de mis consultas; pero me imprime texto en el modalbox; no de error sino java; aqui el codigo:
Aqui implemento la tabla que deberia de imprimirse y el archivo de fpdf; pero como repito no sale:
Código PHP:
<?
header 
("Expires: tdu, 27 Mar 1980 23:59:00 GMT"); //la pagina expira en una fecha pasada
header ("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); //ultima actualizacion ahora cuando la cargamos
header ("Cache-Control: no-cache, must-revalidate"); //no guardar en CACHE
header ("Pragma: no-cache"); 
require_once(
"config/config.php");
require_once(
"include/clasesmysql.php");
require_once(
"include/funciones.php");
require_once(
'include/fpdf.php');
$pdf=new FPDF('P','cm','A4');
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
//$pdf->Cell(40,10,'¡Hola, Mundo!');
$pdf->Output();
$miconexion = new DB_mysql ;
$miconexion->conectar($basededatos$host$usuario_bd,$contrasena_bd);
$id=$_GET['id'];
$id2=$_GET['id2'];
if (!empty(
$id)){
$miconexion->consulta("select documento_venta.*,empleado.emp_nom,cliente.*, tipodocumento.tip_nom from documento_venta,empleado,cliente, tipodocumento where documento_venta.doc_id=$id and documento_venta.emp_id_FK=empleado.emp_id and documento_venta.cli_id_FK=cliente.cli_id and documento_venta.doc_tipo=tipodocumento.tip_id ");
$row mysql_fetch_array($miconexion->Consulta_ID);
$fec=explode('-',$row['doc_fec']);
$fecha=$fec[2].'-'.$fec[1].'-'.$fec[0];}
?>
<div id='seleccion' class='textimpr1' align='center'>
<table align='center' border='0' width="789" height="1084" cellpadding="0" cellspacing="1">
    <tr>
        <td align='left' height="100">&nbsp;</td>
    </tr>
    <tr>
      <td height="40">
      <div id='tablaimpdv01'>
      <table border="0" cellpadding="0" cellspacing="1" width="100%">
        <tr>
          <td colspan='6'>
            <font class="textimpr1" style='margin-left:12%'>
                <?php if ($row['cli_tipdoc']=='D') { echo (utf8_encode($row['cli_nom'])); } elseif ($row['cli_tipdoc']=='R') { echo (utf8_encode($row['cli_razon']));}?>
            </font>
            <br style="line-height:6px" />
            <font class="textimpr1" style='margin-left:12%'>
                <?php echo (utf8_encode($row['cli_dir'])); ?>
            </font> 
            </td>
           <td align='right' rowspan='2'>
            <font class="textimpr1">
                <p style='margin-right:6%'><? echo ($fecha);?></p>
            </font>
            <?php
                            $tipo_pago
=$row['doc_tipo_pago'];
                            if (
$tipo_pago==1)
                                {
                                    
$t_pago="CONTADO";
                                }
                            if (
$tipo_pago==2)
                                {
                                    
$t_pago="CREDITO";
                                }
                    echo 
"<font class='textimpr1' style='margin-right:6%'>".' '.$t_pago."</font>";
                        
?>
            </td>
        </tr>
        <tr>
          <td width='38px'>&nbsp;</td>
          <td>
            <?php
            
if ($row['cli_tipdoc']=='D') { echo "<font class='textimpr1' style='margin-left:12%'>".' '.$row['cli_dni']."</font>";} elseif ($row['cli_tipdoc']=='R') { echo "<font class='textimpr1' style='margin-left:18%'>".' '.$row['cli_ruc']."</font>";}
            
?>
          </td>
          <td width='90px'>&nbsp;</td>
          <td align='right'>
            <font class='textimpr1' style='margin-left:12%'>
.
.
.
.
.
culminando toda la tabla asi:
Código PHP:
            </table>
            </div>
        </td>
    </tr>
    <tr>
        <td align='left' valign='top'><font style='margin-left:12%'>Son:&nbsp;&nbsp;&nbsp;<?php echo strtoupper(num2letras($total)); $decimal=explode('.',$total); echo ' '.$decimal[1]; echo "/100"?>&nbsp;&nbsp;&nbsp;Nuevos Soles</font>
        </td>
    </tr>
</table>
</div>
<div align='center'>
<table border='4' cellspacing='0' cellpadding='0'>
    <tr><td><input type='button' value='Imprimir' onclick="AddPage();"/></td></tr>
</table>
</div>
Y como repito no sale; 1 de 2; no entiendo el manual y no se como implementarlo;
o no funciona con modalbox.
En que momento debo llamar al fpdf?
  #2 (permalink)  
Antiguo 12/12/2009, 11:45
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: No entiendo fpdf

y de casualidad ya has probado un ejemplo de su pagina web??

pienso, habiendo tanta información oficial, ejemplos y tutoriales...
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 12/12/2009, 11:50
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Respuesta: No entiendo fpdf

si; solo el tuto sin nada mas; pero en modalbox no me jala por eso.
  #4 (permalink)  
Antiguo 12/12/2009, 11:52
Avatar de bacdavi  
Fecha de Ingreso: junio-2006
Ubicación: http://localhost/
Mensajes: 351
Antigüedad: 17 años, 10 meses
Puntos: 7
Respuesta: No entiendo fpdf

arrg amigo amigo...

leete este tuto..

http://www.fpdf.org/es/tutorial/tuto5.htm
  #5 (permalink)  
Antiguo 12/12/2009, 11:57
Avatar de mark_ant0n  
Fecha de Ingreso: enero-2009
Ubicación: Comitan, Chiapas mx
Mensajes: 388
Antigüedad: 15 años, 3 meses
Puntos: 6
Respuesta: No entiendo fpdf

mmm mira yo tambien soy nuevo con el fpdf, llevo como 5 dias de haberlo conocido, y pues la solucion mas optima que encontre es la siguiente, has tu consulta a tu base de datos y muestrala con html, y pones un hipervinculo con la opcion imprimir reporte o imprimir noticia
que te lleve a un archivo totalmente echo en php.

<a href='index.php?reporte.php&id=id'>Imprimir Reporte</a>

Cuando le des clic a imprimir reporte la pagina de reporte.php ara de nuevo la consulta solo que ahora no mezclas php con html , si no que solamente php. en reporte php estara todo lo que se necesita imprimir con fpdf, espero me haya logrado explicar saludos
__________________
"Diseño de software a la medida"

http://www.sadhoc.com
  #6 (permalink)  
Antiguo 12/12/2009, 12:15
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Respuesta: No entiendo fpdf

Gracias mark_ant0n; mira lo que tengo son los siguientes formularios:
documento_venta.php; la cual me llama a ver_documento_venta.php; la cual tiene parte de php y parte de html; en este formulario; hago las consultas y me muestra mis resultados; ahora el boton imprimir que me llame a otra pagina con nuevas consultas?; y como podria indicar que el texto vaya uno debajo de otro sin html?
  #7 (permalink)  
Antiguo 12/12/2009, 12:34
Avatar de mark_ant0n  
Fecha de Ingreso: enero-2009
Ubicación: Comitan, Chiapas mx
Mensajes: 388
Antigüedad: 15 años, 3 meses
Puntos: 6
Respuesta: No entiendo fpdf

ok, esta facil, haces tu consulta en mysql

Código PHP:
$consulta=mysql_query("SELECT * FROM tabla",$con);
while (
$fila=mysql_fetch_array($consulta))
 
$pdf->Cell(0,10,$f['2']." ".$f['3'],0,1);//de esta manera sacas los datos de mysql a pdf
$pdf->Output(); 
te recomiendo que veas los tutos del fpdf http://www.fpdf.org/es/tutorial/index.php
__________________
"Diseño de software a la medida"

http://www.sadhoc.com
  #8 (permalink)  
Antiguo 14/12/2009, 15:26
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Exclamación Respuesta: No entiendo fpdf

estoy revisando todo lo posible; el problema es qeu yo estoy intentado imprimir un comprobante el cual tiene tablas anidadas; entonces estoy intentando utilizar el tuto6.php; pero no me reconoce la variable que le envio:

Código PHP:
$miconexion->consulta("select documento_venta.*,empleado.emp_nom,cliente.*, tipodocumento.tip_nom from documento_venta,empleado,cliente, tipodocumento where documento_venta.doc_id=4 and documento_venta.emp_id_FK=empleado.emp_id and documento_venta.cli_id_FK=cliente.cli_id and documento_venta.doc_tipo=tipodocumento.tip_id ");
$row mysql_fetch_array($miconexion->Consulta_ID);
$fec=explode('-',$row['doc_fec']);
$fecha=$fec[2].'-'.$fec[1].'-'.$fec[0];
$nom=$row['cli_razon'];
$html="<table border=2> <tr><td>++$nom--</td></tr></table>";

$pdf=new PDF();
//Primera página
$pdf->AddPage();
$pdf->SetLeftMargin(45);
$pdf->SetFontSize(14);
$pdf->WriteHTML($html);
$pdf->Output(); 
la variable $nom; no la reconoce; alguna forma de imprimir esa parte; lo que quisiera hacer es una combinacion del tuto6 con el tuto5
  #9 (permalink)  
Antiguo 14/12/2009, 15:47
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Respuesta: No entiendo fpdf

en la variable $html; no muestra las tablas:
Cita:
$html="<table align='center' border='0' width='660' height='834' cellpadding='0' cellspacing='1'><tr><td width='658' height='100' align='left'>&nbsp;</td></tr><tr><td height='40'>
<div id='tablaimpdv01' align='right'><table border='0' cellpadding='0' cellspacing='1' width='87%'>
<tr><td colspan='6'><font class='textimpr1' style='margin-left:12%'>$vercli</font><br style='line-height:6px' /><font class='textimpr1' style='margin-left:12%'>$dir</font></td>
<td align='right' rowspan='2'><font class='textimpr1'>$fecha</p></font><font class='textimpr1' style='margin-right:6%'>$t_pago</font></td></tr><tr><td width='38px'>&nbsp;</td><td>
<font class='textimpr1' style='margin-left:12%'>$verdoc</font></td><td width='90px'>&nbsp;</td>
<td align='right'><font class='textimpr1' style='margin-left:12%'>$guianum</font></td>
<td width='90px'>&nbsp;</td><td><font class='textimpr1' style='margin-left:12%'>$orden</font>
</td></tr></table></div></td></tr></table>";
me sale todo amontondado; no respeta tampoco el &nbsp;
  #10 (permalink)  
Antiguo 22/12/2009, 16:54
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Respuesta: No entiendo fpdf

implementando el html2pdf en version 3.26; ejecuta el codigo pero no imprime nada en el pdf:
tengo verproforma.php que me llama a verproformapdf.php; este ultimo tiene el codigo para convertir a pdf pero no muestra nada en el pdf:
Cita:
<?php
session_start();
header ("Expires: Thu, 27 Mar 1980 23:59:00 GMT"); //la pagina expira en una fecha pasada
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //ultima actualizacion ahora cuando la cargamos
header ("Cache-Control: no-cache, must-revalidate"); //no guardar en CACHE
header ("Pragma: no-cache");
require_once("config/config.php");
require_once("include/clasesmysql.php");
// conversion HTML => PDF
require_once('include/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','fr');
// $html2pdf->setModeDebug();
$html2pdf->setDefaultFont('Arial');
$html2pdf->WriteHTML($content, isset($_GET['ver_proformapdf.php']));
$html2pdf->Output('exemple00.pdf');
$miconexion = new DB_mysql ;
$miconexion->conectar($basededatos, $host, $usuario_bd,$contrasena_bd);
$id=4;
$miconexion->consulta("select * from proformas p, cliente c, equipo_predefinido ep, obsequios ob where p.pr_cli_id_FK=c.cli_id and p.pr_ep_id_FK=ep.ep_id and p.pr_ob_id_FK=ob.ob_id and pr_id='$id'");
$row0 = mysql_fetch_array($miconexion->Consulta_ID);
$numero=$row0['pr_num'];
$fec=explode('-',$row0['pr_fecha']);
$fecha=$fec[2].'-'.$fec[1].'-'.$fec[0];
$fecha1=$row0['pr_fecha'];
$cli_id=$row0['pr_cli_id_FK'];
$clidni=$row0['cli_dni'];
$cliruc=$row0['cli_ruc'];
$razcli=$row0['cli_razon'];
$salu=$row0['pr_saludo'];
$dircli=$row0['cli_dir'];
$tip_doc=$row0['pr_doctip'];
$tip_coti=$row0['pr_coti'];
$telfcli=$row0['cli_telf'];
$pr_mon=$row0['pr_mon'];
$tc=$row0['pr_tc'];
$garantia=utf8_encode($row0['pr_garantias']);
$prof_est=$row0['pr_estado'];
$cantprof=$row0['pr_can'];
$plazoe=$row0['pr_plazoe'];
$esp=$row0['pr_especi'];
$maxdias=$row0['pr_dias'];
$ep_id=$row0['pr_ep_id_FK'];
$nomep1=$row0['ep_nom'].' '.$row0['ep_desc'];
$totfinals=round($row0['pr_precioS'] * $cantprof , 2);
$tofinald=$row0['pr_precioD'];
$descuento=$row0['pr_desc'];
$descripcion=$row0['pr_descripcion'];
?>
<html>
<head>
<title>Citec</title>
<body>
<form name='form11' action='<? echo $paginaprincipal;?>?menu=ver_proformapdf' method='post'>
<div id='seleccion'>
<table align='center' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td align='left' colspan='3' class='textimpr'>
<b><u>PROFORMA N&ordm;:</u></b><u>&nbsp;&nbsp;&nbsp;<?php echo $numero;?></u>
</td>
<td align='right' colspan='3' class='textimpr'><b><u>FECHA:</u></b>&nbsp;&nbsp;&nbsp;&nbsp;<u><?php echo $fecha;?></u></td>
</tr>
<tr><td><br style="line-height:8px "></td></tr>
<tr>
<td align='right' class='textimpr'><b>Sr.(es):</b></td>
<td>&nbsp;</td>
<td align='left' class='textimpr'><u><?=utf8_encode($razcli);?></u></td>
<td align='right' class='textimpr'><? if ($tip_doc=="R") echo "<b>RUC:</b></td><td>&nbsp;</td><td align='left' class='textimpr'><u>$cliruc</u></td>"; else echo "<b>DNI:</b></td><td>&nbsp;</td><td align='left' class='textimpr'><u>$clidni</u></td>";?></td>
</tr>
<tr><td><br style="line-height:6px "></td></tr>
<tr>
<td align='right' class='textimpr'><b>Direcci&oacute;n:</b></td>
<td>&nbsp;</td>
<td align='left' class='textimpr'><u><?=utf8_encode($dircli);?></u></td>
<td align='right' class='textimpr'><b>Tel&eacute;fono:</b></td>
<td>&nbsp;</td>
<td align='left' class='textimpr'><u><?=$telfcli?></u></td>
</tr>
.
.
.
.
.
alguien me podria decir porque
  #11 (permalink)  
Antiguo 22/12/2009, 17:30
Avatar de zeuzft  
Fecha de Ingreso: junio-2009
Ubicación: peru
Mensajes: 358
Antigüedad: 14 años, 9 meses
Puntos: 2
Exclamación Respuesta: No entiendo fpdf

me arroja el siguiente error; y no entiendo sigo la estructura:
Cita:
ERREUR n°4
Fichier : /home/citecper/public_html/sistema/include/parsingHTML.class.php
Ligne : 127

Code HTML non valide, les balises ne sont pas fermées dans le bon ordre.
Etat :

Array
(
[0] => page
[1] => table
[2] => tr
)



HTML : ...timpr'><u>20165645325</u></td></td> </tr> <tr><td><br style="line-he...
este es el codigo:
Código PHP:
<page orientation="paysage">
<?php
session_start
();
header ("Expires: Thu, 27 Mar 1980 23:59:00 GMT"); //la pagina expira en una fecha pasada
header ("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); //ultima actualizacion ahora cuando la cargamos
header ("Cache-Control: no-cache, must-revalidate"); //no guardar en CACHE
header ("Pragma: no-cache"); 
require_once(
"config/config.php");
require_once(
"include/clasesmysql.php");
$miconexion = new DB_mysql ;
$miconexion->conectar($basededatos$host$usuario_bd,$contrasena_bd);
$id=4;
$miconexion->consulta("select * from proformas p, cliente c, equipo_predefinido ep, obsequios ob where p.pr_cli_id_FK=c.cli_id and p.pr_ep_id_FK=ep.ep_id and p.pr_ob_id_FK=ob.ob_id and pr_id='$id'");
        
$row0 mysql_fetch_array($miconexion->Consulta_ID);
        
$numero=$row0['pr_num'];    
        
$fec=explode('-',$row0['pr_fecha']);    
        
$fecha=$fec[2].'-'.$fec[1].'-'.$fec[0];
        
$fecha1=$row0['pr_fecha'];
        . . . . . .. . . . . . 
?>
<table align='center' border='0' cellspacing='0' cellpadding='0'>
    <tr>
      <td align='left' colspan='3' class='textimpr'>
        <b><u>PROFORMA N&ordm;:</u></b><u>&nbsp;&nbsp;&nbsp;<?php echo $numero;?></u>
      </td>
      <td align='right' colspan='3' class='textimpr'><b><u>FECHA:</u></b>&nbsp;&nbsp;&nbsp;&nbsp;<u><?php echo $fecha;?></u></td>
    </tr>
    <tr><td><br style="line-height:8px "></td></tr>
    <tr>
        <td align='right' class='textimpr'><b>Sr.(es):</b></td>
        <td>&nbsp;</td>
        <td align='left' class='textimpr'><u><?=utf8_encode($razcli);?></u></td>
        <td align='right' class='textimpr'><? if ($tip_doc=="R") echo "<b>RUC:</b></td><td>&nbsp;</td><td align='left' class='textimpr'><u>$cliruc</u></td>"; else echo "<b>DNI:</b></td><td>&nbsp;</td><td align='left' class='textimpr'><u>$clidni</u></td>";?></td>
    </tr>
    <tr><td><br style="line-height:6px "></td></tr>
    <tr>
        <td align='right' class='textimpr'><b>Direcci&oacute;n:</b></td>
        <td>&nbsp;</td>
        <td align='left' class='textimpr'><u><?=utf8_encode($dircli);?></u></td>
        <td align='right' class='textimpr'><b>Tel&eacute;fono:</b></td>
        <td>&nbsp;</td>
        <td align='left' class='textimpr'><u><?=$telfcli?></u></td>
    </tr>
    <tr><td><br style="line-height:10px "></td></tr>
    <tr>
        <td>&nbsp;</td>
        <td colspan="5" class='textimpr'><?=$salu?></td>
    </tr>
    <tr><td><br style="line-height:14px" /></td></tr>
<?
$miconexion
->consulta1("select depr.dp_independiente,count(depr.dp_id) as nada from detalle_proformaequipoproducto depr where depr.dp_pr_id_FK=$id and depr.dp_independiente='N' group by depr.dp_independiente");
$row8 mysql_fetch_array($miconexion->Consulta_ID1);
$resp1=$row8['dp_independiente'];
$dif8=$row8['nada'];
$miconexion->consulta2("select depr.dp_independiente,count(depr.dp_id) as nada from detalle_proformaequipoproducto depr where depr.dp_pr_id_FK=$id and depr.dp_independiente='S' group by depr.dp_independiente");
$row7 mysql_fetch_array($miconexion->Consulta_ID2);
$resp2=$row7['dp_independiente'];
$dif7=$row7['nada'];
if ((
$dif8!=0) and ($dif7!=0))
{
?>
    <tr>
        <td colspan="6">
            <div id='divResultado'>    
            <table width='100%' border='0' >
            <tr><td align='left' colspan='4' class='textimpr'>
            <?
            $miconexion
->consulta("select * from proformas where pr_id=$id");
            
$row=mysql_fetch_array($miconexion->Consulta_ID);
            
$verprodu=$row['pr_descripcion'];
            
$obid025=$row['pr_ob_id_FK'];
            if (
$tip_coti=='P')
            
$str mb_strtoupper($verprodu);
            else
            
$str mb_strtoupper($cantprof.' '.$nomep1);
            
?><b><?=$str;?></b><br style='line-height:1px'><img src='images/linea1.png' width='100%' /></td></tr>
            <tr><td colspan='4'><br style='line-height:2px'></td></tr>
            <?
            $total
=0;
            
$totald=0;
            
$miconexion->consulta("select * from detalle_proformaequipoproducto depr, producto p, linea l where depr.dp_pr_id_FK=$id and p.prod_id=depr.dp_prod_id_FK and p.Lin_id_FK=l.Lin_id and depr.dp_independiente='N' order by 1");
            
$miconexion->consulta1("select * from obsequios where ob_id=$obid025");
            
$row5=mysql_fetch_array($miconexion->Consulta_ID1);
            while(
$row mysql_fetch_array($miconexion->Consulta_ID))
                {
                    
$codigo=$row['dp_prod_id_FK'];
                    
$nombre=$row['prod_nom'];
                    .. . .. . . .  .
                    
$preciopr=+$pob;
                    echo 
"<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td class='textimpr'>$mostrar</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
.......
            
$miconexion->consulta("select * from detalle_proformaequipoproducto depr, producto p, linea l where depr.dp_pr_id_FK=$id and p.prod_id=depr.dp_prod_id_FK and p.Lin_id_FK=l.Lin_id and depr.dp_independiente='S' order by 1");
            
$miconexion->consulta1("select * from obsequios where ob_id=$obid025");
            
$row5=mysql_fetch_array($miconexion->Consulta_ID1);
            while(
$row mysql_fetch_array($miconexion->Consulta_ID))
                {
                    
$codigo=$row['dp_prod_id_FK'];
                    
$nombre=$row['prod_nom'];
                    
$descripcion=$row['prod_desc'];
                    
$cant=$row['dp_canti'];            
                    
$tiposubtipo=$row['Lin_nom'];
                    
$precio=$row['dp_precio'];
                    if (
$tc==0)
                        
$tc=1;
                    else
                        
$tc=$tc;
                    
$preciod=round($precio/$tc,2);    
                    
$subtotald=round(($cant*$preciod),2);    
                    
$subtotal=round(($cant*$precio),2);
                    
$preciocompra=$row['prod_preccom'];
                    
$mostrar=utf8_encode($row['Lin_nom'].' '.$row['prod_nom'].' '.$row['prod_desc']);
                    
$pob=$row5['ob_precio'];
                    
$total+=$subtotal;
                    
$totald+=$subtotald;
                    
$preciopr=+$pob;
if (
$tip_coti=='P'){
?><tr><td class='textimpr'><?=$cant?></td><td class='textimpr'><?=$mostrar?></td><td class='textimpr' align='center'><?=$precio?></td><td align='right' class='textimpr'><?=$subtotal?></td></tr>
<?
}
else{
?><tr><td>&nbsp;</td><td class='textimpr' colspand='2'><?=$mostrar?></td></tr>
<?
}
}
?><tr><td colspan='5'><br style='line-height:1px' /><img src='images/linea1.png' width='100%' /></td></tr>
    <tr><td align='right' colspan='3' class='textimpr' align='right'><b>TOTAL S/:</b></td><td colspan='2' align='right' class='textimpr'><b><? echo (number_format($totfinals2'.'' '));?></b><br style='line-height:1px'><img src='images/linea2.png' /></td></tr></table><br />
        </div>
        </td>
    </tr>
<?}?>
<?
$miconexion
->consulta1("select depr.dp_independiente,count(depr.dp_id) as nada from detalle_proformaequipoproducto depr where depr.dp_pr_id_FK=$id and depr.dp_independiente='N' group by depr.dp_independiente");
$row8 mysql_fetch_array($miconexion->Consulta_ID1);
$resp1=$row8['dp_independiente'];
$dif8=$row8['nada'];
$miconexion->consulta2("select depr.dp_independiente,count(depr.dp_id) as nada from detalle_proformaequipoproducto depr where depr.dp_pr_id_FK=$id and depr.dp_independiente='S' group by depr.dp_independiente");
$row7 mysql_fetch_array($miconexion->Consulta_ID2);
$resp2=$row7['dp_independiente'];
$dif7=$row7['nada'];
if ((
$dif8==1) and ($dif7==0)){?>
    <tr>
        <td colspan="6">
            <div id='divResultado'>    
            <table width='100%' border='0' >
            <tr><td align='left' colspan='5' class='textimpr'>
            <?
            $miconexion
->consulta("select * from proformas where pr_id=$id");
            
$row=mysql_fetch_array($miconexion->Consulta_ID);
            
$verprodu=$row['pr_descripcion'];
            
$obid025=$row['pr_ob_id_FK'];
            if (
$tip_coti=='P')
            
$str mb_strtoupper($verprodu);
            else
            
$str mb_strtoupper($cantprof.' '.$nomep1);
            
?><b><?=$str?></b> <br style='line-height:1px'><img src='images/linea1.png' width='100%' /></td></tr>
            <tr><td colspan='5'><br style='line-height:2px'></td></tr>
            <?
            $total
=0;
            
$totald=0;
            
$miconexion->consulta("select * from detalle_proformaequipoproducto depr, producto p, linea l where depr.dp_pr_id_FK=$id and p.prod_id=depr.dp_prod_id_FK and p.Lin_id_FK=l.Lin_id and depr.dp_independiente='N' order by 1");
            
$miconexion->consulta1("select * from obsequios where ob_id=$obid025");
            
$row5=mysql_fetch_array($miconexion->Consulta_ID1);
            while(
$row mysql_fetch_array($miconexion->Consulta_ID))
                {
                    
$codigo=$row['dp_prod_id_FK'];
                    
$nombre=$row['prod_nom'];
                    
$descripcion=$row['prod_desc'];
                    
$cant=$row['dp_canti'];            
------
........
        </
td>
    </
tr>
<?}
?>
<?
    $miconexion
->consulta("select * from proformas p inner join obsequios o on p.pr_ob_id_FK=o.ob_id where pr_id=$id");
    
$row=mysql_fetch_array($miconexion->Consulta_ID);
    
$idob=$row['ob_id'];
    
$veregalos=$row['ob_desc'];
    if (
$idob==2) {$veregalos='';} else {$veregalos=$veregalos;?>
    <tr>
        <td colspan='6' class='textimpr'>
        <B>OBSEQUIOS:</B>
        </td>
    </tr>
    <tr>
        <td colspan='6' class='textimpr'>
            <?echo "<font style='margin-left:6%'>$veregalos</font>";?>
        </td>
    </tr>
    <?}?>
    <tr><td><br style="line-height:8px "></td></tr>
    <tr>
        <td colspan='6' class='textimpr'><B>GARANTIAS</B>:</td>
    </tr>
    <tr>
        <td colspan='6' class='textimpr'><font style='margin-left:6%'><?=$garantia;?></font></td>
    </tr>
    <tr><td><br style="line-height:2px"></td></tr>
    <tr>
        <td align='center' colspan="6" class='textimpr'>
        <b>!!! MAS DE 10 A&Ntilde;OS DE NUESTRA EXPERIENCIA RESPALDAN SU CONFIANZA !!!</b></td>
    </tr>
.
.
.
.
</table>
</page>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:40.