<?php
$current_date = date('Y-m-d');
?>
<style>

    @page {

        margin-top: 1.9cm;
        margin-bottom: 0cm !important;
        margin-left: 0cm;
        margin-right: 0cm;
        header: html_myHeader;
        footer: html_myfooter;
        font-family: 'Oswald', sans-serif;


    }
    @import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800');

    table, tr, td{
        border:solid 1px #333333;
        border-collapse: collapse;
        padding: 10px;

    }
</style>
<!DOCTYPE html>
<html>
    <head>
        <title>Performance Review/Warning Letter</title>
    </head>
    <?php
    $effective_date = '';
    if ($model->visit_from != '0000-00-00' && $model->visit_from != '') {
        $effective_date = date("d/m/Y", strtotime($model->visit_from));
    }
    ?>
    <body style="width: 960px; margin: 0 auto; font-family: open sans; font-size: 15px !important;">
        <div class="">
            <div class="col-6">
                <br>
                <div class="h3" style="margin-top: 0;margin-bottom: 0;">
                    <?php echo "  "; ?>
                </div>
            </div>
            <div style="text-align: right;margin-right: 50px;">
                <div>
                    <img src="uploads/logo/<?php echo $model->employeedetail->branch_sponsor->branch_or_sponsor_logo; ?>" style="height: 70px">
                </div>

            </div>
        </div>
        <div class="page" style="width: 80%; margin: 0 auto; font-family: open sans;">
            <div class="">
                <div style="text-align: left">
                    <p><?php echo $model->employeedetail->branch_sponsor->branch_or_sponsor_code.'/'.$model->mascertificate->code;?>/<?php echo $ref_no; ?>/<?php echo date('y');?></p>
                    <p>Date: <?php echo date("d/m/Y"); ?></p>
                    <p>To: &nbsp;&nbsp;<?php echo $model->employeedetail->employeefullname; ?><br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $model->employeedetail->designationdetail->designation_name; ?><br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $model->employeedetail->employeecode; ?></p><br>

                </div>
                <div style="text-align: left;">
                    <h4>Subject:Termination Letter </h4>
                </div>
                <div style="text-align: left;">
                    Dear <?php echo $model->employeedetail->employeefullname; ?>,
                </div>
                <div style="text-align: justify;">
                    <p>We are writing this letter to formally notify you that you would not be required to continue as <?php echo ucwords($model->employeedetail->designationdetail->designation_name); ?> with <?php echo $model->employeedetail->branch_sponsor->slip_header_name; ?> . Your performance in the previous months has been carefully evaluated and has not been found to be satisfactory..</p>
                    <p>Find below your performance for the last three months.</p>
                    <p>
                        <table border="1">
                            <thead><tr><th colspan="7">Performance period (<?php echo date('Y');?>)</th></tr>
                            <tr>
                                <th>S.N.</th>
                                <th>Name</th>
                                <th>Staff Id</th>
                                <th>Month 1</th>
                                <th>Month 2</th>
                                <th>Month 3</th>
                                <th>Total</th>
                            </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>1</td>
                            <td><?php echo $sign . '' . $model->employeedetail->employeefullname; ?></td>
                            <td><?php echo $model->employeedetail->employeecode; ?></td>
                            <td><?php echo $model->performance_month_1; ?></td>
                            <td><?php echo $model->performance_month_2; ?></td>
                            <td><?php echo $model->performance_month_3; ?></td>
                            <td><?php echo $model->performance_month_1+$model->performance_month_2+$model->performance_month_3; ?></td>
                        </tr>
                        </tbody>
                    </table>
                    </p>
                    <p>Note your service has been terminated from <?php echo $model->employeedetail->branch_sponsor->slip_header_name; ?> effective <?php echo $effective_date; ?>.  </p>                    
                    <p>Sincerely,</p>
                    
                </div>
                <div>                    
                    <?php
                    foreach ($signature as $value) {
                        echo '<p>' . $value . '</p>';
                    }
                    ?> 
                    <br><br>
                    <?php echo $model->employeedetail->employeefullname; ?><br/>
                    <br/>
                    
                </div>

            </div>
        </div>
        <br>


    <htmlpagefooter name="myfooter" style="">
        <div style="width:100%; border-top: 1px solid black;">
            <img src="<?php echo Yii::app()->baseUrl; ?>/uploads/logo/<?php echo $model->employeedetail->branch_sponsor->footer_logo; ?>" style="width:100%;margin-bottom:-20px !important;">
        </div>
    </htmlpagefooter>
</body>

</html>