Reorder summary columns and calculate amount from volume * avg_price

Summary now shows: Produkt | Volym (L) | Snittpris/L | Belopp
Amount is calculated as volume * average_price instead of summing transactions.
This commit is contained in:
2026-03-23 16:16:54 +01:00
parent 611a471bf1
commit 03f643ba82
2 changed files with 11 additions and 10 deletions

View File

@@ -152,8 +152,8 @@
<tr>
<th>Produkt</th>
<th>Volym (L)</th>
<th>Belopp</th>
<th>Snittpris/L</th>
<th>Belopp</th>
</tr>
</thead>
<tbody>
@@ -161,15 +161,15 @@
<tr>
<td>{{ product.name }}</td>
<td>{{ product.volume }}</td>
<td>{{ product.amount }} Kr</td>
<td>{{ product.avg_price }} Kr</td>
<td>{{ product.amount }} Kr</td>
</tr>
{% endfor %}
<tr class="grand-total-row">
<td>Totalt</td>
<td>{{ customer.summary.total_volume }}</td>
<td>{{ customer.summary.grand_total }} Kr</td>
<td></td>
<td>{{ customer.summary.grand_total }} Kr</td>
</tr>
</tbody>
</table>