jobRecord->$param) ? $this->jobRecord->$param : $default; } /** * Utility for easy parameter retrieval. * @param string $param * @param unknown $default * @return unknown */ protected function getStockSubParam($ref, $param, $default) { $ref = !is_null($this->jobRecord->$ref) ? $this->jobRecord->$ref : null; return is_object($ref) ? $ref->$param : $default; } /** * Utility for easy parameter retrieval. * @param string $param * @param unknown $default * @return unknown */ protected function getValuationParam($param, $default) { return !is_null($this->jobRecord->valuation) && !is_null($this->jobRecord->valuation->$param) ? $this->jobRecord->valuation->$param : $default; } /** * Build the content. */ public function build() { ini_set('memory_limit','-1'); #-> Set data item to work with. $authData = \Utility\Registry::getAuthData(); $this->jobRecord = $this->_input['jobRecord']; $recordId = $this->_input['contract']->PdfTemplate['recordId']; if(!empty($recordId) && '' != $recordId) { $result = $this->em->createQuery( 'SELECT tuhpi ' . 'FROM \Stock\Entity\Tuhpi tuhpi ' . 'JOIN tuhpi.stock stock ' . 'WHERE tuhpi.id = :id ' . 'ORDER BY tuhpi.created ASC ' ) ->setParameter( 'id' , $recordId ); } else { $result = $this->em->createQuery( 'SELECT tuhpi ' . 'FROM \Stock\Entity\Tuhpi tuhpi ' . 'JOIN tuhpi.stock stock ' . 'WHERE stock.id = :stockId ' . ' AND IDENTITY(tuhpi.company) = :companyId ' . 'ORDER BY tuhpi.created ASC ' ) ->setParameter( 'stockId' , $this->jobRecord->id ) ->setParameter( 'companyId' , $authData['company']['id'] ); } // \Utility\Debug::errorLog('$result->getSQL()',$result->getSQL()); // \Utility\Debug::errorLog('$result->getParameters()',$result->getParameters()); $result = $result->getResult(); foreach ($result as $data) { // \Utility\Debug::errorLog('$data->id',$data->id); $companyProfileOffice = $data->company->contact->office; $companyProfilefax = $data->company->contact->fax; $companyRegion = $data->company->region->name; $companyCity = $data->company->city->name; $companyPostalCode = $data->company->postalCode; $companyStreet = $data->company->street; // \Utility\Debug::errorLog('$data->ah_data',$data->ah_data); $ah_data = unserialize($data->ah_data); } $dateTimeFormat = \Utility\Definitions\Locale::getDateTimeFormat(); $currencyPrefix = \Utility\Definitions\Locale::getCurrencyPrefix(); $authData = \Utility\Registry::getAuthData(); $msg = 'NO RECORD FOUND ON OUR DATABASE'; //\Utility\Debug::errorLog('$authData', $authData['']); // $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 // manufactured/imported late in one year but being sold and first registered as new in a later year. // TransUnion HPI is a registered financial services provider (22938). // _______________________________________________________________________________________________________________________ // Please check this confirmation carefully to ensure that you enquired on the correct VIN/Engine number. Should you have any queries, please contact // Customer Services at: (0861) 507 507 // Report Date: 2014/08/15 11:22 AM '; // // $dateOfPrint = 'Date of print HPI: ' . date('Y-m-d H:i:s') . ''; // $printedBy = 'Printed by HPI: ' . $authData['firstName'] // . ' ' . $authData['familyName'] . ''; // $referenceNo = 'Reference no.: ' . $this->jobRecord->referenceNumber . ''; // $this->_logo = ' //

TRANSUNION REPORT

//
// //
// //
// '; // $this->_logo = ' // image //
// Trans // Union // ® //
// '; $this->_logo = '
image
'; /* --------------------------------- USER, TransUnion --------------------------------- */ // $type = $this->jobRecord->type; $intro ='

Wanderers Office Park, 52 Corlett Drive, lllovo, 2196

P O Box 4522, Johannesburg, 2000

Web: www.transunion.co.za

Call Centre: 0861 504 504

Email: dealersguide@transunion.co.za

Vehicle Accident Report

Name : ' . $authData['firstName']. ' ' . $authData['familyName'] . '
Tel. Number : ' . $companyProfileOffice . '
Fax Number : ' . $companyProfilefax . '
Address : ' . $companyStreet . ' ' . $companyRegion . ' ' . $companyCity . ' ' . $companyPostalCode . '
Date Requested : ' . date('Y-m-d H:i:s') . '

image

Thank you for your enquiry. The vehicle description you have submitted has been checked against our records, the result of the search is displayed below.

image

To assist you we have added details explanations in each section.

image

Should you have any queries please contact TransUnion on 0861 482 482 from Monday to Friday 08h00 -17h00 and Saturday 08h00 -13h00.

image

By accessing and relying on this report you are deemed to have read and agreed to AIS's terms and conditions as reflected at http://www.motoronline.co.za/portal/page?_pageid=0,4049541,0_8493546&_dad=portal30&_schema=PORTAL30 .

Registered with the National Credit Regulator - Reg Number NCRCB4

'; $this->append($intro); /* $container = $this ->newTable( array(30, 5, 30, 5, 30), 'margin:0;font-size:10px;vertical-align:top;', '', 'padding:10px 0 0 0;' ) ->setCellValue(0, 0, $intro); $this->append($container->publish()); */ /* --------------------------------- INFORMATION SUPPLIED / INFORMATION VERIFIED --------------------------------- */ // $vehicleInfo =' // // '; // $this->append($vehicleInfo); /* --------------------------------- ACCIDENT HISTORY --------------------------------- */ $accidentHistory = '

Car Accident History Report

  1. VEHICLE DETAILS SUPPLIED
    VIN Number: ' . $this->getStockParam('vinNumber', '') . '
    Engine Number: ' . $this->getStockParam('engineNumber', '') . '
    Registration Number: ' . $this->getStockParam('registrationNumber', '') . '
  2. ACCIDENT HISTORY '; // \Utility\Debug::errorLog('$ah_data',$ah_data); if (!empty($ah_data)) { $accidentHistory .= ' '; foreach ($ah_data as $ah) { \Utility\Debug::errorLog('$ah',$ah); $accidentHistory .= ' '; } } else { $accidentHistory .= '

    Source

    Assessment Date

    Vehicle Description

    Vin Match

    REG Match

    Repair Cost Indicator

    ' . $ah['source'] . '

    ' . str_replace('T',' ',$ah['assessmentDate']) . '

    ' . $ah['vehicleDescription'] . '

    ' . $ah['vinMatch'] . '

    ' . $ah['regMatch'] . '

    ' . $ah['estimatedRepairCost'] . '

    '; } $accidentHistory .= '

    ' . $msg . '

'; $this->append($accidentHistory); //$this->_page++; return; } }