# Export Invoices

**URL:** <https://community.breww.com/t/export-invoices/1734>\
**Category:** Ideas & feature requests\
**Tags:** idea-completed\
**Created:** [31 October 2022 14:34 UTC](https://community.breww.com/t/export-invoices/1734 "2022-10-31T14:34:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob-rainey](https://community.breww.com/user_avatar/community.breww.com/rob-rainey/32/645_2.png) [@rob-rainey](https://community.breww.com/u/rob-rainey)\
**Post date:** [31 October 2022 14:34 UTC](https://community.breww.com/t/export-invoices/1734/1 "2022-10-31T14:34:20Z")

</div>

Hi

We have been sending some samples of beer out to China and to Hungary. We are quite new to this so it has been a bit of a learning process. We have seen that Breww produces invoices with the required information for exports but they should say Commercial Invoice at the top whereas the Breww version just says Invoice #… I had to go into a pdf editor to add Commercial to it. Could this be changed in Breww so that it shows Commercial Invoice?

Cheers  
Rob

---

<div class="post-metadata">

**Author:** ![jon-kyme](https://community.breww.com/user_avatar/community.breww.com/jon-kyme/32/823_2.png) [@jon-kyme](https://community.breww.com/u/jon-kyme)\
**Post date:** [31 October 2022 14:47 UTC](https://community.breww.com/t/export-invoices/1734/2 "2022-10-31T14:47:48Z")

</div>

I bet you can do this with the (Invoice) document template.  
see  
[https://community.breww.com/t/customising-pdf-invoice-delivery-note-credit-note-templates/374](https://community.breww.com/t/customising-pdf-invoice-delivery-note-credit-note-templates/374)

---

<div class="post-metadata">

**Author:** ![simon-thompson](https://community.breww.com/user_avatar/community.breww.com/simon-thompson/32/1186_2.png) [@simon-thompson](https://community.breww.com/u/simon-thompson)\
**Post date:** [31 October 2022 17:15 UTC](https://community.breww.com/t/export-invoices/1734/3 "2022-10-31T17:15:54Z")

</div>

You certainly can @jon-kyme.

Give us a shout if you have any bespoke templating needs. [Click here for an example](https://drive.google.com/file/d/1mcMaw77tlg3WqINz9mGxZkMdc7DN3iww/view) @rob-rainey.

---

<div class="post-metadata">

**Author:** ![jon-kyme](https://community.breww.com/user_avatar/community.breww.com/jon-kyme/32/823_2.png) [@jon-kyme](https://community.breww.com/u/jon-kyme)\
**Post date:** [1 November 2022 09:27 UTC](https://community.breww.com/t/export-invoices/1734/4 "2022-11-01T09:27:49Z")

</div>

In this instance, I think the tweak required is merely adding the text "Commercial " to this line in the Header HTML

> {{ document\_title }} #{{ document\_number }}

to give you

> Commercial {{ document\_title }} #{{ document\_number }}

You could choose to assign this template to particular customers via customer settings…

Alternatively, I guess you could wrap the “Commercial” in a conditional, maybe

> {% if is\_export and is\_invoice %}Commercial {% endif %}

Anything much more complicated than that, unless you’re confident with these kinds of templating jobs, probably best to find someone who is.

---

<div class="post-metadata">

**Author:** ![luke](https://community.breww.com/user_avatar/community.breww.com/luke/32/3636_2.png) [@luke](https://community.breww.com/u/luke)\
**Post date:** [1 November 2022 16:22 UTC](https://community.breww.com/t/export-invoices/1734/5 "2022-11-01T16:22:43Z")

</div>

Thanks everyone for the suggestions, these would work really well 👍

Fortunately, it’s a simple tweak on our side to swap out the `{{ document_title }}` variable for “Commercial Invoice” in the case that the document is an invoice and is an export.

We feel that this change will likely be beneficial to everyone, so we’re going to make this change within Breww. If for some reason, you don’t want this change, you can revert this in your own templates with something like:

Swap:

```twig
{{ document_title }} #{{ document_number }}

```

For:

```twig
{{ document_title.replace("Commercial", "") }} #{{ document_number }}

```

Cheers

---

<div class="post-metadata">

**Author:** ![luke](https://community.breww.com/user_avatar/community.breww.com/luke/32/3636_2.png) [@luke](https://community.breww.com/u/luke)\
**Post date:** [6 November 2022 16:23 UTC](https://community.breww.com/t/export-invoices/1734/6 "2022-11-06T16:23:42Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
