- commit
- b1b8cb4ae12e9c439a586ea457c5ea516236d540
- parent
- 15b154b0315f05d9b4b093bcbf4842749a762a79
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2025-02-16 13:53
rent: include net amounts
Diffstat
M | myhome.py | 5 | ----- |
M | templates/index.html | 5 | ++++- |
2 files changed, 4 insertions, 6 deletions
diff --git a/myhome.py b/myhome.py
@@ -131,11 +131,6 @@ def ticket_events(context, ticket): 131 131 env.filters['ticket_events'] = ticket_events 132 132 133 133134 -1 def rent_gross_total(rent):135 -1 return sum(part['gross_amount'] for part in rent)136 -1 env.filters['rent_gross_total'] = rent_gross_total137 -1138 -1139 134 async def fetch(session, *args, **kwargs): 140 135 print('fetch', args, kwargs) 141 136 async with session.request(*args, **kwargs) as response:
diff --git a/templates/index.html b/templates/index.html
@@ -220,18 +220,21 @@ 220 220 <table> 221 221 <thead> 222 222 <th>{{ "financeLocalProduct"|translate }}</th> -1 223 <th class="text-end">{{ "financeAmount"|translate }}</th> 223 224 <th class="text-end">{{ "financeGrossAmount"|translate }}</th> 224 225 </thead> 225 226 <tbody> 226 227 {% for part in rent %} 227 228 <tr> 228 229 <th>{{ part.local_product }}</th> -1 230 <td class="text-end">{{ part.rent_amount }}€</td> 229 231 <td class="text-end">{{ part.gross_amount }}€</td> 230 232 </tr> 231 233 {% endfor %} 232 234 <tr> 233 235 <th>Total</th>234 -1 <td class="text-end">{{ rent|rent_gross_total }}€</td>-1 236 <td class="text-end">{{ rent|sum(attribute='rent_amount') }}€</td> -1 237 <td class="text-end">{{ rent|sum(attribute='gross_amount') }}€</td> 235 238 </tr> 236 239 </tbody> 237 240 </table>