.txt
format.
Template code
Code breakdown
**
Generation Date: {% date_time "dd/MM/YYYY HH:mm" %}
**
Renders the current date and time when the template is processed.
- Uses the format
dd/MM/YYYY HH:mm
(e.g.,26/05/2025 11:45
).
Ledger Name: {{ midaz_onboarding.ledger.0.name }}
**
Displays the name of the ledger associated with this report.
midaz_onboarding.ledger
is a list, and[0]
selects the first ledger..name
fetches the name property, like"Corporate Ledger"
.
{% for transaction in midaz_transaction.transaction %}
**
This loop iterates over each transaction in the midaz_transaction.transaction
list. For every transaction, the code below will run once to display its information.
Transaction header block
Each transaction prints the following details:transaction.id
: Unique ID of the transaction.transaction.created_at
: Timestamp when the transaction was created.transaction.amount
: The raw amount of the transaction.transaction.status
: Current status such asCOMPLETED
,PENDING
, orFAILED
.
Source accounts section
- Filters the operations list to include only operations linked to the current transaction.
- Further filters it to only show operations with
type == "DEBIT"
(funds leaving an account). - For each matching debit:
- Displays the account alias.
- Displays the debit amount.
Target accounts section
- Same logic as the debit block, but filters for
type == "CREDIT"
(funds received). - For each matching credit:
- Displays the account alias.
- Displays the credit amount.
Footer text
- Simple text footer that marks the end of the report.
- Indicates that the file was generated automatically, typically for traceability.