@extends('layout') @section('content') @php $editing = is_array($tx) ? isset($tx['id']) : $tx !== null; $txId = is_array($tx) ? ($tx['id'] ?? null) : $tx->id ?? null; $action = $editing ? '/financeiro/'.$txId : '/financeiro'; $dir = old('direction', field_value($tx, 'direction', 'saida')); $status = old('status', field_value($tx, 'status', 'realizado')); $catId = old('category_id', field_value($tx, 'category_id', '')); $cliId = old('client_id', field_value($tx, 'client_id', '')); $sysId = field_raw_value($tx, 'system_id', ''); $prjId = old('project_id', field_value($tx, 'project_id', '')); $contextValue = old('context_id', $prjId !== '' ? 'project:'.$prjId : ($sysId !== '' ? 'system:'.$sysId : '')); $walletId = old('wallet_id', field_value($tx, 'wallet_id', '')); $paymentMethod = old('payment_method', field_value($tx, 'payment_method', 'nao_informado')); $rawAmount = is_array($tx) ? ($tx['amount'] ?? null) : ($tx->amount ?? null); $amount = old('amount', $rawAmount && (float) $rawAmount > 0 ? number_format((float) $rawAmount, 2, ',', '.') : ''); @endphp
@include('partials.context-back')

{{ $editing ? 'Editar lançamento' : 'Novo lançamento' }}

@if ($editing && ($asaasSeriesSize ?? 0) > 0)
autorenew Esta cobrança pertence a uma assinatura Asaas. Ao salvar categoria, cliente ou vínculo, os demais {{ $asaasSeriesSize - 1 }} lançamento(s) vinculados a ela serão atualizados, e a regra ficará salva para as próximas cobranças.
@endif @if ($editing && !empty($gatewayRecord?->payment_url))
open_in_new Checkout {{ strtoupper($gatewayRecord->provider) }} · {{ $gatewayRecord->status }}. Abrir link do provedor
@endif
@csrf @if ($editing) @method('PUT') @endif
{!! field_error('amount') !!}
{!! field_error('description') !!}
@include('partials.rich-editor', [ 'richEditorId' => 'transaction-notes', 'richEditorName' => 'notes', 'richEditorValue' => field_raw_value($tx, 'notes'), 'richEditorMaxlength' => 4000, 'richEditorPlaceholder' => 'Detalhes, comprovantes e observações do lançamento…', 'richEditorHint' => 'Registre informações complementares sem alterar a descrição principal.', ]) {!! field_error('notes') !!}
Cancelar
@csrf

Nova categoria

A categoria será criada para a direção selecionada e já ficará disponível neste lançamento.

@if ($editing)
@csrf @method('DELETE')
@endif @endsection