How to print a commerce_invoice custom field in invoice pdf

Created on 4 October 2023, 9 months ago
Updated 9 October 2023, 9 months ago

Problem/Motivation

Hi. In commerce_invoice I created a custom field for an invoice number with machine name 'field_numero_de_factura' and every time I generate a new invoice, I can manually enter the invoice number. The invoice number is shown correctly in /admin/commerce/orders/%/invoices . All this is working fine.

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|field_value }} or {{ content.invoice_entity.field_numero_de_factura|field_value }} 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

Documentation

Created by

πŸ‡ͺπŸ‡ΈSpain henkpotman

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

Comments & Activities

Production build 0.69.0 2024