Numer: {{ invoice.invoice_number }}
Numer KSeF: {{ invoice.ksef_number }}
Kontrahent: {{ invoice.contractor_name }}
NIP: {{ invoice.contractor_nip }}
Adres: {{ invoice.contractor_address or '—' }}
Kartoteka klientów: {{ linked_customer.name if linked_customer else 'brak powiązania' }}
Netto: {{ invoice.net_amount|pln }}
VAT: {{ invoice.vat_amount|pln }}
Brutto: {{ invoice.gross_amount|pln }}
Split payment: {{ 'Tak' if invoice.split_payment else 'Nie' }}
Forma płatności: {{ payment_details.payment_form_label or '—' }}
Rachunek bankowy: {{ payment_details.bank_account or (invoice.company.bank_account if invoice.company and invoice.source in ['issued', 'nfz'] else '') or '—' }}
{% if payment_details.bank_name %}
Bank: {{ payment_details.bank_name }}
{% endif %}{% if payment_details.payment_due_date %}
Termin płatności: {{ payment_details.payment_due_date }}
{% endif %}
{% if invoice.source in ['issued', 'nfz'] %}
Status wystawienia: {{ invoice.issued_status_label }}
KSeF: {{ 'Przesłana do KSeF' if invoice.issued_to_ksef_at else 'Nieprzesłana do KSeF' }}
{% endif %}
{% if invoice.source in ['issued', 'nfz'] and not invoice.issued_to_ksef_at %}
Ta faktura nie została jeszcze wysłana do KSeF. Możesz ją edytować i wysłać później.
{% elif invoice.source in ['issued', 'nfz'] and invoice.issued_to_ksef_at %}
Faktura została wysłana do KSeF {{ invoice.issued_to_ksef_at }}. Edycja jest zablokowana.
{% endif %}
{% if invoice.external_metadata and invoice.external_metadata.get('nfz') %}
Moduł NFZ: {{ invoice.external_metadata.get('nfz', {}).get('recipient_branch_name') }} · okres {{ invoice.external_metadata.get('nfz', {}).get('settlement_from') }} - {{ invoice.external_metadata.get('nfz', {}).get('settlement_to') }} · umowa {{ invoice.external_metadata.get('nfz', {}).get('contract_number') }}
{% endif %}
{% for tag in invoice.tags %}{{ tag.name }}{% endfor %}