Пример #1
0
        //anno anterior
        $idEstablecimiento = $_SESSION['ListadoPersonalExpuesto']['idrelev'];
        $pdf->SetIdEstablecimiento($_SESSION['ListadoPersonalExpuesto']['idrelev']);
        $pdf->SetNominaConfirmada($_SESSION['ListadoPersonalExpuesto']['NominaConfirmada']);
    }
    if ($pdf->NominaConfirmada == 'SI') {
        $row = Obtener_ID_TABLA($pdf->idrelev, $annoACTUAL);
        if (BuscaSubStr($row["TABLA"], 'SINRIESGO')) {
            $pdf->TieneExpuestos = 'SINEXPUESTO';
        }
        if (BuscaSubStr($row["TABLA"], 'CABECERANOMINA')) {
            $pdf->TieneExpuestos = 'CONEXPUESTO';
        }
        $params[":IDCABECERA"] = $pdf->idrelev;
        $sql = $pdf->ListadoPersonalExpAnnoAntSQL($annoACTUAL);
        $pdf->BuscaDatorGeneralReporte($annoACTUAL, $idEstablecimiento);
    } else {
        if (isset($_SESSION['ListadoPersonalExpuesto']['tiponomina']) and $_SESSION['ListadoPersonalExpuesto']['tiponomina'] == 'S') {
            $pdf->TieneExpuestos = 'CONEXPUESTO';
            $sql = $pdf->ListadoPersonalExpSQL($idEstablecimiento);
        } else {
            $pdf->TieneExpuestos = 'SINEXPUESTO';
            $idEWEstableci = $_SESSION['ListadoPersonalExpuesto']['empresaESTABLECI'];
            $idEWCUIT = $_SESSION['ListadoPersonalExpuesto']['empresaCUITSINGUION'];
        }
        $params[":IDCABECERANOMINA"] = $idEstablecimiento;
        $pdf->BuscaDatorGeneralReporte($annoACTUAL, $idEstablecimiento);
    }
} catch (Exception $e) {
    DBRollback($conn);
    SalvarErrorTxt(__FILE__, __FUNCTION__, __LINE__, $e->getMessage());