@extends('layouts.dashboard')

@section('page_title')
  MinuteSheet Detail
@endsection

@section('page_header_title')
HR
@endsection



@section('page_body')
{{ Breadcrumbs::render('minute_sheet_detail',Crypt::encrypt($curr_minute_sheet->id),($curr_minute_sheet->title)) }}
{{ Form::open(array('route' => 'payroll.post', 'class' => 'cls_form', 'id' => 'form_post_payroll')) }}
  <div class="row row-cards row-deck">
  <div class="col-12">
                <div class="card">
                    <div class="card-header">   
                    <div class = "col-md-3" > 
               <h4 class="card-title">Payroll Details</h4>
             </div>

            <div class = "col-md-3" > 
            @php($datatable_key = Crypt::encrypt('Minute Sheet Detail'))

            <select onchange="showParameterBranchWiseDataTable(event,this,'{{Crypt::encrypt($curr_minute_sheet->id)}}','{{$datatable_key}}','show_minute_sheet_detail');" class = "form-control form-control-sm employee_salary_mode" name = "salary_mode"><option value = "{{Crypt::encrypt(0)}}">Select Salary Mode</option>
              @foreach(EF::getSalaryMode() as $rows)

              <option value = "{{Crypt::encrypt($rows)}}">{{ucwords($rows)}}</option>

              @endforeach

            </select>
            
             </div>

             <div class = "col-md-2"> 

            <select class = "form-control form-control-sm" name = "bank"><option value = "{{Crypt::encrypt(0)}}">Select Bank</option>
              @foreach($curr_accounts as $rows)

              <option value = "{{Crypt::encrypt($rows->id)}}">{{ucwords($rows->name)}}</option>
              @endforeach
            </select>
            
             </div>
               <div class = "col-md-2"> 

              <input type = "text" placeholder= "Instrument Number "name = "instrument_no" class = "form-control form-control-sm"/>  

              </div>
             <div class = "col-md-1">
               @if(Auth::user()->hasAnyPermission(['All','Post Payroll']))
                <i style = " display:none;" class="btn btn-primary btn-sm cls_submit cls_post" content = "post selected salaries"> Post Payroll</i>  

                @endif
              </div>
            </div>

                  <div class="card-status card-status-left bg-blue"></div>
                  <div class="table-responsive table-height">
                    <table class="table table-hover table-outline table-vcenter text-nowrap card-table cls_datatable">
                      <thead>
                        <tr>
                          <th><input type="checkbox" onchange="selectAllPayroll(event,this)"/></th>
<!--                           <th>#</th> -->
                          <th>Name</th>
                          <th>Designation</th>
                          <th>Location</th>
                          <th>Basic Salary</th>
                          <th>Allowances</th>
                          
                          <th>Loan</th>
                          <th>Other D.</th>
                          <th>Gross Salary</th>
                          <th>Taxable Salary</th>
                          <th>Tax</th>
                          <th>Net Salary</th> 
                          <th>Status</th>  
                        
                          <th class = "instrument_tr">Instrument</th>

                          <th style="text-align: center;"><i class="dropdown-icon fa fa-cogs"></i></th>
                          
                        </tr>
                      </thead>
                      <tbody id="show_minute_sheet_detail">

                        {!! $view_minute_sheet !!}
                  
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
          </div>
          <input type = "hidden" name = "minute_sheet_id" value = "{{Crypt::encrypt($curr_minute_sheet->id)}}"/>
           {{ Form::close() }}
         

@endsection

@section('page_modal')

  <div id="update_payroll_detail_model">
    
  </div>

    @include('hr.deduction.modals.add_deduction')


@endsection

@section('page_script')
 @include('hr.scripts.minute_sheet')  
  @include('hr.scripts.deduction')  
@endsection
