Fix some issues in report docs. (#5918)

Ref: https://github.com/inventree/InvenTree/issues/5893
This commit is contained in:
Oliver 2023-11-15 10:42:57 +11:00 committed by GitHub
parent fe0d9c1923
commit 2234357e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ In addition to the default report context variables, the following variables are
#### Lines #### Lines
Each line item have sub variables, as follows: Each line item (available within the `lines` list) has sub variables, as follows:
| Variable | Description | | Variable | Description |
| --- | --- | | --- | --- |
@ -45,11 +45,13 @@ Each line item have sub variables, as follows:
| total_line_price | The total price for this line item, calculated from the unit price and quantity | | total_line_price | The total price for this line item, calculated from the unit price and quantity |
| destination | The stock location where the part will be stored | | destination | The stock location where the part will be stored |
A simple example below shows how to use the context variables for line items: A simple example below shows how to use the context variables for each line item:
```html ```html
{% raw %} {% raw %}
{% for line in order.lines %} {% for line in lines %}
Internal Part: {{ line.part.part.name }} - <i>{{ line.part.part.description }}</i>
SKU: {{ line.part.SKU }}
Price: {% render_currency line.total_line_price %} Price: {% render_currency line.total_line_price %}
{% endfor %} {% endfor %}
{% endraw %} {% endraw %}