{% extends "base.html" %} {% block contenido %} {% import "macros.html" as macros %} {% if TESTING %}
{% endif %} {% set status_value = _('Borrador') %} {% set status_badge = 'bg-secondary' %} {% if registro.docstatus == 1 %} {% set status_value = _('Aprobado') %} {% set status_badge = 'bg-success' %} {% elif registro.docstatus == 2 %} {% set status_value = _('Anulado') %} {% set status_badge = 'bg-dark' %} {% endif %} {% set payment_amount = registro.received_amount if registro.payment_type == 'receive' else registro.paid_amount %} {% set payment_label = _('Recibir') if registro.payment_type == 'receive' else _('Pagar') %} {% set payment_actions %} {{ macros.workflow_buttons( registro.docstatus, url_for('bancos.bancos_pago_submit', payment_id=registro.id), url_for('bancos.bancos_pago_cancel', payment_id=registro.id), _('Aprobar'), _('Anular')) }} {{ macros.detail_nav_buttons( url_for('bancos.bancos_pago_lista'), url_for('bancos.bancos_pago_nuevo')) }} {% endset %}
{{ registro.document_no or registro.id }} {{ status_value }}
{{ _('Registro de Pago') }} · {{ payment_label }}
{{ payment_actions }}

{{ registro.company or '-' }}

{{ registro.posting_date or '-' }}

{{ payment_label }}

{{ registro.mode_of_payment or '-' }}

{{ registro.naming_series_id or '-' }}

{{ status_value }}

{{ banco.account_name if banco else (registro.bank_account_id or '-') }}

{{ registro.currency or (banco.currency if banco else '-') }}

{{ registro.currency or '' }} {{ "{:,.2f}".format(payment_amount or 0) }}

{{ _('Gestionado por backend/libros activos') }}

{{ registro.party_name or registro.party_id or '-' }}

{{ creador.nickname if creador else '-' }}

{{ _('Datos bancarios') }}
{{ _('Referencia') }}

{{ registro.reference_no or '-' }}

{{ _('Fecha de referencia') }}

{{ registro.reference_date or '-' }}

{% if registro.mode_of_payment == 'check' %}
{{ _('Contador externo') }}

{{ registro.external_counter_id or '-' }}

{{ _('Número de cheque') }}

{{ registro.external_number or '-' }}

{% endif %}
{{ _('Observaciones') }}

{{ registro.remarks or '-' }}

{% if referencias %}
{{ _('Referencias del Pago') }}
{{ _('Documentos aplicados o trazados por este pago') }}
{% for ref in referencias %} {% endfor %}
{{ _('Referencias del Pago') }}
{{ _('No.') }} {{ _('Tipo') }} {{ _('Documento') }} {{ _('Fecha') }} {{ _('Tercero') }} {{ _('Total') }} {{ _('Saldo previo') }} {{ _('Aplicado') }} {{ _('Saldo posterior') }}
{{ loop.index }} {{ ref.flow_source_type or ref.reference_type }} {{ ref.reference_document_no or ref.reference_id }} {{ ref.reference_date or ref.allocation_date or '-' }} {{ ref.party_id or '-' }} {{ ref.currency or registro.currency or '' }} {{ "{:,.2f}".format(ref.total_amount or 0) }} {{ ref.currency or registro.currency or '' }} {{ "{:,.2f}".format(ref.outstanding_amount or 0) }} {{ ref.currency or registro.currency or '' }} {{ "{:,.2f}".format(ref.allocated_amount or 0) }} {{ ref.currency or registro.currency or '' }} {{ "{:,.2f}".format(ref.outstanding_amount_after or 0) }}
{{ _('Total aplicado') }} {{ registro.currency or '' }} {{ "{:,.2f}".format(referencias | sum(attribute='allocated_amount')) }}
{% endif %} {% if lineas_gl %}
{{ _('Asientos Contables') }}
{{ _('Entradas GL generadas por el pago') }}
{% for gl in lineas_gl %} {% endfor %}
{{ _('Asientos Contables') }}
{{ _('Libro') }} {{ _('Cuenta') }} {{ _('Tercero') }} {{ _('Débito') }} {{ _('Crédito') }} {{ _('Notas') }}
{{ gl.ledger_id or '-' }} {{ gl.account_id }} {{ gl.party_id or '-' }} {{ gl.company_currency or registro.currency or '' }} {{ "{:,.2f}".format(gl.debit or 0) }} {{ gl.company_currency or registro.currency or '' }} {{ "{:,.2f}".format(gl.credit or 0) }} {{ gl.remarks or '' }}
{% endif %} {{ macros.document_flow_tree("payment_entry", registro) }} {{ macros.audit_timeline(audit_timeline) }} {{ macros.document_collaboration_panel("payment_entry", registro) }} {% endblock %}