<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Lead Report</title>         
    </head>
    <body>
        <!--mpdf        
        <htmlpagefooter name="myfooter">
            <div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; ">
        <strong><?php echo Yii::app()->user->master_company_name;?></strong><br />        <?php echo MasterCompany::getBillingAddress();?><br/>        
                Lead No:<?php echo $model->file->id . '/' . $model->id; ?> | Page {PAGENO} of {nb} 
            </div>
        </htmlpagefooter>
        <sethtmlpagefooter name="myfooter" value="on" />
        mpdf-->
        <div class="page">
            <div class="wrapper">
                <div class="header">
                    <div class="header-top">
                        <div class="logo"><?php echo CHtml::image(Yii::app()->baseUrl . '/images/logo/'.Yii::app()->user->pdf_company_logo); ?>                            
                        </div>
                        <div class="page-title">
                            <h1>LEAD</h1>
                            <div class="repot-title cell-left"> <strong> No:   <?php echo $model->id; ?></strong></div>
                        </div>
                    </div>
                    <div class="header-top">
                        <div class="header-bottom">
                            <div class="address-box" style="width:60%"> <span><strong><?php echo $model->company->company_name; ?></strong></span><br />
                                <?php echo!empty($model->company->billingAddress) ? nl2br($model->company->billingAddress) . '<br />' : ''; ?>
                                <?php echo!empty($model->company->genral_phno) ? 'Tel:  ' . $model->company->genral_phno . '<br />' : ''; ?>
                                <strong><?php echo $model->contact->fullname; ?></strong>
                            </div>
                            <div class="left">
                                <table class="table_grid">
                                    <tr>
                                        <td>File ID</td>
                                        <td><?php echo $model->file_id; ?></td>
                                    </tr>
                                    <tr>
                                        <td class="even">Company ID</td>
                                        <td><?php echo $model->company_id; ?></td>
                                    </tr>

                                    <tr>
                                        <td class="even">Enquiry Date</td>
                                        <td><?php echo $model->enq_date; ?></td>
                                    </tr>
                                    <tr>
                                        <td>Closing Date</td>
                                        <td><?php echo $model->closing_date; ?></td>
                                    </tr>
                                </table>                                
                            </div>
                        </div>
                    </div>
                </div> 
                <div class="content"> 
                    <div class="lead-right"><strong>File Title</strong><br />
                        <span><?php echo nl2br($model->title); ?></span> </div>
                    <div class="lead-right"><strong>Lead owner</strong><br />
                        <span><?php echo $model->file->leadowner->fullname; ?></span> </div>                    
                    <div class="terms"><strong>Notes</strong><br />
                        <span><?php echo nl2br($model->notes); ?></span> </div>
                </div>                
            </div>
            <div class="footer"> This is a system generated output  and requires no signature<br/>The Lead is auto generated  by <?php echo Yii::app()->name; ?> on <?php echo date('Y/m/d') ?> </div>
        </div>
    </body>
</html>