How to show a custom invoice field in the invoice pdf

Created on 3 October 2023, about 1 year ago
Updated 9 October 2023, about 1 year ago

Problem/Motivation

As the automatic invoice number generation is not suitable for us, I created a custom invoice number field with machine name 'field_numero_de_factura' and every time we create a new invoice, we manually enter the invoice number. The invoice number is shown correctly in /admin/commerce/orders/%/invoices

However I can't find out how to print the value of the field_numero_de_factura in the invoice PDF.

I tried things like {{ invoice_entity.field_numero_de_factura }} or {{ node.invoice_entity.field_numero_de_factura.view }} in the commerce-invoice.html.twig template but no success.

Can anyone help me out? I guess more people are struggling with similar matters.

Thanks so much!

💬 Support request
Status

Closed: works as designed

Version

2.0

Component

Miscellaneous

Created by

🇪🇸Spain henkpotman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024