public function getAtividades($id) { $posto = SetorPosto::find($id); return View::make('cadastros::setors.elementos.posto_atividades', compact('posto')); }
$fpdf->Cell(190, 7, utf8_decode('Posto de Trabalho: ' . SetorPosto::find($novo->posto_id)->descricao), 'LTR', 0, 'L'); $fpdf->Ln(); } $fpdf->SetFont('Arial', 'B', 10); $fpdf->Cell(190, 6, utf8_decode('Riscos'), 'TLRB', 0, 'C', 1); $fpdf->Ln(); $fpdf->SetFont('Arial', '', 9); $fpdf->SetFillColor(255); $fpdf->Cell(38, 6, utf8_decode('Físicos'), 'TLRB', 0, 'C'); $fpdf->Cell(28, 6, utf8_decode('Químicos'), 'TLRB', 0, 'C'); $fpdf->Cell(28, 6, utf8_decode('Biológicos'), 'TLRB', 0, 'C'); $fpdf->Cell(43, 6, utf8_decode('Ergonomicos'), 'TLRB', 0, 'C'); $fpdf->Cell(53, 6, utf8_decode('Acidentes'), 'TLRB', 0, 'C'); $fpdf->Ln(); $fpdf->SetFont('Arial', '', 5); $riscos = SetorPosto::riscos($aso->posto_id); if (!empty(count($riscos))) { for ($i = 0; $i < count(max($riscos)); $i++) { if (!empty($riscos['Físico'][$i])) { if (SesmtPostoRisco::where('descricao', $riscos['Físico'][$i])->where('posto_id', $aso->posto_id)->count()) { $marca = '( X ) '; } else { $marca = '( ) '; } $fpdf->Cell(38, 6, $marca . utf8_decode($riscos['Físico'][$i]), 'TLRB', 0, 'L'); } else { $fpdf->Cell(38, 6, '', 'TLRB', 0, 'L'); } if (!empty($riscos['Quimico'][$i])) { if (SesmtPostoRisco::where('descricao', $riscos['Quimico'][$i])->where('posto_id', $aso->posto_id)->count()) { $marca = '( X ) ';