
        <style>
		table {
			border-collapse: collapse;
			border-radius: 1em;
			font-size:13px;
			
		}
		
		th, td {
			padding : 0.1em;
			background : #fff;
			border-bottom: 2px solid #000;
		}
		.bloc2{
		display:inline-block;
		position:relative;
		text-align:center;
		margin-top:-25px;
		width:100%;
		padding-top: -10px;
		border-bottom:1px solid #000;
	}
	
		</style>
		<div class="bloc"> 
		   
			<div class="bloc2">
				<p style="margin-top:15px;color:#000;font-size:16px;">
				<b><u>{{DB::table('magasin')->where('id', session('user')->magasin_id)->first()->nom}}</u><br>
			
				</b>
				</p>
		    </div>
		    </div>
		<h4 align="center"> Journal caisse {{date('d/m/Y')}} / @if (session('user')->roles=="Validateur") Caissier : {{session('user')->nom}} @endif</h4>
		<table style="text-align:right;width:700px;" cellspacing="3">
                        <thead>
                          <tr>
                            <th class="text-center"> ID </th>
                            <th class="text-center"> N° Facture</th>
                            <th class="text-center"> Client </th>
                            <th class="text-center">Produit</th>
                            <th class="text-center">Prix</th>
							<th class="text-center">Qté</th>
                            <th class="text-center">Total</th>
                            <th class="text-center">Etat</th>
                          </tr>
                        </thead>
                        <tbody>
						@foreach($ligne as $lignes)
                          <tr>
							<td style="text-align:center;">{{$loop->iteration}}</td>
							<td style="text-align:center;">{{DB::table('vente')->where('id', $lignes->vente_id)->first()->numero}}</td>
							<td style="text-align:center;">{{DB::table('vente')->where('id', $lignes->vente_id)->first()->nomcli}}</td>
							<td style="text-align:center;">{{DB::table('produit_vendable')->where('id', $lignes->produit_id)->first()->desi}}</td>
							<td style="text-align:center;">{{$lignes->pv}}</td>
							<td style="text-align:center;">{{$lignes->qte}}</td>
							<td style="text-align:center;">{{$lignes->montligne}}</td>
							<td style="text-align:center;">
								@if ($lignes->etat == "Annulée")
								 <font color="red"> {{$lignes->etat}} </font>
								@else
								{{$lignes->etat}} 
								@endif
							</td>
                          </tr>
						@endforeach
                        </tbody>
                        <tfoot>
						@php
						$tot =  number_format($total, 0, ' ', ' ');
						@endphp
							<tr>
								<td style="text-align:center;" colspan="8"> &nbsp;</td>
							</tr>
							<tr>
								<td style="text-align:center;" colspan="2"><b>Total vente</b> : <b>{{number_format($montant, 0, ' ', ' ')}}</b></td>
								<td style="text-align:center;">Paiement client : <b>{{number_format($paiement_client, 0, ' ', ' ')}}</b></td>
								<td style="text-align:center;" colspan="2"><b>Total Remise : </b> <b>{{number_format($remise, 0, ' ', ' ')}}</b></td>
								<td style="text-align:center;"><b>Total net</b></td>
								<td style="text-align:center;color:red" colspan="2"><b>{{number_format(($total + $paiement_client), 0, ' ', ' ')}}</b></td>
							</tr>
                        </tfoot>
                      </table>
                      
                      <br/><br/>
                      
                      <table style="text-align:right;width:700px;" cellspacing="3">
                        <thead>
                          <tr>
                            <th class="text-center"> ID </th>
                            <th class="text-center"> Date</th>
                            <th class="text-center"> Montant </th>
                            <th class="text-center">Nature</th>
                            <th class="text-center">Notes</th>
                            <th class="text-center">Etat</th>
                          </tr>
                        </thead>
                        <tbody>
						@foreach($dep as $deps)
                          <tr>
							<td style="text-align:center;">{{$loop->iteration}}</td>
							<td style="text-align:center;">{{implode('/', array_reverse(explode('-', $deps->date)))}}</td>
							<td style="text-align:center;"> {{number_format($deps->montant, 0, ' ', ' ')}}</td>
							<td style="text-align:center;">{{$deps->nature}}</td>
							<td style="text-align:center;">{{$deps->note}}</td>
							<td style="text-align:center;">
								@if ($deps->etat == "Annulée")
								 <font color="red"> {{$deps->etat}} </font>
								@else
								{{$deps->etat}} 
								@endif
							</td>
                          </tr>
						@endforeach
                        </tbody>
                        <tfoot>
							<tr>
								<td style="text-align:center;" colspan="6"> &nbsp;</td>
							</tr>
							<tr>
								<td style="text-align:center;"></td>
								<td style="text-align:center;"></td>
								<td style="text-align:center;" colspan="2"></td>
								<td style="text-align:center;"><b>Total dépense</b></td>
								<td style="text-align:center;color:red" colspan="2"><b>{{number_format($totaldep, 0, ' ', ' ')}}</b></td>
							</tr>
                        </tfoot>
                      </table>