<!DOCTYPE html>
<html>

    <head>
        <title>SALARY PAYMENT DETAILS</title>
    </head>

    <body>
        <div class="heading">
            <div class="logo col-6">
                <img src="images/pdf/logo.png">
            </div>
            <div class="companay_name col-6 text-right">

            </div>
        </div>
        <div class="clearfix"></div>
        <div class="title">
            <div class="col-6">
                <div style="height: 10px;"></div>
            </div>
            <div class="col-6 text-right">
                <h1>SALARY PAYMENT DETAILS</h1>
                <div class="details-box">
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="filter-item">
            <label>MONTH/YEAR :</label><?php echo $model_sif->salary_month.'/'.date("Y", strtotime($model_sif->processing->payroll_enddate));?>
        </div>
        <div class="table-body">
            <table class="table table-fixed table-primary">
                <thead>
                    <tr>
                        <th class="text-center tbl-iw nw">No</th>
                        <th class="text-center tbl-iw nw">Branch</th>
                        <th class="text-center tbl-iw nw">Employee Code</th>
                        <th class="text-center tbl-iw nw">Name</th>
                        <th class="text-center tbl-iw nw">MOL ID</th>
                        <th class="text-center tbl-iw nw">Mode</th>
                        <?php
                        $colspan=7;
                        ?>
                        <th class="text-center tbl-iw nw">Acc No</th>
                        <th class="text-center tbl-iw nw">Amount</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $total=0.00;
                    $payment_mode=array('0'=>'All','1'=>'Cash','2'=>'Cheque','3'=>'WPS','4'=>'Exchange');
                    foreach ($model_sif_details as $key => $sif_details) {
                        ?>
                        <tr>
                            <td><?php echo $j + 1; ?></td>
                            <td><?php echo $sif_details->employeedetail->branch_sponsor->branch_or_sponsor_name; ?></td>
                            <td><?php echo $this->ciphertext($sif_details->employeedetail->employee_code, "d"); ?></td>
                            <td><?php echo $this->ciphertext($sif_details->employeedetail->first_name, "d") . ' ' . $this->ciphertext($sif_details->employeedetail->middle_name, "d") . ' ' . $this->ciphertext($sif_details->employeedetail->last_name, "d"); ?></td>
                            <td><?php echo $sif_details->employeedetail->personal_file_no; ?></td>
                            <td><?php echo $payment_mode[$sif_details->employeedetail->payment_type]; ?></td>
                            <td><?php echo $sif_details->employeedetail->employee_accountno; ?></td>
                            <td class="text-right"><?php echo $sif_details->total_salary_paid; ?></td>
                        </tr>

                        <?php
                        $total+=$sif_details->total_salary_paid;
                        $j++;
                    } ?>
                        <tr><td colspan="<?php echo $colspan; ?>" class="text-right text-bold">Total</td><td class="text-right text-bold"><?php
                            echo Yii::app()->numberFormatter->formatCurrency($total, " "); 
                            ?>
                            </td></tr>
                </tbody>
            </table>
        </div>
        <!--    mpdf
                <htmlpagefooter name="myfooter">
                    <div style="border-top: 1px dotted #000000; font-size: 12px; text-align: center; padding-top: 10px; ">
                        <div style="text-align:center;width:100%">This report is auto generated by Bluesky project on 
<?php
date_default_timezone_set("Asia/Dubai");
echo date('d/m/Y') . " " . date("h:i:sa");
?> </div>
                        <div style="text-align:center;width:100%">Page {PAGENO} of {nb} </div>
                    </div>
                </htmlpagefooter>
                <sethtmlpagefooter name="myfooter" page="all" value="on" />-->

    </body>

</html>
