@php
// Construction du titre dynamique
$titleParts = [];
// Période
if ($from && $to) {
$titleParts[] = 'du ' . \Carbon\Carbon::parse($from)->format('d/m/Y') . ' au ' . \Carbon\Carbon::parse($to)->format('d/m/Y');
} elseif ($from) {
$titleParts[] = 'à partir du ' . \Carbon\Carbon::parse($from)->format('d/m/Y');
} elseif ($to) {
$titleParts[] = 'jusqu\'au ' . \Carbon\Carbon::parse($to)->format('d/m/Y');
} else {
$titleParts[] = 'toutes périodes';
}
// Type d'opération
if (request('type')) {
$type = request('type');
if ($type === 'entrée') {
$titleParts[] = 'entrées';
} elseif ($type === 'sortie') {
$titleParts[] = 'sorties';
}
} else {
$titleParts[] = 'entrées et sorties';
}
// Agence
if ($isSuperAdmin && request('agence_id')) {
$agence = \App\Models\Agency::find(request('agence_id'));
if ($agence) {
$titleParts[] = 'de l\'agence "' . $agence->name . '"';
}
} elseif ($isSuperAdmin) {
$titleParts[] = 'de toutes les agences';
} else {
$titleParts[] = 'de l\'agence "' . (auth()->user()->agencie->name ?? '') . '"';
}
$dynamicTitle = 'Rapport des opérations de caisse (' . implode(', ', $titleParts) . ')';
@endphp
Généré le {{ now()->format('d/m/Y à H:i') }}
| N° | @if(in_array('operation_date', $columns))Date | @endif @if(in_array('type', $columns))Type | @endif @if(in_array('amount', $columns))Montant | @endif @if(in_array('uuid', $columns))Identifiant | @endif @if(in_array('external_reference', $columns))Référence | @endif @if($isSuperAdmin && in_array('agency', $columns))Agence | @endif @if(in_array('reason', $columns))Motif | @endif @if(in_array('added_by', $columns))Caissier | @endif @if(in_array('date_added', $columns))Date ajout | @endif @if(in_array('exported_by', $columns))Exporté par | @endif @if(in_array('date_export', $columns))Date export | @endif @if(in_array('is_exported_to_comptability', $columns))Exporté | @endif
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $orderNumber }} | @if(in_array('operation_date', $columns)){{ $op->operation_date ? $op->operation_date->format('d/m/Y H:i') : 'N/A' }} | @endif @if(in_array('type', $columns)){{ ucfirst($op->type) }} | @endif @if(in_array('amount', $columns)){{ number_format($op->amount, 0, ',', ' ') }} F | @endif @if(in_array('uuid', $columns)){{ $op->uuid ?? 'N/A' }} | @endif @if(in_array('external_reference', $columns)){{ $op->external_reference ?? 'N/A' }} | @endif @if($isSuperAdmin && in_array('agency', $columns)){{ $op->agencie->name ?? 'N/A' }} | @endif @if(in_array('reason', $columns)){{ Str::limit($op->reason, 20) ?? 'N/A' }} | @endif @if(in_array('added_by', $columns)){{ $addAction && $addAction->user ? $addAction->user->first_name . ' ' . $addAction->user->last_name : 'N/A' }} | @endif @if(in_array('date_added', $columns)){{ $addAction ? $addAction->created_at->format('d/m/Y H:i') : 'N/A' }} | @endif @if(in_array('exported_by', $columns)){{ $exportAction && $exportAction->user ? $exportAction->user->first_name . ' ' . $exportAction->user->last_name : 'N/A' }} | @endif @if(in_array('date_export', $columns)){{ $exportAction ? $exportAction->created_at->format('d/m/Y H:i') : 'N/A' }} | @endif @if(in_array('is_exported_to_comptability', $columns)){{ $op->is_exported_to_comptability ? 'Oui' : 'Non' }} | @endif
Aucune opération trouvée pour les critères sélectionnés.