{% extends "base.html" %} {% from "_macros.html" import terms_field, project_field with context %} {% block title %}{{ t(info.label) }}{% endblock %} {% block scripts %}{% endblock %} {% block content %} {% set cur_branch = (inv.branch_id if inv else default_branch)|string %} {% set list_title = {'out_invoice': 'Customer Invoices', 'out_refund': 'Credit Notes', 'in_invoice': 'Vendor Bills', 'in_refund': 'Vendor Refunds'}[kind] %}
{{ t(list_title) }}

{{ (inv.number if inv and inv.number else none) or t('New ' ~ info.label) }}

{% set cur_type = (inv.invoice_type if inv and inv.invoice_type else (itype_pre or 'standard')) %} {% if kind == 'out_invoice' and cur_type in ('standard', 'simplified', 'advance', 'proforma', 'debit_note') %}
{% for k, lbl in invoice_types %}{% endfor %}
{% endif %}
{% if kind.startswith('in_') %}
{{ t('The same vendor number cannot be booked twice for this vendor.') }}
{% else %}
{% endif %} {{ project_field(projects, inv.project_id if inv else project_pre, t('Income and expense lines without a cost centre go to the project.')) }}
{% include "invoices/_lines.html" %}
{{ terms_field('invoice' if kind.startswith('out_') else 'bill', inv.terms if inv else '', not (inv and inv.id)) }}
{{ t('Cancel') }}
{% endblock %}