app is now using historical exchange rates for transactions

This commit is contained in:
Matthias Hinrichs
2025-07-05 03:44:53 +02:00
parent a96bbe4d2a
commit aef9342cc5
11 changed files with 926 additions and 237 deletions
@@ -128,7 +128,7 @@ templ PortfolioDetailContent(portfolio model.Portfolio) {
<td>{ fmt.Sprintf("%.2f %s", activity.Amount * activity.Price, activity.Currency) }</td>
<td>
if activity.Currency != portfolio.BaseCurrency {
{ getConvertedTotal(activity, portfolio.BaseCurrency) }
{ getConvertedTotalWithFallbackInfo(activity, portfolio.BaseCurrency) }
} else {
<span class="text-muted">-</span>
}
@@ -194,10 +194,10 @@ templ PortfolioDetailContent(portfolio model.Portfolio) {
</svg>
</div>
<div class="flex-fill">
<div class="font-weight-medium">Währungsumrechnung</div>
<div class="font-weight-medium">Historische Währungsumrechnung</div>
<div class="text-muted small">
Transaktionen in anderen Währungen werden automatisch in { portfolio.BaseCurrency } umgerechnet.
Wechselkurse werden stündlich aktualisiert.
Transaktionen werden mit den historischen Wechselkursen vom Transaktionsdatum in { portfolio.BaseCurrency } umgerechnet.
Bei nicht verfügbaren historischen Kursen werden aktuelle Kurse verwendet (markiert mit *).
</div>
</div>
</div>
@@ -408,6 +408,9 @@ templ PortfolioSummary(activities []model.Activity, currency string) {
<div class="h2 mb-0">
{ formatTotalInvestedWithConversion(activities, currency) }
</div>
<div class="text-muted small">
* = Aktueller Kurs verwendet (historischer Kurs nicht verfügbar)
</div>
</div>
<div class="mb-3">
<div class="text-muted">Letzter Kauf</div>