


<!DOCTYPE html>
<html>
<head>

  <title>Salary Slip</title>


  <style type="text/css">

    
    *{

        margin: 0;
     }

     /* GENERAL CSS APPLY ALL SECTIONS*/


  *{
    margin: 0;
  /*  padding-top: 6px;*/
  }
  .margin{
    padding-top: 8px;
  }

  .title{

    text-align: center;
    font-weight: bold;
  }


  .container1{

    margin-left: 7%;
    margin-right: 5%; 
    
  }

  .image-section1{

    width: 100px;
    height: 100px;
    
    
    text-align: center;
    position: absolute;
    margin-left:  -5%;
/*    top:  -500%;*/
bottom:  10%;

    
  }

  .title1{

    text-align: center;
    margin-top: 2%;
    background: #a8a8a8;
    color: #fff;
    width: 30%;
    height: 2%;
    border-radius: 15px;
    vertical-align: middle;
    line-height: 29px;
    margin-left: 34.5%;
  }

  

  .clear{

    clear: both;
  }

  .top-section{
    margin-left: 4%;
  }

  input[type=text]
  {
    

    
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid;
    font-size: 12px;
    text-align: center;
    background-color: transparent;

  }

/*  #START=> APPARTMENT SECTION */
  .main-section .row .col{
    
  
    width: 25%;
    margin-right: 30px;
    padding-right: 10px;
    float: left;
  }

  .main-section .row{

    /*margin-left: 4%;*/


  }

  .main-section .col label{
    font-size: 12px;
    /*font-weight: bold;*/
  }

  

  .main-section .row .col .check{
    vertical-align: middle;
    margin-top: 10px;
    margin-right:  90px; 
  }

/*  #END=> APPARTMENT SECTION */




  

  
/*  #END=> OFFICE USE SECTION */

/*  #START=>  IMAGE SECTION */

 .image-section{

    width: 85px;
    height: 85px;
    
    border: 1px solid #000;
    text-align: center;
    position: absolute;
    margin-left:  83%;
    top:  18%;

    
  }



  small{
    font-size: 12px;
    margin-left: 15;
  }

     .container{

        
     }


table {
  border: 1% solid black;
}

th, td {
  border-right: 1% solid black;
  padding-right: 1%;
}

  </style>
</head>

