From c50b54182b8d18ffb175bc4b4dccbd3d484f0327 Mon Sep 17 00:00:00 2001 From: Arne Baeumler Date: Sun, 7 Feb 2021 18:22:50 +0100 Subject: [PATCH] update data --- tmpl/cryptoReport.tmpl | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tmpl/cryptoReport.tmpl b/tmpl/cryptoReport.tmpl index a62e38d..b904844 100644 --- a/tmpl/cryptoReport.tmpl +++ b/tmpl/cryptoReport.tmpl @@ -5,6 +5,9 @@ body { font-family: Helvetica,Arial; } + table { + width: 100vw; + } th { text-align: left; font-weight: bold; @@ -15,12 +18,12 @@ padding: 0em 1em; border-bottom: 1px solid #808080; } - .gain { + .green { font-weight: bold; - color: #f0f0f0; - background-color: #269900; + color: #303030; + background-color: #adebad; } - .loss { + .red { font-weight: bold; color: #f0f0f0; background-color: #cc0000; @@ -34,25 +37,29 @@ [% totalProfit = 0 %] [% FOREACH c IN DATA %] [% gain = f2(c.CURRENT_PRICE / c.LAST_WEEK_PRICE * 100 - 100) %] +[% cur_value = f2(c.CURRENT_PRICE * c.COIN) %] +[% cur_profit_value = f2((c.CURRENT_PRICE * c.COIN) - c.PRICE) %] +[% cur_profit_perc = f2(cur_profit_value / c.PRICE * 100) %] [% c.NAME %] - + + - - + + [% IF gain > 0 %] - + [% ELSE %] - + [% END %]
Währung[% c.NAME %] ([% c.CURRENCY %])
Kaufdatum[% c.DATE %]
Kaufpreis[% f2(c.BUYRATE) %] Euro/[% c.CURRENCY %]
Kaufwert[% f2(c.PRICE) %] Euro | [% c.COIN %] [% c.CURRENCY %]
Kaufkurs[% f2(c.BUYRATE) %] Euro/[% c.CURRENCY %]
aktueller Kurs[% f2(c.CURRENT_PRICE) %] Euro/[% c.CURRENCY %]
aktueller Wert[% f2(c.CURRENT_PRICE * c.COIN) %] Euro
aktueller Profit[% f2((c.CURRENT_PRICE * c.COIN) - c.PRICE) %] Euro
aktueller Wert[% cur_value %] Euro
aktueller Profit[% cur_profit_value %] Euro ([% cur_profit_perc %]%)
7 Tage Gewinn+[% gain %] %
7 Tage Gewinn+[% gain %]%
7 Tage Verlust[% gain %] %
7 Tage Verlust[% gain %]%
-[% totalProfit = totalProfit + f2((c.CURRENT_PRICE * c.COIN) - c.PRICE) %] +[% totalProfit = totalProfit + cur_profit_value %] [% END %]

Gewinn (gesamt) ca. [% totalProfit %] Euro