<html>
    <meta charset="utf-8"/>
	<link rel="stylesheet" href="css/style.css" />
    <head>
      <title>Bulletin de paie</title>
	  <style>


	.bloc2{
		display:inline-block;
		position:relative;
		text-align:center;
		margin-top:-25px;
		width:100%;
		padding-top: -10px;
		border-bottom:1px solid #000;
	}
	
		
		</style>
    </head>
    <body>
	<div class="bloc"> 
		   @php
			$ig = DB::table('magasin')->orderBydesc('id')->take(1)->first()->logo_fichier;
			@endphp
			<div class="bloc2">
				<p style="margin-top:15px;color:#000;font-size:16px;">
				<img src="{{public_path('/storage/'.$ig)}}" style="height:75px"> <br/>
				<b><u>{{DB::table('magasin')->orderBydesc('id')->take(1)->first()->nom}}</u></b><br>
				{{DB::table('magasin')->orderBydesc('id')->take(1)->first()->telephone}} {{DB::table('magasin')->orderBydesc('id')->take(1)->first()->email}} <br/>
				</p>
				
		    </div>
		    </div>
			<br/><br/>
	<div class="entete">
            @php
           

        @endphp
		<b>BULLETIN DE PAIE</b><br/>
    PERIODE
    Du      : <b>{{$datds}} </b> au      : <b>{{$datfs}}</b><br/>
    </div>
		<br/><br/>
        <div class="etat">
		    <table class="t0">
            <tr><td width="160px;"><strong>Nom :</strong></td><td  width="150px;">{{$employe->nom}}</td><td width="150px;"><strong>Fonction :</strong></td><td>{{$employe->fonction}}</td></tr>
			<tr><td><strong>Prénoms :</strong></td><td>{{$employe->prenoms}}</td><td><strong></strong></td><td></td></tr>
			</table>
			<br/>
			<table class="t1" border="1" style="border-collapse:collapse;width:650px">
			    <tr>
				   <th align="center">Code</th>
				   <th align="center">Libellé</th>
				   <th align="center">Rémunération</th>
				   <th align="center">Retenues</th>
                </tr>
                @php
                   $tt = $salaire->nbjour * $salaire->salaire;
                @endphp
				<tr><td height="20px" align="center">0550</td><td>Salaire de base</td><td align="center">{{number_format($employe->salaire_base, 0, ' ', ' ')}} </td><td align="center">{{number_format($retenue, 0, ' ', ' ')}}</td></tr>
				<tr><td height="20px" align="center">0550</td><td>Total à payer sur {{$salaire->nbjour}} jour(s)</td><td align="center">{{number_format($tt, 0, ' ', ' ')}} </td><td align="center"></td></tr>

                </table>
                <br>
                <table class="t1" border="1" style="border-collapse:collapse;width:400px">
                    <tr>
                        <td align="center" height="30px"><b>Total absence</b></td>
                        <td align="center" height="30px"><b>{{$absence}}</b></td>
                    </tr>
                   
                </table>
                <table border="1" style="border-collapse:collapse;margin-left:435px;">
                    <tr>
                        <td align="center" height="30px"><b>Total avance sur salaire</b></td>
                        <td align="center" height="30px"><b>{{number_format($salaire->avance, 0, ' ', ' ')}}</b></td>
                    </tr>
                   
                </table>
                <br>
            <table class="t1" border="1" style="border-collapse:collapse;width:400px">
				
				<tr><td align="center"><b>Net à payer</b></td><td align="center"><font color="brown"><b>{{number_format($salaire->apayer, 0, ' ', ' ')}} </b></font></td></tr>
			</table>
			<br/>
			 <p style="text-align:center;font-size: 13px;">
              <br/>
              <strong> <font color="brown">POUR TOUTE RÉCLAMMATION CONCERNANT VOTRE BULLETIN, VEUILLEZ CONTACTER LE SERVICE RH </font></strong></p>
             <p style="margin-right: 5px;font-size: 13px;" align="right"><strong>Délivré le : {{$today}}</strong></p>
            </div>
			<footer style="position:fixed;bottom:50px;text-align:center;">
        <p align="center">
		<hr/>
				{{DB::table('magasin')->orderBydesc('id')->take(1)->first()->adresse}}<br/>
		<strong>&copy; {{DB::table('magasin')->orderBydesc('id')->take(1)->first()->nom}} 2019-2020 </strong>  </p>
        </footer>
    </body>

</html>
