
@foreach($minute_payroll_detail as $rows)
                        
                        @php ($basic_salary = $rows->getBasicSalary($rows->id,$curr_minute_sheet->id))

                        @php($allowance_sum = $rows->getAllowanceSum($rows->id,$curr_minute_sheet->id))

                        @php($loan_sum = $rows->getLoanSum($rows->id,$curr_minute_sheet->id))

                        @php($deduction_sum = $rows->getDeductionSum($rows->id,$curr_minute_sheet->id))

                        @php($other_deduction = $deduction_sum- $loan_sum)

                        @php($gross_salary = ($basic_salary + $allowance_sum)-($deduction_sum))

                        @php($non_taxable_allowances = $rows->getNonTaxableAllowanceSum($rows->id,$curr_minute_sheet->id))

                        @php($taxable_amount = $gross_salary - $non_taxable_allowances)

                        @php($tax = $rows->calculateTax($taxable_amount)['monthly_tax_amount'])

                        @php($net_salary = $gross_salary-$tax)

                        @php($user_payroll = $payroll->getPayrollByUser($rows->id,$curr_minute_sheet->id))






                  
                   <tr>
                     @if(EF::getUrl() != "minutesheetdownload")
                      <td>@if(!isset($user_payroll->id))<input onchange="verifyCheckBoxList(this);" type="checkbox" class="checked_payroll  user_{{$unique_id}}"  name = "user_id[]" value= "{{Crypt::encrypt($rows->id)}}"/>@endif</td>
                      @endif
                        <!--  <td>{{$loop->iteration}}</td> -->

                         <td>{{ucwords($rows->name)}}</td>
                         <td>{{ucwords($rows->title)}}</td>
                         <td>{{ucwords($rows->location)}}</td>

                         <td>{{EF::numberFormat($basic_salary)}}</td>

                         <td>{{EF::numberFormat($allowance_sum)}}</td>

                       

                         <td>{{EF::numberFormat($loan_sum)}}</td>

                         <td>{{EF::numberFormat($other_deduction)}}</td>

                         <td>{{EF::numberFormat($gross_salary)}}</td>


                         <td>{{EF::numberFormat($taxable_amount)}}</td>

                         <td>{{EF::numberFormat($tax)}}</td>

                         <td>{{EF::numberFormat($net_salary)}}</td>
                         <td>
                          @if(isset($user_payroll->id) && $user_payroll->status == "Approved")          
                         <span class="badge badge-success">Posted</span>
                         @else
                         <span class="badge badge-primary">Pending</span>
                         @endif
                         </td>
                         @if(EF::getUrl() != "minutesheetdownload")
                      
                       <input type = "hidden" name = "payment_mode[]" value = "{{$rows->salary_mode}}"/>
                      
                         <td class = "instrument_td" style = " width: 10%;">
                           @if($rows->salary_mode == 'Cheque')
                           <input disabled="true" type = "text" placeholder= "Instrument "name = "user_instrument_no[]" class = "form-control form-control-sm user_instrument"/> 
                           @endif
                         </td>
                         <td>   <div class="item-action dropdown">
                                    <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fa fa-list-ul"></i></a>
                                    <div class="dropdown-menu dropdown-menu-right">
                                       <a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-cogs"></i> Action</a>
                                    
                  
                                  @if(Auth::user()->hasAnyPermission(['All','Update Payroll Details'])&& !isset($user_payroll->id))
                                       <div class="dropdown-divider"></div>
                                      <a onclick="getDetailsByUser(event,'{{Crypt::encrypt($curr_minute_sheet->id)}}','{{Crypt::encrypt($rows->id)}}')" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-edit"></i> Update </a>
                                      @endif
 
                                    </div>
                                  </div></td>
                                  @endif
                       </tr>
                        @endforeach