

<?php

//invoice contacts

	// ***start with invoice address

	$kindcont='audit';

	// parse contacts data  with variable kindofcontacts

$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM contacts WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts=

'$kindcont'");

$contactsinfoData = mysqli_fetch_assoc($contactsinfo);

$companyname=$contactsinfoData['companyname'];

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

$pdf->SetTextColor(0,0,0);

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

$audititletop=html_entity_decode($auditplacepdf);

$audititletop = iconv('UTF-8', 'windows-1252', $audititletop);

$pdf->Cell(190,6,$audititletop,1,0,'C');

$pdf->Ln();

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

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

$pdf->SetFillColor(232, 242, 255);



$pdf->Cell(150,6,$companyname,1,0,'C',TRUE);

$pdf->Ln();

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

$pdf->Cell(150,6,$contactsinfoData['address'],1,0,'C',TRUE);

$pdf->Ln();

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

$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'C',TRUE);

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

$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'C',TRUE);

$pdf->Ln();

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

$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'C',TRUE);

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

$pdf->Cell(55,6,$contactsinfoData['country'],1,0,'C',TRUE);

$pdf->Ln();

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

$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'C',TRUE);

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

$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'C',TRUE);

$pdf->Ln();

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

$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'C',TRUE);

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

$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'C',TRUE);

$pdf->Ln();

?>

