<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
	<link rel="stylesheet" href="URL to your print.css" type="text/css" media="print" />
	<link rel="stylesheet" href="plugins/bootstrap/dist/css/bootstrap.min.css">
	<title>Imprimer reçu </title>
	
	
	<style>
	
	 .half-underline {
        position: relative;
        text-decoration: none; /* Supprimer le soulignement par défaut */
    }

    .half-underline::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 50%; /* Moitié de la largeur du texte */
        border-bottom: 1px solid black; /* Bordure inférieure */
    }
	
	</style>

	
	
</head>

		 @php
		 
		      $datp = DB::table('transaction')->where('commande_id',$idcmde)->first()->datepaie;
			  
		      $heup = DB::table('transaction')->where('commande_id',$idcmde)->first()->heurepaie;
			  
		      $mtpy = DB::table('transaction')->where('commande_id',$idcmde)->first()->montant;
			  
		      $nom = DB::table('transaction')->where('commande_id',$idcmde)->first()->nom;
			  
		      $mode = DB::table('transaction')->where('commande_id',$idcmde)->first()->payment;
			  
		      $mtfac = $facture->montant;
			  
		      $numero = $facture->reference;
		   
		 
		   
		 @endphp


<body  style="background:url('C:\xampp\htdocs\ecom\public\assets\images\c.png') ; background-repeat:no-repeat; background-position:center; z-index:-1px" >

  <div class="container-fluid">
  
		<div class="row" >
		
	    <div class="col-md-6" style="font-size:12px">
		    <div >
				
			    <b><center style="font-size: 22px; font-weight:3000 ; font-family:'Elephant' "> PHARMACY COPE </center></b>
			    <center style="font-size: 13px;  "> Vente et livraison des produits pharmaceutiques </center>
			    <center style="font-size: 13px;  "> Disponibilité 24h/24 , 7j/7 </center>
			    <center style="font-size: 13px;  "> {{ $adresse  }} </center>
			    <center style="font-size: 13px;  "> Tel. +228 {{ $tel1  }} / {{ $tel2  }}  </center>
				<center style="font-size: 13px;  ">  Washington - USA {{ $heup }} </center>
			      <hr style="width:30% ; "> 
			
			</div>
			
		</div>	  

		  <div class="col-md-6" style="font-size:12px">
			
			<div >
			
				  <center >  <b> Fait le  {{ implode('/', array_reverse(explode('-', $datp))) }} à {{ $heup }}  </b> </center > 
				 
			</div>
		</div>
		
		
		</div>
  
  </div>
  
  <div class="container-fluid" style="padding-top: 10px;">
		
	
	
	<div class="row"  >

	        <div>
			
				<h4  style="font-size:15px; font-family:'Elephant'; margin-bottom : 20px">

                   <center>FACTURE N° {{ $numero }}  </center> 
				   
				</h4>
				
				  <b style="font-size: 12px; margin-bottom : 0px"> Nom du Client  :<strong style="font-size: 12px; margin-left: 60px"> {{ $nom  }}   </strong> </b>
				  <b style="font-size: 13px;">  <hr style="width:88% ; border-style: dotted; margin-top : 3px; margin-left : 75px "> </b>
			</div>
	</div>
	
	
	</div>
	
	
	<div class="container-fluid" style="padding-top: 1px ;padding-bottom: 90px ; position:relative" >
           <div class="row">
		   
           <div class="col-sm-12">
              
                  <div class="card-body">
                    <div class="table-responsive">
                      <table border='1' style="width:100%; border-color: black ; border-collapse: collapse; " >
                       <thead style="background-color: #6c757d82">
                         <tr align="center" style="font-size: 13px">
                         <th style="padding:2px; text-ali">Quantity</th>
                        
                         <th  style="">Désignation</th>
                         <th  style="">Price</th>
                        
						 <th  style="">Amount </th>
						 
						 </tr>
						
                        </thead>
                        <tbody  >
						
						 <tr border='1' style="font-size: 12px; font-family: CASTELLAR !important">

                          <td align="right" style="">  

							@foreach($ligne as $lignes)

								   @php 
					 
									 
									 $lq= strlen($lignes->qte);
									 
									 if ($lq == 1){
										 
										 $qte = '0'.$lignes->qte ;
										 
									 }else{
										 
										 $qte = $lignes->qte ;
										 
									 }
					 
					               @endphp
							
								<p> {{$qte}} &nbsp; </p>

							@endforeach

						  </td>
                     

						<td align="left" style="padding:2px; ">  

								@foreach($ligne as $lignes)
								
									@php 
					 
					                $lang = app()->getLocale();
									 
					                $prod = DB::table('produit')
										->select(
											'image_produit',
											"designation_$lang as designation",
											'categorie_id',
											'prix',
										)
										->where('id', $lignes->produit_id)
										->first();
					 
					               @endphp
								
									<p> &nbsp; {{$prod->designation}} </p>

								@endforeach

						  </td>

						<td align="right" style="padding:2px; ">  

								@foreach($ligne as $lignes)
								
									@php 
					 
									 
					                 $prix = ( $lignes->somligne / $lignes->qte ) ;
					 
					               @endphp
								
								
									<p>  {{number_format($prix, 0, ' ', ' ')}} &nbsp;</p>

								@endforeach

						  </td>

					


						<td align="right" style="padding:2px;">  

								@foreach($ligne as $lignes)

									@php 
					 
									 
					                 $to = $lignes->somligne ;
					 
					               @endphp
								
									<p> {{number_format($to, 0, ' ', ' ')}} &nbsp; </p>

								@endforeach

						  </td>
                         </tr>
                      
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>

       
			<div class="row" style="padding-top:0.5px ; padding-bottom: 0px">

				   

				    <div style="float: right; width: 42%; line-height: 0.5em; border: 1px solid; border-top: 0px solid; padding-left:5px; padding-right:10px ; padding-bottom:10px">
				
						<p style="font-size:13px">Total    <b style="float:right; font-size:13px"> {{number_format($mtfac, 0, ' ', ' ')}} USD </b> </p>
						
						<p style="font-size:13px">Pay amount    <b style="float:right; font-size:15px"> {{number_format($mtpy, 0, ' ', ' ')}} USD </b> </p>

						
				     </div>
	
	        </div> 
		
  
	  </div>

			@php
			
			  $today = date('d/m/Y');

			@endphp

			<footer style="position:absolute; bottom:0; width:100%; float:right; font-size:10px">
			
			 
			  <hr>
			 <p style="font-size:10px" >Thank you for your loyalty, see you soon !!! @  E-commerce © Powered By ZEK Corp. </p>

			</footer>
	
 
</body>

</html>



