@extends('layout')
@section('title','Fiche  ')
@section('description','Fiche resto')
@section('content')
			<br/>
          <div class="section-body">
		  <br/>
			<div class="row">
              <div class="col-12">
                <div class="card">
                  <div class="card-header">
                    <h4>Fiche</h4>
                  </div>
                  <div class="card-body">
                    <div class="table-responsive">
                      <table class="table table-striped" id="table-1">
                        <thead>
                          <tr>
							<th style="text-align:center;">N°</th>
							<th style="text-align:center;">Date</th>
							<th style="text-align:center;">Produit</th>
							<th style="text-align:center;">Nbre/Morceaux/Passe</th>
							<th style="text-align:center;">En stock avant</th>
							<th style="text-align:center;">En stock après</th>
						</tr>
                        </thead>
                        <tbody>
						@foreach($fiche as $fiches)
						<tr>
							<td>
							{{$loop->iteration}}
							</td>
							@php
                                $dd = implode('/', array_reverse(explode('-', $fiches->date)));
								
                              @endphp
							<td>
							{{$dd}}
							</td>
							<td>
							{{ DB::table('produit_vendable')->where('id', $fiches->produit_id)->first()->designation }}
							</td>
							<td style="text-align:center;font-size:17px;">
							   {{$fiches->nbre}}
							</td>
							<td style="text-align:center;font-size:17px;">
							   {{$fiches->en_stock}}
							</td>
							<td style="text-align:center;font-size:17px;">
							   {{$fiches->apres}}
							</td>
						</tr>
						@endforeach
						</tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>

@endsection