From 37a75fdc1a56b4a58651576ad4d466d6476f144e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan=20Burak=20Yakar?= Date: Wed, 29 Oct 2025 10:46:27 +0300 Subject: [PATCH] Added VAT number to invoice PDFs (#2978) * Added VAT number to invoice PDFs * Update src/modules/Invoice/pdf_template/default-pdf.twig Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/modules/Invoice/Service.php | 2 ++ src/modules/Invoice/pdf_template/default-pdf.twig | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/Invoice/Service.php b/src/modules/Invoice/Service.php index 703f91181..4bd7986c0 100644 --- a/src/modules/Invoice/Service.php +++ b/src/modules/Invoice/Service.php @@ -1580,6 +1580,7 @@ class Service implements InjectionAwareInterface 'Address 3' => $invoice['seller']['address_3'], 'Phone' => $invoice['seller']['phone'], 'Email' => $invoice['seller']['email'], + 'VAT Number' => $invoice['seller']['company_vat'], ]; foreach ($sourceData as $label => $data) { @@ -1604,6 +1605,7 @@ class Service implements InjectionAwareInterface 'Zip' => $invoice['buyer']['zip'], 'Country' => $invoice['buyer']['country'], 'Phone' => $invoice['buyer']['phone'], + 'VAT Number' => $invoice['buyer']['company_vat'], ]; foreach ($sourceData as $label => $data) { diff --git a/src/modules/Invoice/pdf_template/default-pdf.twig b/src/modules/Invoice/pdf_template/default-pdf.twig index 02692b804..7e808395e 100644 --- a/src/modules/Invoice/pdf_template/default-pdf.twig +++ b/src/modules/Invoice/pdf_template/default-pdf.twig @@ -39,6 +39,7 @@ {% for key, value in seller %} {% if key == 'Name' %}{% endif %} {% if key == 'Phone' %} {{ 'Phone'|trans }} :{% endif %} + {% if key == 'VAT Number' %} {{ 'VAT Number'|trans }} :{% endif %} {{ value }}
{% if key == 'Name' %}
{% endif %} {% endfor %} @@ -50,7 +51,8 @@

{% for key, value in buyer %} {% if key == 'Company' %}{% endif %} - {% if key == 'Phone '%} {{ 'Phone'|trans }} :{% endif %} + {% if key == 'Phone' %} {{ 'Phone'|trans }} :{% endif %} + {% if key == 'VAT Number' %} {{ 'VAT Number'|trans }} :{% endif %} {{ value }}
{% if key == 'Company' %}
{% endif %} {% endfor %}