<body style="margin:3% 7.5% 4% 7.5%;">
      
     <br>


     <div class="container">
        <div class="main-section">
           <center> <h3>SALARY SLIP</h3></center>
        
        
        
         
          <div class="row clear margin">

        
            <div class="col margin" style="width: 100%;">
              <label>Employee Name: <input style="width: 25% ; " value="{{ucwords($user->name)}}" type="text"></label>
            </div>
          </div>


          <div class="row clear margin">
            <div class="col " style="width: 100%">
              <label>Designation: <input style="width: 29% " value="{{$user->designation->title}}" type="text"></label>
            </div>
          </div>
        <div class="row clear margin">
            <div class="col " style="width: 50%">
              <label >Salary Month: <input style="width: 52%;" value="{{EF::showCustomDate($minute_sheet->date,'M-Y')}}" type="text">
                  </label>
            </div>
             
          </div>
            
      @php($total_count = abs(1 + @count($contract_detail_list) - @count($deduction_list)))

      @php($earning_side_count   = (1 + @count($contract_detail_list)))

      @php($deduction_side_count = (1 + @count($deduction_list)))

      @if($earning_side_count > $deduction_side_count)

          @php($total_earning_rows   = 0)

          @php($total_deduction_rows = abs($earning_side_count - $deduction_side_count))

      @else
         @php($total_deduction_rows   = 0)

          @php($total_earning_rows = abs($earning_side_count - $deduction_side_count))
      @endif

     

      @php($total_earning = 0)

      @php($total_deduction = 0)

      @php($style = 'background: #E0E0E0; font-weight:bolder;')
 


      <div class="row clear margin">
          <div class="col margin" style="width:50%;">
            <table border="1" style="border-collapse: collapse; font-size:8pt; text-align: center; width:100%;">
              <thead>
                <tr style="background: #E0E0E0;">
                  <th colspan="2">Earnings</th>
                </tr>
              </thead>

              <tbody>

                @isset($contract_list[0]->id)
                  <tr>
                    <td>
                      Basic Salary
                    </td>
                    <td>
                      {{EF::numberFormat($contract_list[0]->amount)}}
                    </td>
                  </tr>
                  @php($total_earning += $contract_list[0]->amount)
                @endisset

                @foreach($contract_detail_list as $rows)
                  <tr>
                    <td>
                      {{$rows->contractDetail->assignAllowance->allowance->title}}
                    </td>
                    <td>
                      {{EF::numberFormat($rows->amount)}}
                    </td>
                  </tr>
                  @php($total_earning += $rows->amount)
                @endforeach
              </tbody>
                @for($i = 0; $i <= ($total_earning_rows); $i++)
                  <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
                @endfor

              <tfoot >
                <tr style="{{$style}}">
                  <td>Total Earning</td>
                  <td>{{EF::numberFormat($total_earning)}}</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
            </tfoot>
            </table>


            <table border="1" style="border-collapse: collapse; font-size:8pt; text-align: center; width:100%; position: absolute; left: 100%; top: 13.33%; margin-left: 0; ">
              <thead>
                <tr style="background: #E0E0E0;">
                  <th colspan="2">Deductions</th>
                </tr>
              </thead>

              <tbody>
                @foreach($deduction_list as $rows)
                  <tr>
                    <td>
                      {{$rows->deduction->title}}
                    </td>
                    <td>
                      {{EF::numberFormat($rows->amount)}}
                    </td>
                  </tr>
                  
                  @php($total_deduction += $rows->amount)

                @endforeach
                <tr>
                    <td>
                      Tax {{$payroll->tax->title}}
                    </td>
                    <td>
                      {{EF::numberFormat($final_tax_amount)}}
                    </td>
                </tr>

                @for($i = 0; $i <= ($total_deduction_rows); $i++)
                  <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
                @endfor
              </tbody>

              <tfoot>
                <tr style="{{$style}}">
                  <td>Total Deduction</td>
                  <td>{{EF::numberFormat($total_deduction)}}</td>
                </tr>
                <tr style="{{$style}}">
                  <td>Net Salary</td>
                  <td>{{EF::numberFormat($payroll->net_salary)}}</td>
                </tr>
            </tfoot>
            </table>
          </div>

          
      </div>

      <div class="row clear">
          {{-- For Amount in words --}}
      </div>


      <div class="row clear">
          <div class="col margin" style="width: 100%">
            <label>Cheque #: <input style="width: 28.5% ; margin-left: 5px;" value="" type="text"></label>
            <span style="margin-left: 80px;">
            <label>Bank Name Here: <input style="width: 28.5% ; margin-left: 5px;" value="" type="text"></label>
            </span>
          </div>
      </div>

      <div class="row clear">
        <div class="col margin" style="width: 100%">
          <label>Dated As: <input style="width: 28.5% ; margin-left: 5px;" value="" type="text"></label>
        </div>
      </div>

      <br><br><br><br><br><br><br><br><br><br><br><br>       

       <div class="row clear">
          <div class="col margin" style="width: 100%">
             <input style="width: 38.5% ; margin-left: 0px;" value="" type="text">
            <span style="margin-left: 130px;">
            <input style="width: 38.5% ; margin-left: 15px;" value="" type="text">
            </span>
          </div>
      </div>

      <div class="row clear">
          <div class="col margin" style="width: 100%">
             <label style="margin-left: 70px;">Employee </label>
            <span style="margin-left: 350px;">
            <label>HR Department</label>
            </span>
          </div>
      </div>



              <!-- SALARY SLIP -->
        
        </div>
          </div>
    

</body>
</html>