

<?php

// parse new component

$identpartlist = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);

$identpartlist->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='new'");

$identpartlist->execute();



$pdf->AddPage('L');

$pdf->SetFont('','B','9');

$pdf->Cell(275,6,'Parti da testare',1,0,'C');

$pdf->Ln();

$pdf->SetFont('','B','8');

$pdf->Cell(55,6,'Parte',1,0,'C');

$pdf->Cell(85,6,'Descrizione',1,0,'C');

$pdf->Cell(80,6,'Articolo',1,0,'C');

$pdf->Cell(55,6,'Colore',1,0,'C');

$pdf->Ln();

$pdf->SetFont('','','8'); 



$wa_startindex = 0;

while(!$identpartlist->atEnd()) {

  $wa_startindex = $identpartlist->Index;



$descpart=$identpartlist->getColumnVal("description_identificationparts");

$pdf->Cell(55,6,$descpart,1,0,'L',TRUE);

$pdf->Cell(85,6,$identpartlist->getColumnVal("material_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(80,6,$identpartlist->getColumnVal("article_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(55,6,$identpartlist->getColumnVal("color_identificationparts"),1,0,'L', TRUE);

    

    	$pdf->Ln();





  $identpartlist->moveNext();

}

$identpartlist->moveFirst(); //return RS to first record

unset($wa_startindex);

unset($wa_repeatcount);



// parse issue by cmc

$identpartlistcmc = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);

$identpartlistcmc->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='cmc'");

$identpartlistcmc->execute();

if (!empty($identpartlistcmc->getColumnVal("ididentificationparts"))) {

$pdf->SetFont('','B','8');

$pdf->Cell(275,6,'Parti testate da CIMAC',1,0,'C');

$pdf->Ln();

$pdf->Cell(40,6,'Parte',1,0,'C');

$pdf->Cell(50,6,'Descrizione',1,0,'C');

$pdf->Cell(50,6,'Articolo',1,0,'C');

$pdf->Cell(40,6,'Colore',1,0,'C');

$pdf->Cell(30,6,'Rapporto',1,0,'C');

$pdf->Cell(30,6,'Data',1,0,'C');

$pdf->Cell(35,6,'Intestato',1,0,'C');

$pdf->Ln();

$pdf->SetFont('','','8'); 



$wa_startindex = 0;

while(!$identpartlistcmc->atEnd()) {

  $wa_startindex = $identpartlistcmc->Index;





$descpart=$identpartlistcmc->getColumnVal("description_identificationparts");

$pdf->Cell(40,6,$descpart,1,0,'L',TRUE);

$pdf->Cell(50,6,$identpartlistcmc->getColumnVal("material_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(50,6,$identpartlistcmc->getColumnVal("article_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(40,6,$identpartlistcmc->getColumnVal("color_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(30,6,$identpartlistcmc->getColumnVal("cmcreportnumber_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(30,6,$identpartlistcmc->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(35,6,$identpartlistcmc->getColumnVal("reportof"),1,0,'L',TRUE);

    

    	$pdf->Ln();





  $identpartlistcmc->moveNext();

}

$identpartlistcmc->moveFirst(); //return RS to first record

unset($wa_startindex);

unset($wa_repeatcount);

}

// parse issue by trd

$identpartlisttrd = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);

$identpartlisttrd->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='trd'");

$identpartlisttrd->execute();

if (!empty($identpartlisttrd->getColumnVal("ididentificationparts"))) {

$pdf->SetFont('','B','8');

$pdf->Cell(275,6,'Parti testate da altro laboratorio',1,0,'C');

$pdf->Ln();

$pdf->Cell(40,6,'Parte',1,0,'C');

$pdf->Cell(50,6,'Descrizione',1,0,'C');

$pdf->Cell(50,6,'Articolo',1,0,'C');

$pdf->Cell(40,6,'Colore',1,0,'C');

$pdf->Cell(30,6,'Rapporto',1,0,'C');

$pdf->Cell(30,6,'Data',1,0,'C');

$pdf->Cell(35,6,'Intestato',1,0,'C');

$pdf->Ln();

$pdf->SetFont('','','8'); 



$wa_startindex = 0;

while(!$identpartlisttrd->atEnd()) {

  $wa_startindex = $identpartlisttrd->Index;





$descpart=$identpartlisttrd->getColumnVal("description_identificationparts");

$pdf->Cell(40,6,$descpart,1,0,'L',TRUE);

$pdf->Cell(50,6,$identpartlisttrd->getColumnVal("material_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(50,6,$identpartlisttrd->getColumnVal("article_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(40,6,$identpartlisttrd->getColumnVal("color_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(30,6,$identpartlisttrd->getColumnVal("cmcreportnumber_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(30,6,$identpartlisttrd->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);

$pdf->Cell(35,6,$identpartlisttrd->getColumnVal("reportof"),1,0,'L',TRUE);

    

    	$pdf->Ln();





  $identpartlisttrd->moveNext();

}

$identpartlisttrd->moveFirst(); //return RS to first record

unset($wa_startindex);

unset($wa_repeatcount);

}

?>