Display stock in product info in price table.

This commit is contained in:
Krzysztof Płaczek
2024-11-17 16:38:22 +01:00
parent 48ee68f71a
commit f963dcd4c8
6 changed files with 20 additions and 7 deletions

View File

@@ -32,6 +32,7 @@
<th>price</th>
<th>lowest product price in 30 days</th>
<th colspan='2'>standard price</th>
<th>Stock</th>
</tr>
</thead>
{% for price in product.price %}
@@ -40,6 +41,7 @@
<td>{{ price.lowestProductPrice30Days | format_currency('PLN', {}, 'pl') }}</td>
<td>{{ price.productStandardPrice | format_currency('PLN', {}, 'pl') }}</td>
<td>{{ price.created_at }}</td>
<td>{{ (product.stock | findByCreatedAtDate(price.created_at | slice(0,10))).stock ?? '' }}</td>
</tr>
{% endfor %}
</table>