Exemplo n.º 1
0
 public function printFunc()
 {
     $empresa = new Empresa();
     $empresa->get_empresa_by_id($this->id_empresa);
     $valor_custo = new Valor_custo();
     $valor_custo->get_valor_custo_id($this->id_valor_custo);
     $vlr = $this->verificaValor($valor_custo->valor);
     if ($vlr == "") {
         $vlr = 0.0;
     }
     $sal = $this->verificaValor($this->salario_base);
     $filial = Filial::get_filial_id($this->id_empresa_filial);
     $cbo = new Cbo();
     $cbo->get_cbo_by_id($this->id_cbo);
     $turno = new Turno();
     $turno->getTurnoById($this->id_turno);
     $u = new Epi();
     $epi_func = $u->get_epi_func($this->id);
     $texto = "";
     $texto .= "<table class='table_pesquisa'><tr>";
     $texto .= "<td colspan='2'><b><span>ID: <span></b></td><td><span><span>" . $this->id . "</span><td><span>Cod_Serie</span></td><td><span>" . $this->cod_serie . "</span></td></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Nome: <span></b></td><td colspan='3'><span>" . $this->nome . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Telefone: <span></b></td><td colspan='3'><span>" . $this->telefone . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>CPF: <span></b></td><td colspan='3'><span>" . $this->cpf . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Data de Nascimento: <span></b></td><td colspan='3'><span>" . $this->data_nasc . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Email:<span> </b></td><td colspan='3'><span>" . $this->email . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Empresa: <span></b></td><td colspan='3'><span>" . $empresa->nome_fantasia . "</span></td>";
     $texto .= "</tr>";
     if ($filial) {
         $texto .= "<tr>";
         $texto .= "<td colspan='2'><b><span>Filial: <span></b></td><td colspan='3><span>" . $filial->nome . "</span></td>";
         $texto .= "</tr>";
     }
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Salário base: <span></b></td><td colspan='3'><span>R\$ " . number_format($sal, 2, ',', '.') . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Valor de Custo: <span></b></td><td colspan='3'><span>R\$ " . number_format($vlr, 2, ',', '.') . "</span></td>";
     $texto .= "</tr>";
     $texto .= "<tr>";
     if (isset($cbo->descricao)) {
         $texto .= "<td colspan='2'><b><span>CBO: <span></b></td><td colspan='3'><span>" . $cbo->descricao . "</span></td>";
     }
     $texto .= "</tr>";
     $texto .= "<tr>";
     $texto .= "<td colspan='2'><b><span>Turno: <span></b></td><td colspan='3'><span>" . $turno->nome . " - " . $turno->desc . "</span></td>";
     $texto .= "</tr>";
     if (count($epi_func) > 0) {
         $texto .= '<tr> <td colspan="5"><span><b>Equipamentos do funcionário:</b></span></td></tr>';
         $texto .= '<tr> <td><span>ID</span></td> <td><span>Nome</span></td> <td><span>Data da entrega</span></td><td><span>Quantidade</span></td></tr>';
         foreach ($epi_func as $key => $value) {
             $texto .= '<tr><td><span>' . $epi_func[$key]->id . '</span></td><td><span>' . $epi_func[$key]->nome_epi . '</span></td><td><span>' . $epi_func[$key]->data_entrega . '</span></td><td><span>' . $epi_func[$key]->quantidade . '</span></td></tr>';
         }
     }
     $texto .= "</table>";
     return $texto;
 }
Exemplo n.º 2
0
    $id_obs = $obs->add_obs_bd();
    if ($horario->corrige_horario($data, $tipo, $hora, $id_funcionario, $id_obs, $situacao)) {
        echo "<script>window.location='logado.php';</script>";
    } else {
        // echo "<script>alert('Falha');</script>";
    }
}
if (isset($_GET['desc']) && $_GET['desc'] == 'mes') {
    $data = date('Y-m');
    get_esquecidos($data, 1);
} else {
    if (isset($_GET['desc']) && $_GET['desc'] == 'sem_registros') {
        $funcionario = new Funcionario();
        $turno = new Turno();
        $funcionario->get_func_id($_GET['id_func']);
        $turno->getTurnoById($funcionario->id_turno);
        if ($_GET['tipo'] == 1) {
            $tipo = 'iniciar o expediente';
            $hora_turno = $turno->ini_exp;
        } else {
            if ($_GET['tipo'] == 2) {
                $tipo = 'iniciar do almoço';
                $hora_turno = $turno->ini_alm;
            } else {
                if ($_GET['tipo'] == 3) {
                    $tipo = 'encerrar o almoço';
                    $hora_turno = $turno->fim_alm;
                } else {
                    $tipo = 'encerrar o expediente';
                    $hora_turno = $turno->fim_exp;
                }