<?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:20%;float:right;object-fit:contain;";
}
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: .4cm;
        /*margin-bottom:2cm;*/
          margin-bottom:4.2cm;
        margin-left: .3cm;
        margin-right: .3cm;
        header: html_myHeader;
        header: html_otherpages;
        font-family:'Times New Roman';
        border:5px solid red;
          height: 280mm;

    }
</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_logo; ?>"  />
    </div>
<br>
