initial commit
[namibia] / module / Stock / src / Stock / Pdf / TuhpiAccident.php
1 <?php
2 namespace Stock\Pdf;
3
4
5
6 class TuhpiAccident extends \Utility\Service\PdfTemplate
7 {
8
9
10         /**
11          * PDF title.
12          * @var string
13          */
14         protected $_title = 'HPI Accident Only Report';
15         /**
16          * @var \Stock\Entity\Stock
17          */
18         protected $jobRecord;
19
20         /**
21          * @var boolean
22          */
23         protected $showCustomerDetails = false;
24         /**
25          * @var boolean
26          */
27         protected $showValuationDetails = false;
28         /**
29          * @var boolean
30          */
31         protected $showPricingDetails = false;
32         /**
33          * @var boolean
34          */
35         protected $showVehicleDetails = false;
36         /**
37          * @var boolean
38          */
39         protected $showVehicleNotes = false;
40         /**
41          * @var boolean
42          */
43         protected $showDamageDetails = false;
44         /**
45          * @var boolean
46          */
47         protected $showAccessoryDetails = false;
48         /**
49          * @var boolean
50          */
51         protected $showSignatureLines = false;
52         /**
53          * @var boolean
54          */
55         protected $showTermsAndConditions = false;
56         /**
57          * @var boolean
58          */
59         protected $showOffersReceived = false;
60         /**
61          * @var boolean
62          */
63         protected $showOfferMade = false;
64
65
66         /**
67          * Utility for easy parameter retrieval.
68          * @param string $param
69          * @param unknown $default
70          * @return unknown
71          */
72         protected function getStockParam($param, $default)
73         {
74                 return !is_null($this->jobRecord->$param)
75                         ? $this->jobRecord->$param
76                         : $default;
77         }
78
79         /**
80          * Utility for easy parameter retrieval.
81          * @param string $param
82          * @param unknown $default
83          * @return unknown
84          */
85         protected function getStockSubParam($ref, $param, $default)
86         {
87                 $ref = !is_null($this->jobRecord->$ref)
88                         ? $this->jobRecord->$ref
89                         : null;
90                 return is_object($ref)
91                         ? $ref->$param
92                         : $default;
93         }
94
95         /**
96          * Utility for easy parameter retrieval.
97          * @param string $param
98          * @param unknown $default
99          * @return unknown
100          */
101         protected function getValuationParam($param, $default)
102         {
103                 return !is_null($this->jobRecord->valuation)
104                                 && !is_null($this->jobRecord->valuation->$param)
105                         ? $this->jobRecord->valuation->$param
106                         : $default;
107         }
108
109
110         /**
111          * Build the content.
112          */
113         public function build()
114         {
115         ini_set('memory_limit','-1');
116
117                 #-> Set data item to work with.
118                 $authData = \Utility\Registry::getAuthData();
119
120         $this->jobRecord = $this->_input['jobRecord'];
121
122         $recordId = $this->_input['contract']->PdfTemplate['recordId'];
123
124         if(!empty($recordId) && '' != $recordId)
125         {
126             $result = $this->em->createQuery(
127                 'SELECT tuhpi '
128                 . 'FROM \Stock\Entity\Tuhpi tuhpi '
129                 . 'JOIN tuhpi.stock stock '
130                 . 'WHERE tuhpi.id = :id '
131                 . 'ORDER BY tuhpi.created ASC '
132             )
133                 ->setParameter( 'id' , $recordId );
134         }
135         else
136         {
137             $result = $this->em->createQuery(
138                 'SELECT tuhpi '
139                 . 'FROM \Stock\Entity\Tuhpi tuhpi '
140                 . 'JOIN tuhpi.stock stock '
141                 . 'WHERE stock.id = :stockId '
142                 . ' AND IDENTITY(tuhpi.company) = :companyId '
143                 . 'ORDER BY tuhpi.created ASC '
144             )
145                 ->setParameter( 'stockId' , $this->jobRecord->id )
146                 ->setParameter( 'companyId' , $authData['company']['id'] );
147         }
148
149
150 //        \Utility\Debug::errorLog('$result->getSQL()',$result->getSQL());
151 //        \Utility\Debug::errorLog('$result->getParameters()',$result->getParameters());
152
153                 $result = $result->getResult();
154
155                 foreach ($result as $data)
156                 {
157
158 //            \Utility\Debug::errorLog('$data->id',$data->id);
159
160                         $companyProfileOffice = $data->company->contact->office;
161                         $companyProfilefax = $data->company->contact->fax;
162                         $companyRegion = $data->company->region->name;
163                         $companyCity = $data->company->city->name;
164                         $companyPostalCode = $data->company->postalCode;
165                         $companyStreet = $data->company->street;
166
167
168 //            \Utility\Debug::errorLog('$data->ah_data',$data->ah_data);
169
170             $ah_data = unserialize($data->ah_data);
171
172
173                 }
174
175                 $dateTimeFormat = \Utility\Definitions\Locale::getDateTimeFormat();
176                 $currencyPrefix = \Utility\Definitions\Locale::getCurrencyPrefix();
177                 $authData = \Utility\Registry::getAuthData();
178                 $msg = 'NO RECORD FOUND ON OUR DATABASE';
179
180                 //\Utility\Debug::errorLog('$authData', $authData['']);
181
182 //              $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
183 //                              manufactured/imported late in one year but being sold and first registered as new in a later year.
184 //                              TransUnion HPI is a registered financial services provider (22938).
185 //                              _______________________________________________________________________________________________________________________
186 //                              Please check this confirmation carefully to ensure that you enquired on the correct VIN/Engine number. Should you have any queries, please contact
187 //                              Customer Services at: (0861) 507 507
188 //                              Report Date: 2014/08/15  11:22 AM ';
189 //
190 //              $dateOfPrint = 'Date of print HPI: <span style="color:#333;">' . date('Y-m-d H:i:s') . '</span>';
191 //              $printedBy   = 'Printed by HPI: <span style="color:#333;">' . $authData['firstName']
192 //                                       . ' ' . $authData['familyName'] . '</span>';
193 //              $referenceNo = 'Reference no.: <span style="color:#333;">' . $this->jobRecord->referenceNumber . '</span>';
194
195
196 //              $this->_logo = '
197 //                              <h1 style="font-size:20px; margin:0 auto; text-align:center">TRANSUNION REPORT</h1>
198 //                              <div style="width:100%"></div>
199 //
200 //                              <div style="display:block; width:115px; height:82px; margin-left:640px; margin-top:-40px; " >
201 //                                      <img  style="" width="115px" height="82px" src="' . __DIR__ . '/../../../../../public/img/app/logos/tuhpi.jpg" style="padding:0;margin:0;width:100%;" />
202 //                              </div>
203 //                              ';
204
205
206
207 //        $this->_logo = '
208 //                              <img width="53" height="67" alt="image" src="' . __DIR__ . '/../../../../../public/img/app/logos/logo.png"/>
209 //                <div style="padding-left: 1pt;text-indent: 0pt;text-align: left;margin-top: 25px;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: bold;text-decoration: none;font-size: 20.5pt;">
210 //                    Trans
211 //                    <span style=" color: #00a6d2;margin-left:-10px;">Union</span>
212 //                    <span style="color: #B8C8C3;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 5pt;margin-left:-7px;" >®</span>
213 //                </div>
214 //                              ';
215
216         $this->_logo = '
217                                 <div style="text-align: left;margin-bottom: 25px;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: bold;text-decoration: none;font-size: 20.5pt;">
218                                     <img width="261" height="50" alt="image" src="' . __DIR__ . '/../../../../../public/img/app/logos/TULogo_blue.jpg"/>
219                 </div>
220                                 ';
221
222
223                 /* --------------------------------- USER, TransUnion --------------------------------- */
224
225
226 //              $type = $this->jobRecord->type;
227                 $intro ='
228             <div style="background-image:linear-gradient(to bottom,#d6d0c4,white 20%);position: relative;">
229                <table style="width:100%;margin-top:-20px;">
230                     <tr>
231                         <td style="width:70%;">
232                             <p style="line-height: 5pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt;">
233                                 Wanderers Office Park, 52 Corlett Drive, lllovo, 2196
234                             </p>
235                             <p style="margin-top:-1px;line-height: 5pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt;">
236                                 P O Box 4522, Johannesburg, 2000
237                             </p>
238                         </td>
239                         <td style="width:30%;">
240                             <p style="text-indent: 50%;line-height: 5pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt;">
241                                 Web:
242                                 <a href="http://www.transunion.co.za/" target="_blank" style="color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt;">
243                                     www.transunion.co.za
244                                 </a>
245                             </p>
246                             <p style="margin-top:-1px;line-height: 5pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt">
247                                 Call Centre: 0861 504 504
248                             </p>
249                             <p style="margin-top:-1px;line-height: 5pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt">
250                                 Email:
251                                 <a href="mailto:dealersguide@transunion.co.za" style="color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt;">
252                                     dealersguide@transunion.co.za
253                                 </a>
254                             </p>
255                         </td>
256                     </tr>
257                 </table>
258                 <p style="line-height: 20pt;text-align: left;color: #04a6cd;font-family: Arial, sans-serif;font-style: normal;font-weight: bold;text-decoration: none;font-size: 18pt;">
259                     Vehicle Accident Report
260                 </p>
261                 <table style="width:90%;text-align: left;margin-top:-20px;">
262                     <tr>
263                         <td style="width:20%;border: 1px solid;padding-left: 5pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
264                             Name :
265                         </td>
266                         <td style="width:80%;border: 1px solid;padding-left: 10pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
267                              ' . $authData['firstName']. ' ' . $authData['familyName'] . '
268                         </td>
269                     </tr>
270                     <tr>
271                         <td style="width:20%;border: 1px solid;padding-left: 5pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
272                             Tel. Number :
273                         </td>
274                         <td style="width:80%;border: 1px solid;padding-left: 10pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
275                             ' . $companyProfileOffice . '
276                         </td>
277                     </tr>
278                     <tr>
279                         <td style="width:20%;border: 1px solid;padding-left: 5pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
280                             Fax Number :
281                         </td>
282                         <td style="width:80%;border: 1px solid;padding-left: 10pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
283                             ' . $companyProfilefax . '
284                         </td>
285                     </tr>
286                     <tr>
287                         <td style="width:20%;border: 1px solid;padding-left: 5pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
288                             Address :
289                         </td>
290                         <td style="width:80%;border: 1px solid;padding-left: 10pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
291                             ' . $companyStreet . ' ' . $companyRegion . ' ' . $companyCity . ' ' . $companyPostalCode . '
292                         </td>
293                     </tr>
294                     <tr>
295                         <td style="width:20%;border: 1px solid;padding-left: 5pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
296                             Date Requested :
297                         </td>
298                         <td style="width:80%;border: 1px solid;padding-left: 10pt;line-height: 10pt;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 10pt;">
299                             ' . date('Y-m-d H:i:s') . '
300                         </td>
301                     </tr>
302                 </table>
303
304                 <div style="width:90%;margin-top:50pt;">
305                     <p style="text-indent: 0pt;line-height: 56%;text-align: left;">
306                         <img width="26" height="27" alt="image" src="' . __DIR__ . '/../../../../../public/img/app/logos/Image_012.jpg"/>
307                         <p style="text-align: left;margin-left: 30px;margin-top: -25px;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;line-height: 12pt;font-size: 12pt;">
308                             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.
309                         </p>
310                     </p>
311                     <span style="text-indent: 0pt;text-align: left;padding-top:5px;"></span>
312                     <p style="text-indent: 0pt;line-height: 56%;text-align: left;">
313                         <img width="29" height="26" alt="image" src="' . __DIR__ . '/../../../../../public/img/app/logos/Image_013.jpg"/>
314                         <p style="text-align: left;margin-left: 30px;margin-top: -25px;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;line-height: 12pt;font-size: 12pt;">
315                                 To assist you we have added details explanations in each section.
316                         </p>
317                     </p>
318                     <span style="text-indent: 0pt;text-align: left;padding-top:5px;"></span>
319                     <p style="text-indent: 0pt;line-height: 56%;text-align: left;">
320                         <img width="26" height="27" alt="image" src="' . __DIR__ . '/../../../../../public/img/app/logos/Image_012.jpg"/>
321                         <p style="text-align: left;margin-left: 30px;margin-top: -25px;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;line-height: 12pt;font-size: 12pt;">
322                             Should you have any queries please contact TransUnion on 0861 482 482 from Monday to Friday
323                             08h00 -17h00 and Saturday 08h00 -13h00.
324                         </p>
325                     </p>
326                     <span style="text-indent: 0pt;text-align: left;padding-top:5px;"></span>
327                     <p style="text-indent: 0pt;line-height: 56%;text-align: left;">
328                         <img width="29" height="26" alt="image" src="' . __DIR__ . '/../../../../../public/img/app/logos/Image_013.jpg"/>
329                         <p style="text-align: left;margin-left: 30px;margin-top: -25px;color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;line-height: 12pt;font-size: 12pt;">
330                             By accessing and relying on this report you are deemed to have read and agreed to AIS&#39;s terms and conditions as reflected at
331                             <a href="http://www.motoronline.co.za/portal/page?_pageid=0,4049541,0_8493546&_dad=portal30&_schema=PORTAL30" target="_blank" style="color: #050505;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;">
332                             http://www.motoronline.co.za/portal/page?_pageid=0,4049541,0_8493546&_dad=portal30&_schema=PORTAL30
333                             </a>.
334                         </p>
335                     </p>
336                 </div>
337
338                 <div style="width:90%;margin-top:300pt;">
339                      <p style="text-indent: 0pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 8pt;">
340                         Registered with the National Credit Regulator - Reg Number NCRCB4
341                     </p>
342                 </div>
343             </div>
344                 ';
345                 $this->append($intro);
346                 /* $container = $this
347                 ->newTable(
348                                 array(30, 5, 30, 5, 30),
349                                 'margin:0;font-size:10px;vertical-align:top;',
350                                 '',
351                                 'padding:10px 0 0 0;'
352                 )
353                 ->setCellValue(0, 0, $intro);
354
355                 $this->append($container->publish()); */
356
357
358                 /* --------------------------------- INFORMATION SUPPLIED /  INFORMATION VERIFIED --------------------------------- */
359
360
361 //              $vehicleInfo ='
362 //
363 //              ';
364 //              $this->append($vehicleInfo);
365
366
367                 /* --------------------------------- ACCIDENT HISTORY --------------------------------- */
368
369         $accidentHistory = '<br />
370                                         <div style="margin-top:50pt;"></div>
371             <div style="height: 30px;background-image:linear-gradient(to right,#9bb5c4,white 80%);"></div>
372             <p style="margin-left: 20pt;text-align: left;margin-top: -45px; color: #030505;font-family: Arial, sans-serif;font-style: normal;font-weight: bold;text-decoration: none;font-size: 18pt;">
373                 Car Accident History Report
374             </p>
375             <ol>
376                 <li style="margin-left: 20px;color: #04a6cd;font-family: Arial, sans-serif;font-style: normal;font-weight: bold;text-decoration: none;font-size: 12pt;">
377                     <span style="-webkit-border-radius: 0px 99px 99px 20px;-moz-border-radius: 0px 99px 99px 20px;border-radius: 0px 99px 99px 20px;max-width: 500px !important;padding-right: 10%;">
378                         VEHICLE DETAILS SUPPLIED
379                     </span>
380                     <table style="width:90%;text-align: left;margin-left: -30px;margin-top: 10px;" >
381                         <tr>
382                             <td style="width:30%;">
383                                 <span style="line-height: 20pt;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
384                                     VIN Number:
385                                 </span>
386                             </td>
387                             <td style="width:70%;">
388                                 <span style="line-height: 20pt;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
389                                     ' . $this->getStockParam('vinNumber', '') . '
390                                 </span>
391                             </td>
392                         </tr>
393                         <tr >
394                             <td style="width:30%;">
395                                 <span style="line-height: 20pt;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
396                                     Engine Number:
397                                 </span>
398                             </td>
399                             <td style="width:70%;">
400                                 <span style="line-height: 20pt;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
401                                     ' . $this->getStockParam('engineNumber', '') . '
402                                 </span>
403                             </td>
404                         </tr>
405                         <tr >
406                             <td style="width:30%;">
407                                 <span style="line-height: 20pt;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
408                                     Registration Number:
409                                 </span>
410                             </td>
411                             <td style="width:70%;">
412                                 <span style="line-height: 20pt;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
413                                    ' . $this->getStockParam('registrationNumber', '') . '
414                                 </span>
415                             </td>
416                         </tr>
417                     </table>
418                 </li>
419                 <li style="margin-left: 20px;padding-top: 20px;color: #04a6cd;font-family: Arial, sans-serif;font-style: normal;font-weight: bold;text-decoration: none;font-size: 12pt;">
420                     <span style="-webkit-border-radius: 0px 99px 99px 20px;-moz-border-radius: 0px 99px 99px 20px;border-radius: 0px 99px 99px 20px;max-width: 500px !important;padding-right: 10%;">
421                        ACCIDENT HISTORY
422                     </span>';
423
424
425
426 //        \Utility\Debug::errorLog('$ah_data',$ah_data);
427
428
429         if (!empty($ah_data))
430         {
431             $accidentHistory .= '
432                     <table style="width:100%;text-align: left;margin-left: -30px;margin-top: 10px;" >
433                         <tr>
434                             <td style="width:15%;">
435                                 <span style="margin-top:-17px;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
436                                     <p>Source</p>
437                                 </span>
438                             </td>
439                             <td style="width:15%;">
440                                 <span style="text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
441                                     <p>Assessment Date</p>
442                                 </span>
443                             </td>
444                             <td style="width:20%;">
445                                 <span style="text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
446                                     <p>Vehicle Description</p>
447                                     </span>
448                             </td>
449                             <td style="width:15%;">
450                                 <span style="margin-top:-17px;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
451                                     <p>Vin Match</p>
452                                 </span>
453                             </td>
454                             <td style="width:15%;">
455                                 <span style="margin-top:-17px;text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
456                                     <p>REG Match</p>
457                                 </span>
458                             </td>
459                             <td style="width:20%;">
460                                 <span style="text-align: left;font-weight: bold;color: #030505;font-family: Arial, sans-serif;font-style: normal;text-decoration: none;font-size: 12pt;">
461                                     <p>Repair Cost Indicator</p>
462                                 </span>
463                             </td>
464                         </tr>';
465
466
467
468             foreach ($ah_data as $ah)
469             {
470                 \Utility\Debug::errorLog('$ah',$ah);
471
472                 $accidentHistory .= '
473                                         <tr>
474                             <td style="width:15%;">
475                                 <p style="line-height: 13pt;text-align: left;color: #030505;font-family: Arial, sans-serif;font-size: 12pt;font-weight: normal;">
476                                     ' . $ah['source'] . '
477                                 </p>
478                             </td>
479                             <td style="width:15%;">
480                                 <p style="line-height: 13pt;text-align: left;color: #030505;font-family: Arial, sans-serif;font-size: 12pt;font-weight: normal;">
481                                     ' . str_replace('T',' ',$ah['assessmentDate']) . '
482                                 </p>
483                             </td>
484                             <td style="width:20%;">
485                                 <p style="line-height: 13pt;text-align: left;color: #030505;font-family: Arial, sans-serif;font-size: 12pt;font-weight: normal;">
486                                     ' . $ah['vehicleDescription'] . '
487                                 </p>
488                             </td>
489                             <td style="width:15%;">
490                                 <p style="line-height: 13pt;text-align: left;color: #030505;font-family: Arial, sans-serif;font-size: 12pt;font-weight: normal;">
491                                     ' . $ah['vinMatch'] . '
492                                 </p>
493                             </td>
494                             <td style="width:15%;">
495                                 <p style="line-height: 13pt;text-align: left;color: #030505;font-family: Arial, sans-serif;font-size: 12pt;font-weight: normal;">
496                                     ' . $ah['regMatch'] . '
497                                 </p>
498                             </td>
499                             <td style="width:20%;">
500                                 <p style="line-height: 13pt;text-align: left;color: #030505;font-family: Arial, sans-serif;font-size: 12pt;font-weight: normal;">
501                                     ' . $ah['estimatedRepairCost'] . '
502                                 </p>
503                             </td>
504                         </tr>
505                         ';
506             }
507         }
508         else
509         {
510             $accidentHistory .= '<table style="width:90%;text-align: left;margin-left: -30px;margin-top: 10px;" >
511                             <tr>
512                                 <td style="width:90%;">
513                                      <p style="text-indent: 0pt;text-align: left;color: #8A8379;font-family: Arial, sans-serif;font-style: normal;font-weight: normal;text-decoration: none;font-size: 12pt;">
514                                         ' . $msg . '
515                                     </p>
516                                 </td>
517                             </tr>';
518         }
519
520                 $accidentHistory .= '
521                                 </table>
522                 </li>
523             </ol>';
524
525                 $this->append($accidentHistory);
526                 //$this->_page++;
527
528
529
530
531
532
533                 return;
534         }
535
536
537 }