@extends('layout')
@section('title','Détails approvisionnement matiere')
@section('content')


<div class="section-header">
            <h1>Détails approvisionnement matiere</h1>
            <div class="section-header-breadcrumb">
              <div class="breadcrumb-item active"><a href="#">Détails approvisionnement matiere</a></div>
              <div class="breadcrumb-item"><a href="#">Détails</a></div>
            </div>
          </div>
        
		  
		  
		  <div class="section-body">
            <div class="row">
              <div class="col-12">
                <div class="card">
                  <div class="card-header">
                    <h4>Détails</h4>
                  </div>
                  <div class="card-body">
                    <div class="table-responsive">
                      <table class="table table-striped" id="table-1">
                        <thead>
                          <tr>
                            <th class="text-center"> N° </th>
                            <th class="text-center">matiere</th>
                            <th class="text-center">Nbre de sac/coli </th>
                            <th class="text-center">Contenu </th>
                            <th class="text-center">Qté total </th>
							<th class="text-center">PU par sac/coli </th>
							<th class="text-center">Montant total </th>
                          </tr>
                        </thead>
                        <tbody>
						 @foreach($detail as $details)
						 @php
						 
						 @endphp
                          <tr>
                            <td class="text-center">{{$loop->iteration}}</td>
                            <td class="text-center"> {{ DB::table('matiere')->where('id', $details->matiere_id)->first()->designation }}</td>
							 
                            <td class="text-center"> {{$details->nbre_coli}}</td>
                            <td class="text-center"> {{$details->contenu}}</td>
                            <td class="text-center"> {{$details->qte}}</td>
							 @php
                            	
								$mtl = $details->montligne;
                                $mtl1 =  number_format($mtl, 0, ' ', ' ');
								
								$mp = $details->pa;
                                $mp1 =  number_format($mp, 0, ' ', ' ');
								
                              @endphp
							 <td class="text-center"> {{$mp1}} FCFA</td>
							  <td class="text-center"> {{$mtl1}} FCFA</td>
                          </tr>
                      @endforeach
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
           
           
          </div>
		  
		  
	   @push('scripts') 
	   
	  
@endpush

@endsection