@extends('layouts.app') @section('title', __('agreements.create_title')) @section('breadcrumbs') @endsection @section('content')
{{-- ═══════════════════════════════════════════════════════════════ BANNER: SALDO DEVEDOR EM EVIDÊNCIA ═══════════════════════════════════════════════════════════════ --}}

{{ __('agreements.create_title') }}

{{ __('agreements.form.outstanding_description') }}
{{ __('agreements.form.outstanding_balance') }}
{{ \App\Helpers\CurrencyConfig::format($totalOutstandingBalance ?? 0) }}
{{ count($receivables ?? []) }} {{ __('agreements.form.overdue_receivables') }}
{{-- ═══════════════════════════════════════════════════════════════ CONTAS ORIGINAIS EM ATRASO (colapsável) ═══════════════════════════════════════════════════════════════ --}} @if(!empty($receivables) && count($receivables) > 0)
{{ __('agreements.form.source_receivables') }} {{ count($receivables) }}
@foreach($receivables as $i => $rec) {{-- Detalhamento da Composição --}} @if(($rec->penalty_amount ?? 0) > 0) @endif @if(($rec->interest_amount ?? 0) > 0) @endif @endforeach
# {{ __('agreements.fields.title') }} {{ __('agreements.fields.due_date') }} {{ __('agreements.fields.amount') }}
{{ $rec->code }} {{ $rec->title }} {{ $rec->due_date?->format('d/m/Y') ?? '---' }} {{ \App\Helpers\CurrencyConfig::format($rec->current_total ?? $rec->total_amount) }}
{{ __('agreements.fields.principal') ?? 'Principal' }} {{ \App\Helpers\CurrencyConfig::format($rec->total_amount) }}
{{ __('agreements.fields.penalty') ?? 'Multa' }} {{ \App\Helpers\CurrencyConfig::format($rec->penalty_amount) }}
{{ __('agreements.fields.interest') ?? 'Juros' }} @if($rec->days_overdue) ({{ $rec->days_overdue }} dias) @endif {{ \App\Helpers\CurrencyConfig::format($rec->interest_amount) }}
Total: {{ \App\Helpers\CurrencyConfig::format($totalOutstandingBalance ?? 0) }}
@endif {{-- ═══════════════════════════════════════════════════════════════ FORMULÁRIO DE NEGOCIAÇÃO ═══════════════════════════════════════════════════════════════ --}}
{{ __('agreements.form.negotiation_params') }}
{{-- IDs das receivables originais (usados pelo JS) --}}
{{-- ENTRADA --}}
{{ \App\Helpers\CurrencyConfig::getConfig()['symbol'] }}
{{-- DESCONTO --}}
{{ \App\Helpers\CurrencyConfig::getConfig()['symbol'] }}
{{-- NÚMERO DE PARCELAS --}}
{{-- JUROS A.M. --}}
%
{{-- DATA 1ª PARCELA --}}
{{-- BOTÃO CALCULAR --}}
{{-- /row --}} {{-- ═══════════════════════════════════════════════════════ RESUMO FINANCEIRO ═══════════════════════════════════════════════════════ --}}
{{ __('agreements.form.outstanding_balance') }}
—
{{ __('agreements.form.down_payment') }}
—
{{ __('agreements.form.remaining_to_finance') }}
—
{{ __('agreements.form.installment_value') }}
—
{{-- ═══════════════════════════════════════════════════════ TABELA DE PARCELAMENTO (padrão payables) ═══════════════════════════════════════════════════════ --}}
{{ __('agreements.form.installments_table') }}
{{-- Linhas geradas via JS --}}
# {{ __('agreements.form.due_date') }} {{ __('agreements.form.installment_value') }} {{ __('agreements.form.interest_value') }} {{ __('agreements.form.principal_value') }}
Total: — — —
{{-- BOTÃO CONFIRMAR --}}
{{ __('common.back') }}
{{-- /summarySection --}}
{{-- /card-body --}}
{{-- /card --}}
{{-- ═══════════════════════════════════════════════════════════════ MODAL: TERMO DE CONFISSÃO DE DÍVIDA ═══════════════════════════════════════════════════════════════ --}} @endsection @section('scripts') @endsection