6 class Tuhpi extends \Utility\Service\PdfTemplate
14 protected $_title = 'HPI Report';
16 * @var \Stock\Entity\Stock
22 protected $showCustomerDetails = false;
26 protected $showValuationDetails = false;
30 protected $showPricingDetails = false;
34 protected $showVehicleDetails = false;
38 protected $showVehicleNotes = false;
42 protected $showDamageDetails = false;
46 protected $showAccessoryDetails = false;
50 protected $showSignatureLines = false;
54 protected $showTermsAndConditions = false;
58 protected $showOffersReceived = false;
62 protected $showOfferMade = false;
66 * Utility for easy parameter retrieval.
67 * @param string $param
68 * @param unknown $default
71 protected function getStockParam($param, $default)
73 return !is_null($this->jobRecord->$param)
74 ? $this->jobRecord->$param
79 * Utility for easy parameter retrieval.
80 * @param string $param
81 * @param unknown $default
84 protected function getStockSubParam($ref, $param, $default)
86 $ref = !is_null($this->jobRecord->$ref)
87 ? $this->jobRecord->$ref
89 return is_object($ref)
95 * Utility for easy parameter retrieval.
96 * @param string $param
97 * @param unknown $default
100 protected function getValuationParam($param, $default)
102 return !is_null($this->jobRecord->valuation)
103 && !is_null($this->jobRecord->valuation->$param)
104 ? $this->jobRecord->valuation->$param
112 public function build()
114 #-> Set data item to work with.
115 $authData = \Utility\Registry::getAuthData();
116 $this->jobRecord = $this->_input['jobRecord'];
118 $recordId = $this->_input['contract']->PdfTemplate['recordId'];
120 if(!empty($recordId) && '' != $recordId)
122 $result = $this->em->createQuery(
124 . 'FROM \Stock\Entity\Tuhpi tuhpi '
125 . 'JOIN tuhpi.stock stock '
126 . 'WHERE tuhpi.id = :id '
127 . 'ORDER BY tuhpi.created ASC '
129 ->setParameter( 'id' , $recordId );
133 $result = $this->em->createQuery(
135 . 'FROM \Stock\Entity\Tuhpi tuhpi '
136 . 'JOIN tuhpi.stock stock '
137 . 'WHERE stock.id = :stockId '
138 . ' AND IDENTITY(tuhpi.company) = :companyId '
139 . 'ORDER BY tuhpi.created ASC '
141 ->setParameter( 'stockId' , $this->jobRecord->id )
142 ->setParameter( 'companyId' , $authData['company']['id'] );
145 // $result = $this->em->createQuery(
147 // . 'FROM \Stock\Entity\Tuhpi tuhpi '
148 // . 'JOIN tuhpi.stock stock '
149 // . 'WHERE stock.id = :stockId '
150 // . ' AND IDENTITY(tuhpi.company) = :companyId '
151 // . 'ORDER BY tuhpi.created ASC '
153 // ->setParameter( 'stockId' , $this->jobRecord->id )
154 // ->setParameter( 'companyId' , $authData['company']['id'] )
157 $result = $result->getResult();
159 foreach ($result as $data)
161 $companyProfileOffice = $data->company->contact->office;
162 $companyProfilefax = $data->company->contact->fax;
163 $companyRegion = $data->company->region->name;
164 $companyCity = $data->company->city->name;
165 $companyPostalCode = $data->company->postalCode;
166 $companyStreet = $data->company->street;
167 $companyDealerType = $data->company->dealerType;
168 $companyClientType = $data->company->clientType;
169 $companyCompanyRegistrationNumber = $data->company->companyRegistrationNumber;
170 $companyBusinessName = $data->company->businessName;
173 $f_financeProvider = $data->f_financeProvider;
174 $f_financeBranch = $data->f_financeBranch;
175 $f_agreementOrAccountNumber = $data->f_agreementOrAccountNumber;
176 $f_agreementType = $data->f_agreementType;
177 $f_telephoneNumber = $data->f_telephoneNumber;
178 $f_resultCode = $data->f_resultCode;
181 $fh_data = unserialize($data->fh_data);
183 $ah_data = unserialize($data->ah_data);
185 $si_policeStation = $data->si_policeStation;
186 $si_caseNumber = $data->si_caseNumber;
187 $si_dateStolen = $data->si_dateStolen;
188 $si_vinMatch = $data->si_vinMatch;
189 $si_engineMatch = $data->si_engineMatch;
190 $si_registrationMatch = $data->si_registrationMatch;
191 $si_resultCode = $data->si_resultCode;
193 $ai_company = $data->ai_company;
194 $ai_referenceNumber = $data->ai_referenceNumber;
195 $ai_alertReason = $data->ai_alertReason;
196 $ai_telephoneNumber = $data->ai_telephoneNumber;
197 $ai_resultCode = $data->ai_resultCode;
199 $ivid_responseCode = $data->ivid_responseCode;
200 $ivid_responseDescription = $data->ivid_responseDescription;
201 $ivid_referenceNumber = $data->ivid_referenceNumber;
202 $ivid_contactNumber = $data->ivid_contactNumber;
203 $ivid_resultCode = $data->ivid_resultCode;
206 $mi_company = $data->mi_company;
207 $mi_referenceNumber = $data->mi_referenceNumber;
208 $mi_contactNumber = $data->mi_contactNumber;
209 $mi_dateApplied = $data->mi_dateApplied;
210 $mi_resultCode = $data->mi_resultCode;
213 $vesa_certificateNumber = $data->vesa_CertificateNumber;
214 $vesa_dateFitted = $data->vesa_dateFitted;
215 $vesa_brandName = $data->vesa_brandName;
216 $vesa_brandModel = $data->vesa_brandModel;
217 $vesa_deviceDescriptionType = $data->vesa_deviceDescriptionType;
218 $vesa_resultCode = $data->vesa_resultCode;
221 $rh_data = unserialize($data->rh_data);
224 $eh_data = unserialize($data->eh_data);
227 $mh_data = unserialize($data->mh_data);
230 $vc_month = $data->vc_month;
231 $vc_year = $data->vc_year;
232 $vc_newOptionCode = $data->vc_newOptionCode;
233 $vc_usedOptionCode = $data->vc_usedOptionCode;
234 $vc_maximumRange = $data->vc_maximumRange;
235 $vc_minimunRange = $data->vc_minimunRange;
236 $vc_newPrice = $data->vc_newPrice;
237 $vc_retailPrice = $data->vc_retailPrice;
238 $vc_tradePrice = $data->vc_tradePrice;
239 $vc_resultCode = $data->vc_resultCode;
241 $vvi_guideMonth = $data->vvi_guideMonth;
242 $vvi_guideYear = $data->vvi_guideYear;
243 $vvi_newListPrice = $data->vvi_newListPrice;
244 $vvi_retailPrice = $data->vvi_retailPrice;
245 $vvi_tradePrice = $data->vvi_tradePrice;
246 $vvi_costPrice = $data->vvi_costPrice;
247 $vvi_adjustedRetailPrice_mileageAndCondition = $data->vvi_adjustedRetailPrice_mileageAndCondition;
248 $vvi_AdjustedTradePrice_MileageAndCondition = $data->vvi_AdjustedTradePrice_MileageAndCondition;
249 $vvi_adjustedRetailPrice = $data->vvi_adjustedRetailPrice;
250 $vvi_adjustedTradePrice = $data->vvi_adjustedTradePrice;
251 $vvi_estimatedRetailPrice = $data->vvi_estimatedRetailPrice;
252 $vvi_estimatedTradePrice = $data->vvi_estimatedTradePrice;
253 $vvi_estimatedCostPrice = $data->vvi_estimatedCostPrice ;
254 $vvi_adjustedEstimatedRetailPrice_mileageAndCondition = $data->vvi_adjustedEstimatedRetailPrice_mileageAndCondition = 0;
255 $vvi_adjustedEstimatedTradePrice_mileageAndCondition = $data->vvi_adjustedEstimatedTradePrice_mileageAndCondition = 0;
256 $vvi_adjustedEstimatedCostPrice_mileageAndCondition = $data->vvi_adjustedEstimatedCostPrice_mileageAndCondition = 0;
257 $vvi_adjustedEstimatedRetailPrice = $data->vvi_adjustedEstimatedRetailPrice;
258 $vvi_adjustedEstimatedTradePrice = $data->vvi_adjustedEstimatedTradePrice;
259 $vvi_adjustedEstimatedCostPrice = $data->vvi_adjustedEstimatedCostPrice;
260 $vvi_resultCode = $data->vvi_resultCode;
262 $error_code = $data->error_code;
266 $dateTimeFormat = \Utility\Definitions\Locale::getDateTimeFormat();
267 $currencyPrefix = \Utility\Definitions\Locale::getCurrencyPrefix();
268 $authData = \Utility\Registry::getAuthData();
269 $msg = 'NO RECORD FOUND ON OUR DATABASE';
271 //\Utility\Debug::errorLog('$authData', $authData['']);
273 $test = '* Year of Manufacturer - The year of manufacture and the year of first registration normally coincides. If not, the difference is caused by vehicles being
274 manufactured/imported late in one year but being sold and first registered as new in a later year.
275 TransUnion HPI is a registered financial services provider (22938).
276 _______________________________________________________________________________________________________________________
277 Please check this confirmation carefully to ensure that you enquired on the correct VIN/Engine number. Should you have any queries, please contact
278 Customer Services at: (0861) 507 507
279 Report Date: 2014/08/15 11:22 AM ';
281 $dateOfPrint = 'Date of print HPI: <span style="color:#333;">' . date('Y-m-d H:i:s') . '</span>';
282 $printedBy = 'Printed by HPI: <span style="color:#333;">' . $authData['firstName']
283 . ' ' . $authData['familyName'] . '</span>';
284 $referenceNo = 'Reference no.: <span style="color:#333;">' . $this->jobRecord->referenceNumber . '</span>';
288 <h1 style="font-size:20px; margin:0 auto; text-align:center">TRANSUNION REPORT</h1>
289 <div style="width:100%"></div>
291 <div style="display:block; width:115px; height:82px; margin-left:640px; margin-top:-40px; " >
292 <img style="" width="115px" height="82px" src="' . __DIR__ . '/../../../../../public/img/app/logos/tuhpi.jpg" style="padding:0;margin:0;width:100%;" />
296 /* --------------------------------- USER, TransUnion --------------------------------- */
300 $type = $this->jobRecord->type;
302 <table style="width:100%; margin-top:-20px;">
303 <tr>Adobe Acrobat 11 Pro
304 <td style="width:180px; font-weight:bold;">FOR ATTENTION : </td>
305 <td style="padding-left:20px; font-weight: normal;"></td>
306 <td style="width:150px;"></td>
307 <td style="width:220px; font-weight:bold;"></td>
311 <td style="width:180px; font-weight:bold;">' . $companyBusinessName . '</td>
312 <td style="padding-left:20px; font-weight: normal;"> </td>
313 <td style="width:150px;"></td>
314 <td style="width:220px; font-weight:bold;">TransUnion</td>
318 <td style="width:180px; font-weight: normal;">User : ' . $authData['firstName']. ' ' . $authData['familyName'] . '</td>
319 <td style="padding-left:20px; font-weight: normal;"></td>
320 <td style="width:150px;"></td>
321 <td style="width:220px; font-weight: normal;">Reg. No. 94/04014/07</td>
325 <td style="width:180px; font-weight: normal;">' . $companyStreet . '</td>
326 <td style="padding-left:20px; font-weight: normal;"> </td>
327 <td style="width:150px;"></td>
328 <td style="width:220px; font-weight: normal;">P.O. Box 1240 </td>
332 <td style="width:180px; font-weight: normal;"></td>
333 <td style="padding-left:20px; font-weight: normal;"></td>
334 <td style="width:150px;"></td>
335 <td style="width:220px; font-weight: normal;">Randburg</td>
339 <td style="width:180px; font-weight: normal;">' . $companyRegion . '</td>
340 <td style="padding-left:20px; font-weight: normal;"></td>
341 <td style="width:150px;"></td>
342 <td style="width:220px; font-weight: normal;">2125</td>
346 <td style="width:180px; font-weight: normal;">' . $companyCity . '</td>
347 <td style="padding-left:20px; font-weight: normal;"></td>
348 <td style="width:150px;"></td>
349 <td style="width:220px; font-weight: normal;"></td>
353 <td style="width:180px; font-weight: normal;">' . $companyPostalCode . '</td>
354 <td style="padding-left:20px; font-weight: normal;"></td>
355 <td style="width:150px;"></td>
356 <td style="width:220px; font-weight: normal;"> </td>
360 <td style="width:180px; font-weight: normal;">Tel: ' . $companyProfileOffice . '</td>
361 <td style="padding-left:20px; font-weight: normal;"></td>
362 <td style="width:150px;"></td>
363 <td style="width:220px; font-weight: normal;">Tel: (0861) 504 504 </td>
367 <td style="width:180px; font-weight: normal;">Fax:' . $companyProfilefax . '</td>
368 <td style="padding-left:20px; font-weight: normal;"></td>
369 <td style="width:150px;"></td>
370 <td style="width:220px; font-weight: normal;">Fax: (0861) 506 506 </td>
374 <td style="width:180px; font-weight: bold;">Client Reference No.: </td>
375 <td style="padding-left:20px; font-weight: normal;"></td>
376 <td style="width:150px;"></td>
377 <td style="width:220px; font-weight: bold;">Reference No.: ' . $this->jobRecord->referenceNumber . ' </td>
381 <td style="width:180px; font-weight: normal;"></td>
382 <td style="padding-left:20px; font-weight: normal;"></td>
383 <td style="width:150px;"></td>
384 <td style="width:220px; font-weight: normal;"><span style="font-weight: normal;"><strong>Date of Enquiry :</strong> ' . date('Y-m-d H:i:s') . '</span> </td>
390 <span style="font-size: 10px; font-weight: normal; width:100%; float:left;"> Thank you for your enquiry. The information you have submitted has been checked against our records, the result of the search is displayed below. </span>
393 <div style="text-align:center; width:100%; "><h2 style="font-size:16px;">TransUnion Vehicle Enquiry</h2></div>
395 $this->append($intro);
396 /* $container = $this
398 array(30, 5, 30, 5, 30),
399 'margin:0;font-size:10px;vertical-align:top;',
401 'padding:10px 0 0 0;'
403 ->setCellValue(0, 0, $intro);
405 $this->append($container->publish()); */
408 /* --------------------------------- INFORMATION SUPPLIED / INFORMATION VERIFIED --------------------------------- */
411 <table style="width:100%">
412 <tr style="padding:10px;">
413 <td style="width:380px; font-weight: bold; background: #d3d3d3; border-color:#000; padding:5px; padding-right:0px; border-top:1px solid #333; border-left: 1px solid #333; border-bottom:2px solid #333; border-right:1px solid #333">
416 <td style="width:330px; font-weight: bold; background: #d3d3d3;border-color:#000;border-left: 0px solid #000;padding:5px; border-top:1px solid #333; border-right: 1px solid #333; border-bottom:2px solid #333 ">
423 <table style="width:100%">
425 <td style="width:150px; font-weight: bold;">Manufacturer : </td>
426 <td style="width:100px; padding-left:20px; font-weight: normal;">' . $type->model->make->name . '</td>
427 <td style="width:100px;"></td>
428 <td style="width:200px; font-weight: normal;">' . $data->vci_matchManufacturer . ' </td>
432 <td style="width:150px; font-weight: bold;">Model Description: </td>
433 <td style="width:120px; padding-left:20px; font-weight: normal;">' . $type->name . '</td>
434 <td style="width:100px;"></td>
435 <td style="width:160px; font-weight: normal;">' . $data->vci_matchModel . ' </td>
439 <td style="width:150px; font-weight: bold;">VIN or Chassis No. :</td>
440 <td style="width:100px; padding-left:20px; font-weight: normal;">' . $this->getStockParam('vinNumber', '') . '</td>
441 <td style="width:100px;"></td>
442 <td style="width:180px; font-weight: normal;">' . $data->vci_matchVinorChassis . ' </td>
446 <td style="width:150px; font-weight: bold;">Engine No. : </td>
447 <td style="width:100px; padding-left:20px; font-weight: normal;">' . $this->getStockParam('engineNumber', '') . '</td>
448 <td style="width:100px;"></td>
449 <td style="width:180px; font-weight: normal;">' . $data->vci_matchEngineNumber . ' </td>
453 <td style="width:150px; font-weight: bold;">Registration No. :</td>
454 <td style="width:100px; padding-left:20px; font-weight: normal;">' . $this->getStockParam('registrationNumber', '') . '</td>
455 <td style="width:100px;"></td>
456 <td style="width:180px; font-weight: normal;">' . $data->vci_matchVehicleRegistration . ' </td>
460 <td style="width:150px; font-weight: bold;">Colour :</td>
461 <td style="width:100px; padding-left:20px; font-weight: normal;">' . $this->getStockSubParam('exteriorColour', 'name', '') . '</td>
462 <td style="width:100px;"></td>
463 <td style="width:180px; font-weight: normal;">' . $data->vci_matchColour . ' </td>
467 <td style="width:150px; font-weight: bold;">Year of Manufacture :</td>
468 <td style="width:100px; padding-left:20px; font-weight: normal;">' . $this->getStockSubParam('vehicleYear', 'name', '') . '</td>
469 <td style="width:100px;"></td>
470 <td style="width:180px; font-weight: normal;">' . $data->vci_matchYear . ' </td>
477 <div style="text-align:center; margin:0 auto; width:100%; color:#860406 "><h2 style="font-size:16px;">' . $data->vci_matchString . ' </h2></div>
480 <table style="width:100%">
481 <tr style="padding:10px;">
482 <td style="width:730px; font-weight: bold; background: #d3d3d3; border-color:#000; padding:5px; padding-right:0px; border-top:1px solid #333; border-left: 1px solid #333; border-bottom:2px solid #333; border-right:1px solid #333;">
483 ADDITIONAL INFORMATION REGISTERED
488 $this->append($vehicleInfo);
492 /* --------------------------------- FINANCE INTEREST --------------------------------- */
497 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
498 <h2 style="font-size:12px; font-weight:bold;">FINANCE INTEREST</h2>
501 <table style="width:100%">
503 <td style="width:250px; font-weight: bold;">Finance Provider : </td>
504 <td style="width:100px;"></td>
505 <td style="width:200px; font-weight: normal;">' . $f_financeProvider . '</td>
509 <td style="width:250px; font-weight: bold;">Finance Branch : </td>
510 <td style="width:100px;"></td>
511 <td style="width:200px; font-weight: normal;">' . $f_financeBranch . '</td>
516 <td style="width:250px; font-weight: bold;">Agreement Or Account Number:</td>
517 <td style="width:100px;"></td>
518 <td style="width:200px; font-weight: normal;">' . $f_agreementOrAccountNumber . '</td>
522 <td style="width:250px; font-weight: bold;">Agreement Type: </td>
523 <td style="width:100px;"></td>
524 <td style="width:200px; font-weight: normal;">' . $f_agreementType . '</td>
528 <td style="width:250px; font-weight: bold;">Telephone Number:</td>
529 <td style="width:100px;"></td>
530 <td style="width:200px; font-weight: normal;">' . $f_telephoneNumber . '</td>
534 <td style="width:250px; font-weight: bold;">Result Code:</td>
535 <td style="width:100px;"></td>
536 <td style="width:200px; font-weight: normal;">' . $f_resultCode . '</td>
545 if ($f_financeProvider == '' || $f_financeBranch == '' || $f_agreementOrAccountNumber == '' || $f_agreementType == '' || $f_telephoneNumber == '')
547 $msgHeading = '<div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
548 <h2 style="font-size:12px; font-weight:bold;">FINANCE INTEREST</h2>
550 $this->append($msgHeading);
551 $this->append($msg . '<br /><br />');
555 $this->append($financeIntrest);
559 /* --------------------------------- FINANCE HISTORY INTEREST --------------------------------- */
560 $financeHistoryIntrest = '
561 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
562 <h2 style="font-size:12px; font-weight:bold;">FINANCE HISTORY INTEREST</h2>
565 <table style="width:100%">';
566 foreach ($fh_data as $fh)
569 $resultCodeFh = isset($fh['resultCode']) ? $fh['resultCode'] : '';
571 $financeHistoryIntrest .= '
573 <td style="width:250px; font-weight: bold;">Finance House : </td>
574 <td style="width:100px;"></td>
575 <td style="width:200px; font-weight: normal;">' . $fh['financeHouse'] . '</td>
579 <td style="width:250px; font-weight: bold;">Agreement Or Account Number:</td>
580 <td style="width:100px;"></td>
581 <td style="width:200px; font-weight: normal;">' . $fh['agreementOrAccountNumber'] . '</td>
585 <td style="width:250px; font-weight: bold;">Agreement Type: </td>
586 <td style="width:100px;"></td>
587 <td style="width:200px; font-weight: normal;">' . $fh['agreementType'] . '</td>
591 <td style="width:250px; font-weight: bold;">Telephone Number:</td>
592 <td style="width:100px;"></td>
593 <td style="width:200px; font-weight: normal;">' . $fh['telephoneNumber'] . '</td>
597 <td style="width:250px; font-weight: bold;">Start Date : </td>
598 <td style="width:100px;"></td>
599 <td style="width:200px; font-weight: normal;">' . $fh['startDate'] . '</td>
603 <td style="width:250px; font-weight: bold;">End Date : </td>
604 <td style="width:100px;"></td>
605 <td style="width:200px; font-weight: normal;">' . $fh['endDate'] . '</td>
609 <td style="width:250px; font-weight: bold;">Result Code:</td>
610 <td style="width:100px;"></td>
611 <td style="width:200px; font-weight: normal;">' . $resultCodeFh . '</td>
614 <tr><td colspan="3"><hr/></td></tr>';
618 $financeHistoryIntrest .= '<tr><td colspan="3">' . $msg . '</td></tr>';
620 $financeHistoryIntrest .= '
627 $this->append($financeHistoryIntrest);
632 /* --------------------------------- POLICE STOLEN INTEREST --------------------------------- */
636 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
637 <h2 style="font-size:12px; font-weight:bold;">POLICE STOLEN INTEREST</h2>
640 <table style="width:100%">
642 <td style="width:80px; font-weight: bold;">Description</td>
643 <td style="width:80px; font-weight: bold; ">Status</td>
644 <td style="width:80px; font-weight: bold;">Police Station </td>
645 <td style="width:80px; font-weight: bold;">SAP Case Number</td>
646 <td style="width:80px; font-weight: bold;">Date Stolen</td>
647 <td style="width:80px; font-weight: bold;">Vin Match</td>
648 <td style="width:80px; font-weight: bold;">Engine Match</td>
649 <td style="width:80px; font-weight: bold;">Registration Match</td>
653 <td style="width:80px; font-weight: normal;">Successful Enquiry</td>
654 <td style="width:80px; font-weight: normal;">' . $si_resultCode . '</td>
655 <td style="width:80px; font-weight: normal;">' . $si_policeStation . '</td>
656 <td style="width:80px; font-weight: normal;">' . $si_caseNumber . '</td>
657 <td style="width:80px; font-weight: normal;">' . $si_dateStolen . '</td>
658 <td style="width:80px; font-weight: normal;">' . $si_vinMatch . '</td>
659 <td style="width:80px; font-weight: normal;">' . $si_engineMatch . ' </td>
660 <td style="width:80px; font-weight: normal;">' . $si_registrationMatch . '</td>
668 if ($si_resultCode == '' || $si_policeStation == '' || $si_caseNumber == '' || $si_dateStolen == '' || $si_dateStolen == '' || $si_vinMatch == '' || $si_engineMatch == '' || $si_registrationMatch == '' )
670 $msgHeading = '<div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
671 <h2 style="font-size:12px; font-weight:bold;">POLICE STOLEN INTEREST</h2>
674 <table style="width:100%">';
675 $this->append($msgHeading);
676 $this->append('<tr><td colspan="3">' . $msg . '</td></tr>');
677 $this->append('</table><br />');
682 $this->append($policeStolen);
686 /* --------------------------------- ACCIDENT HISTORY --------------------------------- */
690 <table style="width:100%">
692 <td style="width:80px; font-weight: bold;">Description</td>
698 $this->append($emptyLine);
700 $accidentHistory = '<br />
701 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
702 <h2 style="font-size:12px; font-weight:bold;">ACCIDENT HISTORY</h2>
705 <table style="width:100%">';
708 foreach ($ah_data as $ah)
710 $accidentHistory .= '
712 <td style="width:250px; font-weight: bold;">Assessment Date: </td>
713 <td style="width:100px;"></td>
714 <td style="width:200px; font-weight: normal;">' . $ah['assessmentDate'] . '</td>
717 <td style="width:250px; font-weight: bold;">Vehicle Description:</td>
718 <td style="width:100px;"></td>
719 <td style="width:200px; font-weight: normal;">' . $ah['vehicleDescription'] . '</td>
722 <td style="width:250px; font-weight: bold;">Vin Match: </td>
723 <td style="width:100px;"></td>
724 <td style="width:200px; font-weight: normal;">' . $ah['vinMatch'] . '</td>
727 <td style="width:250px; font-weight: bold;">Reg Match:</td>
728 <td style="width:100px;"></td>
729 <td style="width:200px; font-weight: normal;"> ' . $ah['regMatch'] . ' </td>
732 <td style="width:250px; font-weight: bold;">Estimated Repair Cost: </td>
733 <td style="width:100px;"></td>
734 <td style="width:200px; font-weight: normal;">' . $ah['estimatedRepairCost'] . '</td>
737 <td style="width:250px; font-weight: bold;">Result Code:</td>
738 <td style="width:100px;"></td>
739 <td style="width:200px; font-weight: normal;">' . $ah['resultCode'] . '</td>
742 <tr><td colspan="3"><hr/></td></tr>
747 $financeHistoryIntrest .= '<tr><td colspan="3">' . $msg . '</td></tr>';
749 $accidentHistory .= '
753 $this->append($accidentHistory);
758 /* --------------------------------- MICRODOT --------------------------------- */
761 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
762 <h2 style="font-size:12px; font-weight:bold;">MICRODOT</h2>
765 <table style="width:100%">
767 <td style="width:250px; font-weight: bold;">Company: </td>
768 <td style="width:100px;"></td>
769 <td style="width:200px; font-weight: normal;">' . $mi_company . '</td>
773 <td style="width:250px; font-weight: bold;">Reference Number:</td>
774 <td style="width:100px;"></td>
775 <td style="width:200px; font-weight: normal;">' . $mi_referenceNumber . '</td>
779 <td style="width:250px; font-weight: bold;">Contact Number: </td>
780 <td style="width:100px;"></td>
781 <td style="width:200px; font-weight: normal;">' . $mi_contactNumber . '</td>
785 <td style="width:250px; font-weight: bold;">Date Applied:</td>
786 <td style="width:100px;"></td>
787 <td style="width:200px; font-weight: normal;">' . $mi_dateApplied . '</td>
791 <td style="width:250px; font-weight: bold;">Result Code:</td>
792 <td style="width:100px;"></td>
793 <td style="width:200px; font-weight: normal;">' . $mi_resultCode . '</td>
800 if ($mi_company == '' || $mi_referenceNumber == '' || $mi_contactNumber == '' || $mi_dateApplied = '')
803 $msgHeading = '<div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
804 <h2 style="font-size:12px; font-weight:bold;">MICRODOT</h2>
806 $this->append($msgHeading);
807 $this->append($msg . '<br /><br />');
811 $this->append($microdot);
815 /* --------------------------------- VESA SECURITY DEVICE HISTORY --------------------------------- */
817 $vesaInformation =' <br/>
818 <div style="text-align:left; margin:0 0 0 290; width:100%; color:#000; text-decoration:underline; ">
819 <h2 style="font-size:12px; font-weight:bold;">VESA SECURITY DEVICE HISTORY</h2>
822 <table style="width:100%">
824 <td style="width:250px; font-weight: bold;">Certificate Number: </td>
825 <td style="width:100px;"></td>
826 <td style="width:200px; font-weight: normal;">' . $vesa_certificateNumber . '</td>
830 <td style="width:250px; font-weight: bold;">Date Fitted:</td>
831 <td style="width:100px;"></td>
832 <td style="width:200px; font-weight: normal;">' . $vesa_dateFitted . '</td>
836 <td style="width:250px; font-weight: bold;">Brand Name: </td>
837 <td style="width:100px;"></td>
838 <td style="width:200px; font-weight: normal;">' . $vesa_brandName . '</td>
842 <td style="width:250px; font-weight: bold;">Brand Model:</td>
843 <td style="width:100px;"></td>
844 <td style="width:200px; font-weight: normal;">' . $vesa_brandModel . '</td>
848 <td style="width:250px; font-weight: bold;">Device Description Type: </td>
849 <td style="width:100px;"></td>
850 <td style="width:200px; font-weight: normal;">' . $vesa_deviceDescriptionType . '</td>
854 <td style="width:250px; font-weight: bold;">Result Code:</td>
855 <td style="width:100px;"></td>
856 <td style="width:200px; font-weight: normal;">' . $vesa_resultCode . '</td>
864 if ($vesa_certificateNumber == '' || $vesa_dateFitted == '' || $vesa_brandName == '' || $vesa_brandModel = '' || $vesa_deviceDescriptionType == '')
866 $msgHeading = '<div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
867 <h2 style="font-size:12px; font-weight:bold;">VESA SECURITY DEVICE HISTORY</h2>
869 $this->append($msgHeading);
870 $this->append($msg . '<br /><br />');
874 $this->append($vesaInformation);
879 /* --------------------------------- MILEAGES --------------------------------- */
884 <div style="text-align:center; margin:0 auto; width:100%; color:#000; ">
885 <h2 style="font-size:12px; font-weight:bold;"> </h2>
887 <div style="text-align:left; margin:0 0 0 350; width:100%; color:#000; text-decoration:underline; ">
888 <h2 style="font-size:12px; font-weight:bold;">MILEAGES</h2>
891 <table style="width:100%">';
892 foreach ($mh_data as $mh)
895 $resultCodeMh = isset($fh['resultCode']) ? $fh['resultCode'] : '';
899 <td style="width:250px; font-weight: bold;">Source: </td>
900 <td style="width:100px;"></td>
901 <td style="width:200px; font-weight: normal;">' . $mh['source'] . '</td>
905 <td style="width:250px; font-weight: bold;">Vehicle Mileage:</td>
906 <td style="width:100px;"></td>
907 <td style="width:200px; font-weight: normal;">' . $mh['vehicleMileage'] . ' </td>
911 <td style="width:250px; font-weight: bold;">Date Registered: </td>
912 <td style="width:100px;"></td>
913 <td style="width:200px; font-weight: normal;">' . $mh['dateRegistered'] . '</td>
918 <td style="width:250px; font-weight: bold;">Result Code:</td>
919 <td style="width:100px;"></td>
920 <td style="width:200px; font-weight: normal;">' . $resultCodeMh . '</td>
923 <tr><td colspan="3"><hr/></td></tr>';
927 $financeHistoryIntrest .= '<tr><td colspan="3">' . $msg . '</td></tr>';
933 $this->append($mileage);
936 /* --------------------------------- PREVIOUS INQUIRIES --------------------------------- */
939 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
940 <h2 style="font-size:12px; font-weight:bold;">PREVIOUS INQUIRIES</h2>
943 <table style="width:100%">';
944 foreach ($eh_data as $eh)
948 <td style="width:250px; font-weight: bold;">Customer type: </td>
949 <td style="width:100px;"></td>
950 <td style="width:200px; font-weight: normal;">' . $eh['source'] . '</td>
953 <td style="width:250px; font-weight: bold;">Transaction Date:</td>
954 <td style="width:100px;"></td>
955 <td style="width:200px; font-weight: normal;"> ' . $eh['transactionDate'] . '</td>
957 <tr><td colspan="3"><hr/></td></tr>
962 $financeHistoryIntrest .= '<tr><td colspan="3">' . $msg . '</td></tr>';
969 $this->append($enquiryHistory);
971 /* --------------------------------- PREVIOUS REGISTRATIONS --------------------------------- */
973 $registrationHistory = '
974 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
975 <h2 style="font-size:12px; font-weight:bold;">PREVIOUS REGISTRATIONS</h2>
977 <table style="width:100%">';
978 foreach ($rh_data as $rh)
980 $registrationHistory .= '
982 <td style="width:250px; font-weight: bold;">Registration Number: </td>
983 <td style="width:100px;"></td>
984 <td style="width:200px; font-weight: normal;">' . $rh['registrationNumber'] . '</td>
987 <td style="width:250px; font-weight: bold;">Date Registered</td>
988 <td style="width:100px;"></td>
989 <td style="width:200px; font-weight: normal;">' . $rh['dateRegistered'] . '</td>
991 <tr><td colspan="3"><hr/></td></tr>
996 $financeHistoryIntrest .= '<tr><td colspan="3">' . $msg . '</td></tr>';
998 $registrationHistory .= '
1003 $this->append($registrationHistory);
1006 /* --------------------------------- IVID RESPONSE x --------------------------------- */
1009 <div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
1010 <h2 style="font-size:12px; font-weight:bold;">IVID RESPONSE</h2>
1013 <table style="width:100%">
1015 <td style="width:60px; font-weight: bold;">Code </td>
1016 <td style="width:340px; font-weight: bold;">Description</td>
1017 <td style="width:150px; font-weight: bold;">IVID Reference Number</td>
1018 <td style="width:150px; font-weight: bold;">IVID Contact Number</td>
1021 <td style="width:60px; font-weight: normal;">' . $ivid_responseCode . '</td>
1022 <td style="width:340px; font-weight: normal;">' . $ivid_responseDescription . '</td>
1023 <td style="width:150px; font-weight: normal;">' . $ivid_referenceNumber . '</td>
1024 <td style="width:150px; font-weight: normal;">' . $ivid_contactNumber . '</td>
1030 if ($ivid_responseCode == '' || $ivid_responseDescription == '' || $ivid_referenceNumber == '' || $ivid_contactNumber == '')
1032 $msgHeading = '<div style="text-align:center; margin:0 auto; width:100%; color:#000; text-decoration:underline; ">
1033 <h2 style="font-size:12px; font-weight:bold;">IVID RESPONSE</h2>
1035 $this->append($msgHeading);
1036 $this->append($msg . '<br /><br />');
1040 $this->append($vesaInformation);
1044 /* --------------------------------- SIGNATURES --------------------------------- */
1046 /* if ($this->showSignatureLines)
1049 $this->newSignatureLine()
1050 ->addSignatureLine('Customer (name)', 'Signature', 'Date')
1051 ->addSignatureLine('Manager (name)', 'Signature', 'Date')
1057 '<div style="position:absolute;bottom:0;left:0;padding:0;margin:0;width:100%;">'
1058 . '<table cellpadding="0px" cellspacing="0px" style="border:0px;width:100%;">'
1060 . '<td style="width:30%;border-bottom: solid 1px #333;font-size:10px;font-weight:bold;color:#000;"><i>'
1061 . $dateOfPrint . '</i></td>'
1062 . '<td style="width:5%"> </td>'
1063 . '<td style="width:30%;border-bottom: solid 1px #333;font-size:10px;font-weight:bold;color:#000;"><i>'
1064 . $printedBy . '</i></td>'
1065 . '<td style="width:5%"> </td>'
1066 . '<td style="width:30%;border-bottom: solid 1px #333;font-size:10px;font-weight:bold;color:#000;"><i>'
1067 . $referenceNo . '</i></td>'
1075 '<div style="position:absolute;bottom:0;left:0;padding:0;margin:0;width:100%;">'
1076 . '<table cellpadding="0px" cellspacing="0px" style="border:0px;width:100%;">'
1078 . '<td style="width:30%;border-bottom: solid 1px #333;font-size:10px;font-weight:bold;color:#000;"><i>'
1079 . $dateOfPrint . '</i></td>'
1080 . '<td style="width:5%"> </td>'
1081 . '<td style="width:30%;border-bottom: solid 1px #333;font-size:10px;font-weight:bold;color:#000;"><i>'
1082 . $printedBy . '</i></td>'
1083 . '<td style="width:5%"> </td>'
1084 . '<td style="width:30%;border-bottom: solid 1px #333;font-size:10px;font-weight:bold;color:#000;"><i>'
1085 . $referenceNo . '</i></td>'