function Footer() { $this->SetFont('Arial', '', 6); $this->SetY(-21); $this->Cell(0, 10, '', 0, 0, 'C'); $this->SetY(-18); $this->Cell(0, 10, html_entity_decode(''), 0, 0, 'C'); $this->SetY(-15); $this->Cell(0, 10, html_entity_decode(''), 0, 0, 'C'); $this->SetY(-12); /** $this->Cell(0,10,'___________________',0,0,'C'); $this->Ln(4); $this->Cell(0,10,"Administrador",0,0,'C');*/ //$this->Ln(4); $this->SetFont('Arial', '', 8); $fecha = implota($fechahoy = date("Y-m-d")); $fecha .= " " . date("H:i"); $this->Cell(0, 10, utf8_decode('Fecha de impresión ') . $fecha . '.', 0, 0, 'C'); //$this->Cell(0); $this->Cell(-5, 10, utf8_decode('Página ') . $this->PageNo(), 0, 0, 'R'); }
$subtitle = "Listado de Respaldos"; $ww = array(14, 35, 30, 20, 20, 20, 20, 20); /*/Ttulos de las columnas*/ $header = array('Fecha', 'Tarea', 'Equipo/Usuario', 'Versión', 'Errores', 'Procesados', 'Respaldados', 'Tamaño'); $pdf = new PDF(); /*$pdf->Open();*/ $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 6); $contador = 0; $sel_resultado = "SELECT * FROM respaldospc WHERE codcliente='" . $codcliente . "' order by `fecha` DESC LIMIT 0 , 40"; $res_resultado = mysql_query($sel_resultado); $contador = 0; $w = array(14, 35, 30, 20, 20, 20, 20, 20); while ($contador < mysql_num_rows($res_resultado)) { $pdf->Cell($w[0], 5, implota(mysql_result($res_resultado, $contador, "fecha")), 'LRB', 0, 'L'); $pdf->Cell($w[1], 5, mysql_result($res_resultado, $contador, "tarea"), 'RB', 0, 'L'); $pdf->Cell($w[2], 5, mysql_result($res_resultado, $contador, "usuario"), 'RB', 0, 'L'); $pdf->Cell($w[3], 5, mysql_result($res_resultado, $contador, "version"), 'RB', 0, 'L'); $pdf->Cell($w[4], 5, mysql_result($res_resultado, $contador, "errores"), 'RB', 0, 'L'); $pdf->Cell($w[5], 5, mysql_result($res_resultado, $contador, "procesados"), 'RB', 0, 'L'); $pdf->Cell($w[6], 5, mysql_result($res_resultado, $contador, "respaldados"), 'RB', 0, 'L'); $pdf->Cell($w[7], 5, mysql_result($res_resultado, $contador, "tamano"), 'RB', 0, 'L'); $pdf->Ln(); $contador++; } $nombre = '../copias/backups.pdf'; $pdf->Output($nombre, 'F'); ?>
break; } } ?> </td> </tr> <?php $hoy = date("d/m/Y"); ?> <tr> <td width="6%">Fecha</td> <td width="27%"> <?php echo implota($fecha); ?> </td> <td width="3%">IVA</td> <td ><?php echo $iva; ?> %</td> <td colspan="3">Tipo cambio <label>U$S -> $ </label><span> <?php echo $tipocambio; ?> </span> </td> </tr>
$pdf->SetDrawColor(0, 0, 0); $pdf->SetLineWidth(0.2); $pdf->SetFont('Arial', 'B', 11); $pdf->Ln(31); $pdf->Cell(115); $pdf->Cell(10, 4, $codfactura, 0, 0, 'L', 0); $pdf->Ln(22); $pdf->Cell(60); $pdf->Cell(42, 4, $CiudadActual, 0, 0, 'L', 0); $pdf->Cell(20, 4, $dia1, 0, 0, 'L', 0); $pdf->Cell(55, 4, $mes1, 0, 0, 'L', 0); $pdf->Cell(10, 4, $ano1, 0, 0, 'L', 0); $pdf->Ln(8); $pdf->Cell(20); $pdf->Cell(125, 4, $lafila["nombre"], 0, 0, 'L', 0); $fecha = implota($lafila["fecha"]); $pdf->Cell(35, 4, $lafila["nif"], 0, 0, 'L', 0); $pdf->Ln(6); //Calculamos la provincia $codigoprovincia = $lafila["codprovincia"]; $consulta = "select * from provincias where codprovincia='{$codigoprovincia}'"; $query = mysql_query($consulta); $row = mysql_fetch_array($query); $pdf->Cell(20); $pdf->Cell(125, 4, $lafila["codpostal"] . " - " . $lafila["direccion"] . " - " . $row["nombreprovincia"], 0, 0, 'L', 0); $pdf->Cell(40, 4, $lafila["localidad"], 0, 0, 'L', 0); $pdf->Ln(7); //el proyecto original muestra los telefonos en la factura, no lo considero necesario. $pdf->Cell(140); // $pdf->Cell(35,4,$lafila["telefono"] . " - " . "Cel: " . $lafila["movil"],0,0,'L',0); $pdf->Ln(6);
echo $GLOBALS['fonos']; ?> </span></td> </tr> <tr> <td>=============================================</td> </tr> <tr> <td><span class="Estilo3">TICKET N: <?php echo $codfactura; ?> </span></td> </tr> <tr> <td><span class="Estilo3">FECHA: <?php echo implota(@mysql_result($rs_factura, 0, "fechacobro")); ?> </span></td> </tr> <tr> <td><span class="Estilo3">HORA: <?php echo $hora; ?> </span></td> </tr> </table> <br /> <table width="69%" border="0"> <tr>
$contador = $contador + 1; } //################### MENSAJE FOOTER $pdf->SetFont('Arial', '', 8); $pdf->Cell(1); $pdf->Cell(20, 4, "", 'LR', 0, 'C'); $pdf->Cell(16, 4, "", 'LR', 0, 'C'); $pdf->Cell(109, 4, '____________________________________________________________________________________', 'LR', 0, 'C'); $pdf->Cell(20, 4, "", 'LR', 0, 'C'); $pdf->Cell(25, 4, "", 'LR', 0, 'C'); $pdf->Ln(3); //############## LINEA 2 $pdf->Cell(1); $pdf->Cell(20, 4, "", 'LR', 0, 'C'); $pdf->Cell(16, 4, "", 'LR', 0, 'C'); $fecha = implota($fechahoy = date("Y-m-d")); $hora = date("H:i"); $codlist = $lafila["SerieComprobante"] . " - " . $lafila["NComprobante"]; $esTPV = getSesionDato("TipoVentaTPV"); $esTPV = $esTPV == 'VD' ? 'B2C' : 'B2B'; $pdf->Cell(109, 4, "TPV: " . $esTPV . " / Factura: " . $nroSerie . "-" . $nroFactura . " / CS: " . $codlist . "/ IGV:" . $IGV . " / OP: " . $operador . " / F.Imp: " . $fecha . " " . $hora, 'LR', 0, 'C'); $pdf->Cell(20, 4, "", 'LR', 0, 'C'); $pdf->Cell(25, 4, "", 'LR', 0, 'C'); //############## LINEA 3 $pdf->Ln(2); $pdf->Cell(1); $pdf->Cell(20, 4, "", 'LRB', 0, 'C'); $pdf->Cell(16, 4, "", 'LRB', 0, 'C'); $pdf->Cell(109, 4, "", 'LRB', 0, 'C'); $pdf->Cell(20, 4, "", 'LRB', 0, 'C'); $pdf->Cell(25, 4, "", 'LRB', 0, 'C');
location.href="../funciones/fpdf/cerrarcaja.php?fechainicio="+fechainicio+"&minimo="+minimo+"&maximo="+maximo+"&neto="+neto+"&iva="+iva+"&total="+total+"&contado="+contado+"&tarjeta="+tarjeta; } </script> </head> <body Scroll="NO"> <div id="pagina"> <div id="zonaContenidoCC"> <div align="center"> <form id="formulario" name="formulario" method="post" action="rejilla.php" target="frame_rejilla"> <table class="fuente8" width="40%" cellspacing=0 cellpadding=3 border=0> <tr><strong>Totales de facturación</strong></tr> <tr> <td>Cierre de Caja al:</td> <td><?php echo implota($fechainicio); ?> </td> <td> </td> </tr> <tr> <td><strong>Totales de facturación</strong></td> <td> </td> <td> </td> </tr> <tr> <td>De la factura n°</td> <td><?php echo $minimo; ?> </td>
$codarticulo = mysql_result($rs_mostrar, 0, "codarticulo"); $referencia = mysql_result($rs_mostrar, 0, "referencia"); $codfamilia = mysql_result($rs_mostrar, 0, "codfamilia"); $descripcion = mysql_result($rs_mostrar, 0, "descripcion"); $codimpuesto = mysql_result($rs_mostrar, 0, "impuesto"); $codproveedor1 = mysql_result($rs_mostrar, 0, "codproveedor1"); $codproveedor2 = mysql_result($rs_mostrar, 0, "codproveedor2"); $descripcion_corta = mysql_result($rs_mostrar, 0, "descripcion_corta"); $codubicacion = mysql_result($rs_mostrar, 0, "codubicacion"); $stock_minimo = mysql_result($rs_mostrar, 0, "stock_minimo"); $stock = mysql_result($rs_mostrar, 0, "stock"); $aviso_minimo = mysql_result($rs_mostrar, 0, "aviso_minimo"); $datos = mysql_result($rs_mostrar, 0, "datos_producto"); $fecha = mysql_result($rs_mostrar, 0, "fecha_alta"); if ($fecha != "0000-00-00") { $fechalis = implota($fecha); } $codembalaje = mysql_result($rs_mostrar, 0, "codembalaje"); $unidades_caja = mysql_result($rs_mostrar, 0, "unidades_caja"); $precio_ticket = mysql_result($rs_mostrar, 0, "precio_ticket"); $modif_descrip = mysql_result($rs_mostrar, 0, "modificar_ticket"); $observaciones = mysql_result($rs_mostrar, 0, "observaciones"); $precio_compra = mysql_result($rs_mostrar, 0, "precio_compra"); $precio_almacen = mysql_result($rs_mostrar, 0, "precio_almacen"); $precio_tienda = mysql_result($rs_mostrar, 0, "precio_tienda"); //$pvp=mysql_result($rs_mostrar,0,"precio_pvp"); $precio_iva = mysql_result($rs_mostrar, 0, "precio_iva"); $foto_name = mysql_result($rs_mostrar, 0, "imagen"); $codigobarras = mysql_result($rs_mostrar, 0, "codigobarras"); } ?>
' . $alias . '</B></TD> <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" COLSPAN=4 ALIGN="LEFT" VALIGN=MIDDLE> Se han encontrado errores sin especificar al realizar el respaldo</TD></TR> '; } } $contaAux++; $errores = ''; } } else { $encontrado = 1; $message .= ' <TR> <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" HEIGHT="16" ALIGN="CENTER" BGCOLOR="#CC0000" SDVAL="41629" SDNUM="3082;0;DD/MM/AA"><FONT COLOR="#FFFFFF"> ' . implota($hoy) . '</FONT></TD> <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE BGCOLOR="#CC0000"><B><FONT COLOR="#FFFFFF">' . $alias . '</FONT></B></TD> <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" COLSPAN=4 ALIGN="LEFT" VALIGN=MIDDLE BGCOLOR="#CC0000"><FONT COLOR="#FFFFFF"> No se le realizó el respaldo<br> <strong><u>Es posible que el equipo donde se realiza el respaldo este inaccesible</u></strong></FONT></TD> </TR> '; } $contadoAux++; $alias = ''; } if ($encontrado == 1 and ($dia <= 6 and $dia >= 0)) { echo $message = $topmessage . $message . "</TABLE>"; $total++; } if (!empty($email) and $encontrado == 1) { echo "<p>Envio mail<br>";
?> </div></td> <td width="8%" style="background-color:<?php echo $estadocolor[mysql_result($res_resultado, $contador, "estado")]; ?> "><div align="center"> <?php echo $estadoarray[mysql_result($res_resultado, $contador, "estado")]; ?> </div></td> <td width="8%"><div align="center"><?php echo number_format(mysql_result($res_resultado, $contador, "importe"), 2, ",", "."); ?> </div></td> <td width="8%"><div align="left"><?php echo implota(mysql_result($res_resultado, $contador, "facturado")); ?> </div></td> <?php if (mysql_result($res_resultado, $contador, "codequipo") != 0) { ?> <td ><div align="center"><a href="#"><img id="botonBusqueda" src="../../img/modificar.png" width="16" height="16" border="0" onClick="modificar_service(<?php echo mysql_result($res_resultado, $contador, "codservice"); ?> )" title="Modificar"></a></div></td> <td ><div align="center"><a href="#"><img id="botonBusqueda" src="../../img/ver.png" width="16" height="16" border="0" onClick="ver_service(<?php echo mysql_result($res_resultado, $contador, "codservice"); ?> )" title="Visualizar"></a></div></td> <td ><div align="center"><a href="#"><img id="botonBusqueda" src="../../img/eliminar.png" width="16" height="16" border="0" onClick="eliminar_service(<?php echo mysql_result($res_resultado, $contador, "codservice");
<body> <div id="pagina"> <div id="zonaContenido"> <div align="center"> <div id="tituloForm" class="header">PAGOS </div> <div id="frmBusqueda"> <form id="formdatos" name="formdatos" method="post" action="guardar_cobro.php"> <table class="fuente8" width="98%" cellspacing=0 cellpadding=3 border=0> <? $codproveedor=mysql_result($rs_facturas,0,"codproveedor"); $nombre=mysql_result($rs_facturas,0,"nombre"); $codfactura=mysql_result($rs_facturas,0,"codfactura"); $totalfactura=mysql_result($rs_facturas,0,"totalfactura"); $estado=mysql_result($rs_facturas,0,"estado"); $fechapago=mysql_result($rs_facturas,0,"fechapago"); if ($fechapago=="0000-00-00") { $fechapago=""; } else { $fechapago=implota($fechapago); } ?> <tr> <td width="15%">Código de proveedor</td> <td width="43%"><? echo $codproveedor?></td> <td width="42%" rowspan="14" align="left" valign="top"></td> </tr> <tr> <td width="15%">Nombre</td> <td width="43%"><? echo $nombre?></td> <td width="42%" rowspan="14" align="left" valign="top"></td> </tr> <tr> <td width="15%">Código de factura</td> <td width="43%"><? echo $codfactura?></td> <td width="42%" rowspan="14" align="left" valign="top"></td>
<table class="fuente8" cellspacing=0 cellpadding=3 border=0> <tr> <td>Fecha de inicio</td> <td><input id="fechainicio" type="text" class="cajaPequena" NAME="fechainicio" maxlength="10" value="<?php echo implota($fechainicio); ?> " readonly> <img src="../img/calendario.png" name="Image1" id="Image1" width="16" height="16" border="0" id="Image1" onMouseOver="this.style.cursor='pointer'" title="Calendario" style="vertical-align: middle; margin-top: -1px;"> </td> <td> </td> <td>Fecha de fin</td> <td><input id="fechafin" type="text" class="cajaPequena" NAME="fechafin" maxlength="10" value="<?php echo implota($fechafin); ?> " readonly> <img src="../img/calendario.png" name="Image11" id="Image11" width="16" height="16" border="0" onMouseOver="this.style.cursor='pointer'" style="vertical-align: middle; margin-top: -1px;"> </td> <td> </td> <td> </td> <td> </td> </tr> </table></td></tr></table> </div> <table class="fuente8" width="90%" cellspacing=0 cellpadding=3 border=0> <tr> <td width="30%" align="left"></td> <td width="50" align="center">
$res_resultado = mysql_query($sel_resultado); $contador = 0; $x = $pdf->GetX(); $y = $pdf->GetY(); $i = 0; while ($contador < mysql_num_rows($res_resultado)) { $y1 = $pdf->GetY(); if (!empty(mysql_result($res_resultado, $contador, "detalles"))) { $pdf->MultiCell($w[0], 3, mysql_result($res_resultado, $contador, "detalles"), 'LTB', 'L'); } else { $pdf->MultiCell($w[0], 3, mysql_result($res_resultado, $contador, "realizado"), 'LTB', 'L'); } $y2 = $pdf->GetY(); $yH = $y2 - $y1; $pdf->SetXY($x + $w[0], $pdf->GetY() - $yH); $pdf->Cell($w[1], $yH, implota(mysql_result($res_resultado, $contador, "fecha")), 'LTB', 0, 'C'); if (mysql_result($res_resultado, $contador, "codequipo") != 0) { $codequipo = mysql_result($res_resultado, $contador, "codequipo"); $consulta = "SELECT * FROM equipos WHERE borrado=0 AND `codequipo`='" . $codequipo . "'"; $rs_tabla = mysql_query($consulta); $pdf->Cell($w[2], $yH, mysql_result($rs_tabla, 0, "alias"), 'LRTB', 0, 'L'); } else { $pdf->Cell($w[2], $yH, 'Horas', 'LRTB', 0, 'L'); } if (is_numeric(mysql_result($res_resultado, $contador, "tipo"))) { $pdf->Cell($w[3], $yH, $Tipo[mysql_result($res_resultado, $contador, "tipo")], 'LTB', 0, 'L'); } else { $pdf->Cell($w[3], $yH, mysql_result($res_resultado, $contador, "tipo"), 'LTB', 0, 'L'); } $pdf->Cell($w[4], $yH, mysql_result($res_resultado, $contador, "solicito"), 'LTB', 0, 'L'); $pdf->Cell($w[5], $yH, number_format(mysql_result($res_resultado, $contador, "horas"), 2, ",", "."), 'LTB', 0, 'C');
<?php if (mysql_result($rs_query,0,"aviso_minimo")==0) { ?> <option value="0" selected="selected">No</option> <option value="1">Si</option> <? } else { ?> <option value="0">No</option> <option value="1" selected="selected">Si</option> <? } ?> </select></td> </tr> <tr> <td width="11%">Datos del producto</td> <td colspan="2"><textarea name="adatos" cols="41" rows="2" id="datos" class="areaTexto"><?php echo mysql_result($rs_query,0,"datos_producto")?></textarea></td> </tr> <tr> <td>Fecha de alta</td> <td colspan="2"><input NAME="fecha" type="text" class="cajaPequena" id="fecha" size="10" maxlength="10" readonly value="<?php echo implota(mysql_result($rs_query,0,"fecha_alta"))?>"> <img src="../img/calendario.png" name="Image1" id="Image1" width="16" height="16" border="0" id="Image1" onMouseOver="this.style.cursor='pointer'"> <script type="text/javascript"> Calendar.setup( { inputField : "fecha", ifFormat : "%d/%m/%Y", button : "Image1" } ); </script></td> </tr> <?php $embalaje=mysql_result($rs_query,0,"codembalaje"); $query_embalaje="SELECT codembalaje,nombre FROM embalajes WHERE borrado=0 ORDER BY nombre ASC"; $res_embalaje=mysql_query($query_embalaje); $contador=0;
?> </div></td> <td><div align="center"><?php echo $horas; ?> </div></td> <td align="center"><div align="center"> <a href="javascript:pon_prefijo('1','8400000000031','Servicio Técnico a Cliente','<?php echo $importe; ?> ', '3','1','<?php echo $codservice; ?> ','<?php echo implota($fecha) . ' | ' . $horas . 'hrs - ' . addslashes(str_replace('"', '"', $realizado)); ?> ');"> <img id="botonBusqueda" src="../img/convertir.png" border="0" title="Seleccionar"></a></div></td> </tr> <?php } ?> </tbody> </table> <?php } ?> <iframe id="frame_datos" name="frame_datos" width="0%" height="0" frameborder="0"> <ilayer width="0" height="0" id="frame_datos" name="frame_datos"></ilayer>
<form id="formulario" name="formulario" method="post" action="guardar_albaran.php"> <table class="fuente8" width="98%" cellspacing=0 cellpadding=3 border=0> <tr> <td width="15%">Código Proveedor </td> <td colspan="3"><input NAME="codproveedor" type="text" class="cajaPequena" id="codproveedor" size="6" maxlength="5" value="<? echo $codproveedor?>" readonly="yes"></td> </tr> <tr> <td width="6%">Nombre</td> <td width="27%"><input NAME="nombre" type="text" class="cajaGrande" id="nombre" size="45" maxlength="45" value="<? echo $nombre?>" readonly></td> <td width="3%">NIF</td> <td width="64%"><input NAME="nif" type="text" class="cajaMedia" id="nif" size="20" maxlength="15" value="<? echo $nif?>" readonly></td> </tr> <? $hoy=date("d/m/Y"); ?> <tr> <td width="6%">Fecha</td> <td width="27%"><input NAME="fecha" type="text" class="cajaPequena" id="fecha" size="10" maxlength="10" value="<? echo implota($fecha)?>" readonly> <img src="../img/calendario.png" name="Image1" id="Image1" width="16" height="16" border="0" id="Image1" onMouseOver="this.style.cursor='pointer'"> <script type="text/javascript"> Calendar.setup( { inputField : "fecha", ifFormat : "%d/%m/%Y", button : "Image1" } ); </script></td> <td width="3%">IVA</td> <td width="64%"><input NAME="iva" type="text" class="cajaPequena" id="iva" size="5" maxlength="5" value="16" onChange="cambio_iva()" value="<? echo $iva?>"> %</td> </tr> <tr> <td>Código de albarán</td> <td colspan="2"><?php
?> </div></td> <td width="12%"><div align="right"><?php echo number_format(mysql_result($res_resultado, $contador, "importe"), 2); ?> </div></td> <td width="20%"><div align="center"><?php echo mysql_result($res_resultado, $contador, "nombrefp"); ?> </div></td> <td class="aDerecha" width="20%"><div align="center"><?php echo mysql_result($res_resultado, $contador, "numdocumento"); ?> </div></td> <td class="aDerecha" width="15%"><div align="center"><?php echo implota(mysql_result($res_resultado, $contador, "pagos.fechapago")); ?> </div></td> <td width="5%"><div align="center"><a href="#"><img src="../images/observaciones.png" width="16" height="16" border="0" onClick="abreVentana('<?php echo mysql_result($res_resultado, $contador, "observaciones"); ?> ')" title="Ver Observaciones"></a></div></td> <td width="5%"><div align="center"><a href="#"><img src="../images/eliminar2.jpg" width="1" height="1" border="0" onClick="eliminar('<?php echo mysql_result($res_resultado, $contador, "codfactura"); ?> ',<?php echo mysql_result($res_resultado, $contador, "id"); ?> ,<?php echo mysql_result($res_resultado, $contador, "codproveedor"); ?>
if (!empty($valor) and $valor != 0) { $sql_chek = "SELECT * FROM `tipocambio` WHERE `fecha` = '" . $fecha . "' LIMIT 0 , 1 "; $rs_chek = mysql_query($sql_chek); if (mysql_num_rows($rs_chek) == 0) { $query_operacion = "INSERT INTO tipocambio (codtipocambio, fecha, valor) VALUES (null, '{$fecha}', '{$valor}')"; $rs_operacion = mysql_query($query_operacion); if ($rs_operacion) { $mensaje = "El tipo de cambio ha sido dado de alta correctamente"; } //echo $mensaje. "<br>"; } } // Javascript for updating the progress bar and information echo '<script language="javascript"> document.getElementById("progress").innerHTML="<div style=\\"width:' . $percent . ';background-color:#ddd;\\"> </div>"; document.getElementById("information").innerHTML="' . implota(date("Y-m-d", $i)) . ' finaliza el' . implota(date("Y-m-d", $fechaFin)) . ' "; </script>'; // This is for the buffer achieve the minimum size in order to flush data echo str_repeat(' ', 1024 * 64); // Send output to browser immediately flush(); // Sleep one second so we can see the delay sleep(1); } // Tell user that the process is completed echo '<script language="javascript">document.getElementById("information").innerHTML="Proceso completado"</script>'; sleep(3); echo "<script language=\"javascript\"> parent.\$('idOfDomElement').colorbox.close();</script>"; ?> </body>
<?php include "../../conectar.php"; include "../../funciones/fechas.php"; $codservice = $_GET['codservice']; $query_mostrar = "SELECT * FROM service WHERE codservice='{$codservice}'"; $rs_mostrar = mysql_query($query_mostrar); $codequipo = mysql_result($rs_mostrar, 0, "codequipo"); $codcliente = mysql_result($rs_mostrar, 0, "codcliente"); $fecha = mysql_result($rs_mostrar, 0, "fecha"); $fecha = implota($fecha); $facturado = mysql_result($rs_mostrar, 0, "facturado"); $facturado = implota($facturado); $tiposervice = mysql_result($rs_mostrar, 0, "tipo"); $solicito = mysql_result($rs_mostrar, 0, "solicito"); $horas = mysql_result($rs_mostrar, 0, "horas"); $estado = mysql_result($rs_mostrar, 0, "estado"); $detalles = mysql_result($rs_mostrar, 0, "detalles"); $realizado = mysql_result($rs_mostrar, 0, "realizado"); $importe = mysql_result($rs_mostrar, 0, "importe"); $query = "SELECT * FROM clientes WHERE codcliente='" . $codcliente . "'"; $rs_query = mysql_query($query); $tipos = array("Sin definir", "Sin Servicio", "Con Mantenimiento", "Mantenimiento y Respaldos"); $consulta = "SELECT * FROM equipos WHERE borrado=0 AND `codequipo`='" . $codequipo . "'"; $rs_tabla = mysql_query($consulta); $service = $tipos[mysql_result($rs_tabla, 0, "service")]; $desc = mysql_result($rs_tabla, 0, "alias") . " - " . mysql_result($rs_tabla, 0, "descripcion"); ?> <html> <head> <title>Principal</title>
<table class="fuente8" width="98%" cellspacing=0 cellpadding=3 border="0" > <tr><td valign="top" align="center"> <form id="formdatos" name="formdatos" method="post" action="guardar_cobro.php"> <table class="fuente8" width="50%" cellspacing=0 cellpadding=3 border=0> <?php $codproveedor = mysql_result($rs_facturas, 0, "codproveedor"); $nombre = mysql_result($rs_facturas, 0, "nombre"); $codfactura = mysql_result($rs_facturas, 0, "codfactura"); $totalfactura = mysql_result($rs_facturas, 0, "totalfactura"); $estado = mysql_result($rs_facturas, 0, "estado"); $fechapago = mysql_result($rs_facturas, 0, "fechapago"); $moneda = $tipomon[mysql_result($rs_facturas, 0, "moneda")]; if ($fechapago == "0000-00-00") { $fechapago = ""; } else { $fechapago = implota($fechapago); } ?> <tr> <td width="15%">Código de proveedor</td> <td width="43%"><?php echo $codproveedor; ?> </td> <td width="15%">Nombre</td> <td width="43%"><?php echo $nombre; ?> </td>
<?php include "../conectar.php"; include "../funciones/fechas.php"; $codalbaran = $_GET["codalbaran"]; $codproveedor = $_GET["codproveedor"]; $sel_albaran = "SELECT fecha FROM albaranesp WHERE codalbaran='{$codalbaran}' AND codproveedor='{$codproveedor}'"; $rs_albaran = mysql_query($sel_albaran); $fecha = mysql_result($rs_albaran, 0, "fecha"); $fecha = implota($fecha); $sel_proveedor = "SELECT nombre FROM proveedores WHERE codproveedor='{$codproveedor}'"; $rs_proveedor = mysql_query($sel_proveedor); $nombre_proveedor = mysql_result($rs_proveedor, 0, "nombre"); ?> <html> <head> <title>Principal</title> <link href="../estilos/estilos.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="../funciones/validar.js"></script> <link href="../calendario/calendar-blue.css" rel="stylesheet" type="text/css"> <script type="text/JavaScript" language="javascript" src="../calendario/calendar.js"></script> <script type="text/JavaScript" language="javascript" src="../calendario/lang/calendar-sp.js"></script> <script type="text/JavaScript" language="javascript" src="../calendario/calendar-setup.js"></script> <script language="javascript"> var cursor; if (document.all) { // Está utilizando EXPLORER cursor='hand'; } else { // Está utilizando MOZILLA/NETSCAPE cursor='pointer';
if (empty($iniciopagina)) { $iniciopagina=0; } if ($iniciopagina>$filas) { $iniciopagina=0; } if ($filas > 0) { ?> <? $sel_resultado="SELECT * FROM tabbackup WHERE ".$where; $sel_resultado=$sel_resultado." limit ".$iniciopagina.",10"; $res_resultado=mysql_query($sel_resultado); $contador=0; while ($contador < mysql_num_rows($res_resultado)) { if ($contador % 2) { $fondolinea="itemParTabla"; } else { $fondolinea="itemImparTabla"; }?> <tr class="<?php echo $fondolinea; ?> "> <td class="aCentro" width="6%"><? echo $contador+1;?></td> <td width="50%"><div align="center"><? echo mysql_result($res_resultado,$contador,"denominacion")?></div></td> <td width="16%"><div align="center"><? echo implota(mysql_result($res_resultado,$contador,"fecha"))?></div></td> <td width="16%"><div align="center"><? echo mysql_result($res_resultado,$contador,"hora")?></div></td> <td width="6%"><div align="center"><a href="#"><img src="../img/restaurar.png" width="16" height="16" border="0" onClick="restaurar(<?php echo mysql_result($res_resultado, $contador, "id"); ?> )" title="Restaurar"></a></div></td> <td width="6%"><div align="center"><a href="#"><img src="../img/eliminar.png" width="16" height="16" border="0" onClick="eliminar(<?php echo mysql_result($res_resultado, $contador, "id"); ?> )" title="Eliminar"></a></div></td> </tr> <? $contador++; } ?> </table> <? } else { ?>
<tr class="<?php echo $fondolinea; ?> "> <td class="aCentro" width="8%"><? echo $contador+1;?></td> <td width="8%"><div align="center"><? echo mysql_result($res_resultado,$contador,"codfactura")?></div></td> <td width="30%"><div align="left"><? echo mysql_result($res_resultado,$contador,"nombre")?></div></td> <td width="9%"><div align="center"><? echo number_format(mysql_result($res_resultado,$contador,"totalfactura"),2,",",".")?></div></td> <? $sel_cobros="SELECT sum(importe) as aportaciones FROM cobros WHERE codfactura='".mysql_result($res_resultado,$contador,"codfactura")."'"; $rs_cobros=mysql_query($sel_cobros); $aportaciones=mysql_result($rs_cobros,0,"aportaciones"); $pendiente=mysql_result($res_resultado,$contador,"totalfactura") - $aportaciones; ?> <td class="aDerecha" width="10%"><div align="center"><? echo number_format($pendiente,2,",",".")?></div></td> <td class="aDerecha" width="10%"><div align="center"><? echo implota(mysql_result($res_resultado,$contador,"fecha"))?></div></td> <td class="aDerecha" width="10%"><div align="center"><? echo $estado?></div></td> <td width="10%"><div align="center"><? echo implota(mysql_result($res_resultado,$contador,"fechavencimiento"));?></div></td> <td width="5%"><div align="center"><a href="#"><img src="../img/dinero.jpg" width="16" height="16" border="0" onClick="ver_cobros(<?php echo mysql_result($res_resultado, $contador, "codfactura"); ?> )" title="Ver Cobros"></a></div></td> </tr> <? $contador++; } ?> </table> <? } else { ?> <table class="fuente8" width="87%" cellspacing=0 cellpadding=3 border=0> <tr> <td width="100%" class="mensaje"><?php echo "No hay ninguna factura que cumpla con los criterios de búsqueda"; ?>
<td><span class="Estilo3">CODEKA</span></td> </tr> <tr> <td><span class="Estilo3">C/. XXXXXX </span></td> </tr> <tr> <td><span class="Estilo3">Tel.: 0000000000 </span></td> </tr> <tr> <td><span class="Estilo3">00000-XXXXXXXX</span></td> </tr> <tr> <td><span class="Estilo3">TICKET N.: <? echo $codfactura?></span></td> </tr> <tr> <td><span class="Estilo3">FECHA: <? echo implota(mysql_result($rs_factura,0,"fechacobro"))?></span></td> </tr> <tr> <td><span class="Estilo3">FORMA PAGO: <? echo mysql_result($rs_factura,0,"nombrefp")?></span></td> </tr> </table> <table width="85%" border="0"> <tr> <td width="12%" class="Estilo3"><div align="center">CANT.</div></td> <td width="70%" class="Estilo3"><div align="center">ARTICULO</div></td> <td width="18%" class="Estilo3"><div align="center">PVP</div></td> </tr> <? $sel_lineas="SELECT factulinea.*,articulos.* FROM factulinea,articulos WHERE factulinea.codfactura='$codfactura' AND factulinea.codigo=articulos.codarticulo ORDER BY factulinea.numlinea ASC"; $rs_lineas=mysql_query($sel_lineas);
echo "Si"; } ?> </td> </tr> <tr> <td width="22%">Datos del producto</td> <td colspan="2"><?php echo mysql_result($rs_query, 0, "datos_producto"); ?> </td> </tr> <tr> <td width="22%">Fecha de alta</td> <td colspan="2"><?php echo implota(mysql_result($rs_query, 0, "fecha_alta")); ?> </td> </tr> <?php $codembalaje = mysql_result($rs_query, 0, "codembalaje"); if ($codembalaje != 0) { $query_embalaje = "SELECT * FROM embalajes WHERE codembalaje='{$codembalaje}'"; @($res_embalaje = $conn->consulta($query_embalaje)); @($nombreembalaje = mysql_result($res_embalaje, 0, "nombre")); } else { $nombreembalaje = "Sin determinar"; } ?> <tr> <td width="22%">Embalaje</td>
echo number_format(mysql_result($res_resultado, $contador, "importe"), 2, ",", "."); ?> </div></td> <td width="20%"><div align="center"><?php echo mysql_result($res_resultado, $contador, "nombrefp"); ?> </div></td> <td class="aDerecha" width="20%"><div align="center"><?php echo mysql_result($res_resultado, $contador, "numdocumento"); if (mysql_result($res_resultado, $contador, "resguardo") > 0) { echo " Resguardo"; } ?> </div></td> <td class="aDerecha" width="15%"><div align="center"><?php echo implota(mysql_result($res_resultado, $contador, "fechavencimiento")); ?> </div></td> <td><div align="center"><a href="#"><img id="botonBusqueda" src="../img/observaciones.png" width="16" height="16" border="0" onClick="abreVentana('<?php echo mysql_result($res_resultado, $contador, "observaciones"); ?> ')" title="Ver Observaciones"></a></div></td> <td><div align="center"><a href="#"><img id="botonBusqueda" src="../img/eliminar.png" width="16" height="16" border="0" onClick="eliminar('<?php echo mysql_result($res_resultado, $contador, "codfactura"); ?> ',<?php echo mysql_result($res_resultado, $contador, "id"); ?> ,<?php
<div align="center"> <table class="fuente8" width="100%" cellspacing=0 cellpadding=3 border=0 ID="Table1"> <form name="form1" id="form1"> <? if ($filas > 0) { ?> <? $sel_resultado="SELECT * FROM facturasp,pagos,proveedores,formapago WHERE pagos.codfactura='$codfactura' AND pagos.codproveedor='$codproveedor' AND pagos.codfactura=facturasp.codfactura AND pagos.codproveedor=proveedores.codproveedor AND pagos.codformapago=formapago.codformapago ORDER BY pagos.id DESC"; $res_resultado=mysql_query($sel_resultado); $contador=0; while ($contador < mysql_num_rows($res_resultado)) { if ($contador % 2) { $fondolinea="itemParTabla"; } else { $fondolinea="itemImparTabla"; }?> <tr class="<?php echo $fondolinea?>"> <td class="aCentro" width="10%"><? echo $contador+1;?></td> <td width="12%"><div align="center"><? echo implota(mysql_result($res_resultado,$contador,"facturasp.fechapago"))?></div></td> <td width="12%"><div align="center"><? echo number_format(mysql_result($res_resultado,$contador,"importe"),2,",",".")?></div></td> <td width="20%"><div align="center"><? echo mysql_result($res_resultado,$contador,"nombrefp")?></div></td> <td class="aDerecha" width="20%"><div align="center"><? echo mysql_result($res_resultado,$contador,"numdocumento")?></div></td> <td class="aDerecha" width="15%"><div align="center"><? echo implota(mysql_result($res_resultado,$contador,"pagos.fechapago"))?></div></td> <td width="5%"><div align="center"><a href="#"><img src="../img/observaciones.png" width="16" height="16" border="0" onClick="abreVentana('<?php echo mysql_result($res_resultado,$contador,"observaciones")?>')" title="Ver Observaciones"></a></div></td> <td width="5%"><div align="center"><a href="#"><img src="../img/eliminar.png" width="16" height="16" border="0" onClick="eliminar('<?php echo mysql_result($res_resultado,$contador,"codfactura")?>',<?php echo mysql_result($res_resultado,$contador,"id")?>,<?php echo mysql_result($res_resultado,$contador,"codproveedor")?>,<?php echo mysql_result($res_resultado,$contador,"fechapago")?>,<?php echo mysql_result($res_resultado,$contador,"importe")?>)" title="Eliminar"></a></div></td> </tr> <? $contador++; } ?> </table> <? } else { ?> <table class="fuente8" width="100%" cellspacing=0 cellpadding=3 border=0> <tr> <td width="100%" class="mensaje"><?php echo "Todavía no se ha producido ningún pago en esta factura.";?></td> </tr> </table> <? } ?> </form>
$contador++; $Cant_Ventas++; } /* Sector compras*/ $sel_resultado = "SELECT codfactura,proveedores.nombre as nombre,facturasp.fecha as fecha,proveedores.codproveedor,totalfactura,facturasp.iva,estado,moneda \n\t\t\t\tFROM facturasp,proveedores WHERE facturasp.codproveedor=proveedores.codproveedor AND fecha ='" . $startTime . "'"; $res_resultado = mysql_query($sel_resultado); $contador = 0; while ($contador < mysql_num_rows($res_resultado)) { ?> <tr> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" height="17" align="center" sdval="<?php echo implota($startTime); ?> " sdnum="3082;0;DD/MM/AA"> <font face="GillSans"><?php echo implota($startTime); ?> </font></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" colspan=2 align="left" valign=middle> <font face="GillSans"> <?php echo mysql_result($res_resultado, $contador, "nombre"); ?> </font></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" align="right"> <font face="GillSans"><?php echo mysql_result($res_resultado, $contador, "codfactura"); ?> </font></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" align="center"> <font face="GillSans"><?php echo $moneda[mysql_result($res_resultado, $contador, "moneda")];
} ?> <tr class="<?php echo $fondolinea; ?> "> <td class="aCentro" width="6%"><?php echo $contador + 1; ?> </td> <td width="50%"><div align="center"><?php echo mysql_result($res_resultado, $contador, "denominacion"); ?> </div></td> <td width="16%"><div align="center"><?php echo implota(mysql_result($res_resultado, $contador, "fecha")); ?> </div></td> <td width="16%"><div align="center"><?php echo mysql_result($res_resultado, $contador, "hora"); ?> </div></td> <td width="6%"><div align="center"><a href="#"><img src="../img/restaurar.png" width="16" height="16" border="0" onClick="restaurar(<?php echo mysql_result($res_resultado, $contador, "id"); ?> )" title="Restaurar"></a></div></td> <td width="6%"><div align="center"><a href="#"><img src="../img/eliminar.png" width="16" height="16" border="0" onClick="eliminar(<?php echo mysql_result($res_resultado, $contador, "id"); ?> )" title="Eliminar"></a></div></td> </tr>
<div align="center"> <div id="tituloForm" class="header">COBROS </div> <div id="frmBusqueda"> <form id="formdatos" name="formdatos" method="post" action="guardar_cobro.php"> <table class="fuente8" width="98%" cellspacing=0 cellpadding=3 border=0> <?php $codcliente = mysql_result($rs_facturas, 0, "codcliente"); $nombre = mysql_result($rs_facturas, 0, "nombre"); $codfactura = mysql_result($rs_facturas, 0, "codfactura"); $totalfactura = mysql_result($rs_facturas, 0, "totalfactura"); $estado = mysql_result($rs_facturas, 0, "estado"); $fechavencimiento = mysql_result($rs_facturas, 0, "fechavencimiento"); if ($fechavencimiento == "0000-00-00") { $fechavencimiento = ""; } else { $fechavencimiento = implota($fechavencimiento); } ?> <tr> <td width="15%">Código de cliente</td> <td width="43%"><?php echo $codcliente; ?> </td> <td width="42%" rowspan="14" align="left" valign="top"></td> </tr> <tr> <td width="15%">Nombre</td> <td width="43%"><?php echo $nombre; ?>