| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953 |
- <?php
- /*
- Plantilla para generar PDF
- 2019. Servicios Corporativos y Soluciones en CFDI S de RL de CV
- Versi�n 1.0
- �ltima Actualizaci�n: 20/05/2019
- Developer: Fernando A. Jacobo
- Tester: Fernando A. Jacobo
- IT Leader: Jorge H. Fierro
- �ltima modificaci�n: Fernando A. Jacobo
- */
- include_once('shared/fpdf/fpdf.php');
- class crearPDF extends FPDF {
- public $tipoPDF;
- public $datosEntrada;
- public $conversiones;
- public $datosLw;
- public $datosKw;
- public $sonidoRegenerado;
- public $correcionArea;
- public $sonidoMasCorreccion;
- public $LwAVentilador;
- public $LwAVentiladorA;
- public $areaDeSalida;
- public $velocidadDeFluido;
- public $datosLwFinal;
- public $sumaLogLwFinal;
- public $datosLwA;
- public $sumaLogaritmicaLwA;
- public $presionSonora;
- public $presionSonoraA;
- public $DatosLwFinalVa;
- public $sumaLogaritmicaLwFinalVa;
- public $DatosLwAVa;
- public $sumaLogaritmicaLwAVa;
- public $presionSonoraVa;
- public $presionSonoraAVa;
- public $datosAtenuadores;
- public $p;
- public $narch;
- /*public function __construct(){
- $this->FPDF('P', 'mm', 'Letter');
- }*/
-
- function Header() {
- $this->SetFont('Arial','B',6);
- $bordes = 0;
- $areaDeTrabajo = 200;
- $arrXpos = array(30, 90, 13, 11);
- // Logo Corporativo Soler & Palau
- $this->SetY(30);
- $this->SetX(10);
- $rfcSoler = 'SPA861201DK4';
- if ( file_exists( 'shared/imagenes/' . $rfcSoler . '_PDF_LOGOCORPORATIVO.png' ) ) {
- $this->Image( 'shared/imagenes/' . $rfcSoler . '_PDF_LOGOCORPORATIVO.png', 10, 17, 50, 19 );
- }
- // Logo Soler & Palau Ventilation
- $this->SetY(30);
- $this->SetX(2);
- if ( file_exists( 'shared/imagenes/' . $rfcSoler . '_PDF.jpg' ) ) {
- $this->Image( 'shared/imagenes/' . $rfcSoler . '_PDF.jpg', 165, 10, 40, 20 );
- }
- //Texto Fijo
- $this->SetY(30);
- $this->SetX(165);
- $this->SetFont('Arial', '', 7);
- $strTexto = 'http://www.solerpalau.mx';
- $this->Cell( 40, 5, $strTexto, $bordes, 1, 'L');
- $this->SetX(165);
- $strTexto = 'comercialmx@solerpalau.com';
- $this->Cell( 40, 5, $strTexto, $bordes, 1, 'L');
- //Datos de columna A
- $this->SetFont('Arial', '', 7);
- $this->SetY(23);
- $this->SetX($arrXpos[0]);
- // Domicilio Fiscal
- $strTemporal = '';
- $strTemporal .= 'Boulevard A, 15';
- $strTemporal = trim($strTemporal);
- $strTemporal = trim($strTemporal, ',');
- $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L');
- $this->SetX($arrXpos[0]);
- $strTemporal = 'Col. Parque Industrial Puebla 2000';
- $strTemporal = trim($strTemporal);
- $strTemporal = trim($strTemporal, ',');
- $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L');
- $this->SetX($arrXpos[0]);
- $strTemporal = 'Puebla, Puebla, Mexico, C.P. 72225';
- $strTemporal = trim($strTemporal);
- $strTemporal = trim($strTemporal, ',');
- $this->SetX($arrXpos[0]);
- $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L');
- // N�mero telef�nico
- $this->SetX($arrXpos[0]);
- $this->Cell(80, 3, 'Tel. (222) 223 3900, 223 3911', $bordes, 1, 'L');
- // R.F.C.
- $this->SetX($arrXpos[0]);
- $this->Cell(80, 3, 'R.F.C.: SPA861201DK4', $bordes, 1, 'L');
- // R�gimen Fiscal
- $this->SetX($arrXpos[0]);
- $strTemporal = utf8_decode('R�gimen Fiscal: 601 - General de Ley Personas Morales');
- $this->Cell(80, 3, $strTemporal, $bordes, 1, 'L');
- $this->Ln(3);
- if ( $this->PageNo() == "1" ) {
- // T�tulo del pdf
- $this->SetX(10);
- $this->SetFont('Arial', 'B', 14);
- $this->Cell( $areaDeTrabajo, 5, utf8_decode('SELECCI�N DE ATENUADOR'), $bordes, 1, 'C');
- $this->Ln(3);
- $y = $this->GetY();
- $bordes = 0;
- //Dibuja parte superior izquierda y derecha del cuadro
- $this->SetY($y);
- $this->SetX($arrXpos[3]);
- $this->Cell(2, 2, '', 'TL', 'C');
- $this->SetX($arrXpos[3] + 70);
- $this->Cell(2, 2, '', 'TR', 'C');
- $this->Ln(3);
- $this->SetFont('Arial', 'B', 10);
- $this->SetX($arrXpos[2]);
- $this->SetFillColor(255, 255, 255);
- $y3 = $this->GetY();//Sirve para posicionar la columna B
- $this->Cell(68, 4, 'Datos de Entrada', $bordes, 1, 'C');
- $arrDatosEntrada = $this->datosEntrada;
- foreach ( $arrDatosEntrada as $keyDatosEntrada => $valueDatosEntrada ) {
- $this->SetFont('Arial', 'B', 8);
- $this->SetX($arrXpos[2]);
- $this->SetFillColor(255, 255, 255);
- $strTexto = $keyDatosEntrada;
- $wStrTexto = $this->GetStringWidth($keyDatosEntrada) + 2;
- $this->Cell($wStrTexto, 4, $strTexto.":", $bordes, 0, 'L');
- $this->SetFont('Arial', '', 8);
- $this->SetFillColor(255, 255, 255);
- if ( $keyDatosEntrada == "CurvaNC" ) {
- $arrCurvaNC = explode( "##", $valueDatosEntrada );
- $curvaNC = $arrCurvaNC[0];
- $valoresCurvaNC = $arrCurvaNC[1];
- $this->Cell(34, 4, trim($curvaNC), $bordes, 1, 'L');
- } else {
- $this->Cell(34, 4, trim($valueDatosEntrada), $bordes, 1, 'L');
- }
- }
- $this->Ln(3);
- // Dibuja parte inferior izquierda y derecha del cuadro
- $this->SetX($arrXpos[3]);
- $this->Cell(2, 2, '', 'BL', 'C');
- $this->SetX($arrXpos[3] + 70);
- $this->Cell(2, 2, '', 'BR', 1, 'C');
- $this->Ln(2);
- $y1 = $this->GetY();
- $bordes = 0;
- $i = 0;
- $arrConversiones = $this->conversiones;
- foreach ( $arrConversiones as $valueConversiones ) { $i ++; }
- if ( ($i > 0) && ( $this->tipoPDF == "CALC" ) ) {
- $wAreaConversiones = 115;
- $this->SetY($y3);
- $this->SetX($arrXpos[1]);
- $this->SetFont('Arial', 'B', 10);
- $this->SetFillColor(255, 255, 255);
- $this->Cell( $wAreaConversiones, 4, "Conversiones de los Datos de Entrada", $bordes, 1, 'C');
- $y = $this->GetY();
- foreach ( $arrConversiones as $keyConversiones => $valueConversiones ) {
- $this->SetY($y);
- $this->SetX($arrXpos[1]);
- $this->SetFont('Arial', 'B', 8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell( 30, 4, $keyConversiones, $bordes, 0, 'L');
- $this->SetFont('Arial', '', 8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( 85, 4, $valueConversiones, $bordes, 'L');
- $y = $this->GetY();
- }
- }
- $y2 = $this->GetY();
- //Para saber cual posici�n de "y" es mayor
- if ($y1 >= $y2) {
- $this->SetY($y1);
- } else {
- $this->SetY($y2);
- }
-
- }
- }
- //Funci�n parta dibujar el cuadro de los conceptos
- function DibujaCuadro($posy,$largo) {
- //N�mero
- $this->Rect(10, $posy, 7, $largo);
- // Conceptos -> Art�culo
- $this->Rect(17, $posy, 36, $largo);
- //Conceptos -> ClaveProdServ
- $this->Rect(53, $posy, 19, $largo);
- //Conceptos -> Cantidad
- $this->Rect(72, $posy, 17, $largo);
- // Conceptos -> Unidad
- $this->Rect(89, $posy, 11, $largo);
- //Descripcion
- $this->Rect(100, $posy, 65, $largo);
- // Conceptos -> Valor unitario
- $this->Rect(165, $posy, 20, $largo);
- // Conceptos -> Importe
- $this->Rect(185, $posy, 20, $largo);
- }
- //Funci�n para el footer de la p�gina
- function Footer(){
- $this->SetY(-12);
- $this->SetFont('Arial','B',8);
- $this->SetX(10);
- $this->SetY(-13);
- $this->SetFont('Arial','B',8);
- $this->SetTextColor(0);
- $this->Cell(200,10,utf8_decode('P�gina ').$this->PageNo().' de {nb}',0,0,'R');
- }
- // Creaci�n del objeto de la clase heredada
- function genera_PDF() {
- $this->AliasNbPages();
- $this->AddPage();
- // Configuraciones Globales
- $bordes = 1;
- $areaDeTrabajo = 195;
- $tamanoCelda = 4;
- $bolSaltoPagina = false;
- $y = $this->GetY();
-
- $arrDatosLwFinal = $this->datosLwFinal;
- $arrDatosLwA = $this->datosLwA;
- $arrLw = $this->datosLw;
- $arrKw = $this->datosKw;
- $arrDatosLwFinalVa = $this->DatosLwFinalVa;
- $arrDatosLwAVa = $this->DatosLwAVa;
- $arrFrecuencias = array( "63Hz", "125Hz", "250Hz", "500Hz", "1000Hz", "2000Hz", "4000Hz", "8000Hz" );
- $wColFrecuencias = $areaDeTrabajo / (count($arrFrecuencias)+1);
- $arrPonderanciaA = array( "-26.2", "-16.1", "-8.6", "-3.2", "0.0", "1.2", "1.0", "-1.1" );
- $this->SetY($y);
- $this->SetX(10);
- $this->SetFont('Arial','B',11);
- $this->SetFillColor(255, 255, 255);
- $this->Ln(5);
- if ( $this->tipoPDF == "CALC" ) {
- $this->Cell( $areaDeTrabajo, 4, utf8_decode("C�LCULOS GENERALES"), 0, 1, 'C');
- $this->Ln(5);
- $x = 10;
- $w = $x;
- $w1 = $x + $wColFrecuencias;
- $w2 = $x + $wColFrecuencias + $wColFrecuencias;
- $w3 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w4 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w5 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w6 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w7 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w8 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $wCol = array( $w, $w1, $w2, $w3, $w4, $w5, $w6, $w7, $w8 );
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $wColAV = $areaDeTrabajo / 4;
- $tmpX = 10;
- $y = $this->GetY();
- $wx = $tmpX;
- $wx1 = $tmpX + $wColAV;
- $wx2 = $tmpX + $wColAV + $wColAV;
- $wx3 = $tmpX + $wColAV + $wColAV + $wColAV;
- $wColx = array( $wx, $wx1, $wx2, $wx3 );
- $this->SetY($y);
- $this->SetX($wColx[0]);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColAV, 10, utf8_decode("�rea de Salida"), $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wColx[1]);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColAV, 10, $this->areaDeSalida, $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wColx[2]);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColAV, 10, "Velocidad del Fluido", $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wColx[3]);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColAV, 10, $this->velocidadDeFluido, $bordes, 'C');
- $this->Ln(5);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $i = 1;
- $this->Cell($wColFrecuencias, $tamanoCelda, "Frecuencias Hz", $bordes, 0, 'C');
- foreach ( $arrFrecuencias as $frecuencias ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C');
- $i ++;
- }
- $this->Ln(4);
- $i = 1;
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Lw", $bordes, 0, 'C');
- foreach ( $arrLw as $keyLw => $valueLw ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLw, $bordes, 0, 'C');
- $i ++;
- }
- $this->Ln(4);
- $i = 1;
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Kw", $bordes, 0, 'C');
- foreach ( $arrKw as $keyKw => $valueKw ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueKw, $bordes, 0, 'C');
- $i ++;
- }
- $this->Ln(4);
- $i = 1;
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Lw Final", $bordes, 0, 'C');
- foreach ( $arrDatosLwA as $keyLwA => $valueLwA ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwA, $bordes, 0, 'C');
- $i ++;
- }
- $this->Ln(4);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $i = 1;
- $this->Cell($wColFrecuencias, $tamanoCelda, "Ponderancia A", $bordes, 0, 'C');
- foreach ( $arrPonderanciaA as $ponderancia ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $ponderancia, $bordes, 0, 'C');
- $i ++;
- }
- $this->Ln(4);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $i = 1;
- $this->Cell($wColFrecuencias, $tamanoCelda, "LwA", $bordes, 0, 'C');
- foreach ( $arrDatosLwA as $keyLwA => $valueLwA ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwA, $bordes, 0, 'C');
- $i ++;
- }
- $arrDatosEntrada = $this->datosEntrada;
- foreach ( $arrDatosEntrada as $keyDatosEntrada => $valueDatosEntrada ) {
- if ( $keyDatosEntrada == "CurvaNC" ) {
- $arrCurvaNC = explode( "##", $valueDatosEntrada );
- $curvaNC = $arrCurvaNC[0];
- $valoresCurvaNC = $arrCurvaNC[1];
- }
- }
- switch( $curvaNC ) {
- case 'NC15':
- $arrCurvaNC = array( 47, 36, 29, 22, 17, 14, 12, 11 );
- break;
- case 'NC20':
- $arrCurvaNC = array( 51, 40, 33, 26, 22, 19, 17, 16 );
- break;
- case 'NC25':
- $arrCurvaNC = array( 54, 44, 37, 31, 27, 24, 22, 21 );
- break;
- case 'NC30':
- $arrCurvaNC = array( 57, 48, 41, 35, 31, 29, 28, 27 );
- break;
- case 'NC35':
- $arrCurvaNC = array( 60, 52, 45, 40, 36, 34, 33, 32 );
- break;
- case 'NC40':
- $arrCurvaNC = array( 64, 56, 50, 45, 41, 39, 38, 37 );
- break;
- case 'NC45':
- $arrCurvaNC = array( 67, 60, 54, 49, 46, 44, 43, 42 );
- break;
- case 'NC50':
- $arrCurvaNC = array( 71, 64, 58, 54, 51, 49, 48, 47 );
- break;
- case 'NC55':
- $arrCurvaNC = array( 74, 67, 62, 58, 56, 54, 53, 52 );
- break;
- case 'NC60':
- $arrCurvaNC = array( 77, 71, 67, 63, 61, 59, 58, 57 );
- break;
- case 'NC65':
- $arrCurvaNC = array( 80, 75, 71, 68, 66, 64, 63, 62 );
- break;
- case 'NC70':
- $arrCurvaNC = array( 84, 79, 75, 72, 71, 70, 68, 68 );
- break;
- }
- $this->Ln(4);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $i = 1;
- $this->Cell($wColFrecuencias, $tamanoCelda, "Curva ".$curvaNC, $bordes, 0, 'C');
- foreach ( $arrCurvaNC as $valoresCurvaNC ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valoresCurvaNC, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $this->Ln(4);
- $arrLwAV = $this->LwAVentilador;
- $i = 1;
- $y1 = $this->GetY();
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, "LwA Ventilador - ".$curvaNC, $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrLwAV as $valueLwAV ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $valueLwAV, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $arrDatosAtenuador = $this->datosAtenuadores;
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Atenuaci�n Seleccionada"), $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrFrecuencias as $frecuencias ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $arrDatosAtenuador[$frecuencias], $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $arrVentiladorA = $this->LwAVentiladorA;
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("LwA Ventilador - Atenuaci�n"), $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrVentiladorA as $VentiladorA ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $VentiladorA, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $arrSonidoR = $this->sonidoRegenerado;
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, "Sonido Regenerado", $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrSonidoR as $sonidoRegenerado ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $sonidoRegenerado, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $arrCorrecion = $this->correcionArea;
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Correci�n para la �rea"), $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrCorrecion as $correcion ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $correcion, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $arrSonidoMasCorrecion = $this->sonidoMasCorreccion;
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Sonido Regenerado m�s Correci�n del �rea"), $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrSonidoMasCorrecion as $sonidoMasCorrecion ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $sonidoMasCorrecion, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, "(A- weighting (dB))", $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrPonderanciaA as $ponderancia ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $ponderancia, $bordes, 0, 'C');
- $i ++;
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $i = 1;
- $y1 = $this->GetY();
- $this->SetY($y1);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell($wColFrecuencias, $tamanoCelda, utf8_decode("Espectro resultante ponderaci�n A ( dBA )"), $bordes, 'C');
- $y2 = $this->GetY();
- $sCol = $y1 - $y2;
- foreach ( $arrDatosLwAVa as $valueLwAVa ) {
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $sCol, $valueLwAVa, $bordes, 0, 'C');
- $i ++;
- }
- }
- $y = $this->GetY();
- if ( $y >= 243 ) {
- $this->AddPage();
- $y = $this->GetY();
- }
- $this->SetFont('Arial','B',12);
- $this->SetFillColor(255, 255, 255);
- $this->SetY($y);
- $this->Cell( $areaDeTrabajo, 4, "RESULTADOS", 0, 1, 'C');
- $this->Ln(8);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($areaDeTrabajo, $tamanoCelda, "Espectro de Potencia Sonora Ventilador Lw",$bordes, 1, 'C');
- $x = 10;
- $w = $x;
- $w1 = $x + $wColFrecuencias;
- $w2 = $x + $wColFrecuencias + $wColFrecuencias;
- $w3 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w4 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w5 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w6 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w7 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w8 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $wCol = array( $w, $w1, $w2, $w3, $w4, $w5, $w6, $w7, $w8 );
- $i = 0;
- foreach ( $arrFrecuencias as $frecuencias ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dB)", $bordes, 0, 'C');
- $this->Ln(4);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $i = 0;
- foreach ( $arrDatosLwFinal as $keyLwFinal => $valueLwFinal ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwFinal, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogLwFinal, $bordes, 0, 'C');
- $this->Ln(8);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($areaDeTrabajo, $tamanoCelda, utf8_decode("Espectro de Potencia Sonora Ventilador Ponderaci�n A Lw (A)"),$bordes, 1, 'C');
- $i = 0;
- foreach ( $arrFrecuencias as $frecuencias ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dBA)", $bordes, 0, 'C');
- $this->Ln(4);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $i = 0;
- foreach ( $arrDatosLwA as $keyLwA => $valueLwA ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwA, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogaritmicaLwA, $bordes, 0, 'C');
- $this->Ln(8);
- $wColPotencias = $areaDeTrabajo / 2;
- $x = 10;
- $y = $this->GetY();
- $w = $x;
- $w1 = $x + $wColPotencias;
- $w2 = $x + $wColPotencias + $wColPotencias;
- $w3 = $x + $wColPotencias + $wColPotencias + $wColPotencias;
- $wCol = array( $w, $w1, $w2, $w3 );
- $this->SetY($y);
- $this->SetX($wCol[0]);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 10, utf8_decode("Presi�n Sonora"), $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wCol[1]);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 10, $this->presionSonora, $bordes, 'C');
-
- $this->Ln(8);
- // Con Atenaudor
- $x = 10;
- $w = $x;
- $w1 = $x + $wColFrecuencias;
- $w2 = $x + $wColFrecuencias + $wColFrecuencias;
- $w3 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w4 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w5 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w6 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w7 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $w8 = $x + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias + $wColFrecuencias;
- $wCol = array( $w, $w1, $w2, $w3, $w4, $w5, $w6, $w7, $w8 );
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($areaDeTrabajo, $tamanoCelda, "Espectro de Potencia Sonora Ventilador con Atenuador Lw",$bordes, 1, 'C');
- $i = 0;
- foreach ( $arrFrecuencias as $frecuencias ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dBA)", $bordes, 0, 'C');
- $this->Ln(4);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $i = 0;
- foreach ( $arrDatosLwFinalVa as $keyLwFinalVa => $valueLwFinalVa ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwFinalVa, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogaritmicaLwFinalVa, $bordes, 0, 'C');
- $this->Ln(8);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->Cell($areaDeTrabajo, $tamanoCelda, "Espectro de Potencia Sonora Ventilador con Atenuador Lw (A)",$bordes, 1, 'C');
- $i = 0;
- foreach ( $arrFrecuencias as $frecuencias ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $frecuencias, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, "Lw (dBA)", $bordes, 0, 'C');
- $this->Ln(4);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $i = 0;
- foreach ( $arrDatosLwAVa as $keyLwAVa => $valueLwAVa ) {
- $this->SetX($wCol[$i]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $valueLwAVa, $bordes, 0, 'C');
- $i ++;
- }
- $this->SetX($wCol[8]);
- $this->Cell($wColFrecuencias, $tamanoCelda, $this->sumaLogaritmicaLwAVa, $bordes, 0, 'C');
- $this->Ln(8);
- $wColPotencias = $areaDeTrabajo / 2;
- $x = 10;
- $y = $this->GetY();
- $w = $x;
- $w1 = $x + $wColPotencias;
- $w2 = $x + $wColPotencias + $wColPotencias;
- $w3 = $x + $wColPotencias + $wColPotencias + $wColPotencias;
- $wCol = array( $w, $w1, $w2, $w3 );
- $this->SetY($y);
- $this->SetX($wCol[0]);
- $this->SetFont('Arial','B',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 10, utf8_decode("Presi�n Sonora"), $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wCol[1]);
- $this->SetFont('Arial','',8);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 10, $this->presionSonoraVa, $bordes, 'C');
- $arrXpos = array(30, 90, 13, 11);
-
- $y = $this->GetY();
- //Dibuja parte superior izquierda y derecha del cuadro
- $this->SetY($y + 8);
- $this->SetX($arrXpos[3]);
- $this->Cell(2, 2, '', 'TL', 'C');
- $this->SetX($arrXpos[3] + 192);
- $this->Cell(2, 2, '', 'TR', 'C');
- $this->Ln(3);
- $this->SetFont('Arial', 'B', 12);
- $this->SetX($arrXpos[2]);
- $this->SetFillColor(255, 255, 255);
- $y3 = $this->GetY();//Sirve para posicionar la columna B
- $this->Cell(190, 12, 'Datos del Atenuador Seleccionado', $bordes, 1, 'C');
- $areaDeTrabajo = 190;
- $wColPotencias = $areaDeTrabajo / 4;
- $x = 13;
- $y = $this->GetY();
- $w = $x;
- $w1 = $x + $wColPotencias;
- $w2 = $x + $wColPotencias + $wColPotencias;
- $w3 = $x + $wColPotencias + $wColPotencias + $wColPotencias;
- $wCol = array( $w, $w1, $w2, $w3 );
- $arrDatosAtenuador = $this->datosAtenuadores;
- $this->SetY($y);
- $this->SetX($wCol[0]);
- $this->SetFont('Arial','B',11);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 11, "Modelo", $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wCol[1]);
- $this->SetFont('Arial','',11);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 11, $arrDatosAtenuador['MODELO'], $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wCol[2]);
- $this->SetFont('Arial','B',11);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 11, "Longitud", $bordes, 'C');
- $this->SetY($y);
- $this->SetX($wCol[3]);
- $this->SetFont('Arial','',11);
- $this->SetFillColor(255, 255, 255);
- $this->MultiCell( $wColPotencias, 11, $arrDatosAtenuador['LONGITUD']."", $bordes, 'C');
- $this->Ln(3);
- // Dibuja parte inferior izquierda y derecha del cuadro
- $this->SetX($arrXpos[3]);
- $this->Cell(2, 2, '', 'BL', 'C');
- $this->SetX($arrXpos[3] + 192);
- $this->Cell(2, 2, '', 'BR', 1, 'C');
- $this->Ln(2);
- if ( $this->narch == "" ) {
- $this->Output();
- } else {
- if ( $this->p == "" ) {
- $this->Output( $this->narch );
- } else {
- $this->Output( $this->narch, $this->p );
- }
- }
-
- }
- }
- ?>
|