Exemple #1
0
function DrawRows($empleado, $evaluacionId) {
	global $conn;

	$sql =
		"SELECT ROWNUM ID, cm_mejora
			FROM (SELECT cm_mejora
						  FROM rrhh.hcm_compromisomejora, rrhh.hfe_formularioevaluacion2008
						 WHERE cm_id_formularioevaluacion = fe_id
							 AND fe_id = :id
							 AND cm_fechabaja IS NULL
							 AND cm_mejora IS NOT NULL
							 AND fe_anoevaluacion = :ano
							 AND fe_fechabaja IS NULL
					ORDER BY cm_id)";
	$params = array(":id" => $evaluacionId, ":ano" => $_REQUEST["ano"]);
	$stmt = DBExecSql($conn, $sql, $params);
	$tot = DBGetRecordCount($stmt);
	while ($row = DBGetQuery($stmt)) {
		echo '<tr>';
		$id = "";
		if ($row["ID"] == 1) {
			$id = 'id="firstRow"';
			echo '<td rowspan="'.$tot.'" '.$id.'>'.$empleado.'</td>';
		}
		echo '<td '.$id.'>'.$row["ID"].'</td>';
		echo '<td '.$id.'>'.$row["CM_MEJORA"].'</td>';
		echo '</tr>';
	}
}
	public function export() {
		// Método encargado de exportar el query a excel..

		global $conn;

		$result = $this->header;
		$result.= "<table border=1>";

		$stmt = DBExecSql($conn, $this->sql);
		if (DBGetRecordCount($stmt) > 0) {
			$cols = 0;
			while($row = DBGetQuery($stmt, 0)) {
				// Exporto el nombre de las columnas..
				if ($cols == 0) {
					$cols = count($row);
					if ($this->showFieldNames) {
						$result.= "<tr>";
						for ($i=1; $i<=$cols; $i++) {
							$col_name = OCIColumnName($stmt, $i);
							if (substr($col_name, 0, 3) != "NO_") {
								$alineacion = "left";
								if (isset($this->fieldAlignment[$i - 1]))
									$alineacion = $this->fieldAlignment[$i - 1];

								$result.= "<th align=".$alineacion." style='".$this->fieldNamesStyle."'>".$col_name."</th>";
							}
						}
						$result.= "</tr>";
					}
				}

				// Exporto el valor de los campos..
				$result.= "<tr>";
				for ($i=0; $i<$cols; $i++) {
					$col_name = OCIColumnName($stmt, $i + 1);
					if (substr($col_name, 0, 3) != "NO_") {
						$alineacion = "left";
						if (isset($this->fieldAlignment[$i]))
							$alineacion = $this->fieldAlignment[$i];

						$result.= "<td align=".$alineacion." style='".$this->fieldValuesStyle."'>".$row[$i]."</td>";
					}
				}
				$result.= "</tr>";
			}
		}
		else
			$result.= "<tr><td>No hay registros para exportar.</td></tr>";

		$result.= "</table>";

		header("Content-type: ".$this->getHeader()."; charset=iso-8859-1");
		header("Content-Disposition: attachment; filename=".basename($this->fileName.$this->getExtension()));
		header("Pragma: no-cache");
		header("Content-Length: ".strlen($result));
		header("Expires: 0");

		echo $result;
	}
		"SELECT cl_destino, cl_link, cl_textoevento, TO_CHAR(cl_fechaevento, 'DD') dia
			 FROM rrhh.rcl_calendario
			WHERE cl_vistaprevia = 'S'
				AND cl_fechabaja IS NULL
				AND cl_fechaevento BETWEEN TRUNC(TO_DATE(:fechaevento, 'DD/MM/YYYY'), 'month') AND TRUNC(LAST_DAY(TO_DATE(:fechaevento, 'DD/MM/YYYY')))
	 ORDER BY dia";
else
	$sql =
		"SELECT cl_destino, cl_link, cl_textoevento, TO_CHAR(cl_fechaevento, 'DD') dia
			 FROM rrhh.rcl_calendario
			WHERE art.actualdate BETWEEN TRUNC(cl_fechavigenciadesde) AND cl_fechavigenciahasta
				AND cl_fechabaja IS NULL
				AND cl_fechaevento BETWEEN TRUNC(TO_DATE(:fechaevento, 'DD/MM/YYYY'), 'month') AND TRUNC(LAST_DAY(TO_DATE(:fechaevento, 'DD/MM/YYYY')))
	 ORDER BY dia";
