Exemplo n.º 1
0
     $status = "cxc";
 } else {
     $status = "pendiente";
 }
 $codigo = $_POST['codigoArt'];
 $cantidad = $_POST['cantidad'];
 $agregarA = $_POST['agregarA'];
 for ($i = 0; $i <= $_POST['bandera']; $i++) {
     //********************FOR
     $Cost = $myrow23['costo'];
     //*********************saco centro de costo************
     //*************************************CONVENIOS********************************************
     $codigo[$i] = $agregarA[$i];
     $costoHospital = costoHospital($codigo[$i], $basedatos);
     $gpoProducto = gpoProducto($code = $codigo[$i], $basedatos);
     $descripcion = descripcion($code = $codigo[$i], $basedatos);
     $ctaContable = centroCosto($medico, $basedatos);
     $priceLevel = validacionConvenios($precioLevel, $code, $almacen, $gpoProducto, $seguro, $basedatos);
     $iva = iva($gpoProducto, $priceLevel, $basedatos);
     $porcentajeCXC = porcentajeCXC($porcentajeCXC, $code, $almacen, $gpoProducto, $seguro, $basedatos);
     $ivaCXC = ivaCXC($gpoProducto, $porcentajeCXC, $basedatos);
     //*/****************************************Cierro validacion de convenios************************
     //****************CIERRO PRECIOS****************/
     if ($codigo[$i] and $cantidad[$i] and $agregarA[$i]) {
         $leyenda = "Se ingresaron cargos a la cuenta paciente";
         $agrega1 = "INSERT INTO cargosCuentaPaciente (\r\nnumeroE,\r\ncodProcedimiento,\r\ncantidad,\r\nusuario,\r\nfecha1,\r\nip,\r\nstatus,\r\nalmacen,\r\ncosto,\r\n\r\nctaMayor,\r\nctoCosto,\r\nauxiliar,\r\n\r\nejercicio,\r\nseguro,\r\ndia,\r\niva,costoHospital\r\n) values (\r\n'" . $numeroPaciente . "',\r\n'" . $agregarA[$i] . "',\r\n'" . $cantidad[$i] . "',\r\n'" . $usuario . "',\r\n'" . $fecha1 . "',\r\n'" . $ip . "',\r\n'" . $status . "',\r\n'" . $ali . "',\r\n'" . $priceLevel . "',\r\n\r\n'" . $ctaMayor . "',\r\n'" . $ID_CCOSTO . "',\r\n'" . $aux . "',\r\n\r\n'" . $ID_EJERCICIOM . "',\r\n'" . $seguro . "',\r\n'" . $dia . "','" . $iva . "','" . $costoHospital . "'\r\n)";
         mysql_db_query($basedatos, $agrega1);
         echo mysql_error();
         if ($porcentajeCXC and !$_POST['cargo']) {
             $agrega1 = "INSERT INTO cargosCuentaPaciente (\r\nnumeroE,codProcedimiento,usuario,fecha1,ip,status,almacen,costo,iva,ctaMayor,ctoCosto,auxiliar,medico,ejercicio,dia,seguro,hora1,\r\ncostoHospital\r\n) values ('" . $_POST["numeroE"] . "','" . $agregarlos[$i] . "','" . $usuario . "',\r\n'" . $fecha1 . "','" . $ip . "','cxc','" . $ali . "','" . $porcentajeCXC . "',\r\n'" . $ivaCXC . "','" . $ctaContable . "','" . $ctaContable . "','" . $aux . "','" . $_POST["medico"] . "','" . $ID_EJERCICIOM . "','" . $dia . "',\r\n'" . $seguro . "','" . $hora1 . "','" . $costoHospital . "'\r\n)";
             mysql_db_query($basedatos, $agrega1);
<?php 
$sSQL18 = "\r\nSELECT \r\n*\r\nFROM\r\nlistaOC\r\nwhere \r\nentidad='" . $entidad . "' AND\r\nstatus ='solicita'\r\norder by keyREQ DESC\r\n";
$result18 = mysql_db_query($basedatos, $sSQL18);
if ($result18) {
    while ($myrow18 = mysql_fetch_array($result18)) {
        $b += '1';
        $as += '1';
        if ($col) {
            $color = '#FFFF99';
            $col = "";
        } else {
            $color = '#FFFFFF';
            $col = 1;
        }
        $code1 = $myrow18['codigo'];
        $descripcion = descripcion($code = $code1, $basedatos);
        if (!$descripcion) {
            $descripcion = "No existen estos artículos o están inactivos";
        }
        $a = $myrow18['id_almacen'];
        $sSQL7 = "Select * From almacenes WHERE almacen= '" . $a . "' ";
        $result7 = mysql_db_query($basedatos, $sSQL7);
        $myrow7 = mysql_fetch_array($result7);
        $R = $myrow18['nRequisicion'];
        $P = $myrow18['id_proveedor'];
        $sSQL2 = "Select * From proveedores WHERE id_proveedor= '" . $P . "' ";
        $result2 = mysql_db_query($basedatos, $sSQL2);
        $myrow2 = mysql_fetch_array($result2);
        ?>
      <td height="24" bgcolor="<?php 
        echo $color;
Exemplo n.º 3
0
    public static function imprimirFactura($nT, $nCuenta, $seguro, $fecha, $numeroE, $basedatos)
    {
        ?>
<script language=javascript> 
function ventanaSecundaria4 (URL){ 
   window.open(URL,"ventana4","width=800,height=300,scrollbars=YES,resizable=YES, maximizable=YES") 
} 
</script>

<script language=javascript> 
function ventanaSecundaria2 (URL){ 
   window.open(URL,"ventana2","width=300,height=400,scrollbars=YES,resizable=YES, maximizable=YES") 
} 
</script>

<script language="javascript" type="text/javascript">   
//Validacion de campos de texto no vacios by Mauricio Escobar   
//   
//Iv�n Nieto P�rez   
//Este script y otros muchos pueden   
//descarse on-line de forma gratuita   
//en El C�digo: www.elcodigo.com   
  
  
//*********************************************************************************   
// Function que valida que un campo contenga un string y no solamente un " "   
// Es tipico que al validar un string se diga   
//    if(campo == "") ? alert(Error)   
// Si el campo contiene " " entonces la validacion anterior no funciona   
//*********************************************************************************   
  
//busca caracteres que no sean espacio en blanco en una cadena   
function vacio(q) {   
        for ( i = 0; i < q.length; i++ ) {   
                if ( q.charAt(i) != " " ) {   
                        return true   
                }   
        }   
        return false   
}   
  
//valida que el campo no este vacio y no tenga solo espacios en blanco   
function valida(F) {   
           
        if( vacio(F.campo.value) == false ) {   
                alert("Introduzca un cadena de texto.")   
                return false   
        } else {   
                alert("OK")   
                //cambiar la linea siguiente por return true para que ejecute la accion del formulario   
                return true   
        }   
           
}   
  
  
  
  
</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">
<!-- por carlitos. cualquier duda o pregunta, visita www.forosdelweb.com

var ancho=100
var alto=100
var fin=300
var x=100
var y=100

function inicio()
{
ventana = window.open("cita.php", "_blank", "height=1,width=1,top=x,left=y,screenx=x,screeny=y");
abre();
}
function abre()
{
if (ancho<=fin) {
ventana.moveto(x,y);
ventana.resizeto(ancho,alto);
x+=5
y+=5
ancho+=15
alto+=15
timer= settimeout("abre()",1)
}
else {
cleartimeout(timer)
}
}
// -->
</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">
<!--
.style7 {font-size: 9px}
.Estilo24 {font-size: 10px}
.style19 {color: #000000; font-weight: bold; }
-->
</style>


</head>
<style type="text/css">
<!--
.style12 {font-size: 10px}
.Estilo25 {color: #000000}
.style11 {color: #FFFFFF; font-size: 10px; font-weight: bold; }
-->
</style>
<BODY >
<div align="left">
  <table width="597" border="0" align="center">
    <tr>
      <th width="77" scope="col"><img src="<?php 
        echo CONSTANT_PATH_SIMA_RAIZ;
        ?>
/imagenes/logohlc.jpg" width="68" height="60" align="left" /></th>
      <th width="411" scope="col"><h1>Hospital La Carlota </h1></th>
      <th width="95" scope="col"><span class="style7"><?php 
        echo cambia_a_normal($fecha1);
        ?>
</span></th>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td class="style7"><div align="center">
          <h5 class="Estilo25">Camino al Vapor #201 Col. Zambrano, Montemorelos.</h5>
          <h5 class="Estilo25"> Tel. 8262633188 </h5>
      </div></td>
      <td class="style7"> Folio: <?php 
        echo $numeroE;
        ?>
</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><div align="center" class="Estilo25"></div></td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <?php 
        $sSQL = "Select * From clientes WHERE numCliente = '" . $seguro . "' ";
        $result = mysql_db_query($basedatos, $sSQL);
        $myrow = mysql_fetch_array($result);
        ?>
  <table width="603" border="0" align="center">
    <tr>
      <td width="31"><span class="style7">Cliente:</span></td>
      <td width="223" class="style7"><?php 
        echo $myrow['nomCliente'];
        ?>
</td>
      <td width="26" class="style7">RFC:</td>
      <td width="92" class="style7"><?php 
        echo $myrow['rfc'];
        ?>
</td>
      <td width="10" class="style7">&nbsp; </td>
      <td width="73" class="style7">Fecha</td>
      <td width="59" class="style7"><?php 
        echo $fecha1;
        ?>
 </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><span class="style7"><?php 
        echo $myrow['ciudad'] . " ";
        echo $myrow['estado'];
        ?>
</span></td>
      <td><span class="style7">CP:</span></td>
      <td><span class="style7"><?php 
        echo $myrow['cp'];
        ?>
</span></td>
      <td>&nbsp;</td>
      <td class="style7">Total a Pagar: </td>
      <td><span class="style7"><?php 
        echo $myrow['RFC'];
        ?>
</span></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td class="style7">Pagar antes de </td>
      <td><span class="style7"><?php 
        echo $myrow['RFC'];
        ?>
</span></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><div align="center" class="Estilo25"></div></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td class="style7">No. de Cliente: </td>
      <td><span class="style7"><?php 
        echo $myrow['RFC'];
        ?>
</span></td>
    </tr>
  </table>
</div>
<form id="form1" name="form1" method="post" action="">
  <table width="615" border="0" align="center">
    <tr>
      <th width="65" height="21" bgcolor="#660066" scope="col"><span class="style11">Cantidad</span></th>
      <th width="407" bgcolor="#660066" scope="col"><span class="style11">Descrpici&oacute;n</span></th>
      <th width="71" bgcolor="#660066" scope="col"><span class="style11">Importe</span></th>
      <th width="54" bgcolor="#660066" scope="col"><span class="style11">IVA</span></th>
    </tr>
    <tr>
      <?php 
        $sqlNombre = "SELECT distinct * FROM cargosCuentaPaciente where numeroE = '" . $numeroE . "' and\r\nstatusFactura='facturame' group by codProcedimiento order by codProcedimiento ASC\r\n";
        $resultaNombre = mysql_db_query($basedatos, $sqlNombre);
        while ($myrow = mysql_fetch_array($resultaNombre)) {
            $bandera += 1;
            $art = $myrow['codProcedimiento'];
            $registros += 1;
            if ($col) {
                $color = '#FFCCFF';
                $col = "";
            } else {
                $color = '#FFFFFF';
                $col = 1;
            }
            $descripcion = descripcion($art, $basedatos);
            ?>
      <td height="24" bgcolor="<?php 
            echo $color;
            ?>
" class="style12"><span class="style7">
        <?php 
            if ($myrow['cantidad']) {
                echo $myrow['cantidad'];
            } else {
                echo "N/A";
            }
            ?>
      </span></td>
      <td bgcolor="<?php 
            echo $color;
            ?>
" class="style12"><span class="style7">
        <?php 
            echo $descripcion;
            ?>
      </span></td>
      <td bgcolor="<?php 
            echo $color;
            ?>
" class="style12"><span class="style7">
        <?php 
            echo "\$" . number_format($myrow['costo'], 2);
            ?>
      </span></td>
      <td bgcolor="<?php 
            echo $color;
            ?>
" class="style12"><span class="style7">
        <?php 
            echo "\$" . number_format($myrow['iva'], 2);
            ?>
      </span></td>
    </tr>
    <?php 
        }
        //cierra while
        ?>
  </table>
</form>

</body>
</html>
<?php 
    }
Exemplo n.º 4
0
				<!--	  OPCIONES EDITAR / BORRAR -->
				<th style="width: 5%;" class="tcentrado {sorter: false}">Editar</th>
				<th style="width: 5%;" class="tcentrado {sorter: false}">Borrar</th>
			</tr>
		</thead>
		<tbody>
			<?php 
            while ($row = mysql_fetch_array($res)) {
                ?>
				<tr id="col<?php 
                echo $row['id'];
                ?>
">
					<!--	  INFO A MOSTRAR -->
					<td class="tcentrado"><?php 
                echo descripcion("clientes", "id", $row['cliente'], "nombre");
                ?>
</td>
					<td class="tcentrado"><?php 
                echo $row['nombre'];
                ?>
</td>
					<td class="tcentrado"><?php 
                echo $row['apellido1'];
                ?>
</td>
					<td class="tcentrado"><?php 
                echo $row['apellido2'];
                ?>
</td>
					<td class="tcentrado"><?php 
while ($myrow11 = mysql_fetch_array($result11)) {
    $code = $myrow11['codProcedimiento'];
    $gpoPro = $myrow11['gpoProducto'];
    $bandera += "1";
    if ($col) {
        $color = '#FFCCFF';
        $col = "";
    } else {
        $color = '#FFFFFF';
        $col = 1;
    }
    $cProced = $myrow11['codigo'];
    echo mysql_error();
    $gpoProducto = gpoProducto($code, $basedatos);
    $descripcion = descripcion($code, $basedatos);
    $iva = descripcion($gpoProducto, $basedatos);
    $ctaContable = centroCosto($medico, $basedatos);
    $precioLevel = validacionConvenios($precioLevel, $code, $almacen, $gpoProducto, $seguro, $basedatos);
    $porcentajeCXC = porcentajeCXC($porcentajeCXC, $code, $almacen, $gpoProducto, $seguro, $basedatos);
    //***********traigo cuenta contable
    //****************************Terminan las validaciones
    ?>
      <td height="24" bgcolor="<?php 
    echo $color;
    ?>
" class="Estilo24"><span class="style7">
        <label></label>
        <?php 
    echo $code;
    ?>
        <input name="codigoAlpha[]" type="hidden" id="codigoAlpha[]" value="<?php 
Exemplo n.º 6
0
                          <!--<li class="divider"></li>-->
                          <li><a href="#">Cerrar Sesión</a></li>
                      </ul>     
                  </li>
              </ul>
            </div>
          </div>
        </nav>
        <div class="container" id="cabecera-guia">
            <?php 
/*Cagar titulo guia*/
$stmt = $conn->prepare("SELECT Titulo, Descripcion FROM Guia WHERE Id =:id");
$stmt->bindParam(':id', $idGuia);
$stmt->execute();
$row = $stmt->fetch();
descripcion($row['Titulo'], $row['Descripcion']);
?>
	
        </div>
        <div class="container" id="tipo_preguntas">
		 <form action="scripts/enviarRespuestas.php" method="post" autocomplete="on" enctype="multipart/form-data">
		 
            <?php 
/*Arreglos para guardar las variables*/
$ids = array();
$enunciados = array();
$tipos = array();
if ($modo == 'CREAR' || $modo == 'EDITAR') {
    /*Seleccionar todas las preguntas de Pregunta*/
    $stmt = $conn->prepare("SELECT * FROM Pregunta");
    $stmt->execute();
Exemplo n.º 7
0
 <tr>
   <th width="48" height="19" bgcolor="#660066" scope="col"><div align="left"><span class="style11">C&oacute;digo  </span></div></th>
   <th width="335" bgcolor="#660066" scope="col"><span class="style11">Descripci&oacute;n</span></th>
   <th width="43" bgcolor="#660066" scope="col"><span class="style11">U.Medida</span></th>
   <th width="48" bgcolor="#660066" scope="col"><span class="style11">Precio</span></th>
   <th width="37" bgcolor="#660066" scope="col"><span class="style11">Agregar</span></th>
 </tr>
 <tr>
   <?php 
       while ($myrow = mysql_fetch_array($result)) {
           $bandera += "1";
           $code = $myrow['codigo'];
           //*************************************CONVENIOS********************************************
           $um = um($code, $basedatos);
           $gpoProducto = gpoProducto($code, $basedatos);
           $descripcion = descripcion($code, $basedatos);
           $ctaContable = centroCosto($medico, $basedatos);
           $precioLevel = validacionConvenios($precioLevel, $code, $almacen, $gpoProducto, $seguro, $basedatos);
           $iva = iva($gpoProducto, $precioLevel, $basedatos);
           $porcentajeCXC = porcentajeCXC($porcentajeCXC, $code, $almacen, $gpoProducto, $seguro, $basedatos);
           $ivaCXC = ivaCXC($gpoProducto, $porcentajeCXC, $basedatos);
           //*/****************************************Cierro validacion de convenios************************
           //cierro descuento
           if ($col) {
               $color = '#FFCCFF';
               $col = "";
           } else {
               $color = '#FFFFFF';
               $col = 1;
           }
           $sSQL4 = "\r\nSELECT \r\n  *\r\nFROM\r\nexistencias\r\nWHERE codigo = '" . $code1 . "'\r\nand \r\nalmacen='" . $almacen . "'\r\n";