{% macro detail_header(document_title, document_type_label, status_value, buttons_html, items, icon) %} {% set status_badge = 'bg-secondary' %} {% set status_label = _('draft') %} {% if status_value == 'submitted' or status_value == 1 %} {% set status_badge = 'bg-success' %} {% set status_label = _('submitted') %} {% elif status_value == 'rejected' %} {% set status_badge = 'bg-danger' %} {% set status_label = _('rejected') %} {% elif status_value == 'cancelled' or status_value == 2 %} {% set status_badge = 'bg-danger' %} {% set status_label = _('cancelled') %} {% endif %}
{{ document_title }} {{ status_label }}
{{ document_type_label }}
{{ buttons_html | safe }}
{% for label, value in items %}

{{ value or '-' }}

{% endfor %}
{% endmacro %} {% macro detail_lines_table(items, title='Productos / Servicios', currency_code='') %}
{{ _(title) }}
{{ _('Seleccione una línea para ver detalle') }}
{% for fila in items %} {% set item = fila[0] %} {% else %} {% endfor %}
{{ _('Líneas del documento') }}
{{ _('No.') }} {{ _('Código') }} {{ _('Descripción') }} {{ _('Unidad de medida') }} {{ _('Cantidad') }} {{ _('Precio / Costo Unitario') }}{% if currency_code %} ({{ currency_code }}){% endif %} {{ _('Precio / Costo Total') }}{% if currency_code %} ({{ currency_code }}){% endif %} {{ _('Acciones') }}
{{ loop.index }} {{ item.item_code|default('', true) or '-' }} {{ item.item_name|default('', true) or '-' }} {{ item.uom|default('', true) or '-' }} {{ format_quantity(item.qty|default(0, true)) }} {{ format_money_with_currency(item.rate|default('', true) or item.basic_rate|default('', true), currency_code) }} {{ format_money_with_currency(item.amount|default(0, true), currency_code) }}
{{ _('Sin líneas registradas.') }}
{{ _('Detalle de línea seleccionada') }}
#-
{{ _('Código') }}

-

{{ _('Descripción') }}

-

{{ _('Unidad de medida') }}

-

{{ _('Cantidad') }}

0

{{ _('Precio / Costo Unitario') }}{% if currency_code %} ({{ currency_code }}){% endif %}

0

{{ _('Precio / Costo Total') }}{% if currency_code %} ({{ currency_code }}){% endif %}

0

{{ _('Bodega') }}

-

{{ _('Cuenta') }}

-

{{ _('Centro de costos') }}

-

{{ _('Unidad de negocio') }}

-

{{ _('Proyecto') }}

-

{{ _('Trazabilidad') }}

- / - / -

{{ _('Observaciones') }}

-

{% endmacro %}