?>
" >
	  <?php 
        echo $myrow['folioVenta'];
        ?>
      </span></td>


      <td width="131" bgcolor="<?php 
        echo $color;
        ?>
" >

	  	  <?php 
        $verificaCargos = new acumulados();
        $verificaCargos->verificaCargos($basedatos, $usuario, $numeroE, $nCuenta);
        if ($myrow['paciente']) {
            ?>

	  <?php 
            echo $myrow['paciente'];
            ?>
	  <?php 
        } else {
            ?>
 
	  <?php 
            echo $myrow['paciente'] . " [NO TIENE NINGUN CARGO]";
            ?>
	  
	  <?php 
Beispiel #2
0
    public function listaExternos($usuario, $ALMACEN, $entidad, $TITULO, $fecha1, $ventana, $basedatos)
    {
        $sSQLC = "Select * From statusCaja where entidad='" . $entidad . "' and usuario='" . $usuario . "' order by keySTC DESC ";
        $resultC = mysql_db_query($basedatos, $sSQLC);
        $myrowC = mysql_fetch_array($resultC);
        if ($myrowC['status'] == 'abierta') {
            //*******************Comienzo la validaci�n*****************
            ?>







<script language=javascript> 
function ventanaSecundaria (URL){ 
   window.open(URL,"ventana","width=800,height=600,scrollbars=YES,resizable=YES, maximizable=YES") 
} 
</script> 

<script language="javascript" type="text/javascript">

var win = null;
function nueva(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}

</script>

 <!-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> 
<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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css">
<!--
.Estilo24 {font-size: 13px}
-->
</style>
<head>

<?php 
            $estilos = new muestraEstilos();
            $estilos->styles();
            ?>
<meta http-equiv="refresh" content="30" >
</head>

<body>



<?php 
            if ($_GET['fechaInicial']) {
                $date = $_GET['fechaInicial'];
            } else {
                $date = $fecha1;
            }
            ?>

<form id="form10" name="form10" method="get" action="#">
  <h1 align="center" class="titulo"> <?php 
            echo $TITULO;
            ?>
</h1>
  <p align="center" class="titulo">
    <label>
    <input onChange="this.form.submit();" name="fechaInicial" type="text" class="Estilo24" id="campo_fecha" size="10" maxlength="9" readonly=""
		value="<?php 
            echo $date;
            ?>
"/>
    </label>
    <input name="button" type="button" class="Estilo24" id="lanzador" value="..." />
</p>
  <img src="<?php 
            echo CONSTANT_PATH_SIMA_RAIZ;
            ?>
/imagenes/bordestablas/borde1.png" width="864" height="24" />
  <table width="864" border="0.2" align="center" cellpadding="4" cellspacing="0">
    <tr bgcolor="#FFFF00">
      <th width="85" class="blanco" scope="col"><div align="left">Referencia</div></th>
      <th width= "195" class="blanco" scope="col"><div align="left">Nombre del paciente:</div></th>
      <th width= "260" class="blanco" scope="col"><div align="left">Aseguradora</div></th>
	  <th class="blanco" scope="col"><div align="left">Departamento</div></th>
	  <th class="blanco" scope="col"><div align="left">Usuario</div></th>
	  <th class="blanco" scope="col">Aplicar</th>
    </tr>
    <tr>
      <?php 
            $sSQL = "SELECT *\r\nFROM\r\nclientesInternos,cargosCuentaPaciente\r\nWHERE \r\nclientesInternos.entidad='" . $entidad . "' AND\r\nclientesInternos.keyClientesInternos=cargosCuentaPaciente.keyClientesInternos\r\nAND\r\ncargosCuentaPaciente.statusCargo='cargado'\r\nAND\r\nclientesInternos.status='activa' \r\nand \r\nclientesInternos.tipoPaciente='interno'\r\nAND\r\n((clientesInternos.almacenSolicitud!='' and clientesInternos.fechaSolicitud='" . $date . "' ) \r\nor\r\n(clientesInternos.fecha1='" . $date . "' )) \r\ngroup by clientesInternos.keyClientesInternos\r\nORDER BY clientesInternos.nomCliente DESC\r\n ";
            if ($result = mysql_db_query($basedatos, $sSQL)) {
                while ($myrow = mysql_fetch_array($result)) {
                    $numeroE = $myrow['numeroE'];
                    $nCuenta = $myrow['nCuenta'];
                    if ($col) {
                        $color = '#FFCCFF';
                        $col = "";
                    } else {
                        $color = '#FFFFFF';
                        $col = 1;
                    }
                    $nT = $myrow['keyClientesInternos'];
                    ?>
      <td height="24" bgcolor="<?php 
                    echo $color;
                    ?>
" class="codigos"><?php 
                    echo $myrow['folioVenta'];
                    ?>
</td>


      <td width="195" bgcolor="<?php 
                    echo $color;
                    ?>
" class="normal">

	  	  <?php 
                    $verificaCargos = new acumulados();
                    $verificaCargos->verificaCargos($basedatos, $usuario, $numeroE, $nCuenta);
                    if ($myrow['paciente']) {
                        ?>

	  <?php 
                        echo $myrow['paciente'];
                        ?>
	  <?php 
                    } else {
                        ?>
 
	  <?php 
                        echo $myrow['paciente'] . " [NO TIENE NINGUN CARGO]";
                        ?>
	  
	  <?php 
                    }
                    ?>
 
          <input name="nombrePaciente" type="hidden" id="nombrePaciente" value="<?php 
                    echo $nombrePaciente;
                    ?>
"/>
        <input name="tipoSeguro" type="hidden" id="tipoSeguro" value="<?php 
                    echo $myrow['seguro'];
                    ?>
"/>
      </span></td>

      <td width="260" bgcolor="<?php 
                    echo $color;
                    ?>
" class="normal"><?php 
                    if ($myrow['seguro']) {
                        $numCliente = $myrow['seguro'];
                        $sSQL17 = "\r\n\tSELECT \r\n*\r\nFROM\r\nclientes\r\nWHERE \r\nnumCliente = '" . $numCliente . "'\r\n";
                        $result17 = mysql_db_query($basedatos, $sSQL17);
                        $myrow17 = mysql_fetch_array($result17);
                        echo $myrow17['nomCliente'];
                    } else {
                        echo "Sin Seguro";
                    }
                    ?>
</span></td>

<td width="179" bgcolor="<?php 
                    echo $color;
                    ?>
" class="normal"><?php 
                    $al = $myrow['almacen'];
                    $sSQL17 = "\r\n\tSELECT \r\ndescripcion\r\nFROM\r\nalmacenes\r\nWHERE \r\nalmacen = '" . $al . "'\r\n";
                    $result17 = mysql_db_query($basedatos, $sSQL17);
                    $myrow17 = mysql_fetch_array($result17);
                    echo $myrow17['descripcion'];
                    ?>
</td>

<td width="70" bgcolor="<?php 
                    echo $color;
                    ?>
" class="codigos"><?php 
                    echo $myrow['usuario'];
                    ?>
</td>
<td width="49" bgcolor="<?php 
                    echo $color;
                    ?>
" class="normal" align="center"><label>


  <a href="javascript:nueva('estadoCuentaE.php?numeroE=<?php 
                    echo $myrow['keyClientesInternos'];
                    ?>
&nCuenta=<?php 
                    echo $myrow['keyClientesInternos'];
                    ?>
&almacenSolicitante=<?php 
                    echo $ALMACEN;
                    ?>
&nT=<?php 
                    echo $nT;
                    ?>
&folioVenta=<?php 
                    echo $myrow['folioVenta'];
                    ?>
&tipoVenta=<?php 
                    echo 'externo';
                    ?>
','ventana1','800','600','yes')"><img src="<?php 
                    echo CONSTANT_PATH_SIMA_RAIZ;
                    ?>
/imagenes/btns/aplybtn.png" alt="Almac&eacute;n &oacute; M&eacute;dico Activo" width="30" height="24" border="0"/>
  </a>
  
</label></td>

    </tr> 
    <?php 
                }
            }
            ?>
    <input name="menu" type="hidden" value="<?php 
            echo $menu;
            ?>
" />
  </table>
  <img src="../imagenes/bordestablas/borde2.png" width="864" height="24" />
<p>&nbsp;</p>
</form>

    <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 
        } else {
            $link = new ventanasPrototype();
            $mensaje = new ventanasPrototype();
            $link->links();
            $mensaje->despliegaMensaje('LA CAJA ESTA CERRADA');
        }
        ?>

<?php 
    }
    public function listaExternosDescuentos($ALMACEN, $entidad, $TITULO, $ventana, $basedatos)
    {
        ?>
<script language=javascript> 
function ventanaSecundaria (URL){ 
   window.open(URL,"ventana","width=800,height=600,scrollbars=YES,resizable=YES, maximizable=YES") 
} 
</script> 
<script src="<?php 
        echo CONSTANT_PATH_SIMA_RAIZ;
        ?>
/js/jquery.js" type="text/javascript"></script>
 <!-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="../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> 

<script language="javascript" type="text/javascript">

var win = null;
function nueva(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}

</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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<head>

<?php 
        $estilos = new muestraEstilos();
        $estilos->styles();
        ?>
<meta http-equiv="refresh" content="30" >
</head>

<body>
    <div class="page_right">
<?php 
        if ($_GET['fechaInicial']) {
            $date = $_GET['fechaInicial'];
        } else {
            $date = $fecha1;
        }
        ?>


<form id="form10" name="form10" method="get" action="#">
  <h1 align="center" >Aplicar Descuentos Pacientes Externos</h1>
  <p align="center" >Fecha: 
  <input onChange="this.form.submit();" name="fechaInicial" type="text"  id="campo_fecha" size="10" maxlength="10" readonly=""
		value="<?php 
        echo $date;
        ?>
"/>
    </label>
    <input name="button" type="image"src="<?php 
        echo CONSTANT_PATH_SIMA_RAIZ;
        ?>
/imagenes/btns/fecha.png" /></p>

  <!--<table width="536" class="table table-striped">-->
  <table width="536" class="table-template">
    <tr >
      <th width="49"   scope="col"><div align="center">Folio</div></th>
      <th width= "238"   scope="col"><div align="center">Nombre del paciente:</div></th>
      <th   scope="col"><div align="center">Departamento</div></th>
	  <th   scope="col"><div align="center">Usuario</div></th>
	  <th   scope="col"><div align="center">Aplicar</div></th>
    </tr>
    <tr >
      <?php 
        $fecha1 = date("Y-m-d");
        $sSQL = "SELECT *\r\nFROM\r\nclientesInternos\r\nwhere\r\nentidad='" . $entidad . "'\r\nand\r\nstatus!='cancelado'\r\nand\r\ntipoPaciente='externo'\r\nand\r\nfecha='" . $date . "'\r\nand\r\nstatusCaja!='pagado'\r\nand\r\nfolioVenta!=''\r\n\r\nORDER BY paciente ASC\r\n ";
        if ($result = mysql_db_query($basedatos, $sSQL)) {
            while ($myrow = mysql_fetch_array($result)) {
                $numeroE = $myrow['numeroE'];
                $nCuenta = $myrow['nCuenta'];
                $nT = $myrow['keyClientesInternos'];
                ?>
       <tr  > 
      <td height="24" ><?php 
                echo $myrow['folioVenta'];
                ?>
</td>


      <td width="238" >

	  	  <?php 
                $verificaCargos = new acumulados();
                $verificaCargos->verificaCargos($basedatos, $usuario, $numeroE, $nCuenta);
                if ($myrow['paciente']) {
                    ?>

	  <?php 
                    echo $myrow['paciente'];
                    ?>
	  <?php 
                } else {
                    ?>
 
	  <?php 
                    echo $myrow['paciente'] . " [NO TIENE NINGUN CARGO]";
                    ?>
	  
	  <?php 
                }
                ?>
 
        <input name="nombrePaciente" type="hidden" id="nombrePaciente" value="<?php 
                echo $nombrePaciente;
                ?>
"/>
        <input name="tipoSeguro" type="hidden" id="tipoSeguro" value="<?php 
                echo $myrow['seguro'];
                ?>
"/>
      </span></td>

      <td width="104" ><?php 
                $al = $myrow['almacen'];
                $sSQL17 = "\r\n\tSELECT \r\ndescripcion\r\nFROM\r\nalmacenes\r\nWHERE \r\nalmacen = '" . $al . "'\r\n";
                $result17 = mysql_db_query($basedatos, $sSQL17);
                $myrow17 = mysql_fetch_array($result17);
                echo $myrow17['descripcion'];
                ?>
</td>

<td width="74"  align="center"><?php 
                echo $myrow['usuario'];
                ?>
</td>
<td width="49"  align="center"><label>

<?php 
                if ($myrow['descuento'] == '') {
                    ?>
  <a href="javascript:nueva('../cargos/aplicarDescuentos.php?numeroE=<?php 
                    echo $myrow['keyClientesInternos'];
                    ?>
&nCuenta=<?php 
                    echo $myrow['keyClientesInternos'];
                    ?>
&almacenSolicitante=<?php 
                    echo $ALMACEN;
                    ?>
&nT=<?php 
                    echo $nT;
                    ?>
&folioVenta=<?php 
                    echo $myrow['folioVenta'];
                    ?>
&tipoVenta=<?php 
                    echo 'externo';
                    ?>
','ventana1','800','600','yes')"><img src="<?php 
                    echo CONSTANT_PATH_SIMA_RAIZ;
                    ?>
/imagenes/btns/desctbtn.png" alt="Almac&eacute;n &oacute; M&eacute;dico Activo" width="24" height="24" border="0"/>  </a>
<?php 
                } else {
                    echo '---';
                }
                ?>
   
</label></td>
    </tr> 
    <?php 
            }
        }
        ?>
    <input name="menu" type="hidden" value="<?php 
        echo $menu;
        ?>
" />
    <input name="main" type="hidden" value="<?php 
        echo $_GET['main'];
        ?>
" />
    <input name="warehouse" type="hidden" value="<?php 
        echo $_GET['warehouse'];
        ?>
" />
     <input name="datawarehouse" type="hidden" value="<?php 
        echo $_GET['datawarehouse'];
        ?>
" />
  </table>

<p>&nbsp;</p>
</form>
    </div>
<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 
    }
    public function listaExternos($entidad, $TITULO, $fecha1, $ventana, $basedatos)
    {
        ?>
  <script language="JavaScript" type="text/javascript">
    /**
    * funcion demo del evento onclick en la tabla
    */
    function envia()
    {
      document.forms[0].submit();
    }
    /**
    * funcion de captura de pulsaci�n de tecla en Internet Explorer
    */ 
    var tecla;
    function capturaTecla(e) 
    {
        if(document.all)
            tecla=event.keyCode;
        else
        {
            tecla=e.which; 
        }
     if(tecla==13)
        {
            document.forms[0].submit();
        }
    }  
    document.onkeydown = capturaTecla;
</script>


<script language=javascript> 
function ventanaSecundaria (URL){ 
   window.open(URL,"ventana","width=800,height=600,scrollbars=YES,resizable=YES, maximizable=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>
<style type="text/css">

.style11 {color: #FFFFFF; font-size: 10px; font-weight: bold; }
.style12 {font-size: 10px}
.style7 {font-size: 9px}
.style13 {color: #FFFFFF}
.enlace {cursor:default;}


div.htmltooltip{
position: absolute; /*leave this and next 3 values alone*/
z-index: 1000;
left: -1000px;
top: -1000px;
background: #272727;
border: 10px solid black;
color: white;
padding: 3px;
width: 250px; /*width of tooltip*/
}

</style>
</head>
<META HTTP-EQUIV="Refresh"
CONTENT="30"> 
<body>


<form id="form1" name="form1" method="get" action="#">
  <h1 align="center"> <?php 
        echo $TITULO;
        ?>
</h1>
  <table width="584" border="0.2" align="center">
    <tr>
      <th width="51" bgcolor="#660066" class="style12" scope="col"><div align="left"><span class="style11 style13"># Folio </span></div></th>
      <th bgcolor="#660066" class="style12" scope="col"><div align="left"><span class="style11 style13">Nombre del paciente:</span></div></th>
      <th bgcolor="#660066" class="style12" scope="col"><span class="style11 style13">Aseguradora</span></th>
	  <th bgcolor="#660066" class="style12" scope="col"><span class="style11 style13">Departamento</span></th>
    </tr>
    <tr>
      <?php 
        $sSQL = "SELECT *\r\nFROM\r\nclientesInternos \r\nWHERE \r\nentidad='" . $entidad . "' AND\r\nstatus='pendiente' \r\nand \r\ntipoPaciente='externo'\r\nAND\r\nfecha1='" . $fecha1 . "'\r\nORDER BY keyClientesInternos DESC\r\n ";
        if ($result = mysql_db_query($basedatos, $sSQL)) {
            while ($myrow = mysql_fetch_array($result)) {
                $numeroE = $myrow['numeroE'];
                $nCuenta = $myrow['nCuenta'];
                if ($col) {
                    $color = '#FFCCFF';
                    $col = "";
                } else {
                    $color = '#FFFFFF';
                    $col = 1;
                }
                $nT = $myrow['keyClientesInternos'];
                ?>
      <td height="24" bgcolor="<?php 
                echo $color;
                ?>
" class="style12"><span class="style7"><?php 
                echo $myrow['keyClientesInternos'];
                ?>
</span></td>


      <td width="257" bgcolor="<?php 
                echo $color;
                ?>
" class="style12"><span class="style7">

	  	  <?php 
                $verificaCargos = new acumulados();
                $verificaCargos->verificaCargos($basedatos, $usuario, $numeroE, $nCuenta);
                if ($verificaCargos->verificaCargos($basedatos, $usuario, $numeroE, $nCuenta) == TRUE) {
                    ?>
	 
<a href="#"  onClick="javascript:ventanaSecundaria('<?php 
                    echo $ventana;
                    ?>
?numeroE=<?php 
                    echo $myrow['keyClientesInternos'];
                    ?>
&amp;nCuenta=<?php 
                    echo $myrow['keyClientesInternos'];
                    ?>
&amp;almacen=<?php 
                    echo $bali;
                    ?>
&amp;nT=<?php 
                    echo $nT;
                    ?>
')">
	  <?php 
                    echo $myrow['paciente'];
                    ?>
</a>
	  <?php 
                } else {
                    ?>
 
	  <?php 
                    echo $myrow['paciente'] . " [NO TIENE NINGUN CARGO]";
                    ?>
	  
	  <?php 
                }
                ?>
 
          <input name="nombrePaciente" type="hidden" id="nombrePaciente" value="<?php 
                echo $nombrePaciente;
                ?>
"/>
        <input name="tipoSeguro" type="hidden" id="tipoSeguro" value="<?php 
                echo $myrow['seguro'];
                ?>
"/>
      </span></td>

      <td width="138" bgcolor="<?php 
                echo $color;
                ?>
" class="style12"><span class="style7"><?php 
                if ($myrow['seguro']) {
                    $numCliente = $myrow['seguro'];
                    $sSQL17 = "\r\n\tSELECT \r\n*\r\nFROM\r\nclientes\r\nWHERE \r\nnumCliente = '" . $numCliente . "'\r\n";
                    $result17 = mysql_db_query($basedatos, $sSQL17);
                    $myrow17 = mysql_fetch_array($result17);
                    echo $myrow17['nomCliente'];
                } else {
                    echo "Sin Seguro";
                }
                ?>
</span></td>

<td width="120" bgcolor="<?php 
                echo $color;
                ?>
" class="style12"><span class="style7"><?php 
                $al = $myrow['almacen'];
                $sSQL17 = "\r\n\tSELECT \r\n*\r\nFROM\r\nalmacenes\r\nWHERE \r\nalmacen = '" . $al . "'\r\n";
                $result17 = mysql_db_query($basedatos, $sSQL17);
                $myrow17 = mysql_fetch_array($result17);
                echo $myrow17['descripcion'];
                ?>
</span></td>

    </tr>
    <?php 
            }
        }
        ?>
    <input name="menu" type="hidden" value="<?php 
        echo $menu;
        ?>
" />
  </table>






  <p>&nbsp;</p>
</form>
</body>
</html>


<?php 
    }