$stmt = DBExecSql($conn, $sql, $params);
$totalEventos = DBGetRecordCount($stmt);
$eventos = "<div id=\"divEventosTitulo\">EVENTOS</div>";
$eventos.= "<table style=\"cursor:default;\">";
while ($row = DBGetQuery($stmt)) {
	$eventos.= "<tr>";
	$eventos.= "<td align=\"right\" style=\"vertical-align:top;\">".(int)$row["DIA"].".</td>";
	$eventos.= "<td id=\"evento".(int)$row["DIA"]."\">";

	if ($row["CL_LINK"] != "")		// Si tiene link, abro el tag a y el href..
		$eventos.= "<a style=\"color:#317282;\" href=\"";

	if (strpos($row["CL_LINK"], "@"))		// Si el link es un e-mail, agrego el mailto..
		$eventos.= "mailto:";

	if ($row["CL_LINK"] != "")		// Si tiene link, cierro el href
		$eventos.= $row["CL_LINK"]."\"";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Classes/provart/grid.php";
validarSesion(isset($_SESSION["isCliente"]));
$showProcessMsg = false;
$ob = "2";
if (isset($_REQUEST["ob"])) {
    $ob = $_REQUEST["ob"];
}
$pagina = 1;
if (isset($_REQUEST["pagina"])) {
    $pagina = $_REQUEST["pagina"];
}
// 26.12.2013 - Lo comentado de abajo es porque se dio de baja un contrato antes de que venza y el cliente queria cobertura hasta la fecha de vencimiento..
$params = array(":idusuarioextranet" => $_SESSION["idUsuario"]);
$sql = "SELECT #select#\n\t\t FROM aem_empresa, aco_contrato, web.wcu_contratosxusuarios, web.wuc_usuariosclientes\n\t\tWHERE em_id = co_idempresa\n\t\t\tAND co_contrato = cu_contrato\n\t\t\tAND cu_idusuario = uc_id\n/*\t\t\tAND art.afi.check_cobertura(em_cuit, SYSDATE) = 1*/\n\t\t\tAND uc_idusuarioextranet = :idusuarioextranet";
$stmt = DBExecSql($conn, str_replace("#select#", "1", $sql), $params);
if (DBGetRecordCount($stmt) < 2) {
    require_once "menu_clientes.php";
    exit;
}
?>
<link rel="stylesheet" href="/styles/style.css" type="text/css" />
<div class="TituloSeccion" style="display:block; width:730px;">Acceso Clientes</div>
<iframe id="iframeProcesando" name="iframeProcesando" src="" style="display:none;"></iframe>
<div class="ContenidoSeccion" id="divPaso1" style="margin-top:16px;">	Seleccione el contrato que desea administrar en este momento haciendo clic sobre el ícono correspondiente.</div>
<div id="divContent" name="divContent" style="display:block; height:336px; left:0px; position:relative; top:40px; width:730px;">
<?
$sql = str_replace("#select#", "co_contrato ¿id?, ¿co_contrato?, art.utiles.armar_cuit(em_cuit) ¿cuit?, ¿em_nombre?", $sql);

$grilla = new Grid(15, 10);
$grilla->addColumn(new Column("S", 0, true, false, -1, "btnSeleccionar", "/modules/usuarios_registrados/clientes/seleccionar_empresa.php", "", -1, true, -1, "Seleccionar"));
$grilla->addColumn(new Column("Contrato"));
					ve_vendedor
		 FROM xve_vendedor, xen_entidad, xil_ibliquidacion, cpv_provincias, oib_ingresosbrutos, xev_entidadvendedor, xlc_liqcomision
		WHERE lc_identidadvendedor = ev_id
			AND ib_provincia = pv_codigo
			AND ib_concepto = '01'
			AND ev_idvendedor = ve_id
			AND ev_identidad = en_id
			AND il_idliquidacion = lc_id
			AND pv_codigo = il_provincia
			AND il_retencion <> 0
			AND lc_estado <> 'C'
			AND pv_codigo = :provincia
			AND lc_id = :id
 ORDER BY 1";
$stmt = DBExecSql($conn, $sql, $params);
validarSesion((DBGetRecordCount($stmt) > 0));
$row = DBGetQuery($stmt, 1, false);

$sql =
	"SELECT fi_caracter, fi_firmante
		 FROM cfi_firma
		WHERE fi_id = 444";		// Queda fijo Ana Bordachar..
$stmt = DBExecSql($conn, $sql, array());
$rowFirmante = DBGetQuery($stmt, 1, false);

$pdf = new FPDI();
$pdf->setSourceFile($_SERVER["DOCUMENT_ROOT"]."/modules/usuarios_registrados/agentes_comerciales/comisiones/templates/ingresos_brutos_generico.pdf");

$pdf->AddPage();
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx);
Exemple #6
0
	private function GetRecordCount() {
		// Método que calcula la cantidad de registros que devuelve el query..

		global $conn;

		$sqlCount = $this->FormatExtraConditions($this->sql).$this->GetBajaCondition();
		$sqlCount = str_replace("?", "", str_replace("¿", "", $sqlCount));
		$this->stmt = DBExecSql($conn, $sqlCount);
		$this->recordCount = DBGetRecordCount($this->stmt);
		$this->totalPages = ceil($this->recordCount / $this->rowsPerPage);
	}
                                if ($sistema <> 2) {
                                echo " <label>PC<span class=small>Estación de trabajo</span></label>
                                       <input id=PC name=PC readonly=true value=".$row["PC"]."></input>";
                                };
                                ?>
