Update currency handling in models and views: Modify model attributes to specify values in centavos for precision. Adjust CSV export and currency formatting functions to convert centavos to GTQ for accurate display and export.

This commit is contained in:
padreug 2025-07-05 14:59:05 +02:00
parent f32e1bb9ae
commit d2866276a9
3 changed files with 13 additions and 11 deletions

View file

@ -199,7 +199,7 @@ async def api_export_transactions(
writer.writerow([
tx.created_at.isoformat(),
tx.amount_sats,
tx.amount_fiat, # Values are already in full currency units
tx.amount_fiat / 100, # Convert centavos to GTQ for CSV export
tx.exchange_rate,
tx.transaction_type,
tx.status