/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Autores: Galopin Pedro Obreg�n Mej�as Rub�n D. Mancera Mor�n Factusyn Luis Ignacio Albacete Fecha Liberaci�n del c�digo: 15/10/2007 Factusyn 2007 -- Murcia */ ?> include ("../configuraciones/conectar.php"); include ("../fechas/convertirfechas2.php"); $premium_empresa='admin'.$empresa; // $xidempresa=$_SESSION['usuario_empresa']; $descriptor=mysql_select_db($BaseDeDatos,$conexion); $consulta = "Select * from presupuestos where presupuestos.codpresupuesto='$codpresupuesto'"; $resultado = mysql_query($consulta, $conexion); $lafila=mysql_fetch_array($resultado); $importeiva=$lafila["iva"]; $codpro=$lafila["codcliente"]; $empr_premium_descriptor=mysql_select_db($premium_empresa,$premium_conexion); $consulta1 = "Select * from cliempre where codigo='$codpro'"; $resultado1 = mysql_query($consulta1, $premium_conexion); $lafila1=mysql_fetch_array($resultado1); $empr_premium_descriptor=mysql_select_db($premium_empresa,$premium_conexion); $consulta2 = "select * from listvend where codigo='$vendedor'"; $resultado2 = mysql_query($consulta2, $premium_conexion); $lafilavend=mysql_fetch_array($resultado2); $premium_empresa='adminmatriz'; $empr_premium_descriptor=mysql_select_db($premium_empresa,$premium_conexion); $consulta3 = "select * from empresas where id_empresa='$empresa'"; $resultado3 = mysql_query($consulta3, $premium_conexion); $lafilaempr=mysql_fetch_array($resultado3); ?> $cuerpo=""; $cuerpo=$cuerpo."
"; $cuerpo=$cuerpo." Código | ';
$cuerpo=$cuerpo.' Descripción | ';
$cuerpo=$cuerpo.' Cantidad | ';
$cuerpo=$cuerpo.' Precio | ';
/*
$cuerpo=$cuerpo.' Descuento | ';
$cuerpo=$cuerpo.' % '.$impuestos.' | ';
$cuerpo=$cuerpo.' Importe | ';
*/
$cuerpo=$cuerpo.'|
';
$cuerpo=$cuerpo.' '.$codigoarticulo.' | ';
$cuerpo=$cuerpo.'';
$cuerpo=$cuerpo.' '.substr($descripcion,0,65).' | ';
$cuerpo=$cuerpo.'';
$cantidad= number_format($lafila2["cantidad"],2,",",".");
$cuerpo=$cuerpo.' '.$cantidad.' | ';
$cuerpo=$cuerpo.'';
$precio= number_format($lafila2["precio"],2,",",".");
$cuerpo=$cuerpo.' '.$precio.' | ';
/*
if ($lafila2["dcto"]==0) {
$cuerpo=$cuerpo.''; } else { $cuerpo=$cuerpo.' | '.$lafila2["dcto"].'% | ';
$cuerpo=$cuerpo.'';
$iva= number_format($lafila2["iva"],1,",",".");
$cuerpo=$cuerpo.' '.$iva.' | ';
}
$cuerpo=$cuerpo.'';
$cuerpo=$cuerpo.'$importe2= number_format($lafila2["importe"],2,",",".")';
$cuerpo=$cuerpo.' '.$importe2.' | ';
*/
$importe=$importe + $lafila2["importe"];
$cuerpo=$cuerpo.'
'; $cuerpo=$cuerpo.' | '; $cuerpo=$cuerpo.' | '; $cuerpo=$cuerpo.' | '; $cuerpo=$cuerpo.' |
'; @mysql_free_result($resultado); @mysql_free_result($resultado1); @mysql_free_result($resultado2); @mysql_free_result($resultado3); $cuerpo=$cuerpo.'
'; $cuerpo=$cuerpo.''; $cuerpo=$cuerpo.'