$pdf->Cell(24, 0, $totalTrabajadores, 0, 0, "R");

$pdf->Cell(48);
$pdf->Cell(24, 0, ($totalAlicuota == 0)?"-":number_format($totalAlicuota, 2), 0, 0, "R");
// FIN - Cuadro alícuota PCP..


$pdf->Ln(18);
$pdf->Cell(34);
$pdf->Cell(32, 0, $row["CUOTAANUAL"], 0, 0, "R");

$pdf->Ln(4.4);
$pdf->Cell(34);
$pdf->Cell(32, 0, $row["CUOTAMENSUAL"], 0, 0, "R");

$pdf->Ln(5.4);
$pdf->Cell(34);
$pdf->Cell(32, 0, $row["CUOTATRABAJADOR"], 0, 0, "R");

$pdf->SetFont("Arial", "B", 8);
$pdf->Ln(-6.2);
$pdf->Cell(152);
$pdf->Cell(20, 0, number_format($row["CLAUSULAPENAL"], 0, ",", "."), 0, 0, "C");

$pdf->Ln(3.2);
$pdf->Cell(89);
$pdf->Cell(76, 0, numerosALetras($row["CLAUSULAPENAL"]));
$pdf->SetFont("Arial", "B", 10);

$pdf->Output($file, "F");
?>
		$pdf->Cell(91);
		$pdf->Cell(170, 0, $rowCabecera["DOMICDESTINATARIO"]);

		$pdf->Ln(149);
		$pdf->Cell(-2);
		$pdf->Cell(9, 0, $rowPeriodos["PER_MES"], 0, 0, "C");

		$pdf->Cell(-0.4);
		$pdf->Cell(11, 0, $rowPeriodos["PER_ANO"], 0, 0, "C");

		$pdf->SetFont("Arial", "B", 14);
		$pdf->Cell(10);
		$pdf->Cell(85, 0, $rowPeriodos["TOTALFORMATEADO"], 0, 0, "C");

		$pdf->SetY(196.4);
		$texto = strtoupper(numerosALetras(str_replace(",", ".", $rowPeriodos["TOTAL"]), 2, true));
		$pdf->WordWrap($texto, 145);
		$texto = explode("\n", $texto);
		for ($i=0; $i<count($texto); $i++) {
			$str = trim($texto[$i]);

			$pdf->Cell(116);
			$pdf->Cell(0, 0, $str);
			$pdf->Ln(5);
		}
	}

	$pdf->Output("EC_Formulario_817.pdf", "I");
	//	*******  FIN - Armado del reporte..  *******
}
catch (Exception $e) {
$pdf->Cell(47, 0, $cuotaInicial, 0, 0, "C");

$pdf->SetFont("Arial", "BU", 7);
$pdf->Ln(12.6);
$pdf->Cell(140.8);
$pdf->Cell(0, 0, $row2["FECHA"]);


// Tapo la claúsula penal..
$pdf->SetFillColor(255, 255, 255);
$pdf->Rect(113, 210, 40, 6, "F");

$pdf->SetFont("Arial", "", 9);
$pdf->Ln(25.2);
$pdf->Cell(102);
$pdf->Cell(90, 0, "$".number_format($row2["CLAUSULAPENAL"], 0, ",", ".").".- (pesos ".numerosALetras($row2["CLAUSULAPENAL"]).")");


$pdf->SetFont("Arial", "B", 8);
$pdf->Ln(11.8);
$pdf->Cell(20);
$texto = $row2["SA_OBSERVACIONES"];
$pdf->WordWrap($texto, 176);
$texto = explode("\n", $texto);
for ($i=0; $i<count($texto); $i++) {
	if ($i > 1)
		break;

	$str = trim($texto[$i]);

	$pdf->Cell(1);
	$pdf->Cell(32, 0, $rowTelefonos["CODIGOPOSTAL"]);

	$pdf->Ln(5);
	$pdf->Cell(30);
	$pdf->Cell(32, 0, $rowTelefonos["LT_EMPLEADOS"]);

	$pdf->Cell(22);
	$pdf->Cell(116, 0, $rowTelefonos["TELEFONOS"]);
}

$pdf->SetY(226);
$pdf->Cell(93);
$pdf->Cell(28, 0, number_format($row2["CLAUSULAPENAL"], 0, ",", "."), 0, 0, "C");

$pdf->Cell(12);
$pdf->Cell(62, 0, numerosALetras($row2["CLAUSULAPENAL"]));



//Página 2..
$pdf->AddPage();
$tplIdx = $pdf->importPage(2);
$pdf->useTemplate($tplIdx);

// Tapo el N° de solicitud que está en el pdf original..
$pdf->SetDrawColor(255, 255, 255);
$pdf->SetFillColor(255, 255, 255);
$pdf->Rect(80, 19, 48, 4, "F");
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor(0, 0, 0);