function Header() { if (empty($_COOKIE["Organismo"])) { $Organismo = 0; } else { if (empty($_POST['txtFecha'])) { $fechaCabecera = 0; } else { $fechaCabecera = $_POST['txtFecha']; } $mes = substr($fechaCabecera, 5, 2); $mesTex = genMonth_Text($mes); $anhoText = substr($fechaCabecera, 0, 4); $Organismo = $_COOKIE["Organismo"]; setcookie("Organismo", $_COOKIE["Organismo"], time() + 12); } if (empty($_POST['txtRadioFuente'])) { $fuente = '30 Recursos Institucionales'; } else { $fuente = '10 Recursos del Tesoro'; } if ($Organismo == 'Administracion') { $Programa = '01 Programa de Administracion'; } else { $Programa = '02 Programa de Accion'; } // Select Arial bold 15 $this->SetFont('Arial', '', 9); $this->Image('img/intn.jpg', 15, 10, -300, 0, '', '../../InformeCargos.php'); // Move to the right $this->Cell(80); // Framed title $this->text(15, 32, utf8_decode('Instituto Nacional de Tecnología, Normalización y Metrología')); $this->text(315, 32, 'Sistema - Sueldos'); $this->text(315, 37, 'Sueldo Mes: ' . utf8_decode(genMonth_Text($mes) . ' Año: ' . $anhoText)); //$this->Cell(30,10,'noc',0,0,'C'); // Line break $this->Ln(30); $this->SetDrawColor(0, 0, 0); $this->SetLineWidth(0.2); $this->Line(360, 33, 10, 33); //largor,ubicacion derecha,inicio,ubicacion izquierda //table header $this->SetFont('Arial', 'B', 8); $this->SetTitle('LISTADO DE SUELDOS'); $this->Cell(120, 5, 'Organismo: 23 Entes Autonomos y Autarquicos', 100, 100, 'L'); //Titulo $this->Cell(120, 5, 'Entidad: 01 Instituto Nacional de Tecnologia Normalizacion y Metrologia', 100, 100, 'L'); //Titulo $this->Cell(120, 5, 'Tipo de Presupuesto: ' . $Programa, 100, 100, 'L'); //Titulo $this->Cell(120, 5, 'Programa: ' . $Organismo, 100, 100, 'L'); //Titulo $this->Cell(120, 5, 'Objeto del Gasto: 111 Sueldos', 100, 100, 'L'); //Titulo $this->Cell(120, 5, 'Fuente del Financiamiento: ' . $fuente, 100, 100, 'L'); //Titulo $this->SetFillColor(153, 192, 141); $this->SetTextColor(255); $this->SetDrawColor(153, 192, 141); $this->SetLineWidth(0.3); /*$this->Cell(20,10,'SIAPE',1,0,'L',1); $this->Cell(50,10,'Nome',1,1,'L',1);*/ $this->Cell(15, 10, 'Item', 1, 0, 'C', 1); $this->Cell(13, 10, 'Nro Linea', 1, 0, 'C', 1); $this->Cell(45, 10, 'Cargo', 1, 0, 'C', 1); $this->Cell(15, 10, 'Nro CI', 1, 0, 'C', 1); $this->Cell(57, 10, 'Funcionario', 1, 0, 'C', 1); $this->Cell(15, 10, 'Categoria', 1, 0, 'C', 1); $this->Cell(20, 10, 'Sueldo Bruto', 1, 0, 'C', 1); $this->Cell(15, 10, 'IPS', 1, 0, 'C', 1); $this->Cell(20, 10, 'Ausencia', 1, 0, 'C', 1); $this->Cell(20, 10, 'Permisos', 1, 0, 'C', 1); $this->Cell(20, 10, 'Judicial', 1, 0, 'C', 1); $this->Cell(20, 10, 'ASO', 1, 0, 'C', 1); $this->Cell(20, 10, 'Reposo', 1, 0, 'C', 1); $this->Cell(25, 10, 'Total Descuentos', 1, 0, 'C', 1); $this->Cell(25, 10, 'Neto a Cobrar', 1, 1, 'C', 1); //Restore font and colors }
<td colspan=3 height="20" align="center" valign=middle><b><font size=3>Ultimo Pago DGI: __/__/____</font></b></td> <td align="left"><br></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" colspan=2 align="center" valign=middle bgcolor="#B2B2B2"> <b><font size=3><?php echo genMonth_Text(date('m', strtotime($sTime))); ?> </font></b></td> <td align="left"><br></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" colspan=2 align="center" valign=middle bgcolor="#B2B2B2"> <b><font size=3>Resguardo <?php echo genMonth_Text(date('m', strtotime($sTime))); ?> </font></b></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" colspan=2 align="center" valign=middle bgcolor="#B2B2B2"> <b><font size=3>Acumulado <?php echo genMonth_Text(date('m', strtotime($sTime))); ?> </font></b></td> </tr> <?php /*Pagos DGI*/ ?> <tr> <td style="border-top: 2px solid #000000; border-bottom: 1px solid #000000; border-left: 2px solid #000000; border-right: 1px solid #000000" colspan=2 height="17" align="left" valign=middle>108 – IRAE Anticipo:</td> <td style="border-top: 2px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 2px solid #000000" align="right" sdval="3270" sdnum="3082;"> 3270</td> <td align="left"><br></td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" align="left" bgcolor="#CCCCCC">Saldo IVA</td> <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" align="right" sdval="<?php echo number_format($Iva_Ventas - $Iva_Compras, 2, ",", ".");
break; case 11: $month_text = "Noviembre"; break; case 12: $month_text = "Diciembre"; break; } return $month_text; } $startTime = data_first_month_day(explota($_GET['fechainicio'])); $endTime = data_last_month_day(explota($_GET['fechafin'])); if ($_GET['fechainicio'] != $_GET['fechafin']) { $m = 'Del ' . genMonth_Text(date('m', strtotime($startTime))) . ' al ' . genMonth_Text(date('m', strtotime($endTime))) . ' de 2014'; } else { $m = genMonth_Text(date('m', strtotime($endTime))) . ' de 2014'; } $sTime = $startTime; setlocale(LC_ALL, 'et_EE.ISO-8859-1'); $datay = array(); $datax = array(); $color = array(); $Pinto = array('', 'aliceblue', 'antiquewhite', 'lightsalmon', 'lightseagreen', 'aqua', 'bisque', 'lime', 'black', 'lightyellow', 'limegreen', 'linen', 'blue', 'lightskyblue', 'blanchedalmond', 'aquamarine', 'lightslategray', 'azure', 'lightsteelblue', 'beige', 'magenta', 'blueviolet', 'maroon', 'brown', 'mediumaquamarine', 'burlywood', 'mediumblue', 'coral', 'mediumslateblue', 'cornflowerblue', 'mediumspringgreen', 'cornsilk', 'mediumturquoise', 'cadetblue', 'mediumorchid', 'chartreuse', 'mediumpurple', 'chocolate', 'mediumseagreen', 'mediumvioletred', 'cyan', 'midnightblue', 'darkblue', 'mintcream', 'darkcyan', 'mistyrose', 'oldlace', 'darkmagenta', 'olive', 'darkolivegreen', 'olivedrab', 'darkorange', 'orange', 'darkgoldenrod', 'moccasin', 'darkgray', 'navajowhite', 'darkgreen', 'navy', 'darkkhaki', 'darkorchid', 'orangered', 'darkred', 'orchid', 'darksalmon', 'palegoldenrod', 'darkseagreen', 'papayawhip', 'darkviolet', 'peachpuff', 'deeppink', 'peru', 'deepskyblue', 'pink', 'dimgray', 'plum', 'dodgerblue', 'powderblue', 'firebrick', 'purple', 'floralwhite', 'red', 'forestgreen', 'palegreen', 'darkslateblue', 'paleturquoise', 'darkslategray', 'palevioletred', 'darkturquoise', 'rosybrown', 'fuchsia', 'royalblue', 'gainsboro', 'saddlebrown', 'ghostwhite', 'salmon', 'gold', 'honeydew', 'skyblue', 'hotpink', 'slateblue', 'indianred', 'slategray', 'indigo', 'snow', 'ivory', 'sandybrown', 'goldenrod', 'seagreen', 'gray', 'seashell', 'green', 'sienna', 'greenyellow', 'silver', 'springgreen', 'khaki', 'steelblue', 'lavender', 'tan', 'lavenderblush', 'teal', 'lawngreen', 'thistle', 'lightgoldenrodyellow', 'white', 'lightgreen', 'whitesmoke', 'lightgrey', 'yellow', 'lightpink', 'yellowgreen', 'lemonchiffon', 'tomato', 'lightblue', 'turquoise', 'lightcoral', 'violet', 'lightcyan', 'wheat'); $tipo = array(0 => "Contado", 1 => "Credito", 2 => "Nota Credito"); $moneda = array(1 => "\$", 2 => "U\$S"); $Iva_Compras = 0; $Iva_Ventas = 0; $Total_Compras = 0; $Total_Ventas = 0; $Cant_Ventas = 0; $Cant_Compras = 0;
$pdf->text(158, 40, $ficha); $pdf->Ln(4); $pdf->Cell(0, 0, 'C.I.:', 0, 0, 'L', false); //numero de cedula de identidad $pdf->text(19, 44, $CI); $pdf->Ln(4); $pdf->Cell(0, 0, utf8_decode('Descripción:'), 0, 0, 'L', false); //descripcion..este campo no se usa $pdf->Ln(4); $pdf->Cell(0, 0, utf8_decode('Liquidacion y Pagos por: SUELDOS'), 0, 0, 'L', false); //llenamos por defecto SUELDOS $pdf->Ln(4); $pdf->Cell(0, 0, utf8_decode('Correspondiente al mes de:'), 0, 0, 'L', false); //mes y anho del salario $m = substr($fecha, 3, 2); $pdf->text(57, 56, genMonth_Text($m)); $pdf->Ln(10); $pdf->Cell(0, 0, utf8_decode('POR LA SUMA DE:'), 0, 0, 'L', false); //monto del pago $pdf->text(152, 66, 'Gs:'); $pdf->text(158, 66, number_format($sueldoBruto), 0, '', '.'); $pdf->Ln(4); $pdf->Cell(0, 0, utf8_decode('MENOS:'), 0, 0, 'L', false); //los descuentos van por debajo $pdf->Ln(4); $pdf->Cell(0, 0, utf8_decode('- I.P.S.:'), 0, 0, 'L', false); //descuento IPS 9% $pdf->text(80, 74, "Gs: "); $pdf->text(90, 74, number_format($IPS), 0, '', '.'); $pdf->Ln(4); $pdf->Cell(0, 0, utf8_decode('- Ausencias:'), 0, 0, 'L', false);
if (is_array($value)) { //si es un array sigo recorriendo echo '<br>Proyecto:' . $key . '<br> '; recorro($value); } else { //si es un elemento lo muestro echo $key . '=>' . $value . '<br>'; } } } //recorro($datay); //recorro($name); //recorro($Pinto); $x = $x - 1; $titulo = 'Algo va'; $m = genMonth_Text($_GET['mes']) . ' de 2014'; if (!empty($datay)) { require_once '/usr/share/jpgraph/jpgraph.php'; require_once '/usr/share/jpgraph/jpgraph_bar.php'; $graph = new Graph(500, 600, 'auto'); $graph->SetScale("textlin"); $graph->SetShadow(); $graph->img->SetMargin(40, 30, 40, 260); $graph->yaxis->title->Set($m); $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD); $graph->title->Set('Horas destinadas a clientes abonados'); $graph->title->SetFont(FF_FONT1, FS_BOLD); $graph->xaxis->SetTickLabels($name); $graph->xaxis->SetTextLabelInterval(1); $graph->xaxis->SetLabelAngle(90); $bplot1 = new BarPlot($datay);