@extends('layouts.provider') @section('title', 'Mouvements - ' . $account->name) @section('page-title', 'Finances > Trésorerie') @section('content')

{{ $account->name }}

@if($account->reference)

Réf.: {{ $account->reference }}

@endif

Solde: {{ number_format($account->current_balance, 3) }} {{ $account->currency }}

@if(!$account->is_active) Inactif @endif
@if($account->notes)

{{ $account->notes }}

@endif
@if(request()->hasAny(['search', 'date_from', 'date_to'])) @endif
@if(request('search')) @endif
@if($movements->count() > 0)
@php $runningBalance = $account->current_balance; @endphp @foreach($movements as $movement) @endforeach
Date de saisie Date d'opération Description Débit ({{ $account->currency }}) Crédit ({{ $account->currency }}) Solde ({{ $account->currency }}) Actions
{{ $movement->created_at->format('d/m/Y H:i') }} {{ $movement->operation_date->format('d/m/Y') }} @if($movement->invoice_payment_id && $movement->payment) {{ $movement->description }} @elseif($movement->related_type === 'App\\Models\\Payment' && $movement->related_id) @php $relatedPayment = \App\Models\Payment::find($movement->related_id); @endphp @if($relatedPayment) {{ $movement->description }} @else {{ $movement->description }} @endif @elseif($movement->expense_payment_id && $movement->expensePayment && $movement->expensePayment->expense) {{ $movement->description }} @else {{ $movement->description ?: ($movement->type === 'depot' ? 'Dépôt' : ($movement->type === 'retrait' ? 'Retrait' : $movement->type)) }} @endif @if($movement->reference && !str_starts_with($movement->reference, 'ANNULATION') && !str_starts_with($movement->reference, 'ANN-') && !str_contains($movement->description, $movement->reference)) ({{ $movement->reference }}) @endif @if($movement->direction === 'sortie' || $movement->direction === 'out') {{ number_format($movement->amount, 3) }} @else - @endif @if($movement->direction === 'entree' || $movement->direction === 'in') {{ number_format($movement->amount, 3) }} @else - @endif {{ number_format($runningBalance, 3) }} @php $runningBalance -= (($movement->direction === 'entree' || $movement->direction === 'in') ? $movement->amount : -$movement->amount); @endphp @if($movement->invoice_payment_id) @php $invoicePayment = $movement->invoicePayment; $canDelete = $invoicePayment && !$invoicePayment->isReversal() && !$invoicePayment->isReversed(); @endphp
@elseif($movement->expense_payment_id) @php $expensePayment = $movement->expensePayment; $canDelete = $expensePayment && !$expensePayment->isCancellation() && !$expensePayment->isReversed(); @endphp
@elseif(!$movement->related_type && !$movement->related_id) @endif
{{ $movements->links() }}
@else

Aucun mouvement

Commencez par créer votre premier mouvement.

@endif
@push('scripts') @endpush @endsection