<?php
$modelCompanySettings = new MasCompanySettings();
$modelCompanySettings = $modelCompanySettings->find(array('condition'=>'crm_company_id='.(int) Yii::app()->user->master_user_company_id));   
if(!empty($modelCompanySettings->print_template_logo)){
    $pdf_logo = $modelCompanySettings->print_template_logo;
}
else{
    $pdf_logo = Yii::app()->user->company_logo;
}


if($modelCompanySettings->print_template_id=='R'){
    $print_template_style="width:30%;float:right";
}
elseif($modelCompanySettings->print_template_id=='M'){
    $print_template_style="width:100%;float:left";
}
else{
    $print_template_style ="width:30%;float:left";
}

?>

<style>
    @page {
        margin-top: .3cm;
        /*margin-bottom:2cm;*/
          margin-bottom:30mm;
        margin-left: 1cm;
        margin-right: 1cm;
        header: html_myHeader;
        header: html_otherpages;
        font-family:'Times New Roman';
    }
</style>
   <div class="header" style="width:100%;padding-bottom:0;display:flex;">
        <img style="<?php echo $print_template_style;?>;" src="<?php echo  'uploads/logo/pdf/'.$pdf_logo; ?>"/>
    </div>
<br>
