@extends('layouts.enterprise') @section('title', 'Ver movimientos') @section('content') @php $isAccountant = request()->routeIs('accountant.*'); $indexRoute = $isAccountant ? route('accountant.incomes.index') : route('admin.incomes.index'); $linkRouteName = $isAccountant ? 'accountant.incomes.link' : 'admin.incomes.link'; $notLinkableRouteName = $isAccountant ? 'accountant.incomes.not_linkable' : 'admin.incomes.not_linkable'; $clientRouteName = $isAccountant ? 'accountant.incomes.client' : 'admin.incomes.client'; $classificationRouteName = $isAccountant ? 'accountant.incomes.classification' : 'admin.incomes.classification'; $classificationOptions = $classificationOptions ?? \App\Models\FinancialMovement::classificationOptions(); $taxDetailOptions = $taxDetailOptions ?? \App\Models\FinancialMovement::taxDetailOptions(); $defaultClassification = 'all'; $hasActiveFilters = (($filters['q'] ?? '') !== '') || (($filters['type'] ?? 'all') !== 'all') || (($filters['linked'] ?? 'all') !== 'all') || (($filters['classification'] ?? $defaultClassification) !== $defaultClassification) || (($filters['request_id'] ?? null) !== null) || (($filters['client_id'] ?? null) !== null) || (($filters['request_q'] ?? '') !== '') || !empty($filters['date_from'] ?? null) || !empty($filters['date_to'] ?? null); $freeGeneratedInvoices = collect($generatedInvoiceCatalog ?? [])->filter(function ($entry) { return !($entry['is_linked'] ?? false); }); $freeGeneratedInvoicesByAmount = $freeGeneratedInvoices->groupBy(function ($entry) { return number_format((float) ($entry['total'] ?? 0), 2, '.', ''); }); $classificationBadgeClassMap = [ \App\Models\FinancialMovement::CLASSIFICATION_NORMAL => 'badge-normal', \App\Models\FinancialMovement::CLASSIFICATION_PROVIDER_REQUESTS => 'badge-provider', \App\Models\FinancialMovement::CLASSIFICATION_TAXES => 'badge-taxes', \App\Models\FinancialMovement::CLASSIFICATION_PAYROLL => 'badge-payroll', \App\Models\FinancialMovement::CLASSIFICATION_BANK => 'badge-bank', \App\Models\FinancialMovement::CLASSIFICATION_OTHERS => 'badge-other', \App\Models\FinancialMovement::CLASSIFICATION_NOT_LINKABLE => 'badge-not-linkable', ]; @endphp
Ingresos relacionados con prefacturas y egresos relacionados con solicitudes.
@if(session('ok'))
Filtros
@if($hasActiveFilters)
Activos
@endif
| Fecha | Tipo | Concepto | Depositos | Retiros | Cod. Trans. | Cliente | Proyecto / JN / RC | Relacion y categoria |
|---|---|---|---|---|---|---|---|---|
| {{ $movement->movement_date?->format('Y-m-d') }} | {{ $isIncome ? 'Ingreso' : 'Egreso' }} | {{ $movement->concept }} | {{ $isIncome ? '$'.number_format((float) $movement->amount, 2) : '-' }} | {{ !$isIncome ? '$'.number_format((float) $movement->amount, 2) : '-' }} | {{ $movement->transaction_code ?: '-' }} |
@if($movement->client)
{{ $movement->client->name }}
@if($movement->client->rfc)
{{ $movement->client->rfc }}
@endif
@else
-
@endif
|
@if($linkedRequest)
{{ $linkedRequest->project_name ?: 'Sin PROJECT NAME' }}
JN: {{ $linkedRequest->title ?: '-' }}
RC: {{ $linkedRequest->rc_list ?: '-' }}
@elseif($isNotLinkable)
No relacionable (ID 0)
@else
Sin relacionar
@endif
|
@if(!$isLockedLink)
@if($isIncome)
@if($matchingGeneratedInvoices->isEmpty())
No hay prefacturas libres con monto exacto para este ingreso.
@else
Solo se muestran prefacturas con el mismo monto del ingreso.
@endif
@else
|
| Sin movimientos cargados todavia. | ||||||||