<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>Facture client</title>
    </head>
      <body style="font-family:'Montserrat';" onload="window.print();">
            <div class="container">
		   <div class="row">
		    <div class="col-md-12">  
                <center>
				<br/>				
				<img src="{{public_path('assets/img/logo3.png')}}"/><br/>
				<p><b>EasyShop Pro 2.0</b></p>
				<hr style="width:100px;" />
				<p><b></b></p>
				</center>
		    </div>
		</div></div>
		<!--BLOC DU GERANT-->
		<div class="container">
		<div class="row"> 
                <div class="col-md-4" style="margin-left:20px;">
					<p><b>Client : @php if($client==0){$cli="Tous les clients";} else {$cli=DB::table('client_externe')->where('id', $client)->first()->noms;}@endphp {{$cli}}</b></p>
					@php
					$date_debut= explode('-', $date_debut);
					$date_debut= array_reverse($date_debut);
					$date_debut= implode('/', $date_debut);

					
					$date_fin= explode('-', $date_fin);
					$date_fin= array_reverse($date_fin);
					$date_fin= implode('/', $date_fin);
					@endphp
					<p><b>Période :</b> Du {{$date_debut}} au {{$date_fin}}</p>
			        </div>
				<div class="col-md-4">  
                    &nbsp;
		        </div>
		</div>
		</div>
     <center>
	    <br/>
        <table class="rpp" border='1' style="border-collapse: collapse;margin-left:35px;width:600px" cellspacing="3">
        <tr>
			@php
			$reste = $total - $sommePaiement;
			$reste =  number_format($reste, 0, ' ', ' ');
			$total1 = $total;
			$total1 =  number_format($total1, 0, ' ', ' ');
			$sommePaiement1 = $sommePaiement;
			$sommePaiement1 =  number_format($sommePaiement1, 0, ' ', ' ');
			@endphp
			<td style="text-align:center;height:35px"> <b>Total à payer</b></td>
			<td style="text-align:center;height:35px"> {{$total1}} F</td>
		</tr>
		<tr>
			<td style="text-align:center;height:35px"><b>Payé</b></td>
			<td style="text-align:center;height:35px"> {{$sommePaiement1}} F</td>
		</tr>
		<tr style="background-color:brown;color:#fff;">
			<td style="text-align:center;height:35px"><b>Reste à payer</b></td>
			<td style="text-align:center"> <b>{{$reste}} F</b></td>
		</tr>
		
        </table>
		
		
		<p style="margin-left:430px;margin-top:90px;"><strong>Gérant(e),</strong><br/>
        Ce <?php echo date('d-m-Y');?>
        </p>
      </div>
        <footer style="position:fixed;bottom:0;text-align:center;">
        <p align="center"><strong>&copy; EasyShop Pro 2.0 2019-2020 </strong>  </p>
        </footer>
      </body>
     </html> 