@extends('layouts.dash') @section('title') Balance @stop @section('title_card') Balance @stop @section('subtitle_card',"") @section('content')
@if (Session::has('message'))
{!! Session::get('message') !!}
@endif @if ($errors) @foreach ($errors->all() as $error)
{!! $error !!}
@endforeach @endif @if (Session::has('success'))
{!! \Session::get('success') !!}
@endif
{!! html()->label('Date de début','date_debut') !!}  
{!! html()->text('date_debut', isset($date_deb)?$date_deb:'01/01/'.date('Y')) ->attributes(['id'=>'date_debut','size'=>'10','placeholder' => 'JJ/MM/AAAA', 'class' => 'form-control']) !!}
{!! html()->label('Date de fin','date_fin') !!}  
{!! html()->text('date_fin', isset($date_fin)?$date_fin:'31/12/'.date('Y')) ->attributes(['id'=>'date_fin','size'=>'10','placeholder' => 'JJ/MM/AAAA', 'class' => 'form-control']) !!}
{!! html()->label('Journal','jnx') !!}   {!! html()->select('jnx')->options($liste_journaux) ->value(isset($jnx)?$jnx:"") ->placeholder('') ->attributes(['id'=>'jnx','class' => 'form-control']) !!}
@php $total_debit=0;$total_credit=0;$solde=0; @endphp @foreach ($t_plan as $key=>$ligne) @php $total_debit+=$ligne['debit']; $total_credit+=$ligne['credit']; $solde=$total_debit-$total_credit; @endphp @endforeach
CompteTri Compte Designation Débit Crédit Solde
{!! str_pad($ligne['compte'],7,'0',STR_PAD_RIGHT) !!} {!! $ligne['compte'] !!} {!! $ligne['compte_libelle'] !!} {!! $ligne['debit'] !!} {!! $ligne['credit'] !!} {!! $ligne['solde'] !!}
{{ $total_debit }} {{ $total_credit }} {{ $total_debit-$total_credit }}
@endsection @section('scripts') @endsection