Hello! I am working on a Refund Template using Order Printer. I have the date in which the order was made (Bestelldatum) and want to display a different date for when the refund is made. I cannot figure out how to this in the code. Can someone please help?
For the order date (the date in which the order was made) I am using:
Bestelldatum{{ processed_at | date: "%d.%m.%Y" }}
If the customer sends the order back and a refund is made, I need to display the date in which the refund was applied (Gutschrift Datum).
Attached is a screenshot of what it looks like at the moment.
I cannot find the right Variable for that. I would appreciate help ASAP as this is for a client who needs it urgently for taxing purposes. Thanks so much!
@peterloane sorry for the late reply. Here is the code I used for the refund date âGutschrift Datumâ:
- Gutschrift-Nr.
{% for transaction in refund_transactions %}
GS{{ order_number }}-1000
{% endfor %}
- Gutschrift Datum
{% for transaction in refund_transactions %}
{{ transaction.date | date: "%d.%m.%Y" }}
{% endfor %}
- Bestelldatum
{{ processed_at | date: "%d.%m.%Y" }}
I now have a different challenge, maybe you can help me? For the âGutschrift-Nr.â (Refund Nr.) I want to display a string with the number 1000 that always increases. This is for taxing purposes. For example the first refund would have the number GS{{ order_number }}-1000, the second refund GS{{ order_number }}-1001, the third GS{{ order_number }}-1002 and so on. I donât know how to do this in a way that catches all the refunds in the system and creates this linear sequence of increasing numbers. Any ideas? Thanks so much!
@peterloane thank you so much for getting back to me! The thing is I need that the refund receipts have a progressing number. This is for taxing purposes. So the first receipt need to have the order number and then â1000â, the second one again the order number and â1001â, the third one order number â1002â, and so on. The code you provided is very cool but all my receipts would end up having the same number at the end which is not what I am looking for. Do you have any other ideas? I checked the documentation but havenât found anything so far⌠I greatly appreciate your time and help!
@peterloane Also doesnât work⌠I asked someone else and they told me this is not possible with Shopify Apps, since there is no way of tracking the number of refunds and calling them in the code in this way. If you think otherwise please let me know! Thanks so much