fixed and nicer output, added charts
This commit is contained in:
parent
170ad50652
commit
d3714630b2
@ -37,7 +37,7 @@ function webpage_transactions {
|
|||||||
local f_tax_year
|
local f_tax_year
|
||||||
cat ALL_TRANSACTIONS_OVERVIEW.csv | cut -d- -f1 | sort -u | while read f_tax_year
|
cat ALL_TRANSACTIONS_OVERVIEW.csv | cut -d- -f1 | sort -u | while read f_tax_year
|
||||||
do
|
do
|
||||||
echo "========== Tax year $f_tax_year (German Tax Law) =========="
|
#echo "========== Tax year $f_tax_year (German Tax Law) =========="
|
||||||
local f_exchange_tax_type
|
local f_exchange_tax_type
|
||||||
cat ALL_TRANSACTIONS_OVERVIEW.csv | grep "^$f_tax_year-" | cut -d, -f 2,13 | sort -u | egrep -v ',$' | grep -v "Note: " | while read f_exchange_tax_type
|
cat ALL_TRANSACTIONS_OVERVIEW.csv | grep "^$f_tax_year-" | cut -d, -f 2,13 | sort -u | egrep -v ',$' | grep -v "Note: " | while read f_exchange_tax_type
|
||||||
do
|
do
|
||||||
@ -45,9 +45,9 @@ function webpage_transactions {
|
|||||||
local f_tax_type=$(echo $f_exchange_tax_type | cut -d, -f2)
|
local f_tax_type=$(echo $f_exchange_tax_type | cut -d, -f2)
|
||||||
|
|
||||||
local f_tax=$(cat ALL_TRANSACTIONS_OVERVIEW.csv | grep "^$f_tax_year-" | cut -d, -f 2,13,14 | egrep -v ',,0$' | grep "$f_exchange_tax_type" | cut -d, -f3 | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM) }")
|
local f_tax=$(cat ALL_TRANSACTIONS_OVERVIEW.csv | grep "^$f_tax_year-" | cut -d, -f 2,13,14 | egrep -v ',,0$' | grep "$f_exchange_tax_type" | cut -d, -f3 | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM) }")
|
||||||
echo "$f_exchange_tax_type: $f_tax"
|
#echo "$f_exchange_tax_type: $f_tax"
|
||||||
|
|
||||||
echo "$f_tax_type: $f_tax EUR<br>" >>${g_tmp}/tax_summary_$f_exchange-$f_tax_year
|
#echo "$f_tax_type: $f_tax EUR<br>" >>${g_tmp}/tax_summary_$f_exchange-$f_tax_year
|
||||||
|
|
||||||
echo "<html>
|
echo "<html>
|
||||||
<head>
|
<head>
|
||||||
@ -88,31 +88,5 @@ $(cat ${g_tmp}/tax_summary_$f_exchange-$f_tax_year)
|
|||||||
echo ""
|
echo ""
|
||||||
done
|
done
|
||||||
|
|
||||||
## Overview over Overviews
|
|
||||||
echo "<html>
|
|
||||||
<head>
|
|
||||||
<meta charset='UTF-8'>
|
|
||||||
<meta http-equiv='refresh' content='${INTERVAL}'>
|
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
|
||||||
<link rel='stylesheet' type='text/css' href='/browser.css'>
|
|
||||||
<link rel='stylesheet' type='text/css' href='/charts.min.css'>
|
|
||||||
<title>Trading Overview</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Transaction Overviews</h1>" >../TRANSACTIONS_OVERVIEWS.html
|
|
||||||
|
|
||||||
|
|
||||||
local f_html f_name
|
|
||||||
ls ../TRANSACTIONS_OVERVIEW-* | while read f_html
|
|
||||||
do
|
|
||||||
f_html=$(basename $f_html)
|
|
||||||
f_name=$(echo $f_html | cut -d- -f2,3 | cut -d. -f1)
|
|
||||||
echo "<a href='${f_html}'>$f_name</a><br>" >>../TRANSACTIONS_OVERVIEWS.html
|
|
||||||
done
|
|
||||||
echo "$(cat ALL_TRANSACTIONS_OVERVIEW_WARN.csv | cut -d, -f1,2,20)<br>" >>../TRANSACTIONS_OVERVIEWS.html
|
|
||||||
|
|
||||||
echo "</body></html>" >>../TRANSACTIONS_OVERVIEWS.html
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user