<!DOCTYPE html>
<html>
    <div id="DivIdToPrint">
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                @if($payroll)

                    <table id="table" width="100%" class="table table-striped">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>{{ __('administrator.employee') }}</th>
                            <th>{{ __('administrator.spouse') }}</th>
                            <th>{{ __('administrator.child') }}</th>
                            <th>{{ __('administrator.month') }}</th>
                            <th>{{ __('administrator.year') }}</th>
                            <th>{{ __('administrator.monthly_rate') }}</th>
                            <th>{{ __('administrator.gross_pay') }}</th>
                            <th>{{ __('administrator.income_tax') }}</th>
                            <th>{{ __('administrator.taxable_salary') }}</th>
                            <th>{{ __('administrator.net_payment') }}</th>
                        </tr>
                        </thead>
                        @foreach($payroll as $key =>$row)
                            <tbody>
                                <tr>
                                    <td style="text-align:center;">{{$key+1}}</td>
                                    <td>{{optional($row->employee)->name}}</td>
                                    <td style="text-align:center;">{{$row->spouse}}</td>
                                    <td style="text-align:center;">{{$row->child}}</td>
                                    <td style="text-align:center;">{{$row->f_month}}</td>
                                    <td style="text-align:center;">{{$row->f_year}}</td>
                                    <td style="text-align: right;">{{$row->monthly_rate}}</td>
                                    <td style="text-align: right;">{{$row->gross_pay}}</td>
                                    <td style="text-align: right;">{{$row->income_tax}}</td>
                                    <td style="text-align: right;">{{$row->taxable_salary}}</td>
                                    <td style="text-align: right;">{{$row->net_pay}}</td>
                                </tr>
                            </tbody>
                        @endforeach
                    </table>    
                    
                @endif   
            </div>
        </div>
    </div>
</html>
