@extends('layout')
@section('title','Journal de caisse dépense ')
@section('description','Journal de caisse dépense')
@section('content')
			<br/>
          <div class="section-body">
		  <div class="row">
              <div class="col-12">
			  @if (session('status'))
            <div class="alert alert-warning" style="font-size: 15px; background-color: #328039; color: white">
                <i class="fa fa-check"></i> &nbsp; {{ session('status') }}
            </div>
        @endif

        @if (session('error'))
            <div class="alert alert-danger" style="font-size: 15px; background-color: #fb5757; color: white">
                <i class="ti-na"></i> {{ session('error') }}
            </div>
        @endif
        @if ($errors->any())
            <div class="alert alert-danger" style="font-size: 15px; background-color: #fb5757; color: white" >
                <ul>
                    @foreach ($errors->all() as $error)
                        <li> <i class="ti-na"></i> {{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif
			  </div>
		  </div>
			<div class="row">
              <div class="col-12">
                <div class="card">
                  <div class="card-header">
                    <h4>Journal de caisse dépense (APPRO/PAIEMENTS FOURNISSEUR)</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;">Nature</th>
							<th style="text-align:center;">Montant</th>
							<th style="text-align:center;">Note</th>
                          </tr>
                        </thead>
                        <tbody>
						@foreach($solde as $soldes)
						<tr>
						@php
							$dd = $soldes->date;
							$dd= explode('-', $dd);
							$dd= array_reverse($dd);
							$dd= implode('/', $dd);
							@endphp
							<td>{{$soldes->id}}</td>
							<td>{{$dd}}</td>
							<td>{{$soldes->nature}}</td>
							
							<td style="text-align:center;font-size:12px;">
							@php
							$lh = $soldes->montant;
							$lh1 =  number_format($lh, 0, ' ', ' ');
							echo $lh1."&nbsp;F";
							@endphp
							</td>
							
							<td style="text-align:center;font-size:12px;">
							{{$soldes->note}}
							</td>
						</tr>
						@endforeach
						</tbody>
						</table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
		
@endsection