<html>
    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet">
	<link href="css/charisma-app.css" rel="stylesheet">
    <link href='bower_components/fullcalendar/dist/fullcalendar.css' rel='stylesheet'>
    <link href='bower_components/fullcalendar/dist/fullcalendar.print.css' rel='stylesheet' media='print'>
    <link href='bower_components/chosen/chosen.min.css' rel='stylesheet'>
    <link href='bower_components/colorbox/example3/colorbox.css' rel='stylesheet'>
    <link href='bower_components/responsive-tables/responsive-tables.css' rel='stylesheet'>
    <link href='bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css' rel='stylesheet'>
    <link href='css/jquery.noty.css' rel='stylesheet'>
    <link href='css/noty_theme_default.css' rel='stylesheet'>
    <link href='css/elfinder.min.css' rel='stylesheet'>
    <link href='css/elfinder.theme.css' rel='stylesheet'>
    <link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
    <link href='css/uploadify.css' rel='stylesheet'>
    <link href='css/animate.min.css' rel='stylesheet'>
        <title>Reçu de paiement</title>
		<style>
		table {
			border-collapse: collapse;
			border-radius: 1em;
			overflow: hidden;
		}
		
		th, td {
			padding : 0.4em;
			background : #EEEEE4;
			border-bottom: 2px solid white;
			font-size:12px;
		}
		
		
		.bloc2{
		display:inline-block;
		position:relative;
		text-align:center;
		margin-top:-25px;
		width:100%;
		padding-top: -10px;
		}
		</style>
    </head>
      <body style="font-family:'Montserrat';" onload="window.print();">
          <div class="bloc"> 
		   
			<div class="bloc2">
                    <span style="margin-top:15px;margin-bottom:10px;color:#000;font-size:30px;text-align:center"><b>AV'S ELECTRIC</b></span><br><hr style="width:60px;">
                    <span style="margin-top:20px;color:#000;font-size:14px;text-align:center"><b>VENTE DE MATÉRIAUX DE CONSTRUCTION</b></span><br>	
                    <span style="margin-top:15px;color:#000;font-size:13px;text-align:center">Tél: {{DB::table('magasin')->where('id', $vente->magasin_id)->first()->telephone}} </span><br>	
                    <span style="margin-top:15px;color:#000;font-size:13px;text-align:center">{{DB::table('magasin')->where('id', $vente->magasin_id)->first()->adresse}} Lomé-Togo</span><br>	
				</p>
				
		    </div>
		    </div>
		<!--BLOC DU GERANT-->
		<br/><br/>
		<div class="container">
		<div class="row"> 
		
				
				<div class="col-md-4" style="margin-left:-20px;margin-top:10px;width:220px;border:1px solid #000;border-radius:10px">
				<p style="border-collapse: collapse;margin-left:10px;width:220px;line-height:2;margin-top:-5px;" cellspacing="3" >	
				<br/><h3 align="center">RECU DE PAIEMENT</h3>
					
					<br/>
					
			    </p>
			    </div>
			    
                <div class="col-md-4" style="margin-left:280px;margin-top:-120px;width:220px;border:1px solid #000;border-radius:10px">
				<p style="border-collapse: collapse;margin-left:10px;width:220px;line-height:2;margin-top:-2px;" cellspacing="3" >		
					<p><b>&nbsp;&nbsp;&nbsp;Client : {{DB::table('client_externe')->where('id', $client)->first()->noms}}</b></p>
					@php
					$datec= explode('-', $paie->date);
					$datec= array_reverse($datec);
					$datec= implode('/', $datec);
					@endphp
					<p><b>&nbsp;&nbsp;&nbsp;Date paiement:</b> {{$datec}}</p><br/>
			        </div>
				
		        </p>
		</div>
		</div>
     <center>
	    <br/>
	    <br/>
        <table style="border-collapse: collapse;width:530px;margin-left:-30px">
		<thead>
                      <tr>
                        <th >Montant payé</th>
						<th >Total à payer</th>
						<th >Total payé</th>
                        <th>Reste à payer</th>
                      </tr>
                    </thead>
        <tbody>
           <tr>
				<td  height="30px" align="center"> 
				@php
					$lh = $paie->montant;
					$lh =  number_format($lh, 0, ' ', ' ');
				@endphp
				<b>{{$lh}} </b>
				</td>
				<td align="center">
					@php
					$lhh = $vente;
					$lhh =  number_format($lhh, 0, ' ', ' ');
				@endphp
				{{$lhh}}
				</td>
				<td align="center">
					@php
					$paye1 = $paie->paye;
					$paye1 =  number_format($paye1, 0, ' ', ' ');
					@endphp
					{{$paye1}}
				</td>
				<td align="center">
					@php
					$lhhh = $paie->reste;
					$lhhh =  number_format($lhhh, 0, ' ', ' ');
					@endphp
					<b>{{$lhhh}} </b>
				</td>
			</tr>
		</tbody>
        </table>
		
        <footer style="position:fixed;bottom:0;text-align:center;">
        <p align="center"><strong></strong>  </p>
        </footer>
      </body>
     </html> 