<?
// Muestro los archivos adjuntos NO dados de baja...
$sql =
	"SELECT LOWER(REPLACE(REPLACE(UPPER(as_rutaarchivo), UPPER(directory_path), UPPER('F:/STORAGE_INTRANET/')), '/', '\'))
		FROM computos.cas_adjuntosolicitud, sys.all_directories
	 WHERE directory_name = 'STORAGE_INTRANET'
		  AND as_fechabaja IS NULL
		  AND as_idsolicitud = :idsolicitud";
$params = array(":idsolicitud" => $_REQUEST["id"]);
$stmt = DBExecSql($conn, $sql, $params);
$hayAdjuntos = (DBGetRecordCount($stmt) > 0);
if ($hayAdjuntos) {
	$links = "";
	while ($row2 = DBGetQuery($stmt, 0)) {
		$links.='<li><a href="/functions/get_file.php?fl='.base64_encode($row2[0]).'" target="blank">'.basename(htmlentities($row2[0])).'</li>';
		$links.="\n";
	}
?>
	<table align="center" id="tableAdjuntos" style="margin-bottom:8px;" width="50%">
		<tr>
			<td><b><a name="titleAdjuntos">Adjuntos</a></b></td>
		</tr>
		<tr>
			<td align="left"><ol><?php 
echo $links;
?>
function Confirma_NominaWeb($IDESTABLECIWEB)
{
    /*Esta funcion valida y confirma la nomina web 
    		se van a validar todos los registros de la nomina que esten completos para el envio
    		se va a generar un nuevo numero de version y se actualiza la fecha de versionado
    	*/
    $resultadoText = '';
    try {
        global $conn;
        $params = array(":IDCABECERANOMINA" => $IDESTABLECIWEB);
        $sql = ObtenerDatosNominaWeb('', '', false);
        $sql = ReemplazaCaracterStr($sql, '?', '');
        $sql = ReemplazaCaracterStr($sql, '¿', '');
        $stmt = DBExecSql($conn, $sql, $params);
        $contador = 0;
        if (DBGetRecordCount($stmt) == 0) {
            return utf8_encode("Nómina vacia.");
        }
        while ($row = DBGetQuery($stmt)) {
            $faltantes = '';
            foreach ($row as $key => $value) {
                if (!isset($value)) {
                    $value = '';
                }
                if ($value == '') {
                    if ($faltantes != '') {
                        $faltantes .= ', ';
                    }
                    switch ($key) {
                        case "NOMBRE":
                            $faltantes .= 'Nombre ';
                            break;
                        case "FECING":
                            $faltantes .= "Fecha ingreso ";
                            break;
                        case "FECINI":
                            $faltantes .= "Fecha inicio";
                            break;
                        case "SECTOR":
                            $faltantes .= "Sector ";
                            break;
                        case "PUESTO":
                            $faltantes .= "Puesto ";
                            break;
                        case "LISTAESOP":
                            $faltantes .= "ESOP ";
                            break;
                    }
                    // $faltantes .= $key;
                }
            }
            if ($faltantes != '') {
                $contador++;
                $resultadoText .= " CUIL " . $row['CUIL'] . ". Completar: " . $faltantes . " <p>";
            } else {
                $fechaIngreso = $row['FECING'];
                $fechaInicio = $row['FECINI'];
                $resultFecha = ValidarFechas($fechaIngreso, $fechaInicio);
                if ($resultFecha != '') {
                    $contador++;
                    $resultadoText .= " CUIL " . $row['CUIL'] . ". Error: " . $resultFecha . " <p>";
                }
            }
        }
        if ($resultadoText != '') {
            return $resultadoText . " Total registros incompletos " . $contador;
        } else {
            GrabarEstadoNomina($IDESTABLECIWEB, 'L', false, $conn);
            DBCommit($conn);
        }
        return $resultadoText;
    } catch (Exception $e) {
        DBRollback($conn);
        SalvarErrorTxt(__FILE__, __FUNCTION__, __LINE__, $e->getMessage());
        RetronaXML($e->getMessage());
    }
}
Exemple #9
0
						WHEN ha_enviarmedico = 'T' THEN 'Sí'
						WHEN ha_enviarmedico = 'F' THEN 'No'
						ELSE '&nbsp;'
					END enviarmedico, TO_CHAR(ha_fechaalta, 'dd/mm/yyyy HH24:MI') fechaalta, ha_empleado, ha_id,
					ha_motivonoenviomedico, ha_observaciones, ma_detalle, se_id,
					UPPER(SUBSTR(ha_usualta, 1, 2)) || LOWER(SUBSTR(ha_usualta, 3, 1000)) usualta
		 FROM rrhh.rha_ausencias, rrhh.rma_motivosausencia, use_usuarios
		WHERE ha_idmotivoausencia = ma_id
			AND UPPER(ha_usualta) = se_usuario
			AND ha_fechaavisojefe IS NULL
 ORDER BY ha_fechaalta DESC";
$stmt = DBExecSql($conn, $sql);

$cant = 0;

$totalRegistros = DBGetRecordCount($stmt);
require_once("gestion_combos.php");

while ($row = DBGetQuery($stmt)) {
	$cant++;
?>
	<tr class="FormLabelNegro10">
		<td><input id="id<?php 
echo $cant;
?>
" name="id<?php 
echo $cant;
?>
" size="20" type="hidden" value="<?php 
echo $row["HA_ID"];
?>
Exemple #10
0
}
?>
	</div>

	<div id="divBusquedas">
		<div id="divTituloNovedades"><img id="imgTituloNovedades" src="/modules/portada/images/busquedas.png" /></div>
<?
$sql =
	"SELECT bc_id, bc_nombrearchivo, bc_puesto, INSTR(bc_postulados, ',".getUserId().",') postulado
		 FROM rrhh.rbc_busquedascorporativas
		WHERE art.actualdate BETWEEN TRUNC(bc_fechavigenciadesde) AND bc_fechavigenciahasta
			AND bc_idestado = 3
			AND bc_fechabaja IS NULL
 ORDER BY bc_fechaalta DESC";
$stmt = DBExecSql($conn, $sql);
$mostrarBusquedas = (DBGetRecordCount($stmt) > 0);
$par = false;
while ($row = DBGetQuery($stmt)) {
	$par = !$par;

	$fileTitle = addslashes($row["BC_NOMBREARCHIVO"]);
	$partesFile = pathinfo($fileTitle);
	if (!isset($partesFile["extension"]))
		$partesFile["extension"] = "";
	$file = base64_encode(DATA_BUSQUEDAS_CORPORATIVAS_PATH.$row["BC_ID"].".".$partesFile["extension"]);
?>
		<div id="<?php 
echo $par ? "divItem1" : "divItem2";
?>
">
			<div class="noLinkItemNovedadesTexto" id="divItemNovedadesTexto">
 function HistoricoLaboral()
 {
     $ReturnSQL = ObtenerSQL_HistoricoLaboral();
     $ReturnSQL = utf8_decode($ReturnSQL);
     $params[":idtrabajador"] = $this->idtrabajador;
     $sql = $ReturnSQL;
     global $conn;
     $stmt = DBExecSql($conn, $sql, $params);
     $rowLiqCount = DBGetRecordCount($stmt);
     if ($rowLiqCount > 0) {
         $this->SetX($this->margenDerecho);
         $this->SetTextColor(0, 0, 0);
         $this->SetFontAlignGeneralHistorico();
         $this->SetFont('Arial', 'B', 10);
         $Newrow = array_values($this->arrayTitulosHistorico);
         $this->Row($Newrow);
         $this->LineaSepara();
         $this->Ln(2);
         while ($row = DBGetQuery($stmt, 1, false)) {
             $this->SetX($this->margenDerecho);
             $this->SetTextColor(0, 0, 0);
             $this->SetFormatCell(array(6), 2, '$ ');
             $this->SetFontAlignGeneralHistorico();
             $this->SetFont('Arial', 'I', 7);
             $Newrow = array_values($row);
             $this->Row($Newrow);
             $this->LineaSepara();
         }
     }
 }
Exemple #12
0
			AND ui_idempresa = em_id
			AND ui_id = :id";
$stmt = DBExecSql($conn, $sql, $params);
$row = DBGetQuery($stmt);

$params = array(":idusuario" => $_SESSION["idUsuario"]);
$sql = 
	"SELECT be_descripcion, be_id, be_posicion, NVL(cp_puntos, 0) puntos
		 FROM rrhh.rbe_beneficios, rrhh.rcp_canjepuntos
		WHERE be_id = cp_idbeneficio(+)
			AND be_fechabaja IS NULL
			AND cp_fechabaja IS NULL
			AND cp_idusuario(+) = :idusuario
 ORDER BY be_posicion";
$stmt2 = DBExecSql($conn, $sql, $params);
$alto = 128 + (22 * DBGetRecordCount($stmt2));
if ($alto < 240)
	$alto = 240;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Language" content="es-ar" />
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<link rel="stylesheet" href="/styles/style2.css" type="text/css" />
		<script language="JavaScript" src="/js/functions.js"></script>
		<script language="JavaScript" src="/js/hint/hints.js"></script>
		<script language="JavaScript" src="js/programa_incentivos.js"></script>
		<style>
			.hintText {
				background-color: #FFFFCC;
	public function validateSolicitud($datosSolicitud) {
		global $conn;

		$this->datosSolicitud = $datosSolicitud;

		$advertencias = "";
		$errores = "";

		try {
			$this->completeData();
			$this->insertEstablecimientos();

			// Validación 1..
			if (!validarCuit($datosSolicitud["cuit"])) {
				$errores.= "<error><codigo>1</codigo>";
				$errores.= "<mensaje>La C.U.I.T. es inválida.</mensaje></error>";
				throw new Exception("ERROR FATAL: La C.U.I.T. es inválida.");		// Este error lo lanzo porque con una CUIT inválida no puedo ni validar nada..
			}

			// Validación 2 - Control de CUIT reservado..
			$params = array(":cuit" => $datosSolicitud["cuit"]);
			$sql =
				"SELECT ac_descripcion actividad, ca_descripcion canal, en_nombre entidad, ru_idcanal, ru_identidad, ru_idvendedor, ru_observaciones, ve_nombre vendedor
					 FROM aru_reservacuit ru, aca_canal, cac_actividad, xen_entidad, xve_vendedor
					WHERE ru_idcanal = ca_id(+)
						AND ru_idactividad = ac_id(+)
						AND ru_identidad = en_id(+)
						AND ru_idvendedor = ve_id(+)
						AND ru_cuit = :cuit
						AND ru_fechabaja IS NULL
						AND actualdate BETWEEN ru_fechadesde AND ru_fechahasta";
			$stmt = DBExecSql($conn, $sql, $params);
			if (DBGetRecordCount($stmt) > 0) {
				$row = DBGetQuery($stmt);

				$distintoVendedor = (($row["VENDEDOR"] != "") and ($row["RU_IDVENDEDOR"] != $this->datosUsuario["VENDEDOR"]));
				if (($row["RU_IDCANAL"] != $this->datosUsuario["CANAL"]) or ($row["RU_IDENTIDAD"] != $this->datosUsuario["ENTIDAD"]) or ($distintoVendedor)) {
					$errores.= "<error><codigo>2</codigo>";
					$errores.= "<mensaje>Esta C.U.I.T. se encuentra reservada por otro usuario, por favor comuníquese con su Ejecutivo de Provincia ART.</mensaje>";
					$errores.= "<observaciones>".$row["RU_OBSERVACIONES"]."</observaciones></error>";
				}
			}

			// Validación 3 - Control de vigencia de la Solicitud de Cotización..
			$params = array(":cuit" => $datosSolicitud["cuit"]);
			$sql =
				"SELECT ca_descripcion
					 FROM asc_solicitudcotizacion, aca_canal
					WHERE ca_id = sc_canal
						AND (actualdate - TRUNC(sc_fechasolicitud)) < 30
						AND sc_estado NOT IN('05', '07', '08', '09', '18.0', '18.1', '18.2', '18.3')
						AND sc_cuit = :cuit";
			$stmt = DBExecSql($conn, $sql, $params);
			if (DBGetRecordCount($stmt) > 0) {
				$errores.= "<error><codigo>3</codigo>";
				$errores.= "<mensaje>Ya existe una solicitud para esta C.U.I.T., por favor comuníquese con su Ejecutivo de Provincia ART.</mensaje></error>";
			}

			// Validación 4 - Control de vigencia de la Revision de Precio..
			$params = array(":cuit" => $datosSolicitud["cuit"]);
			$sql =
				"SELECT ca_descripcion
					 FROM art.asr_solicitudreafiliacion 
					 JOIN aca_canal ON ca_id = sr_idcanal
					WHERE (art.actualdate - TRUNC(sr_fechaalta)) < 30
						AND sr_estadosolicitud NOT IN('05', '18.0', '18.1', '18.2', '18.3')
						AND sr_cuit = :cuit";
			$stmt = DBExecSql($conn, $sql, $params);
			if (DBGetRecordCount($stmt) > 0) {
				$errores.= "<error><codigo>4</codigo>";
				$errores.= "<mensaje>Ya existe una solicitud para esta C.U.I.T., por favor comuníquese con su Ejecutivo de Provincia ART.</mensaje></error>";
			}

			// Validación 5..
			$params = array(":cuit" => $datosSolicitud["cuit"]);
			$sql = "SELECT afiliacion.check_cobertura(:cuit) FROM DUAL";
			if (ValorSql($sql, "", $params) == 1) {
				$errores.= "<error><codigo>5</codigo>";
				$errores.= "<mensaje>Esta empresa ya tiene un contrato activo con esta aseguradora.</mensaje></error>";
			}

			// Validación 6 - Que no puedan colocar la CUIT de la Provincia ART..
			if ($datosSolicitud["cuit"] == "30688254090") {
				$errores.= "<error><codigo>6</codigo>";
				$errores.= "<mensaje>Debe registrarse la C.U.I.T. del empleador (si la C.U.I.T. se registra erróneamente la solicitud no tiene validez).</mensaje></error>";
			}

			// Validación 7 - Valida el status ante la SRT..
			$params = array(":cuit" => $datosSolicitud["cuit"]);
			$sql =
				"SELECT 1
					 FROM srt.sem_empresas e JOIN srt.shv_historialvigencias v ON v.hv_id = art.cotizacion.get_idultimavigencia(em_cuit)
					WHERE CASE
								WHEN v.hv_idoperaciondesde = 10888 THEN ADD_MONTHS(v.hv_vigenciadesde, 10) + 11
								ELSE ADD_MONTHS(v.hv_vigenciadesde, 6)
								END <= SYSDATE
						AND e.em_cuit = :cuit";
			if (($this->datosSolicitud["statusSrtAutomatico"]->getStatus() != -1) and ($this->datosSolicitud["statusSrtAutomatico"]->getStatus() != 1) and (!ExisteSql($sql, $params, 0))) {
				$errores.= "<error><codigo>7</codigo>";
				$errores.= "<mensaje>Esta C.U.I.T. no puede ser cotizada por la vigencia en la actual ART, por favor comuníquese con su Ejecutivo de Provincia ART.</mensaje></error>";
			}

			// Validación 8..
			if ($datosSolicitud["statusSrt"] < 1) {
				$errores.= "<error><codigo>8</codigo>";
				$errores.= "<mensaje>El status ante la SRT debe ser mayor a cero (0).</mensaje></error>";
			}

			// Validación 9..
			$codigoVendedor = NULL;
			if (($this->datosUsuario["ENTIDAD"] == 9003) and ($this->datosUsuario["VENDEDOR"] == "")) {
				if ($this->datosSolicitud["codigoVendedor"] == NULL) {
					$errores.= "<error><codigo>9</codigo>";
					$errores.= "<mensaje>El código de vendedor es inválido.</mensaje></error>";
				}
			}

			// Validación 10..
			if ($this->datosSolicitud["totalTrabajadores"] == 0) {
				$errores.= "<error><codigo>10</codigo>";
				$errores.= "<mensaje>El total de trabajadores debe ser mayor a cero (0).</mensaje></error>";
			}

			// Validación 11..
			if ($this->datosSolicitud["totalMasaSalarial"] == 0) {
				$errores.= "<error><codigo>11</codigo>";
				$errores.= "<mensaje>El total de la masa salarial debe ser mayor a cero (0).</mensaje></error>";
			}

			// Validación 12..
			if (!$this->validatePeriodo()) {
				$errores.= "<error><codigo>12</codigo>";
				$errores.= "<mensaje>El período es inválido, el formato debe ser AAAA/MM.</mensaje></error>";
			}

			$this->SPValidation($advertencias, $errores);
		}
		catch (Exception $e) {
//			$errores.= "<error>".$e->getMessage()."</error>";
			$errores.= "<error><fecha>".date("d/m/Y")."</fecha><hora>".date("H:i:s")."</hora><mensaje>Ocurrió un error inesperado en la función validarSolicitud.</mensaje></error>";
		}

		if (($advertencias == "") and ($errores == ""))
			return "";
		else {
			$xml = '<?xml version="1.0" encoding="utf-8"?><solicitudCotizacion>';
			if ($advertencias != "")
				$xml.= "<advertencias>".$advertencias."</advertencias>";
			if ($errores != "")
				$xml.= "<errores>".$errores."</errores>";
			$xml.= "</solicitudCotizacion>";
			return new soapval("return", "xsd:string", $xml);
		}
	}
Exemple #14
0
else {
	// Se corre primero este SP que recupera la documentación faltante..
	$curs = null;
	$params = array(":contrato" => $_REQUEST["id"], ":usuario" => $_SESSION["usuario"]);
	$sql = "BEGIN art.afiliacion.do_documentacion_faltante(:contrato, :usuario); END;";
	DBExecSP($conn, $curs, $sql, $params, false);

	$params = array(":usuario" => $_SESSION["usuario"]);
	$sql =
		"SELECT df_contrato, tb_descripcion AS forma_juridica, df_contacto, df_firmante AS caracter_firmante, df_documentofalta AS documento
			 FROM tmp.tdf_documentacion_faltante
	LEFT JOIN art.ctb_tablas ON tb_clave = 'FJURI' AND tb_codigo = df_formajuridica
			WHERE df_usuario = :usuario
	 ORDER BY df_firmante, df_documentofalta";
	$stmt = DBExecSql($conn, $sql, $params);
	$hayDocFal = (DBGetRecordCount($stmt) > 1);
	$docFal = ($hayDocFal)?"<span style=\"cursor:hand;\" onClick=\"verDocumentacionFaltante();\" title=\"Ver Documentaciónn Faltante\">SÍ</span>":"NO";
}
?>
<!--
<div class="TituloSeccion" style="display:block; font-size:9pt; margin-top:8px; width:730px;">Varios</div>
<div class="ContenidoSeccion" style="padding:4px; margin-left:4px; margin-top:4px; width:720px;">
	<div>
		<label>Documentación Faltante Contrato</label>
		<span><b><?php 
echo $docFal;
?>
</b></span>
	</div>
	<div style="margin-top:2px;">
		<label style="margin-left:108px;">DDJJ Faltantes</label>
Exemple #15
0
	msgBox("[2] Ya existe una solicitud para esta C.U.I.T., por favor comuníquese con su Ejecutivo de Provincia ART.", "cuit");
}

// Validación 3..
// EJV 01/02/2010
// Control de vigencia de la Revision de Precio
$params = array(":cuit" => $_REQUEST["cuit"]);
$sql =
	"SELECT ca_descripcion
		 FROM art.asr_solicitudreafiliacion 
		 JOIN aca_canal ON ca_id = sr_idcanal
		WHERE (art.actualdate - TRUNC(sr_fechaalta)) < 30
			AND sr_estadosolicitud NOT IN('05', '18.0', '18.1', '18.2', '18.3')
			AND sr_cuit = :cuit";
$stmt = DBExecSql($conn, $sql, $params);
if (DBGetRecordCount($stmt) > 0) {
	$rowValidation = DBGetQuery($stmt);
	msgBox("[3] Ya existe una solicitud para esta C.U.I.T., por favor comuníquese con su Ejecutivo de Provincia ART.", "cuit");
}


// Validación 4..
$params = array(":cuit" => $_REQUEST["cuit"]);
$sql = "SELECT afiliacion.check_cobertura(:cuit) FROM DUAL";
if (ValorSql($sql, "", $params) == 1) {
	msgBox("[4] Esta empresa ya tiene un contrato activo con esta aseguradora.");
}

// Validación 5.. Que no puedan colocar el CUIT de la ART.
// EJV 15/04/2010.
if ($_REQUEST["cuit"] == "30688254090") {
Exemple #16
0
  <?php 
require_once $_SERVER["DOCUMENT_ROOT"] . "/constants.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/db.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/oracle_funcs.php";
$referrerIsValid = false;
$hasReferrer = false;
if (isset($_SERVER['HTTP_REFERER'])) {
    $parts = parse_url($_SERVER['HTTP_REFERER']);
    if (isset($parts['host'])) {
        $hasReferrer = true;
        $referrerIsValid = (bool) preg_match('/(?:^|\\.)artprov\\.com$/', strtolower($parts['host']));
    }
}
$sql = "SELECT ROUND (sys.DBMS_RANDOM.VALUE (1, 7)) AS tipo,\n       ca_descripcion,\n       tp_descripcion,\n       ca_telefono,\n       ca_calle || ' ' || ca_numero || ' ' || ca_localidad AS domicilio,\n       ca_direlectronica,\n       REPLACE (ca_lat, ',', '.') AS ca_lat,\n       REPLACE (ca_lng, ',', '.') AS ca_lng\n  FROM art.cpr_prestador, mtp_tipoprestador\n WHERE ca_especialidad = tp_codigo\n   AND ca_lat IS NOT NULL\n   AND ca_lng IS NOT NULL\n   AND ca_provincia IN (1, 2) and rownum < 300\n";
$stmt = DBExecSql($conn, $sql);
$number = DBGetRecordCount($stmt);
$i = 0;
if ($number == 0) {
    print "Error - No records found";
} elseif ($number > 0) {
    echo "<script type='text/javascript'>\n";
    echo "  function initialize() {\n";
    ?>
      var latlng = new google.maps.LatLng(-34.60399,-58.455776);
      var settings = {
                      zoom: 12,
  		      center: latlng,
  		      mapTypeControl: true,
  		      mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
  		      navigationControl: true,
  		      navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
     exit;
 }
 global $conn;
 SetDateFormatOracle("DD/MM/YYYY");
 $params = array();
 $pdf = new PDFReport();
 $pdf->SetTitle("ReporteDatosdelaEmpresa");
 $pdf->SetAuthor("JLovatto");
 $pdf->SetCreator("ReporteDatosdelaEmpresa");
 $pdf->SetSubject("REPORTE WEB LEGALES");
 $sql = ObtenerSQL_DatosdelaEmpresa();
 $params[":siniestro"] = $_SESSION["ReportesSiniestros"]["ID"];
 $params[":orden"] = $_SESSION["ReportesSiniestros"]["ORDEN"];
 $stmt = DBExecSql($conn, $sql, $params);
 //-----------------------------------------------------------------------
 if (DBGetRecordCount($stmt) == 0) {
     echo "La consulta no devolviò datos.";
     exit;
 }
 $rowCabecera = DBGetQuery($stmt, 1, false);
 //-----------------------------------------------------------------------
 // $pdf->setSourceFile($_SERVER["DOCUMENT_ROOT"]."/modules/varios/templates/ListadoJuiciosVerticalBlanco.pdf");
 $stmt = DBExecSql($conn, $sql, $params);
 $pdf->SetAutoPageBreak(true, 20);
 $pdf->AddPage('P', 'Legal');
 while ($row = DBGetQuery($stmt, 1, false)) {
     $pdf->SetX($pdf->margenDerecho);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetFontAlignGeneral();
     $Newrow = array_values($row);
     $pdf->Row($Newrow);
 private function Iprimir_Liquidaciones($posY1, $sumY1, $EXID)
 {
     $ReturnSQL = ObtenerSQL_ReporteLiquidaciones();
     $ReturnSQL = utf8_decode($ReturnSQL);
     $params[":EXID"] = $EXID;
     $sql = $ReturnSQL;
     global $conn;
     $stmt = DBExecSql($conn, $sql, $params);
     $rowLiqCount = DBGetRecordCount($stmt);
     if ($rowLiqCount > 0) {
         $posX1 = 12;
         $this->SetX($this->margenDerecho);
         $this->SetTextColor(0, 0, 0);
         $this->SetFontAlignGeneralLiquidaciones();
         $this->SetFont('Arial', 'B', 9);
         $Newrow = array_values($this->arrayTitulosLiquidacion);
         $this->Row($Newrow);
         $this->LineaSepara();
         $sumaImporte = 0;
         while ($row = DBGetQuery($stmt, 1, false)) {
             // EscribirLogTxt1("datos row text",  htmlentities(implode(',' , $row) , ENT_QUOTES) );
             $this->SetX($this->margenDerecho);
             $this->SetTextColor(0, 0, 0);
             $this->SetFontAlignGeneralLiquidaciones();
             $this->SetFont('Arial', '', 6);
             $this->SetFormatUTF8(true);
             $this->SetFormatCell(array(5), 2, '$ ');
             $Newrow = array_values($row);
             $this->Row($Newrow);
             $this->LineaSepara();
             $sumaImporte = $sumaImporte + floatval($row['IMPORTE']);
         }
         $posY1 = $this->GetY();
         //$posY1 += $sumY1;
         $this->SetXY($posX1, $posY1);
         $posX1 = 100;
         $this->ImprimeCelda($posX1, $posY1, 'Total', '', 0, 1, 0, 9);
         $posX1 = 125;
         $psumaImporte = toMoney($sumaImporte);
         $this->SetXY($posX1, $posY1);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(100, 5, $psumaImporte . '   ', 0, 0, 'L');
     }
 }