I am creating a custom invoice which requires me to list already made payments (payment type, payment date, payment amount). There will be multiple payments per invoice which I need to list.
In the invoice I can add the $payments variable which gives me only the following output: Zahlungseingang: 4. March 2024 :: 200,00 € ::
First of all the the type of the payment is not reflected (payment type was bank transfer), then the date format is not the one I have selected in the settings (should be in german, not in englisch since my language is set to german):
Ideally I would like to loop over all payments and access each individual column of the payment like the type, date and amount to style it freely (or put it into a table).
I did not find any documentation how fully utilize the already made payments in my custom invoice. Since all payments are only made via bank transfer I could also write down the information in a static way, but ideally I could use the different fields from the payment.
For me the made payments are available via $payments but I’m not able to access parts of it like the method (which should be possible based on the documentation).
If I understand the documentation correct Payments contains also the method, amount and date - but I cannot access it to generate a custom entry.
I would like to archive something like (sorry for the german) this: 4. März 2024 in der Höhe von 200,00€ mit Überweisung
If I only output the $payments the generated output is completely strange and nothing I can put on the invoice for my customers: Zahlungseingang: 4. March 2024 :: 200,00 € :: Überweisung
Since the only method can be Bank Transfer (Überweisung) the method is not that important but neither can I access .date or .amount directly (please take a look at the screenshot above).
I tried to iterate over the $payment with the following code but its only printing the loop:
{% for item in payments %}
$item.date in der Höhe von $item.amount mit $item.method
{% endfor %}
Not sure if my thinking is wrong or if this simply cannot be archived?
Any input is highly appreciated.
I’m now also running on the latest InvoiceNinja release (5.10.4).