{{-- Porte de views/billing/payment_form.php do aurios-ops original. --}} @extends('layout') @section('content') @php $editing = is_array($payment) ? isset($payment['id']) : $payment !== null; $paymentId = is_array($payment) ? ($payment['id'] ?? null) : ($payment->id ?? null); $action = $paymentAction ?? ($editing ? 'financeiro/cobrancas/'.$paymentId : 'financeiro/cobrancas'); $cancelAction = $paymentCancelAction ?? ('financeiro/cobrancas/'.$paymentId); $cancelMethod = $paymentCancelMethod ?? 'DELETE'; $clientId = old('client_id', field_raw_value($payment, 'client_id', '')); $systemId = field_raw_value($payment, 'system_id', ''); $projectId = field_raw_value($payment, 'project_id', ''); $contextValue = old('context_id', $projectId !== '' ? 'project:'.$projectId : ($systemId !== '' ? 'system:'.$systemId : '')); $rawValue = is_array($payment) ? ($payment['value'] ?? $payment['amount'] ?? null) : ($payment->value ?? $payment->amount ?? null); $value = old('value', $rawValue ? number_format((float) $rawValue, 2, ',', '.') : ''); $invoiceUrl = is_array($payment) ? ($payment['invoice_url'] ?? $payment['payment_url'] ?? null) : ($payment->invoice_url ?? $payment->payment_url ?? null); $status = is_array($payment) ? ($payment['status'] ?? '') : ($payment->status ?? ''); $isEfiPayment = (is_array($payment) ? ($payment['provider'] ?? null) : ($payment->provider ?? null)) === 'efi'; @endphp
@include('partials.context-back')

{{ $title }}

Escolha onde gerar a cobrança; a pendência também será registrada em contas a receber.

@csrf @if ($editing) @method('PUT') @endif @unless ($editing)
Asaas e PagBank usam checkout hospedado. A Efí oferece link hospedado para boleto/cartão e Pix com código copia e cola.
@endunless
O pagamento extraordinário ficará associado ao contexto escolhido.
@if ($editing) @endif {!! field_error('client_id') !!}
{!! field_error('value') !!}
{!! field_error('due_date') !!}
{!! field_error('description') !!}
@if ($editing && $invoiceUrl)
info Link hospedado: abrir cobrança
@endif @if ($editing && $isEfiPayment && (($payment->provider_data['pix_copy_paste'] ?? '') !== ''))
Código fornecido pela Efí. A confirmação de pagamento chega pelo webhook Pix autenticado.
@endif
Cancelar
@if ($editing && ! in_array(strtolower((string) $status), ['deleted', 'partially_refunded', 'refunded', 'canceled', 'cancelled'], true))
@csrf @method($cancelMethod)
@endif @endsection