@extends('layouts.app') @section('content')
Régularisation des opérations
Réf : {{$journal->id_journal}}
Date : {{(new DateTime($journal->date_oper))->format(config('myahs.date_format'))}}
@csrf
@if(count($errors->all())) {{implode(', ',str_replace('.','',$errors->all()))}} @endif
@php $numCompte = !empty($rowEdit->numCompte) ? $rowEdit->numCompte : '' @endphp
@php $codeAnal = !empty($rowEdit->numCompte) ? $rowEdit->codeAnal : '' @endphp
@php $libelle = !empty($rowEdit->numCompte) ? $rowEdit->libelle : '' @endphp
@php $montant = !empty($rowEdit->numCompte) ? $rowEdit->debit + $rowEdit->credit : '' @endphp
@php $sumDebit = 0; $sumCredit = 0; $i = 0; @endphp @if(count($operations)>0) @foreach ($operations as $id=>$operation) @php $i++; $sumDebit += $operation->debit; $sumCredit += $operation->credit; @endphp @php $libelle_compte = key_exists($operation->numCompte, $plans)?$plans[$operation->numCompte]:'' @endphp @php $libelle_analytique = key_exists($operation->codeAnal, $codes)?$codes[$operation->codeAnal]:'' @endphp @endforeach @if($sumDebit != $sumCredit) @endif @else @endif
# N° Compte Libellé compte Code Libellé Débit Crédit
{{$i}} {{$operation->numCompte}}{{substr($libelle_compte,0,30)}}{{$operation->codeAnal}} {{substr($operation->libelle,0,40)}} {{App\Lib\Format::number($operation->debit)}} {{App\Lib\Format::number($operation->credit)}}
TOTAL {{App\Lib\Format::number($sumDebit)}} {{App\Lib\Format::number($sumCredit)}}
ECART @if($sumDebit < $sumCredit) {{App\Lib\Format::number(abs($sumDebit - $sumCredit))}} @endif @if($sumDebit > $sumCredit) {{App\Lib\Format::number(abs($sumDebit - $sumCredit))}} @endif
Aucun compte n'a été sélectionné
@if($sumDebit == $sumCredit && count($operations) > 0)
@endif
@csrf
Régularisation Voulez-vous réellement enregister ces écritures comptables ? @endsection @section('script') @endsection