@extends('layouts.appadmin')

@section('content')
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-12">
          
            <h3 style="color: blue;font-weight: bold;">Dernier mouvement  (sortie)</h3>



    <section class="content">
      <div class="row">
        <div class="col-12">
          <div class="card">
      
          <div class="card-header  bg-info">
          <div class="col-md-6 font-weight-bold"><i class="fas  fa fa-users"></i> Dernier mouvement du stock (sortie)
      </div> 
      </div> 
 





            <!-- /.card-header -->
            <div class="card-body">
            <div class="table-responsive">
            <table id="example" class="table table-bordered display nowrap" cellspacing="0" width="100%">
                <thead>
                <tr>
                <th style="color: blue;font-weight: bold;">Ref</th>
           
                <th style="color: blue;font-weight: bold;">quantité</th>
                <th style="color: blue;font-weight: bold;">mouvement</th>
                <th style="color: blue;font-weight: bold;">date</th>
             
                </tr>
                </thead>
                <tbody>
                    @foreach($stocks as $stock)
                    <tr>
             <td> {{$stock->id}} </td> 

    
             <td class="text-success font-weight-bold">+ {{$stock->qty}} </td> 
             <td class="text-danger font-weight-bold"> {{$stock->mouvement->mouvement}} </td> 

             <td> {{$stock->created_at}} </td> 
            </tr>
             @endforeach
          </tbody>
        </table>
        <div class="d-flex justify-content-center mt-4">
                                                {{ $stocks->links('pagination::bootstrap-4') }}
                                            </div>


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

                </section>
    </div>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  
        @endsection
        <script src="{{asset('dash/plugins/jquery/jquery.min.js')}}"></script>








</body>
</html>