public function consultarPrecios($almacen, $entidad, $basedatos) { ?> <?php $articulo = $_POST['nomArticulo']; ?> <?php if ($_GET['codigo'] and $_GET['inactiva']) { if ($_GET['inactiva'] == "inactiva") { $q = "UPDATE articulos set \r\n\r\n\t\tactivo='I'\r\n\t\tWHERE entidad='" . $entidad . "' AND\r\n\t\talmacen='" . $_GET['codigo'] . "'"; mysql_db_query($basedatos, $q); echo mysql_error(); } else { $q = "UPDATE articulos set \r\n\r\n\t\tactivo='A'\r\n\t\tWHERE entidad='" . $entidad . "' AND\r\n\t\tcodigo='" . $_GET['codigo'] . "'"; mysql_db_query($basedatos, $q); echo mysql_error(); } } ?> <script language=javascript> function ventanaSecundaria (URL){ window.open(URL,"ventana","width=350,height=189,scrollbars=YES") } </script> <script language=javascript> function ventanaSecundaria2 (URL){ window.open(URL,"ventana2","width=350,height=170,scrollbars=YES") } </script> <script type="text/javascript" src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /js/wz_tooltip.js"></script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <?php $estilos = new muestraEstilos(); $estilos->styles(); ?> </head> <body> <div class="page_right"> <h1 align="center">Médicos Precios x Departamento </h1> <form id="form2" name="form2" method="post" action=""> <div align="center"> <table width="600" class="table-template-left"> <!--<table width="600" class="table-forma">--> <?php if (verificaCargoTotal::verificaCT($seguro, $basedatos)) { ?> <?php } ?> <tr > <td scope="col"> </td> <td scope="col"><div align="left" >Todos</div></td> <td scope="col"><div align="left"> <input name="todos" type="checkbox" id="todos" value="si" <?php if ($_POST['todos'] == 'si') { echo 'checked=""'; } ?> /> </div></td> <td scope="col"><input name="Submit" type="submit" value="Mostrar" /></td> </tr> <tr > <td width="31" scope="col"><label></label></td> <td width="103" scope="col"><div align="left">Departamento</div></td> <td width="347" scope="col"><div align="left"> <?php require CONSTANT_PATH_CONFIGURACION . "/componentes/comboAlmacen.php"; $comboAlmacen = new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad, 'style7', $almacenSolicitante, $almacenDestino, $basedatos); ?> </div></td> <td width="104" scope="col"> </td> </tr> </table> <label></label> </div> <p> </p> </form> <p align="center" class="style14"> <?php if ($_POST['almacenDestino']) { $articulo = '*'; if ($articulo === '*' and !$_POST['todos']) { $sSQL = "\r\nselect articulosPrecioNivel.codigo,articulosPrecioNivel.keyAPN,almacenes.almacenPadre,almacenes.almacen,almacenes.descripcion, articulosPrecioNivel.nivel1,articulosPrecioNivel.nivel3 \r\nfrom almacenes,articulosPrecioNivel where almacenes.medico='si'\r\nand\r\nalmacenes.almacen=articulosPrecioNivel.almacen\r\nand\r\nalmacenes.almacenPadre='" . $_POST['almacenDestino'] . "' \r\ngroup by almacenes.descripcion ASC\r\n"; } else { $sSQL = " select * from almacenes\r\nwhere\r\nalmacenPadre='" . $_POST['almacenDestino'] . "' \r\nand\r\nmedico='si'\r\n"; } if ($result = mysql_db_query($basedatos, $sSQL)) { echo mysql_error(); ?> </p> <form id="form1" name="form1" method="post" action="modificaA.php"> <p align="center"> </p> <table width="600" class="table table-striped"> <tr> <th width="69" scope="col"><div align="left"><span >Código</span></div></th> <th width="321" scope="col"><div align="left"><span >Mini Almacén (Médico)</span></div></th> <th width="74" scope="col"><div align="left"><span >Part.</span></div></th> <th width="68" scope="col"><div align="left"><span >Aseg.</span></div></th> <th width="41" scope="col"><div align="left"><span >Editar</span></div></th> </tr> <tr> <?php while ($myrow = mysql_fetch_array($result)) { $totalRegistros += 1; $sSQL5 = "SELECT *\r\nFROM\r\n `precioArticulos`\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result5 = mysql_db_query($basedatos, $sSQL5); $myrow5 = mysql_fetch_array($result5); $sSQL52 = "SELECT count(*) as totalRegedit\r\nFROM\r\nexistencias\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result52 = mysql_db_query($basedatos, $sSQL52); $myrow52 = mysql_fetch_array($result52); $i = $myrow52['totalRegedit']; $sSQL51 = "SELECT *\r\nFROM\r\nexistencias\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result51 = mysql_db_query($basedatos, $sSQL51); $myrow51 = mysql_fetch_array($result51); $bali = $myrow51['almacen']; $sSQL6 = "SELECT *\r\nFROM\r\narticulosPrecioNivel\r\nWHERE entidad='" . $entidad . "' \r\nAND\r\nalmacen='" . $myrow['almacen'] . "'\r\n\r\n "; $result6 = mysql_db_query($basedatos, $sSQL6); $myrow6 = mysql_fetch_array($result6); $C = $codigo = $code = $myrow6['codigo']; if ($col) { $color = '#FFFF99'; $col = ""; } else { $color = '#FFFFFF'; $col = 1; } $Cd = $myrow['almacen']; $sSQL7 = "SELECT *\r\nFROM\r\narticulos\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result7 = mysql_db_query($basedatos, $sSQL7); $myrow7 = mysql_fetch_array($result7); ?> <td bgcolor="<?php echo $color; ?> " height="24" ><span > <label><?php echo $Cd; ?> </label> </span></td> <td bgcolor="<?php echo $color; ?> " ><span ><?php echo $myrow['descripcion']; ?> <?php if (!$bali) { echo '<img src="' . CONSTANT_PATH_SIMA_RAIZ . '/imagenes/stop.png" alt="NO TIENE ASIGNADO NINGUN PRECIO O ALMACEN" width="13" height="13" border="0" />'; } ?> <?php if ($myrow['generico'] == 'si') { ?> <blink> <img src="../imagenes/g.jpg" alt="MEDICAMENTO GENERICO..." width="12" height="12" border="0" /> </blink> <?php } else { echo ''; } ?> </span></td> <td bgcolor="<?php echo $color; ?> " > <?php if ($myrow6['nivel1']) { echo "\$" . number_format($myrow6['nivel1'], 2); } else { echo '...'; } ?> </td> <td bgcolor="<?php echo $color; ?> " ><span > <?php if ($myrow6['nivel3']) { echo "\$" . number_format($myrow6['nivel3'], 2); } else { echo '...'; } ?> </span></td> <td bgcolor="<?php echo $color; ?> " > <a onmouseover="Tip('<div class="estilo25"><?php echo '' . $myrow['descripcion']; ?> </div>')" onMouseOut="UnTip()" href="javascript:ventanaSecundaria2('../ventanas/cambiarMedicos.php?nRequisicion=<?php echo $requisicion; ?> &almacenPadre= <?php echo $myrow['almacenPadre']; ?> &keyAPN=<?php echo $myrow['keyAPN']; ?> &codigo=<?php echo $C; ?> &almacen=<?php echo $Cd; ?> &keyPA=<?php echo $myrow['keyPA']; ?> ')"> <img src="../imagenes/Save.png" alt="Modificar Precios" width="12" height="12" border="0" /> </a></td> <?php if ($UM == 's' or $UM == 'S') { $modifica = 'modificaP.php'; } else { $modifica = 'modificaA.php'; } ?> </tr> <?php } } ?> </table> <p align="center"> <label></label> <input name="bandera" type="hidden" id="bandera" value="<?php echo $totalRegistros; ?> " /> </p> </form> <?php if ($totalRegistros) { ?> <p align="center"><strong><em>Se encontraron <?php echo $totalRegistros; ?> registros</em></strong></p> <?php } } ?> <p> </p> </div> </body> </html> <?php }
?> "/> </td> </tr> <tr> <td width="24" height="24" bgcolor="#CCCCCC"> </td> <td width="98" bgcolor="#CCCCCC" class="negromid">Departamento</td> <td width="478" bgcolor="#CCCCCC"> <?php require CONSTANT_PATH_CONFIGURACION . "/componentes/comboAlmacen.php"; $comboAlmacen = new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad, 'style12', $almacenSolicitante, $almacenDestino, $basedatos); ?> </td> </tr> <tr> <td height="23" bgcolor="#CCCCCC"> </td> <?php if (!$_POST['gpoProducto']) { ?> <td bgcolor="#CCCCCC" class="negromid">Mini Almacen</td>
</head> <body> <p align="center">REPORTE DE CONSULTAS DE MEDICOS (x CITAS) </p> <form id="form1" name="form1" method="post" action=""> <table width="546" border="0" align="center" class="Estilo24"> <tr> <th height="37" scope="col"> </th> <th width="129" bgcolor="#660066" scope="col"><div align="left"><span class="style13">Departamento Principal: </span></div></th> <th width="338" scope="col"><div align="left"> <?php require(CONSTANT_PATH_CONFIGURACION."/componentes/comboAlmacen.php"); $comboAlmacen=new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad,'style7',$almacenDestino,$almacenDestino,$basedatos); ?> </div></th> </tr> <tr> <th width="1" scope="col"> </th> <td bgcolor="#660066"><div align="left" class="style13">Fecha Inicial :</div></td> <td><div align="left"> <label> <input name="fechaInicial" type="text" class="Estilo24" id="campo_fecha" size="9" maxlength="9" readonly="" value="<?php if($_POST['fechaInicial']){ echo $_POST['fechaInicial']; } ?>"/> </label>
public function consultarArticulosxAlmacen($almacen, $entidad, $basedatos) { ?> <?php $articulo = $_POST['nomArticulo']; ?> <?php if ($_GET['codigo'] and ($_GET['inactiva'] or $_GET['activa'])) { if ($_GET['inactiva'] == "inactiva") { $q = "UPDATE articulos set \r\n\r\n\t\tactivo='I'\r\n\t\tWHERE keyPA='" . $_GET['keyPA'] . "'"; mysql_db_query($basedatos, $q); echo mysql_error(); } else { $q = "UPDATE articulos set \r\n\r\n\t\tactivo='A'\r\n\t\tWHERE keyPA='" . $_GET['keyPA'] . "'"; mysql_db_query($basedatos, $q); echo mysql_error(); } } if (!$_POST['nomArticulo']) { $_POST['nomArticulo'] = $_GET['nomArticulo']; } if (!$_POST['almacenDestino']) { $_POST['almacenDestino'] = $_GET['almacenDestino']; } if (!$_POST['almacenDestino1']) { $_POST['almacenDestino1'] = $_GET['almacenDestino1']; } ?> <script language=javascript> function ventanaSecundaria (URL){ window.open(URL,"ventana","width=350,height=189,scrollbars=YES") } </script> <script language=javascript> function ventanaSecundaria2 (URL){ window.open(URL,"ventana2","width=660,height=800,scrollbars=YES") } </script> <script language=javascript> function ventanaSecundaria20 (URL){ window.open(URL,"ventana20","width=350,height=170,scrollbars=YES") } </script> <script language=javascript> function ventanaSecundaria9 (URL){ window.open(URL,"ventanaSecundaria9","width=900,height=600,scrollbars=YES,resizable=YES, maximizable=YES") } </script> <SCRIPT LANGUAGE="JavaScript"> function checkIt(evt) { evt = (evt) ? evt : window.event var charCode = (evt.which) ? evt.which : evt.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) { status = "Este campo s�lo acepta n�meros." return false } status = "" return true } </SCRIPT> <script type="text/javascript" src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /js/wz_tooltip.js"></script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <?php $estilos = new muestraEstilos(); $estilos->styles(); ?> </head> <body> <div class="page_right"> <h1 align="center" >Artículos/Servicios x Almacén </h1> <form id="form2" name="form2" method="post" action=""> <!--<table width="399" class="table-forma">--> <table width="399" class="table-template-left"> <?php if (verificaCargoTotal::verificaCT($seguro, $basedatos)) { ?> <?php } ?> <tr > <td width="88" scope="col"><div align="left">Departamento</div></td> <td width="301" scope="col"> <div align="left" > <?php require CONSTANT_PATH_CONFIGURACION . "/componentes/comboAlmacen.php"; $comboAlmacen = new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad, 'combos', $almacenSolicitante, $almacenDestino, $basedatos); ?> </div></td> </tr> <tr > <td scope="col"><div align="left">Mini Almacén </div></td> <td scope="col"> <div align="left" > <?php $comboAlmacen1 = new comboAlmacen(); if (!$almacenDestino) { $almacenDestino = $almacenSolicitante; } $comboAlmacen1->despliegaMiniAlmacen($entidad, 'combos', $_POST['almacenDestino'], $almacenDestino, $basedatos); ?> </div></td> </tr> </table> <p> </p> <!--<table width="532" class="table-forma">--> <table width="532" class="table-template-left"> <tr> <td height="22" scope="col"><div align="left">Título</div></td> <td scope="col"><label> <div align="left"> <textarea name="titulo" cols="60" wrap="virtual" id="titulo"><?php echo $_POST['titulo']; ?> </textarea> </div> </label></td> </tr> <tr> <td height="22" scope="col"><div align="left">Incluir Referidos </div></td> <td scope="col"><div align="left"> <label> <input name="referidos" type="checkbox" id="referidos" value="si" <?php if ($_POST['referidos']) { echo 'checked=""'; } ?> /> </label> </div></td> </tr> <tr> <td height="22" align="left" scope="col">Precio</td> <td scope="col"><div align="left"> <label> <input type="radio" name="radio" id="asegura" value="asegura" /> </label> Aseguradora <label> <input type="radio" name="radio" id="part" value="part" /> Particular</label> <label> <input type="radio" name="radio" id="ambos" value="ambos" /> Ambos Precios</label> </div></td> </tr> <tr> <td height="22" scope="col"><div align="left">Porcentaje % </div></td> <td scope="col"><div align="left"> <label> <input name="porcentaje" type="text" id="porcentaje" size="2" maxlength="2" value="<?php echo $_POST['porcentaje']; ?> " onkeypress="return checkIt(event)"/> </label> </div></td> </tr> <tr> <td width="88" height="22" scope="col"> </td> <td width="322" scope="col"><span > </span> <div align="left" > <input name="buscar" type="submit" src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /imagenes/btns/searcharticles.png" id="buscar" value="buscar" /> </div> </td> </tr> </table> </form> <p align="center" > <?php if ($_POST['referidos'] == 'si') { $sSQL = "\r\nSELECT \r\narticulos.codigo,articulos.keyPA,articulos.descripcion \r\nFROM articulos,existencias\r\nwhere \r\n\r\narticulos.entidad='" . $entidad . "' AND\r\narticulos.codigo=existencias.codigo\r\nand\r\nexistencias.almacen='" . $_POST['almacenDestino1'] . "'\r\n AND\r\n articulos.activo='A'\r\norder by articulos.descripcion ASC\r\n"; } else { $sSQL = "\r\nSELECT \r\narticulos.codigo,articulos.keyPA,articulos.descripcion \r\nFROM articulos,existencias\r\nwhere \r\n\r\narticulos.entidad='" . $entidad . "' AND\r\narticulos.codigo=existencias.codigo\r\nand\r\n(articulos.laboratorioReferido='no' or articulos.laboratorioReferido='' )\r\nand\r\nexistencias.almacen='" . $_POST['almacenDestino1'] . "'\r\n AND\r\n articulos.activo='A'\r\norder by articulos.descripcion ASC\r\n"; } if ($result = mysql_db_query($basedatos, $sSQL)) { echo mysql_error(); ?> <br /> Listado de Servicios de: <?php $sSQL6a = "SELECT descripcion\r\nFROM\r\n almacenes\r\nWHERE entidad='" . $entidad . "' AND\r\nalmacen='" . $_POST['almacenDestino1'] . "'\r\n "; $result6a = mysql_db_query($basedatos, $sSQL6a); $myrow6a = mysql_fetch_array($result6a); echo $myrow6a['codigo']; ?> </p> <form id="form1" name="form1" method="post" action=""> <p> </p> <!--<table width="500" class="table table-striped">--> <table width="500" class="table-template-left"> <tr > <th width="2" scope="col"><div align="left" >#</div></th> <th width="539" scope="col"><div align="left" >Descripción</div></th> <th width="62" scope="col"><div align="left" >Part</div></th> <th width="59" scope="col"><div align="left" >Aseg</div></th> </tr> <tr > <?php while ($myrow = mysql_fetch_array($result)) { $keyPA = $myrow['keyPA']; $totalRegistros += 1; $codigo = $code = $myrow['codigo']; $sSQL52 = "SELECT count(*) as totalRegedit\r\nFROM\r\nexistencias\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result52 = mysql_db_query($basedatos, $sSQL52); $myrow52 = mysql_fetch_array($result52); $i = $myrow52['totalRegedit']; $sSQL5 = "SELECT *\r\nFROM\r\n `precioArticulos`\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result5 = mysql_db_query($basedatos, $sSQL5); $myrow5 = mysql_fetch_array($result5); $sSQL51 = "SELECT *\r\nFROM\r\nexistencias\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result51 = mysql_db_query($basedatos, $sSQL51); $myrow51 = mysql_fetch_array($result51); $bali = $myrow51['almacen']; $sSQL6 = "SELECT *\r\nFROM\r\n `articulosPrecioNivel`\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' and\r\nalmacen='" . $_POST['almacenDestino1'] . "'\r\n "; $result6 = mysql_db_query($basedatos, $sSQL6); $myrow6 = mysql_fetch_array($result6); if ($col) { $color = '#FFFF99'; $col = ""; } else { $color = '#FFFFFF'; $col = 1; } $C = $myrow['codigo']; $sSQL7 = "SELECT activo\r\nFROM\r\narticulos\r\nWHERE entidad='" . $entidad . "' AND\r\ncodigo = '" . $code . "' \r\n "; $result7 = mysql_db_query($basedatos, $sSQL7); $myrow7 = mysql_fetch_array($result7); $gpoProducto = $myrow['gpoProducto']; $sSQL39 = "\r\n\tSELECT \r\nprefijo\r\nFROM\r\ngpoProductos\r\nWHERE codigoGP='" . $gpoProducto . "'"; $result39 = mysql_db_query($basedatos, $sSQL39); $myrow39 = mysql_fetch_array($result39); ?> <td height="24" ><span > <label><?php echo $totalRegistros; ?> </label> </span></td> <td ><?php echo $myrow['descripcion']; ?> <?php if (!$bali) { echo '<img src="' . CONSTANT_PATH_SIMA_RAIZ . '/imagenes/stop.png" alt="NO TIENE ASIGNADO NINGUN PRECIO O ALMACEN" width="13" height="13" border="0" />'; } ?> <?php if ($myrow['generico'] == 'si') { ?> <blink> <img src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /imagenes/g.jpg" alt="MEDICAMENTO GENERICO..." width="12" height="12" border="0" /></blink> <?php } else { echo ''; } ?> </td> <td align="right" ><?php if ($myrow6['nivel1']) { echo "\$" . number_format($myrow6['nivel1'], 2); } else { echo '...'; } ?> </td> <td align="right" ><?php if ($myrow6['nivel3']) { echo "\$" . number_format($myrow6['nivel3'], 2); } else { echo '...'; } ?> </td> <?php if ($UM == 's' or $UM == 'S') { $modifica = 'modificaP.php'; } else { $modifica = 'modificaA.php'; } ?> </tr> <?php } } ?> </table> <p align="center"> <label></label> <input name="bandera" type="hidden" id="bandera" value="<?php echo $totalRegistros; ?> " /> <?php if ($totalRegistros >= 1) { ?> <a href="javascript:ventanaSecundaria9('imprimirPrecios.php?nRequisicion=<?php echo $requisicion; ?> &almacen= <?php echo $_POST['almacenDestino1']; ?> &medico=<?php echo $_GET['medico']; ?> &codigo=<?php echo $C; ?> &almacenes=<?php echo $Cd; ?> &porcentaje=<?php echo $_POST['porcentaje']; ?> &referidos=<?php echo $_POST['referidos']; ?> &titulo=<?php echo $_POST['titulo']; ?> ')"><br><img src="../imagenes/btns/printbutton.png" border="0" width="18" height="18"/></a> <?php } ?> </p> <input name="warehouse" type="hidden" value="<?php echo $_GET['warehouse']; ?> "> <input name="main" type="hidden" value="<?php echo $_GET['main']; ?> "> </form> <?php if ($totalRegistros) { ?> <p align="center" ><strong><em>Se encontraron <?php echo $totalRegistros; ?> registros</em></strong></p> <?php } ?> <p> </p> </div> </body> </html> <?php }
public function listadoServicios($titulo, $ventana, $entidad, $almacenSolicitante, $codigo, $basedatos) { if (!$_POST['almacenDestino']) { $_POST['almacenDestino'] = $ALMACEN; } ?> <script language=javascript> function ventanaSecundaria (URL){ window.open(URL,"ventana","widtd=350,height=270,scrollbars=YES") } </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <?php $estilos = new muestraEstilos(); $estilos->styles(); ?> </head> <body> <div class="page_right"> <h1 ><?php echo $titulo; ?> </h1> <form id="form2" name="form2" metdod="post" action=""> <!--<table widtd="482" class="table-forma">--> <table widtd="482" class="table-template-left"> <tr> <td scope="col"> </td> <td scope="col"><div align="left">Almacén</div></td> <td scope="col"> <div align="left"> <?php require CONSTANT_PATH_CONFIGURACION . "/componentes/comboAlmacen.php"; $comboAlmacen = new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad, 'style12', $almacenSolicitante, $almacenDestino, $basedatos); ?> </div></td> </tr> <tr> <td scope="col"> </td> <td height="36" scope="col"><div align="left">Mini-Almacén</div></td> <td scope="col"> <div align="left"> <?php $comboAlmacen1 = new comboAlmacen(); if (!$_POST['almacenDestino']) { $_POST['almacenDestino'] = $almacenSolicitante; } $comboAlmacen1->despliegaMiniAlmacen($entidad, 'style12', $_POST['almacenDestino'], $almacenDestino, $basedatos); ?> </div></td> </tr> <tr > <td widtd="10" scope="col"> </td> <td widtd="84" height="35" scope="col"><div align="left"><span >Artículo </span></div></td> <td widtd="388" scope="col"><div align="left"><span > <input name="nomArticulo" type="text" id="nomArticulo" size="60" value="<?php if ($_POST['nomArticulo']) { echo $_POST['nomArticulo']; } ?> "/> </span></div> </td> </tr> <tr> <td scope="col"> </td> <td scope="col"> </td> <td scope="col"><div align="left"> <input name="buscar" type="submit" id="buscar" value="buscar" /> <?php if ($_POST['nomArticulo'] === '*') { ?> <span >Este proceso puede demorar varios minutos...</span> <?php } ?> </div> <label> </label></td> </tr> </table> </form> <p align="center" > </p> <p align="center" > <?php if ($_POST['buscar'] and $_POST['nomArticulo'] and $_POST['almacenDestino']) { $articulo = $_POST['nomArticulo']; if ($articulo and $_POST['almacenDestino']) { if ($articulo != '*') { $sSQL = "\r\nSELECT * FROM articulos,existencias\r\n\r\n WHERE \r\n articulos.entidad='" . $entidad . "' AND\r\n articulos.um='s'\r\n and\r\n existencias.almacen='" . $_POST['almacenDestino1'] . "'\r\n and\r\n articulos.codigo=existencias.codigo and\r\n articulos.descripcion like '%{$articulo}%'\r\n order by articulos.descripcion ASC"; } else { $sSQL = "\r\nSELECT * FROM articulos,existencias\r\n\r\n WHERE \r\n articulos.entidad='" . $entidad . "' AND\r\n articulos.um='s'\r\n and\r\n existencias.almacen='" . $_POST['almacenDestino1'] . "'\r\n and\r\n articulos.codigo=existencias.codigo \r\n order by articulos.descripcion ASC"; } //cierra todos } else { $sSQL = "\r\nSELECT * FROM articulos\r\nWHERE articulos.entidad='" . $entidad . "' AND\r\n articulos.um='s'\r\nand\r\narticulos.descripcion like '%{$articulo}%'\r\n\r\n order by articulos.descripcion ASC"; } if ($result = mysql_db_query($basedatos, $sSQL)) { echo mysql_error(); ?> </p> <form id="form1" name="form1" metdod="get" action="<?php echo $modifica = 'modificaP.php'; ?> "> <p> </p> <!--<table widtd="584" class="table table-striped">--> <table widtd="584" class="table-template-left"> <tr> <th widtd="84" scope="col"><div align="left"><span >Código</span></div></th> <th widtd="359" scope="col"><div align="left"><span >Descripción</span></div></th> <th widtd="57" scope="col"><div align="left"><span >Cuarto</span></div></th> <th widtd="66" scope="col"><div align="left">Editar</div></th> </tr> <tr> <?php while ($myrow = mysql_fetch_array($result)) { $id_cuarto = $myrow['id_cuarto']; $codigo = $code = $myrow['codigo']; $sSQL5 = "SELECT *\r\nFROM\r\n `precioArticulos`\r\nWHERE\r\ncodigo = '" . $code . "' \r\n "; $result5 = mysql_db_query($basedatos, $sSQL5); $myrow5 = mysql_fetch_array($result5); $sSQL6 = "SELECT *\r\nFROM\r\n `articulosPrecioNivel`\r\nWHERE\r\ncodigo = '" . $code . "' \r\n "; $result6 = mysql_db_query($basedatos, $sSQL6); $myrow6 = mysql_fetch_array($result6); /* if($col){ $color = '#FFCCFF'; $col = ""; } else { $color = '#FFFFFF'; $col = 1; } */ $C = $myrow['codigo']; $sSQL7 = "SELECT *\r\nFROM\r\n `clientesPrecios`\r\nWHERE\r\ncodigo = '" . $code . "' and numCliente='" . $_POST['seguro'] . "' \r\n "; $result7 = mysql_db_query($basedatos, $sSQL7); $myrow7 = mysql_fetch_array($result7); if ($myrow6['nivel1'] and $myrow6['nivel3']) { $color = '#0000FF'; $estilo = "style11"; } else { $myrow6['nivel1'] = "Falta Precio"; $myrow6['nivel3'] = "Falta Precio"; $estilo = "style12"; } if ($myrow6['nivel1'] == "1" or $myrow6['nivel3'] == "1") { //$color='#FF0000'; //$estilo="style11"; } $totalRegistros += "1"; $sSQL15 = "SELECT *\r\nFROM\r\n `articulos`\r\nWHERE\r\ncodigo = '" . $code . "' \r\n "; $result15 = mysql_db_query($basedatos, $sSQL15); $myrow15 = mysql_fetch_array($result15); ?> <td > <label> <?php echo $C; ?> </label> </td> <td ><span ><?php echo $myrow15['descripcion']; ?> </span></td> <td ><span > <?php if ($myrow['id_cuarto']) { echo $myrow['id_cuarto']; } else { echo '---'; } ?> </span></td> <td > <div align="left"><a href="#" onClick="javascript:ventanaSecundaria('<?php echo $ventana; ?> ?numeroE=<?php echo $myrow['numeroE']; ?> &nCuenta=<?php echo $myrow['nCuenta']; ?> &almacen=<?php echo $_POST['almacenDestino1']; ?> &codigo=<?php echo $codigo; ?> &almacenPrincipal=<?php echo $ALMACEN; ?> &codigo=<?php echo $code; ?> ')"> <img src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /imagenes/edit.jpg" alt="Editar el art�culo: <?php echo $myrow15['descripcion']; ?> " widtd="12" height="12" border="0" /> </a> </div></td> </tr> <?php } } } ?> </table> <p align="center"> <label></label> <input name="bandera" type="hidden" id="bandera" value="<?php echo $totalRegistros; ?> " /> <input name="almacen" type="hidden" id="almacen" value="<?php echo $_POST['almacen']; ?> " /> </p> </form> <?php if ($totalRegistros) { ?> <p align="center"><strong><em>Se encontraron <?php echo $totalRegistros; ?> registros</em></strong></p> <?php } ?> <p> </p> </div> </body> </html> <?php }
<body> <h1 align="center" class="titulos">Anaqueles</h1> <form id="form1" name="form1" method="post" action="" onSubmit="return valida(this);"> <table width="647" height="104" border="0" align="center" class="blanco"> <tr> <td width="1" rowspan="4" bgcolor="#FFCCFF"><div align="left"></div> <div align="left"></div> <div align="left"></div></td> <td width="102" bgcolor="#660066"><div align="left" class="style13">Almacén</div></td> <td colspan="2" bgcolor="#FFCCFF"><div align="left"> <label><span class="style7"> <?php require CONSTANT_PATH_CONFIGURACION . "/componentes/comboAlmacen.php"; $comboAlmacen = new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad, 'combos', $almacen, $almacenDestino, $basedatos); ?> </span></label> </div></td> </tr> <tr> <?php if ($_POST['almacen1']) { $sSQL = "SELECT \r\n*\r\nFROM\r\n `anaqueles`\r\n INNER JOIN `tipoAnaqueles` ON (`anaqueles`.`tipoAnaquel` = `tipoAnaqueles`.`codigoAnaquel`)\r\n WHERE entidad='" . $entidad . "' and anaquel = '" . $_POST['almacen1'] . "' "; $result = mysql_db_query($basedatos, $sSQL); $myrow = mysql_fetch_array($result); } ?> <td bgcolor="#660066"><span class="blancos">Anaquel</span></td> <td colspan="2"><input name="anaquel" type="text" class="campos" id="anaquel" value="<?php
public function acumuladosAlmacenes($fecha2, $fecha1, $hora1, $entidad, $basedatos) { ?> <!-Hoja de estilos del calendario --> <link rel="stylesheet" type="text/css" media="all" href="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /calendario/calendar-brown.css" title="win2k-cold-1" /> <!-- librer�a principal del calendario --> <script type="text/javascript" src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /calendario/calendar.js"></script> <!-- librer�a para cargar el lenguaje deseado --> <script type="text/javascript" src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /calendario/lang/calendar-es.js"></script> <!-- librer�a que declara la funci�n Calendar.setup, que ayuda a generar un calendario en unas pocas l�neas de c�digo --> <script type="text/javascript" src="<?php echo CONSTANT_PATH_SIMA_RAIZ; ?> /calendario/calendar-setup.js"></script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- .Estilo24 {font-size: 10px} .style11 {color: #FFFFFF; font-size: 10px; font-weight: bold; } .style12 {font-size: 10px} .style7 {font-size: 9px} .style71 {font-size: 9px} .style71 {font-size: 9px} .style71 {font-size: 9px} .style121 {font-size: 10px} .style121 {font-size: 10px} .style13 {color: #FFFFFF} --> </style> </head> <body> <p> </p> <form id="form1" name="form1" method="post" action=""> <p align="center"><span class="style12">Departamentos: </span> <?php require CONSTANT_PATH_CONFIGURACION . "/componentes/comboAlmacen.php"; $comboAlmacen = new comboAlmacen(); $comboAlmacen->despliegaAlmacen($entidad, 'style7', $almacenSolicitante, $almacenDestino, $basedatos); ?> </p> <table width="317" border="0" align="center" class="style121"> <tr> <td width="95" bgcolor="#660066"><div align="left" class="style13">Fecha Inicial </div></td> <td width="190"><div align="left"> <label> <input name="fecha" type="text" class="style71" id="campo_fecha" size="11" maxlength="11" readonly="" value="<?php if ($_POST['fecha']) { echo $_POST['fecha']; } else { echo $fecha1; } ?> " onchange="javascript:this.form.submit();"/> </label> <input name="button" type="button" class="style121" id="lanzador" value="..." /> </div></td> </tr> </table> <?php if ($_POST['fecha'] and $_POST['fecha'] < $fecha1) { ?> <table width="441" border="0" align="center" class="style71"> <tr> <th width="51" bgcolor="#FFCCFF" class="Estilo24" scope="col"><div align="left">Código</div></th> <th width="212" bgcolor="#FFCCFF" class="Estilo24" scope="col"><div align="left">Descripción</div></th> <th width="62" bgcolor="#FFCCFF" class="Estilo24" scope="col"><div align="left">Importe</div></th> <th width="49" bgcolor="#FFCCFF" class="Estilo24" scope="col"><div align="left">IVA</div></th> <th width="45" bgcolor="#FFCCFF" class="Estilo24" scope="col"><div align="left">% IVA </div></th> </tr> <tr> <?php $sSQL = "\r\nSELECT * FROM gpoProductos\r\nWHERE \r\nentidad='" . $entidad . "' \r\nand\r\nactivo='activo'\r\n"; if ($result = mysql_db_query($basedatos, $sSQL)) { while ($myrow = mysql_fetch_array($result)) { $codigo = $code = $myrow['codigo']; if ($col) { $color = '#FFCCFF'; $col = ""; } else { $color = '#FFFFFF'; $col = 1; } $C = $myrow['codigoGP']; $sSQL7 = "SELECT SUM(precioVenta) as acumulado,sum(iva) as iva\r\nFROM\r\ncargosCuentaPaciente\r\nWHERE\r\ncargosCuentaPaciente.entidad='" . $entidad . "' \r\nand\r\ncargosCuentaPaciente.gpoProducto='" . $C . "'\r\nand\r\ncargosCuentaPaciente.fecha1='" . $_POST['fecha'] . "'\r\nand\r\ncargosCuentaPaciente.status!='transaccion'\r\nand\r\ncargosCuentaPaciente.almacen='" . $_POST['almacenDestino'] . "'\r\n "; $result7 = mysql_db_query($basedatos, $sSQL7); $myrow7 = mysql_fetch_array($result7); ?> <td bgcolor="<?php echo $color; ?> " ><label> <?php echo $C; ?> </label> </td> <td bgcolor="<?php echo $color; ?> " ><div align="left"><span class=""> <?php echo $myrow['descripcionGP']; ?> </span></div></td> <td bgcolor="<?php echo $color; ?> " class="Estilo24"><?php $cargos[0] += $myrow7['acumulado']; echo "\$" . number_format($myrow7['acumulado'], 2); ?> </td> <td bgcolor="<?php echo $color; ?> " class="Estilo24"><?php $iva[0] += $myrow7['iva']; echo "\$" . number_format($myrow7['iva'], 2); ?> </td> <td bgcolor="<?php echo $color; ?> " class="Estilo24"><?php if ($cargos[0] != NULL) { $porcentajeIVA = $abonos / $cargos[0] * 100; echo "\$ " . number_format($porcentajeIVA, 6); } ?> </td> </tr> <?php } } } ?> </table> <p> </p> <table width="513" border="0" align="center" class="style121"> <tr> <td bgcolor="#660066" class="style11"><div align="center"><span class="style71"> Cargos </span></div></td> <td height="14" bgcolor="#660066" class="style11"><div align="center"><span class="style71"> Abonos</span></div></td> <td bgcolor="#660066" class="style11"><div align="center">IVA</div></td> <td bgcolor="#660066" class="style11">% Percentage </td> <td bgcolor="#660066" class="style11"><div align="center">IVA x Pagar </div></td> </tr> <tr> <td width="97" class="style121"><div align="center"> <?php echo "\$ " . number_format($cargos[0], 2); ?> </div></td> <td width="106" height="23" class="style121"><div align="center"><span class="style71"> <?php $sSQL71 = "SELECT SUM(precioVenta) as abonos\r\nFROM\r\ncargosCuentaPaciente\r\nWHERE\r\ncargosCuentaPaciente.entidad='" . $entidad . "' \r\n\r\nand\r\ncargosCuentaPaciente.fecha1='" . $_POST['fecha'] . "'\r\nand\r\nstatus='transaccion'\r\n\r\n "; $result71 = mysql_db_query($basedatos, $sSQL71); $myrow71 = mysql_fetch_array($result71); $abonos = $myrow71['abonos']; echo "\$ " . number_format($myrow71['abonos'], 2); ?> </span></div></td> <td width="96" class="style121"><div align="center"><span class="style71"> <?php $sSQL711 = "SELECT SUM(iva) as ivaAcumulado\r\nFROM\r\ncargosCuentaPaciente\r\nWHERE\r\ncargosCuentaPaciente.entidad='" . $entidad . "' \r\n\r\nand\r\ncargosCuentaPaciente.fecha1='" . $_POST['fecha'] . "'\r\n\r\n\r\n "; $result711 = mysql_db_query($basedatos, $sSQL711); $myrow711 = mysql_fetch_array($result711); $ivaAcumulado = $myrow711['ivaAcumulado']; echo "\$ " . number_format($myrow711['ivaAcumulado'], 2); ?> </span></div></td> <td width="96" class="style121"><div align="center"> <?php if ($cargos[0] != NULL) { $porcentajeIVA = $abonos / $cargos[0] * 100; echo "\$ " . number_format($porcentajeIVA, 6); } ?> </div></td> <td width="96" class="style121"><div align="center"> <?php echo "\$ " . number_format($ivaAcumulado * $porcentajeIVA, 4); ?> </div></td> </tr> </table> </form> <p> </p> <script type="text/javascript"> Calendar.setup({ inputField : "campo_fecha", // id del campo de texto ifFormat : "%Y-%m-%d", // formato de la fecha que se escriba en el campo de texto button : "lanzador" // el id del bot�n que lanzar� el calendario }); </script> </body> </html> <?php }