Themes in receipts


Help needed with liquid in themes.
I am printing Receipts with custom themes when the money comes in (receipts uploaded from bank statement). The printing form basically looks like invoice, but it’s receipt.

Sometimes we have the payer in our system as a customer, sometimes we don’t, if the payment is one-time thing, we don’t want to create Customer for this company, so we created a custom field in the receipt with the payer’s address.

I have the following code:

{{ "Bill To" }}
{% comment %}
{{ custom_fields["Full Name"] }}
Address: {{ recipient.address | newline_to_br }}
{% endcomment %}
{{ }}
Address: {{ custom_fields["Address:"] | newline_to_br] }}

The structure that I put into the comment is for the case when I have this payer as customer, the other structure - when I don’t.

I need to write some conditions like: if the recipient is a customer do this, else do that.

I need help with the syntax how to write it in liquid. Please help. I am not a programmer or IT-worker, just an accountant :blush:

Thanks in advance!

You can create a single customer name like Walk-in Customer and issue sales invoices to them. The advantage is that you can use the available themes to your choice and it also provides better reporting when using sales invoices.

I’m not sure this particular piece of information is available in themes. But why not keep the address going for everyone?


Does this work? It looks like it shouldn’t.